* fix: reject oversized git ref files in workspace status reads
refs #3343
* fix: treat oversized loose refs as unavailable instead of absent
refs #3343
* fix: classify git ref read errors instead of probing path existence
A loose ref behind a metadata or I/O error (for example an unsearchable
refs/heads directory) previously read as absent, because Path::exists()
also returns false on metadata errors, letting a stale same-name
packed-refs OID enter the workspace status fingerprint. The reader now
classifies the open error itself: NotFound and NotADirectory mean the
loose ref is absent (packed-refs fallback stays legitimate), every other
error marks the ref unavailable with no fallback. This also removes the
racy second existence probe.
refs #3343
* fix: reject empty loose git refs
refs #3343
* fix: reject dangling loose git refs
refs #3343
* fix: reject dangling git refs with invalid target paths
refs #3343
Closing a focused pane handed focus to the next pane in tree order.
For a pane opened beside another one -- a plugin split, a file viewer,
any transient tool pane -- that is rarely where the user was: it lands
on some unrelated neighbour rather than the pane that opened it.
Track the pane focus came from in TileLayout and prefer it when the
focused pane closes, falling back to tree order when there is no
history, when it points at the pane being closed, or when it points at
a pane that has since gone away. The history lives in the layout, so it
can only ever name a pane in the same tab.
A one-slot history is only sound if internal focus excursions never
write it, so the tree edits that used to bounce focus around now go
through target-taking primitives instead. close_pane removes a
background pane directly, so detach_pane and take_pane_for_move stop
focus-close-refocusing. split_pane splits a target without moving
focus: the runtime split path only focuses the new pane once the spawn
succeeds, which makes a failed split a pure rollback, and the targeted
and unfocused workspace split paths stop fabricating history.
insert_pane_near now takes the focus intent, so an unfocused pane move
leaves the target tab's history alone. The layout-level focused-split
helpers become test-only; production splits all flow through the
target-taking path.
Co-authored-by: Can Celik <ogulcancelik@gmail.com>
Make herdr persistent by default.
Launching herdr now starts or reattaches to a background session
server. Clients can detach and reattach while panes and agent
processes keep running. Session mode now supports multi-client attach,
auto-detect startup, and a thin-client/headless-server split.
This also refactors the large app, ui, input, pane, config,
workspace, and persistence modules into smaller focused submodules,
while preserving behavior and colocating tests with the code they
exercise.
Upgrade notes:
- persistence mode is now the default
- in-app quit detaches the current client instead of stopping the server
- use `herdr server stop` to stop the background session
- use `--no-session` for the old single-process behavior
- default socket paths now live under the config directory