Repository navigation
perf(titlebar): coalesce the hidden OS title and fix the title label's width - #817
Conversation
umputun#548 moved the title write off the full blend, but NSWindow.title is still assigned on every OSC title tick. WindowAppearance.sync hides it and the custom header draws the visible title, so it only feeds the Window menu, Mission Control and the window switcher. Each assignment runs AppKit's title machinery (NSWindowTitleController, NSTitledFrame.setTitle), about 1.3 ms, which an agent's spinner pays ~10 times a second; umputun#548's own profile still shows _dosetTitle at 213 ms. The first write after a quiet interval lands at once, later ones within 0.5 s collapse into one trailing write carrying the final value. Blend-pass writes stay immediate and do not restart the interval, so a title set right after attach is not deferred.
…ayout The title label sized itself to its text, so the titlebar HStack — and through it the window's outer ZStack — recomputed geometry whenever the string changed. An agent animating its terminal title does that ~10 times a second, and every frame measures the same: NSFont metrics put all ten of codex's braille glyphs at exactly 92.6016 pt for "<glyph> whatsintown", and claude's ◐◑◒◓ cycle likewise. The layout was recomputed to reach a width it already had, at ~2 ms/tick in _ZStackLayout.sizeThatFits. Let the label request the full gap up to the buttons instead. Its size stops depending on the string, so the geometry no longer propagates; the text still redraws on every tick. Preferred over caching measured widths by string, which would mean reproducing SwiftUI's own font metrics — a half-point disagreement shows up as a truncated title.
|
measured on top of #547/#548, same harness shape as in #516: a session writing only an OSC 2 title at a drift-corrected 10 Hz with no screen output, logging its tick count; quiet controls stop it with SIGSTOP and must record zero ticks. Debug builds of CPU from
attribution from
|
umputun
left a comment
There was a problem hiding this comment.
two small things before merge, plus one optional.
agterm/Views/WindowAccessor.swift:65 - nothing tests the coalescing, so a revert to a direct write keeps every test green. Fix: one case in WindowAccessorTests. Let the attach blends drain first (the existing titlebarSeparatorStyle check), then setTitle("a") shows "a" at once, setTitle("b") and setTitle("c") still show "a" after a 50 ms drain, and "c" arrives within ~1 s.
agterm/Views/WindowAccessor.swift:11 - "written on every change" is no longer true. Fix: /// The OS window title; rapid changes are coalesced, see setTitle.
agterm/Views/WindowContentView+Titlebar.swift:71 - the comment describes the old code, and your numbers show _ZStackLayout.sizeThatFits dropping by a quarter to a third rather than going away. Fix: say what the frame does now, e.g. // fixed-width slot, so the label's width stays put while an animated title ticks (#516).
optional: the zoom titlebar (WindowContentView+Zoom.swift:39) uses the same titleLabel without the frame, so a zoomed session keeps the old layout cost. Moving the modifier into titleLabel covers both rows.
nothing tested the coalescing itself, and the zoom titlebar uses the same label without the fixed-width frame, so it kept the text-sized layout cost. Related to umputun#516
* fix(settings): hold the locked keyboard layout in HTML overlays Lock in terminals released the layout whenever an HTML overlay page took the keyboard, so typing in a page reverted to the earlier layout while program overlays and the HUD kept the lock. The lock now holds while the first responder is a live terminal surface or anything inside an HTML overlay page, page fields included, and the web view rechecks it on both focus changes so moving between a page and the palette or an ask dialog restores and relocks the layout. * feat(cookbook): add subagent-status recipe (#906) A Claude Code session's info line counts its subagents and shows the latest one's tool call, the row stays active until the last subagent stops, and a chord pages one subagent's transcript in an overlay. Built on `session info` from #864, as agreed in Discussion #713. Verified live against Claude Code 2.1.299 in an isolated Debug build. * docs(troubleshooting): document screenshot read failures in Live panes a screenshot thumbnail dropped into a Live pane inserts its path, but a tool that opens the file gets `Operation not permitted`, so Claude Code drops the image silently. In the reported case agterm had no Full Disk Access, and granting it made the same read from the same pane succeed with no restart. Fixed #903 * fix(cookbook): address subagent-status review follow-ups - a running subagent whose claude is gone counts as finished: each start records the claude pid beside the status, so a claude killed mid-run no longer holds completed or the count after --resume - the ancestry walk reads argv and takes a node/bun/deno runtime's first argument, so an npm-installed claude is found - the picker opens with the shown subagent when it is the only one, since a HUD over the running viewer is refused - README: the info line belongs to the session, other session info callers overwrite it, and AGTERMCTL/AGT_SUBAGENT_STATE must be set on the keymap line too because settings.json env does not reach the chord * feat(sidebar): add option to hide workspace chevrons (#909) * feat(sidebar): add option to hide workspace chevrons settings > Interface > Sidebar gets a "Workspace chevrons" toggle so rows can take the chevron's width in a narrow sidebar. Hidden chevrons move every row left, and the flat and plain flagged lists, which never draw one, drop that empty strip too. The workspace row menu gains Collapse/Expand Workspace, so the row click and chevron settings stay independent and a workspace can still be folded by mouse with both off. the chevron is hidden through an empty frameOfOutlineCell, because AppKit refuses collapseItem for an item whose shouldShowOutlineCellForItem is false. Related to https://github.com/umputun/agterm/discussions/907 * fix(sidebar): key the left inset on the dropped strip the flat and plain flagged lists drop the disclosure strip whatever the chevron setting is, but the scroll inset followed the setting, so toggling Workspace chevrons shifted those lists 2pt with no chevron in sight. The inset now reads the strip flag and is re-applied on every rebuild, since switching between the tree and the flagged view never reaches the appearance path. Related to https://github.com/umputun/agterm/discussions/907 * chore(release): prepare v0.41.0 * docs(backlog): record the spam-8 stall at new-2 in run 42292892846 * docs(backlog): record the attach-exit miss in run 42295772822 [skip ci] * fix(sidebar): remember the last tint Show On pick for new tints the row menu's Tint submenu started every untinted row on the icon, so picking Name or Icon and Name on one row never carried to the next, and None followed by a new color dropped back to the icon too. the menu now keeps the last Show On pick in memory for the app run. A color picked from the menu for an untinted row starts on it, and Show On shows it checked there while staying disabled. Tinted rows keep their own placement. The palette and `session tint` without `--on` keep the icon default. * fix(ghostty): skip a repeated title while the same one is still queued (#911) * fix(ghostty): skip a repeated title while the same one is still queued libghostty hands over every OSC title a program writes, and each SET_TITLE callback queued its own main block. A program writing one title in a loop put tens of thousands of blocks on the main queue, behind which control requests waited. TitleAdmission, one per pane, skips a title while an identical one from that pane is still queued, since applying it again would change nothing; a different title, or the same one after the queue drains, is queued as before. The zmx lead and remote link notices bypass it. Measured locally with eight producers writing titles: titles reaching main fell from 1.68M to 290k over six seconds, the peak backlog from 34k blocks to 11, and tick time from 179 to 116 ms per 250 ms window. libghostty still delivers every title through its tick, so this is an optimization; whether it ends the CI spam-8 stall is unproven. * ci(teardown): keep the stuck spindump stackshot, record the spam-8 run the CI collectors attach to a stalled app and then lose the report while symbolicating. Spindump now runs with -noIPC, and a raw stackshot a stuck spindump saves under /var/tmp is copied into the case folder, readable later with spindump -i; a failed copy is recorded as stackshot_errors and never skips the app cleanup. the backlog item gains run 42302198754 and the title-flood measurements. * fix(menu): enable Attach Remote from the first menu evaluation (#912) the first menu evaluation read remotes through an unwired actions.settingsModel and disabled Attach Remote. Assigning the model later emitted no observation change, leaving the item disabled until another menu rebuild. Wire it during initialization so the first evaluation sees configured remotes and observes future changes. * docs(backlog): record what libghostty-vt 1.0.0 means for the ghostty pins [skip ci] The vt-1.0.0 stability promise covers only the libghostty-vt C ABI, not ghostty.h or zmx's Zig import. The tag still lacks the surface teardown drain, so GHOSTTY_REV stays, and its nullability markings break several Swift call sites in the bridge on the next bump. The zmx formatter patch is fixed upstream at the tag and can go with the zmx move to Zig 0.17. * perf(titlebar): coalesce the hidden OS title and fix the title label's width (#817) * docs(claude): build contributor PRs on master's dependency pins [skip ci] * docs(skill): show changes as per-file .diff links a multi-file patch has no file list in the text viewer. Per-file links let the user choose which changes to open. * feat(text): step between changes in diff pages (#916) * feat(text): step between changes in diff pages full-context patches can put every change in one hunk. Add change navigation with ] and [ and bar buttons, so the user moves between edits without searching or scrolling. agtermctl session overlay changes --next|--prev exposes the same action, with the count and current change in htmlOverlays[].text.changes. * fix(text): reset the diff page change after a reload's read the old page stays live while a reload reads the file, so a step there set the change again and the reloaded page opened on it. The report is still cleared before the read; the change now resets after it. * feat(links): render cmd-clicked html files in the overlay (#917) A clicked .html or .htm path was revealed in Finder. It now opens over its session like a clicked markdown file, themed like an --html page. Terminal output named the file, so it is untrusted: the page gets no file grant, no control bridge and no page JavaScript, and a refused or unreadable file is still revealed. Opening it makes no network connection: a CSP blocks subresources and a content rule list blocks the preconnect and DNS-prefetch hints the CSP does not cover. A presenting Mac shows it only when it supports the new page source. Clicking a link may still connect to its host before the browser prompt. * fix(zmx): give the quit-time listing 300 ms so slow daemons keep their commands the Live exit capture read every pane's foreground from one zmx list capped at 0.1 s. The listing probes daemons one at a time, so with many busy daemons it can run past that limit. A failed listing left every reattached pane with no command, because its pending one was already consumed at attach, and a later reboot restored bare shells. Fixed #915 * docs(cookbook): name each recipe's author and route recipe fixes by author the cookbook promised a fix for any reported recipe without saying who wrote it. Authorship is now visible, so readers and agents send changes to contributors' recipes as pull requests, and keep issues for bugs in @umputun's own recipes and in agterm itself. * feat(text): color diff pages by file language over row bands (#921) a `.diff` or `.patch` page used highlight.js's `diff` grammar, which colors whole added and removed lines green and red and never the code in them. Now each file's code is colored in its own language, the way webrev's diff view does it. - agtermCore maps every `---`/`+++` header path to a language with the existing extension table and hands the map to the page as `data-files`, so a multi-file `git diff > all.diff` colors each file in its own language, CRLF patches included - each hunk's old and new sides are highlighted whole, so a comment or string opened on an earlier row keeps its color, and none leaks across the lines a patch leaves out between hunks - added and removed rows get green and red background bands mixed from the theme's palette, drawn under the text. The `+`/`-` column is hidden at zero width and stays in the text, so search, copy and `]`/`[` change stepping still read the file as written; header rows stay dimmed - past the 256 KB highlight cap the bands and hidden markers remain and the code renders plain. A near-4 MB diff renders in about 2 s, against 0.5 s for a plain 4 MB log - a context, normal or combined diff has no unified hunk and keeps the `diff` grammar `htmlOverlays[].text.language` stays `diff`. Wrapping long lines on diff pages is recorded in `docs/backlog/diff-pages-do-not-wrap-long-lines.md`. * chore(release): prepare v0.41.1 * feat(cookbook): add multi-agent Git info recipe Combine Claude Code and Codex worktree snapshots on a session's sidebar line. Serialize updates across panes and remove stale participants on refresh. * docs(backlog): defer local markdown link navigation [skip ci] * Forward cmd-clicked file paths from an attached session to its Mac (#923) * docs: add remote link click forwarding plan * feat(links): route a remote pane's file paths to a forward hook * feat(remote): add link.click and link.refused presentation frames * refactor(links): move the link overlay helpers into their own file * feat(remote): open a forwarded click's page on the presenting Mac * feat(remote): forward a remote pane's clicks and report refusals * docs: describe forwarded clicks from an attached pane * fix(remote): let a click after a refusal travel and refuse over a hidden local page * docs(plans): move the remote link click plan to completed * fix(cookbook): codex-session-resume records the tab's conversation from a SessionStart hook (#914) * fix(cookbook): codex-session-resume records the tab's conversation from a SessionStart hook The function mapped a tab to whichever rollout file under ~/.codex/sessions/ was newest when codex exited. Any codex on the machine writes there: a `codex exec` that another agent in the same tab runs for a review, a codex in another tab, a desktop app that embeds codex. On a machine running review agents beside an interactive codex, tabs got mapped to those runs and resumed a review conversation or one another app owns. The README already named this race. A SessionStart hook now writes the mapping from the session id Codex hands it. The function starts codex with CODEX_AGTERM_TAB=<tab-id> and blanks the variable for codex's tool commands with shell_environment_policy.set, since Codex starts a local hook from its own process environment. --no-daemon keeps the hook in that process. Codex fires the hook at the first turn, so a tab is mapped while codex still runs, and /clear moves the mapping to the new conversation. The function drops its own flags from an argv agterm replays, so a restored `resume <id>` is decided again from the mapping instead of passing through. * fix(cookbook): codex-session-resume skips the memory session and a typed --no-daemon Review fixes for codex-cli 0.167.0. The function prepends its own --no-daemon, and codex refuses the flag twice, so `codex --no-daemon` did not start. A typed one is now dropped on the launches the function manages. Words after `--` are prompt text and are kept. Codex's background memory session fires SessionStart in the same process with a null transcript_path and an id that has no rollout. The hook recorded it over the tab's mapping, so the next codex started fresh. An event without a transcript path is now skipped. The passthrough list gains agents, queue, migrate-rollouts and migrate-nfs-db. A rollout kept only as rollout-*.jsonl.zst is found: a compressed root counts for the child to root repair, and a mapped id with only a compressed rollout is resumed as it is. * docs: add markdown local-links implementation plan plan for markdown overlays following relative links to neighbouring .md files with WebKit back/forward, locally and on pages shown from another Mac. CLAUDE.md gains the working norm that a session attached from another Mac gets every capability a local one has. * feat(markdown): add link grant, linked-document check and render.js link filter task 1 of the markdown local-links plan. MarkdownLinkGrant holds the canonical file and folder a link page may follow links within; linkGrant refuses a relative path, a non-markdown target, and a folder that is / or home. linkedDocument accepts only a markdown-spelled request whose canonical target is markdown strictly inside the root. render.js keeps relative links to neighbouring markdown files when the page carries data-links, and remote picture references skip markdown-spelled paths. * test(markdown): pin WebKit scroll restoration on scheme-served link pages task 2 of the markdown local-links plan. a hosted test serves two long markdown documents through HtmlPageSchemeHandler with content JS off and render.js at document end, and checks that a fragment link lands at its heading, Back and Forward restore the scrolled positions, and plain and theme reloads keep the position and the history list. * fix(settings): hold the locked keyboard layout in every agterm window Lock in terminals held the layout only while a terminal surface or an HTML overlay page had the keyboard. The palette, pickers, ask dialogs, the find bar and rename fields released it and accepted another layout, while a field inside an overlay page kept it. The lock now holds whenever any agterm window is key, whatever has focus inside it, and the earlier layout returns when focus leaves agterm. The setting is renamed Lock in agterm; its stored key is unchanged. Focus moves inside a window no longer change the decision, so the refresh calls from terminal surfaces and HTML overlay pages are removed, along with the tests for the per-responder check. * Convert a running session into a companion (#926) * docs(plans): add convert to companion plan * feat(companions): convert a top-level session into a companion in the store * fix(companions): reopen a companion under its parent's current group root * feat(control): add session.companion.convert and agtermctl session convert --companion * feat(companions): add Convert to Companion to the Session menu, row menu, palette and keymap * docs(companions): document Convert to Companion and session convert --companion * test(zmx): give the slow-listing capture test more headroom under load * docs(plans): record convert to companion gate results * docs(companions): state the parentID contract conversion and reopen keep * test(zmx): drop the extra process from the slow-listing capture fixture The fake zmx ran /bin/sh plus /bin/sleep, two process starts on top of the delay, and under the full hosted suite it finished within 13 ms of the 300 ms capture budget. It is now one zsh -f process that waits 120 ms with the zselect builtin and exits 2 if the module does not load. It still fails against the old 100 ms budget. The cause of the earlier timeouts, a slow child or a late termination callback, was not observed at a failure, and the production budget is unchanged. * docs(plans): move convert to companion plan to completed * feat(companions): group the companion items in their own menu section * feat(markdown): follow local markdown links in the overlay with back and forward A clicked markdown file opens with navigation and a link grant: its canonical path and folder. The page loads through the agterm-page scheme, so WebKit resolves relative links and keeps history and scroll. The policy allows only this page's own address with a markdown path inside the folder. The page source checks every read, the first file included, with linkedDocument and reads at the requested path, so pictures and links share one base. A link that cannot be read keeps the shown page; a failed first load still fails. The replica markdown builder moves into MarkdownPageSource unchanged. * feat(markdown): follow local markdown links on pages shown for another Mac The origin sends the link grant it froze at open in PresentationPage and serves the page with it: a markdown-spelled request only through linkedDocument, the original included, as text; anything else only as a picture inside the grant's folder under the signature rule. The presenter loads the grant's path through its scheme handler and builds each linked document from the origin's bytes with links on, so Back and Forward work as on a local page. The grant goes only to a presenter listing page.links. Any other gets the page without links or navigation, in the request and in the record the origin serves from, so an older viewer keeps the rules it knows. Page companions stay without a grant. HtmlReplicaLink and its bounded read move into their own file, which keeps the registry under its length limit. * docs(backlog): re-file the app-rooted session-host daemon item [skip ci] Reverses the 71a9483f drop. The seventh sighting, on zmx with the 0003 staged publish, still shows "created" followed by FileNotFound, and reading zmx found a remover that logs nothing: when daemonize fails in the forked child, the caller's error branch deletes the session name in that child. Adds the 2026-11-07 failures and the 2026-11-08 runs, none of which reproduced it under either trace. * feat(markdown): accept --navigation on a markdown page opened over the control API session.overlay.open --markdown FILE --navigation now opens a link page. The dispatcher and the CLI accept the flag beside --markdown and name it in their error texts. The app computes the link grant right after its file check, so a file whose canonical folder is / or home opens with links as text and no navigation. Markdown page companions stay refused, with or without the flag. The markdown UI test follows a link, reads the page and history back, and navigates back. * Open an HTML page as a session of its own (#930) * docs(plans): add top-level page sessions implementation plan [skip ci] * feat(companions): allow Convert to Companion on a top-level page row Convert to Companion was blocked for any page in the palette, Session menu and keymap while the sidebar offered it, so the same row had the action on one surface and not another. Pin a page row as a companion parent: companions land under it, a page companion's New Companion lands under its root, and closing the root closes the group with one undo. * feat(pages): save and restore every local page row A page row was never written to disk, so a page and its companions vanished on relaunch, and closing a page parent lost its companions from Recent Closed. A local page row now saves its file or URL source and page options, restores as a page row in every restart mode after its group is placed, and opens its page there; a load that fails leaves the row in the failed state with reload. Recent Closed records a page group whole and reopens its pages. A page owns no daemon, so the zmx claim walk, the identity upgrade and the launch spawn plan skip it. * feat(pages): create a top-level page session with session.page A page could only be opened as a companion. session overlay open --html|--url --page now sends session.page, which opens the page as a top-level row right after the target's whole group, in the target's working directory; a remote target only places it, the page is always local. It takes the same file and URL sources and full-size rules as --companion, --follow selects the new row, and an older app answers that it is too old for page sessions. The page-row refusal now names a page session. * fix(pages): close a page row from window.close through the session close A page calling window.close() hard-closed its row with no confirmation or undo, and a page row can now own terminal companions. A page row's window.close() now goes through the app's session close, honoring the close confirmation and the grace-period undo, and is spent once handed off so a cancel or an undo does not ask again; an overlay over a terminal still closes only the overlay, and control close and submit keep their non-prompting path. The failed-page view gets its own Reload, so a page without --navigation, or a chromeless one, can be retried once its file or server is back. * docs(pages): trim page persistence and close comments * feat(remote): attach a page-rooted group from another Mac Another Mac listed a page only under an attachable terminal parent, so a top-level page and its companions could not be viewed remotely. zmx tree now lists this Mac's own top-level pages with their full companion list and no daemon, and never re-lists a row attached from another Mac. The viewer attaches a page root as a top-level replica row, rechecking its window and workspace after the handoff, and page bindings carry the origin endpoint so companions attached later land under it. attach.group starts from a page root through the page path, and the picker offers page roots while still hiding page companions. * docs(pages): one-line isPersistable doc * docs(pages): document top-level page sessions The user guide, command reference, llms.txt and the agent skill describe session.page and --page, page rows as companion parents, page restore in every mode with the failed-row Reload and the launch-time --js bridge, page window.close() through the session close, and attaching a page-rooted group from another Mac. Refusals that now cover any page row name a page session. * docs(pages): scope remote and restore docs to page rows Remote attach text required Live mode and a presentation stream for every attach, while a page row needs no daemon and uses only its page channel. The restore note now says a saved --js page has full control of agterm, the skill description names page sessions, and the remote page contract covers New Companion and channel loss on a page root. * docs(plans): record page sessions gate results [skip ci] * fix(pages): keep unreadable saved pages and pick-blocked closes A saved page entry this build cannot read (a non-web URL, a wrong type, a source kind from a newer build) decoded to no page at all, so the row came back as a terminal with a fresh shell and, in Live mode, a daemon, and the next save made it one for good. It now restores as a page row in the failed state with its companions, owns no daemon, is never handed to another Mac, and saves back as the same unreadable marker. A page row's window.close() was dropped while the frontmost window was zoomed, on its dashboard or showing a picker. It now runs the normal confirmation and close in the page's own window, waits only while a picker is pending there, and is retried when that picker ends. * docs(skill): keep the agterm skill description within 1024 characters The page-session clause pushed the description to 1113 characters, over the limit SkillInstallTests enforces. The clause is shorter and three words whose triggers live in when_to_use are gone. * docs(pages): tighten page close and unreadable page comments * docs: mention page sessions in the README and complete the plan [skip ci] * docs(claude): note the no-socket background launch fallback [skip ci] * docs(plans): record blocked page sessions validation * docs(plans): record the page session UI test pass * docs(backlog): record pidfile stalls and an early attach exit [skip ci] One core swift test run beside make test-app timed out 7 consecutive SessionHostServerTests in Fixture.start, with no pidfile seen within 5 s. 132 starts under load did not reproduce it; the item keeps the amfid timeline and what to capture at the timeout next time. The app-rooted daemon item gains an eighth sighting: the attach client exited 1 right after "created" in the host-free suite, so the route is reachable outside hosted tests. * docs(markdown): describe link pages across the guide, reference, skill and rules [skip ci] The user guide, the command reference and the agent skill now cover --markdown --navigation: relative links to markdown files in the folder or below open in place with back and forward, a file directly in / or home keeps its links as text, and a page shown on another Mac follows its links there unless that agterm is older. The control-api rules add the link-page contract and the remote grant gate, and CLAUDE.md scopes the not-a-browser rule to what it declines. * docs(markdown): scope the textLoaded comment to markdown pages without a link grant * fix: preserve sidebar editor during updates (#924) Co-authored-by: Sergey Yakushenok <[email protected]> * fix(cookbook): isolate unavailable Git-info panes (#927) Skip surfaces without a pane ID and isolate Git read timeouts so the other pane can publish and exit removal is saved. Use a stable cat process in the hard-kill regression instead of a re-execing Python. Refs #922 * docs(backlog): record missing far-side session id read-back [skip ci] * test(sidebar): assert a workspace collapse ends the open rename collapsing the renamed row's workspace ends the edit on its own, so the test's fallback resign never ran and hid whether the collapse does it. Assert it right after the collapse instead. The onRenameEnded doc also names the beginEditing path that fires it when the field cannot take focus. * feat(text): wrap long lines on text, log and diff pages (#934) A text page showed long lines only by scrolling sideways. Its bar now has a Wrap button and the page takes w to toggle it. A wrapped line keeps its number on its first row: every row is one line box of the same height, so the page places each line's start from the newline ending the line before and the end from the code element's last fragment, and the gutter, the requested-line band and a diff's added, removed and current-change bands read those rows. A toggle keeps the line under the bar in place, or a following log at its end, and a narrowed wrapped following log stays at its end. session.overlay.wrap on|off|toggle sets it from control and answers wrapped or unwrapped; it reads back as htmlOverlays[].text.wrap, omitted while unwrapped. The state lives on the page's model, starts off and survives theme rebuilds and reloads; the page's own toggle writes the model and the bridge's record, and every model change is pushed back, so a control call crossing a click ends on the model's value. A slot shown on a presenting Mac is refused, as search is; a page shown for another Mac keeps its toggle in the page alone, unreported and dropped by a redraw. The bar's left inset now matches the find box's right one. Below 480px a paused log's Follow button shows only Resume, and the log's status note shrinks faster than the search box, so a narrow bar keeps Wrap and every search control in view. * docs(cookbook): allow a README screenshot in a recipe directory [skip ci] * docs(backlog): name the remote session id field and its event ordering [skip ci] * docs(backlog): record session paste clipboard round trip [skip ci] * feat(control): report an attached row's remote session id `tree` session nodes and the `remote.opened` / `remote.closed` payloads now carry `remoteSessionID`, the origin's id the row shows, for every attached row: terminals, companions and page rows. `remote.opened` fires inside `addSession`, before `bindRemote`, so the id is fixed on `Session` at construction like `remoteHost`. A hook can now record which remote sessions a window showed and attach them again after a relaunch (#932). Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(control): finish remoteSessionID on the reference pages zmx attach names remoteSessionID among its read-back fields, the hooks Kinds paragraph lists it on remote.opened / remote.closed, and both command references spell out the remote events' human line. The Session.remoteSessionID doc comment gives the real construction-time reason: addSession emits remote.opened before bindRemote runs. Related to https://github.com/umputun/agterm/pull/937 * fix(zmx): focus the left pane of an attached split session The ordinary new-split path focuses the right pane. The stored focus must be left so a group member attached in the background also opens on the left when selected later. Following the origin's focused pane would need a new field in the remote listing. * feat(cookbook): annotate pane output and Claude's replies in plannotator-tui (#936) * feat(cookbook): annotate pane output and Claude's replies in plannotator-tui Two chords open plannotator-tui in a floating overlay: the selection or the pane's last 50 lines, or Claude Code's newest reply. plannotator-tui hands feedback to an agent only through the Herdr CLI, so annotate.py runs its Herdr pane entrypoint with HERDR_BIN_PATH pointing at plannotator-host.py, which answers the three calls the viewer makes; Herdr is not needed. Once the overlay closes the last send is pasted with session paste --pane, unsent for pane output and submitted for replies. * fix(cookbook): reply notes are submitted only while Claude runs in the pane The replies chord pressed Return whenever the pane did not report a bare shell. A scratch pane and a process macOS will not show report no foreground at all, and an ssh session reports one, so after Claude exited there the notes reached a shell: a backtick fence ran as command substitution and a quoted "> README.md ..." line truncated the file. annotate.py now reads the foreground again after the viewer closes and submits only when an argv element matches CLAUDE_FG_MATCH, the pattern agent-reset uses; everything else gets the notes pasted unsent, with a banner saying so. A second press now names the lock in a banner, and SIGTERM unwinds through the cleanup, so a killed viewer no longer drops later presses silently. The log moves under $TMPDIR beside the lock. The README says the sibling recipe's Stop hook serves both recipes, and Limits covers scratch replies arriving unsent and destinations with bracketed paste off. * docs(backlog): record that ghostty global keybinds are inert [skip ci] * feat(cookbook): add project session picker Add a Television picker for focusing sessions or opening zoxide folders, reusing matching sessions and creating new ones when needed. Document setup and usage. * Take the new-session folder from the destination workspace (#873) * Take the new-session folder from the destination workspace In "Current session's directory" mode, the "+" on a workspace row and its New Session item took the folder from the selected session even when that session lived in another workspace. The folder now follows the same rule as placement: the selection only when it is in the destination workspace, else that workspace's most recent session, else today's rule. Claude-Session: https://claude.ai/code/session_018MUCCPGKJQVFrJZdXhkPc4 * Read the new-session folder from the clicked window's store New Session from a workspace row's menu in a background window took the folder from the frontmost window's selection, because resolvedNewSessionCwd looked the workspace up in AppActions.store. It now takes a required store, like resolvedNewSessionIndex, and both callers pass theirs. Claude-Session: https://claude.ai/code/session_018MUCCNvVvjPZK4vJSDBiu6 * feat(status): add a checkmark status shape the agent-status glyph can draw a check, in Settings and through `session status --shape checkmark`, so `completed` can read as done. SF Symbols has no filled checkmark, so the shape draws the `checkmark` stroke at heavy weight in the sidebar, the Settings picker and the attention list. At regular weight it paints about a third of `bolt.fill`, the lightest filled shape, and heavy was picked by eye in a real sidebar row. a Mac on 0.41.x that attached a session advertises `status.shapes` but decodes only the eleven shapes it knows, so a twelfth would fail the frame and drop its presentation stream into a reconnect loop. The origin now clears `checkmark` for a viewer that does not advertise the new `status.checkmark` kind, which draws its Settings shape instead, and keeps every shape that viewer can decode. Related to https://github.com/umputun/agterm/discussions/940 * docs(backlog): record that a stuck stackshot name drops teardown evidence [skip ci] master run 42663853160 stalled spam-8 on `agtermctl tree` and saved a stuck stackshot, but its name carries colons, which actions/upload-artifact rejects, so the run uploaded no surface-teardown artifact at all. * fix(cookbook): annotate drops a stale outbox and stops claiming Claude is absent (#946) A viewer that outlived its script, after a SIGTERM or after a SIGKILL and a removed lock, could still write outbox.jsonl. The next review closed without sending then read it as its own send and pasted the old notes, and the replies chord submitted them. The capture and the outbox are now cleared as soon as the lock is taken. The unsent banner said Claude was not running whenever the foreground did not match, including when it could not be read. In the scratch pane that is every press, so it now says the script could not confirm Claude runs there. * docs(settings): describe the new-session folder's first-session fallback a workspace whose sessions were never selected gives a new session the folder of its first session, and only an empty workspace falls back to the selection. The settings rule and the newSessionDirectorySource doc named the selection for both cases, and following them would bring back the folder from another workspace that #873 removed. The resolveNewSessionCwd doc still named the active session as the source. The test now covers that fallback, and its recency case expects a session that is neither the first nor the last, so picking either end fails it. * docs(backlog): record a local failure of the attach-to-ended-command test [skip ci] the full agtermCore suite on a loaded machine hit the same 3 s stall CI did, and the test passed when run alone right after. * docs(backlog): record that the exit capture test misses its listing in full runs [skip ci] it failed again in a full hosted run and took the whole 300 ms budget when it passed alone, so the record moves out of a completed plan. * fix(text): show terminal colors in text and log pages a log written with terminal color codes showed ESC as a box glyph and the codes as literal text, so the lines were hard to read and lost the colors their writer added. The page now shows those colors and keeps search on the text it shows. A colored diff needs the same stripping in its header rows, or it loses its change steps and syntax highlighting. the shared escape stripper also drops the ESC ( B that `tput sgr0` writes, so a custom command's failure panel no longer shows a stray B either. * fix(text): drop DCS and APC strings and ignore private CSI in log colors a log captured from tmux or a graphics-capable program carries DCS, SOS, PM or APC strings, and the parsers dropped only their first two bytes, so a tmux passthrough, an XTGETTCAP reply or kitty image data showed as text in the page and in a custom command's failure panel. They now run to their ESC \ end and step over the doubled ESCs a tmux passthrough puts inside. `ESC[>4;1m`, which vim and tmux send to set modifyOtherKeys, ends in m like a color code, so the page read it as a reset plus bold and showed the rest of the log bold and uncolored. A CSI with a private marker no longer touches the style. * fix(core): release the state directory lock even when a child holds its descriptor a full swift test run failed to reacquire the state directory lock right after releasing it. A parallel-spawn probe reproduced lock retention through an inherited descriptor: flock belongs to the open file description, and a process spawned on another thread holds a copy of every descriptor until its exec, O_CLOEXEC included, so closing the lock while such a child existed left it held. The lock now unlocks before it closes, which releases it whatever copies remain. * fix(sidebar): fold a workspace at once on a click on its icon (#952) * fix(sidebar): fold a workspace at once on a click on its icon a click anywhere on a workspace row waited the double-click interval before folding, so a rename double-click could cancel it. That delay covered the row icon too, which made folding by the icon feel slow. The icon now acts like the disclosure triangle: a click folds at once, with the row click setting on or off, and a double-click folds and unfolds instead of starting a rename. The name and the rest of the row keep the delay and the rename double-click. * docs(sidebar): name the row icon among the clicks the row setting leaves alone the settings guide and the setting's doc comments still said only the disclosure triangle folds a workspace with the row click setting off. The row icon now folds whatever the setting says, so they name it too. * agterm-server: run sessions on a Linux host, shown in remote windows (experimental) (#949) * feat(scripts): add mac-to-linux attach gate script linux-origin-gate.sh drives an isolated Debug instance against a Linux origin over ssh: attach with a companion, status, context, HUD, ask, blocking program overlay, HTML page, detach during each interaction, and relaunch. It refuses any state dir that is not a short /tmp throwaway, claims only a Debug pid it launched, bounds every origin call, and cleans up what it created. The first real run is plan Task 5, against the agterm-server container. The plan drops the agterm-linux container from Task 1 and Task 14 and moves four checklist items to the tasks that first make them possible. * feat(core): build agtermCore and agtermctl on Linux The core package now compiles on Linux and the Linux paths behave as they do on the Mac: - run-job reports and stream-bridge socket writes use MSG_NOSIGNAL, so a hung-up app no longer kills the helper with SIGPIPE; the CLI's request writes do the same, and clipboard set drains SIGPIPE on its writing thread - the claim walk treats a windows path that is not a directory as unreadable, as Darwin does - the overlay spawn stops itself before the program runs where START_SUSPENDED does not exist - with no --socket and no AGTERM_STATE_DIR, agtermctl on Linux resolves $XDG_STATE_HOME/agterm (default ~/.local/state/agterm), where agterm-server lives - the codex status hook reads its JSON with jq off Darwin - terminfo install, which pushes a Mac's entry to a remote host, refuses off Darwin Session-info, HUD-visibility and image-reference parsing have Linux paths through swift-markdown behind canImport(Markdown). The package manifest does not declare that dependency yet, so on Linux those inputs are refused and their tests fail until it is added. A Linux CI job runs the package tests in swift:6.3.2-noble. setup-zmx-linux.sh builds the patched zmx for aarch64 and x86_64 musl and stages the shell integration and terminfo for the server. Tests that pin Darwin-only behavior carry a platform guard; everything else runs on both. * build(core): add swift-markdown for the Linux build Foundation's attributed Markdown parser exists only on Darwin, so the Linux build parses session-info, HUD and markdown-page Markdown with swift-markdown 0.8.0, declared inside #if os(Linux). The Mac build and its Package.resolved do not change. * feat(core): windowless store contracts and session-bound pick - daemon backing is session state keyed by pane identity (daemonBackedPanes), so attachability and pane tokens resolve with no surface; the Mac still derives backing from its surfaces - a store marked headless swaps, splits, closes and promotes panes by daemon membership - presentsRemotely: a headless origin hands asks, picks, pages and jobs to its presenter; the Mac origin keeps the follower gate - session-bound pick: pick.open with a target, pick --session in the CLI (AGTERM_SESSION_ID only when version reports headless), pick.request/resolve/rejected/dismiss frames gated on the pick kinds, SessionPickBook for placement, handback, retained outcomes and viewer replicas, and the session node's pick read-back - CatalogRoot gives a windowless store a durable logical window id and name, seeds its first workspace, and HeadlessCommandPolicy names the physical window commands a server refuses * feat(server): agterm-server runtime and session lifecycle Add the headless agterm-server for Linux hosts: a state-dir-locked AppStore served over the shared control framing, with a default-deny command policy. Structural commands (session new, rename, close, move, split, swap, companions, text/type, workspace create, rename, delete, move, session-bound picks) provision one detached zmx daemon per pane, each in its own systemd user scope when a user manager runs. Panes start zsh, fish or bash with ghostty's shell integration; other shells are refused. A pane observer replaces the renderer callbacks: an exited shell closes, promotes or respawns its pane as on the Mac, a vanished daemon ends that pane, and a session with no live pane stays as ended. A restarted server adopts surviving daemons before serving, and cwd comes from /proc. zmx patch 0005 adds attach --detached and an exit record written before the socket goes away. ControlStreamOwner and ControlAcceptLoop move into agtermCore with their tests. scripts/server-container.sh builds a systemd + sshd test host from this tree and checks that a live pane keeps its process across a server restart and a killed server. The Linux CI job builds the musl zmx, stages the shell integration from ghostty's source at the pin, installs fish, and runs the real-daemon suite. Spawned helpers get only stdin, stdout and stderr on Linux too, and test scripts are written from a child process, so a concurrent spawn cannot hold them open for writing (ETXTBSY). * feat(server): presentation, overlay jobs and pages from agterm-server - serve status, context, hud, notify, ask, pick and overlay open (program and every page kind) with their follow-ups from the headless store, streamed to the presenting Mac through the shared hub - serve zmx tree, zmx present, overlay job claim/run and page serve through the core engines the Mac uses - hoist portable page checks to core: TextProbe, MarkdownFile, ImageFile and a header-only ImageHeader parser - program overlays get AGTERM_STATE_DIR and TERMINFO; the Mac's ssh PATH appends $HOME/.local/bin - server tests run off the shared pool, write without SIGPIPE and tolerate main-actor queueing on Linux - the attach gate waits for an answering socket, activates a launch that cannot take focus, and matches a replica page by file; results against the server container in docs/remote-linux-gate.md * feat(server): catalog subscription and operation receipts - catalog frames, a diff whose changes applied in order rebuild the next snapshot, and a hub that numbers them per epoch; oversized snapshots go as chunks applied only at their commit - agterm-server serves catalog.subscribe, refreshed after every request and observer pass, and agtermctl catalog subscribe bridges it like zmx present - structural commands take --op-id and --epoch: a repeated id never runs twice, another epoch is refused, and the reply carries an applied, noop, refused or fenced receipt - the operation table is saved with the catalog; catalog.op answers it and fences an unseen id, a receipt is only handed out once saved, and a restart re-anchors applied entries in the new epoch - version from agterm-server reports server, protocol and catalog versions; a Mac app refuses catalog.subscribe, catalog.op and any opID * feat(remote): remote windows mirror an agterm-server catalog A remote window shows every session of an agterm-server as its own rows. The mirror keeps the window's store equal to the server's catalog by identity, so a row leaves only when its session does, an ended session keeps its row and last screen under "Ended on HOST", and a pane exit reattaches instead of closing. - window entries carry a source; a remote one persists host, catalog id and view state, and is skipped by seed, finalization and Recent Closed - catalog client: version probe before subscribing, refusal of an origin without a catalog, resubscribe on a gap, backoff and a silence watchdog - window.remote.open (agtermctl window remote open HOST), File > Open Remote Window from remotes.conf, tree and window.list read-back of remote state - connection strip over the terminals while Connecting, Disconnected or refused - a per-window pool of ssh ControlMaster connections, at most 8 channels each, every channel leased for its lifetime; a master is started once before its users launch, a dead one is replaced once, and its leftover socket is removed - server: catalog.subscribe keeps its connection after the ok reply - scripts/remote-window-gate.sh: 20 sessions under stock sshd, reconnect after killed masters, ended, promoted, shell exit and unreachable cases * feat(remote): structural actions in a remote window go to the server A remote window's structural actions run on its agterm-server instead of the local mirror: new session and workspace, duplicate, split on, off and close, swap, rename, moves and drags, companions, delete and close. Each is sent under an operation id with the epoch it was decided on; split and swap requests also carry the expected pane identities. Its mark stays until the receipt settles, and a lost reply is settled only by catalog op. Close offers Detach, which hides rows on this Mac and leaves them running, or Terminate. - server: catalog.op answers unknown when a dropped table entry may have held the id, and keeps answering it; a pane-pinned operation is refused when its session's panes changed - RemoteCatalogActions: prepare at the click, send later, repeats held while pending, lookups after a lost reply and on every new snapshot, unknown marks cleared only by Dismiss or their row's removal - the control API reaches a remote window's rows through the same path, off the accept thread, refusing fields the server cannot be asked for by name - mutations disabled while disconnected; local-only actions disabled in a remote window - detach state saved with the window, kept views of hidden rows, the Detached Sessions picker and detached_sessions built-in - session.detach/reattach, workspace.detach/reattach, window.remote.dismiss, with tree read-back of detached ids, operations and per-session pending * feat(remote): server scratch and custom commands in a remote window A remote window's scratch is its server's: agterm-server runs it in a zmx daemon named agterm-scratch-<id>, and the window attaches it like a pane. Hiding keeps the same shell; only its shell exiting, closing its session or a server restart ends it. The live catalog carries it and the saved catalog does not. - server: session.scratch served under a receipt; --command replaces the scratch, shown or hidden, checked against --expect-scratch; every listing ends scratch daemons this run does not own, so a restart or a failed kill is retried; a gone scratch releases the status and mailbox it owned - remote window: the row's scratch follows the catalog; every scratch show and hide in the window goes to the server; an ended row keeps its presentation while its scratch runs; a lost attach keeps its screen and reconnects through the reconnect book without taking a lead - read-back: tree scratchBacked on a remote window row; scratch statuses land on the scratch pane - custom commands in a remote window name the server session and host * feat(server): pending interactions wait for a capable presenter agterm-server has no screen, so an ask, pick, page or overlay job opened while no Mac presents its session now waits there instead of failing. The next presenter that lists pending.snapshot and job.token gets the held interactions its capabilities support at once, under its own generation, and an answer from an older generation is refused. - --timeout on ask and pick, validated in the CLI and the dispatcher; the deadline is enforced at offer, answer and resolution on both origins - each session's tree node lists its interactions with kind, state (unpresented, offered, claimed) and deadline - presenter loss returns held work to pending, and a refused ask or pick returns too, while a refused page or job ends; a claimed job reports its outcome and is never launched twice - a job offer to a presenter that negotiated job.token carries a per-offer token the run-job helper must present; an untokened offer, which a Mac origin makes to an older presenter, keeps the id-only claim - a re-offered page gets a new token, its current size, points and hidden state; a page-channel EOF on a headless origin withdraws the page rather than ending it, while a protocol error still ends it - the held batch travels as byte chunks of one encoded array plus a commit, so nothing applies before the commit and a dropped stream applies nothing - zmx.tree reports headless, and the row's binding keeps it: only a headless origin's GUI ask waits hidden for its row and its pick queues behind a busy window; a Mac origin keeps its refusal and handback - closing a window detaches the replica picks shown or queued there without answering; a queued pick answers pick.result and pick.cancel * feat(remote): localhost URL pages through an ssh forward A page agterm-server opens on its own loopback (http://localhost:3000) now shows on the presenting Mac. The server sends it as a forwarded source, only to a presenter listing page.forward; a connected presenter without the kind gets the loopback refusal, and a held page is never offered to one. A Mac origin keeps refusing loopback pages. - the Mac picks a free local port, opens the page at the same loopback host with that port, so an https://localhost certificate still matches, and reloads it once the forward answers - a remote window row adds the forward to its pooled master with ssh -O forward and removes it with -O cancel; it checks the master's pid every 5 s and adds itself again when the master was lost or replaced; add, re-add and cancel run in order, and the lease is released only after the cancel - a row attached alone runs its own ssh -N -L with multiplexing off and ExitOnForwardFailure; its stderr is drained while it runs and a bounded tail names the failure - a forward that fails pins the error in the page, over later load reports and reloads - remote-window-gate.sh checks two forwarded pages against the server container (busybox httpd added to its image): both answer through their ports, and closing one refuses its port while the other answers * feat(server): install agterm-server on a Linux host over ssh - static musl agterm-server and agtermctl for aarch64 and x86_64 (scripts/server-build.sh) - scripts/install-server.sh installs or upgrades over ssh: a directory swap under ~/.local/lib, the user service, a linger check that refuses with the admin command, and the agent hooks - agterm-server install-hooks installs the agent status hooks and the skill from its own resources; the Mac installer's file work moves to agtermCore (AgentHooksFiles, SkillInstall.install, DirectoryCopy) - musl spawns re-exec the server to close inherited descriptors before the real exec, and local sockets are created close-on-exec - the container check covers restart, crash, an upgrade under a fish login shell, a moved state directory, linger refusal, descriptor hygiene and the last logout with and without lingering * docs(backlog): a local failure of the session host attach-to-ended-command test * docs: remote server and remote windows - site/docs.html: a Remote server section (install, opening a remote window, what runs where, disconnects, close and detach, scratch, custom commands and pages) and the two new built-in actions - site/commands.html: window remote open and dismiss, session and workspace detach and reattach, catalog subscribe and op, operation ids and receipts, pick --session, ask and pick --timeout, and what agterm-server serves and refuses - landing card, README and llms.txt entries, the agent skill's trigger and reference - control-api.md, windows.md and ARCHITECTURE.md describe agterm-server and remote windows - remove docs/remote-agent-server.md, the draft the plan replaced * fix(remote): keepalive on pooled and standalone ssh connections - the pooled master and the standalone page forward run the pane attach's ServerAlive check, with -N so a sessiontype Match answers for them; a pane joined to a master ignores its own keepalive, so a half-open link kept passing ssh -O check - remote-window-gate.sh requires the window's masters to end while the server is paused - agterm-server --state-dir help names $XDG_STATE_HOME; the skill reference documents pick --session and the ask and pick --timeout * fix(scripts): an absent master is an empty answer in the remote window gate ssh -O check exits non-zero when no master holds the path, and under pipefail that status ended the gate in the masters-end check instead of counting the master as gone. * fix(remote): an ended catalog row's panes stop waiting to reconnect A pane waiting to reconnect when the catalog marked its row Ended still attached again on the next answered probe, and the replace tore down the surface holding the row's last screen. The waiting lookup now refuses an ended row's primary and split, before and after the probe; its surviving catalog scratch still reconnects. * fix(remote): a catalog row's pane attaches again only against a fresh catalog After a host reboot the cached catalog still shows the row live until the catalog client reconnects, so a pane probe answering in that gap replaced the held surface and attached to a daemon that was gone. A catalog row's primary and split now keep waiting after a successful probe until the window's catalog is connected, which the mirror reports only once a fresh snapshot is applied. * docs(plan): no leaked test process and the container stopped after the final gates * fix(remote): a remote window's file pages wait for their page channel to start A catalog row's page channel starts only once its pooled ssh master is up, while the page's first load fetches at once, so every file, markdown, text and image page in a remote window failed or never left loading. Requests made before the channel starts now wait for it, and a close or a helper that cannot start fails them. * docs(plan): the remote window passes the end-to-end acceptance list against the container * refactor: move one section of each file over the length limit into its own file After the rebase onto master, AppActions, agtermApp, ControlServer and ControlProtocol each crossed SwiftLint's 1000-line limit. One self-contained section of each moves unchanged into an extension file: the sidebar tree expansion actions, the pane reattach helpers, the restore-mode handlers and the error-text enums. * fix(server): agterm-server never negotiates forwarded link clicks Master's link.click kind joined the shared PresentationHub kinds, so the server's hello offered it to a presenter while ServerStreams has no handler for it. A cmd-clicked path in a Linux-origin pane then did nothing instead of showing the Mac's own refusal. The server's hub now withholds that kind. * fix(server): a relative state directory resolves against the working directory agterm-server exported a relative --state-dir or AGTERM_STATE_DIR unchanged, so a pane or hook running in another directory looked for the socket under its own cwd. The container check's moved-state case now starts a pane in /tmp that reaches the server through its inherited state directory alone. * fix(remote): a remote window's title bar names its host once A remote window is named after its host, and the title bar showed that name beside the host badge carrying the same text. The on-screen title now leaves out a window name equal to the host it already shows; a renamed window keeps its name, and the OS title, window list and AGT_WINDOW_NAME still carry the host. * fix(links): /home is an automount root only on macOS LinkPolicy refused every path under /home, which on macOS is auto_home but on Linux holds every user's files, so a click resolved on a Linux host offered nothing there. Other roots stay refused on both platforms. * feat(server): clicked files and overlay hide/show reach agterm-server as on a Mac origin A path clicked in a remote window's pane now opens on the host the way a session attached from another Mac does: agterm-server negotiates link.click, resolves the path against the pane's directory, checks the file off the main actor and hands the markdown, text, image or HTML page to the presenting Mac, answering the same refusals. The control path and the click share the file check and the hand-over. session overlay hide, show and toggle are served too, for pages shown on the presenting Mac. The withheld-kinds hub option this replaces is removed. * fix(server): a page closed on the Mac ends on agterm-server whichever report arrives first Closing a page on the Mac sends pageClosed and then closes its content channel, over separate ssh channels. When the server saw the channel end first, it withdrew the page to hold for the next Mac and then dropped the close, so the page kept its slot and every later page or click on the session was refused. The server now remembers the presenter it withdrew a page from and lets that presenter's close end it. Its own withdrawal close carries channelLost, which the Mac echoes, so the reply to a withdrawal is not read as a dismissal. * fix(links): a click sent to another origin no longer opens a refusal panel The hook the app installs for forwarded clicks folded a sent click's nil result into the missing-server case, so every successful click also opened the 'could not open the file here' HUD. The page then replaced it before its text painted, which showed as an empty box in the middle of the pane on every click in a session attached from another Mac or a Linux host. * feat(remote): a page from another origin shows a loading line until its content arrives A page shown for another Mac or a Linux host loads its content over a channel, so its panel sat empty for about half a second after a click. Until the replica's first successful load the panel now shows 'Loading NAME from HOST'; reloads and navigation keep the document already on screen. * fix(server): a relative state directory with .. resolves against the working directory on Linux Linux Foundation drops a relativeTo base while standardizing a path that collapses '..', so --state-dir=a/../b resolved to /b there. The path is now joined onto the working directory before it is standardized. * docs(plan): ship agterm-server as release tarballs with agtermctl server install * feat(server): package agterm-server per architecture and ship the tarballs with each release server-package.sh builds a versioned tarball for aarch64 or x86_64 holding the server, agtermctl, zmx with its license, the shell integration, terminfo, agent hooks, the skill and install.sh. release.sh packages both, writes their sha256 lines into the app before the re-seal and uploads them with the DMG. install-server.sh installs from the same tarball, so the developer path and a release install run the same host script. agterm-server --version reports the stamped version. * feat(cli): agtermctl server install installs the matching agterm-server release on a Linux host The command asks the host for its architecture over ssh, downloads that release tarball from GitHub, refuses it unless its sha256 matches the line the app was built with, then unpacks it beside the live directory and runs its installer. It exits 0 when installed, 3 when the agent hooks are incomplete, and 1 on any refusal or failure. ssh runs in the caller's foreground process group so a password or host-key prompt works; the posix_spawnp runner terminfo install used moves to ForegroundSpawn and both commands share it. * feat(cli): server install --from installs a tarball already on the Mac The release download stays the default. --from FILE skips it for a Mac without GitHub access or a tarball the user fetched and checked; the file must match the same sha256 line for the host's architecture. Its bytes are read once through a checked descriptor into a private 0600 file, and only that file is hashed and streamed, so a symlink whose target changes after the check cannot change what reaches the host. * docs: agterm-server installs with agtermctl server install The install guide, command reference, README, llms.txt and the agterm skill lead with `agtermctl server install HOST` and its --from option, with installing from a checkout kept as the developer route. ARCHITECTURE covers the packaging and the CLI split, and the control API rules list server install as the third CLI-only exemption. * feat(remote): a remote window's rows report their server session id A catalog row now carries remoteSessionID, the server's id for the session it shows, which equals the row's own id. It is set when the row is built, so the tree node and remote.opened and remote.closed carry it as they do for a per-session attach. A re-attach hook skips these rows by their window's remote node, since the window rebuilds them itself after a relaunch. * fix(zmx): give the quit-time listing 400 ms within an 800 ms capture budget The exit capture's zmx list had 300 ms. In the hosted suite under load, the #915 regression test's fake listing, which answers after 120 ms, ran past that limit, because starting it alone took up to about 120 ms. A real listing on a loaded Mac runs the same race and loses the consumed commands when it times out. The timeout rises to 400 ms and the capture budget to 800 ms, so pane reads keep a nominal 150 ms after the timeout and cleanup grace, which a test now pins. This is a bounded tolerance increase measured on the fake's launch latency, not on real zmx; restore.capture shares the timeout, and its worst case grows by the same 100 ms. * feat(sidebar): a flagged remote row fills its cloud Flagging an attached or remote-window row now fills its cloud, or its slashed cloud while it shows a notice, as a flag fills every other row icon; the flat flagged view leaves it unfilled. A split still shows as the bolder weight, which is barely distinguishable on a filled cloud. * test(remote): cover Detach, Terminate and Cancel on remote closes A remote window's session, companion group, workspace and empty workspace closes now run through AppActions with the answer supplied in place of the alert. Each choice checks what is sent to the server, what stays shown until the server's removal arrives, and that nothing enters local undo or Recent Closed. Also covers the disconnected and only-workspace refusals, an Ended parent with a live companion, an inert Ended row, and a local window falling through. * test(remote): cover remote-window routing, detach lifecycle and read-back GUI New Session, split, move and the inline sidebar rename in a remote window send the server's command and change nothing locally. A real ControlServer with a scripted ssh runner and a fake catalog stream routes session.close, split, rename, move and new by the target's owner, background windows included, refuses local-only commands there, and reads a row pending until the server reaches its receipt. Detach and reattach read back through tree and window.list. A detached row stays hidden through a server respawn, a split promotion, a lost daemon and a companion exiting, and across a real save to disk and relaunch, live or Ended. * test(remote): drive remote-window flows against a live agterm-server Six UI tests open a remote window o…
follow-up to #547 and #548 for #516: two costs an animated OSC title still pays on every tick after those PRs.
NSWindow.titlewrites are coalesced.WindowAppearance.synchides the OS title and the custom header draws the visible one, soNSWindow.titleonly feeds the Window menu, Mission Control and the window switcher. Each assignment still runs AppKit's title machinery (NSWindowTitleController._propertiesChanged,NSTitledFrame.setTitle), about 1.3 ms, which an agent's spinner pays ~10 times a second; #548's own profile kept_dosetTitleat 213 ms.TitleProbeView.setTitlenow writes the first change after a quiet interval at once and collapses later ones within 0.5 s into one trailing write carrying the final value. The blend pass still writes immediately and does not restart the interval, so a title set right after attach is not deferred. The visible header andtree'stitleupdate on every tick as before.The title label no longer sizes to its text. A text-sized label made the titlebar row's geometry depend on the string, so every tick re-ran the HStack and the window's outer ZStack (
_ZStackLayout.sizeThatFits, ~2 ms/tick) to reach a width it already had: every frame of codex's ten braille glyphs, and of claude's ◐◑◒◓, measures identically. The label now takes the whole gap up to the buttons with.frame(maxWidth: .infinity, alignment: .leading); the text still redraws. Caching measured widths by string was rejected, since it would have to reproduce SwiftUI's font metrics and a half-point disagreement truncates the title.the per-tick figures above come from Time Profiler runs before #547/#548 landed. Measured on top of them, the active-window cells drop from 12.4% to 8.4% of a core with the sidebar shown and from 10.0% to 5.5% with it hidden; details in #817 (comment).
tests:
make test,make lint,make test-app. The existingWindowAccessorTestsandtestTheWindowTitleFollowsSessionAndWindowRenamespass with the coalescing. LocallySessionHostSeamTests.testClientAndBareAttachMatchFor{CreationPayload,PlainLoginShell}WithCustomZdotdirfail with[7, 49]vs[0, 0], identically on unmodified master.Related to #516