Skip to content

Mark remote sessions in Ctrl-Tab and reset live sessions that predate a zmx update - #650

Merged
umputun merged 7 commits into
masterfrom
remote-attach-followups
Sep 25, 2026
Merged

umputun merged 7 commits into
masterfrom
remote-attach-followups

Conversation

@umputun

@umputun umputun commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Remote sessions in Ctrl-Tab and the title-bar popovers. An attached session reports its cwd on the other Mac, so its row in Ctrl-Tab and in the recent and attention popovers read exactly like a local one. Those rows now lead with the sidebar's cloud glyph and put the host ahead of the detail, e.g. system · 192.168.1.33 · ~/.dot-files.

Reset Live Sessions covers sessions that predate a zmx update. Live sessions keep their zmx daemons through app updates, so a daemon started before 0.32.0 misses the attach-time lead claim, and the reset used to select only orphaned and app-attributed panes. The app now bundles its zmx build id and records the whole second a state directory first launches a different one; a claimed pane whose daemon was created before that cutoff is selected as outdated, whatever its attribution. At the next launch such a target is killed only while still claimed, listed with the same leader and created before the cutoff. The dialog, zmx.reset's outdated count and an outdated flag on zmx list rows say which sessions that covers. As with any reset, running work in those sessions stops and agent conversations may need resuming.

a session attached from another Mac reports its cwd on that Mac, so in Ctrl-Tab and the title-bar recent and attention popovers it read exactly like a local one. Those rows now lead the title with the sidebar's cloud glyph and put the host ahead of the detail: `system · 192.168.1.33 · ~/.dot-files`.

Session.switcherDetail owns the host prefix, and attentionSubtitle uses it too.
the build phase copies .zmx-build-stamp into the bundle as Resources/zmx/BUILD. At launch, before the reset marker is consumed, ZmxBuildRecord compares it with zmx-build.json in the state directory and dates a different or missing id at the current whole second. The cutoff reaches LiveResetConsumer and the runtime for the outdated reset reason; an app update that ships the same zmx build keeps the old date.
…change

zmx list's created= is parsed into ZmxSessionRecord.createdAt, never throwing on a bad value since the same parser feeds the launch reap and the session host. LiveReset.select takes a pane whose daemon was created before the launch's cutoff as outdated whatever its attribution, which covers the supervised panes the reset used to skip; other panes keep the unsupervised reason. At the next launch an outdated target is killed only while still claimed, listed with the same leader and created before the cutoff, while unsupervised targets still need an orphaned leader.

Targets carry their reason, the marker moves to version 2, and a version-1 marker still consumes as unsupervised.
…date

the reset dialog and zmx.reset's text count sessions and add how many of them predate the last Live sessions update and will be recreated on the current one; zmx.reset's liveReset carries that count as outdated, omitted when none. zmx list marks each daemon created before the launch's cutoff with outdated, carried from the observed creation time through the inventory row, and agtermctl prints it beside the observation.
the reset rule, the user guide, the command reference, the bundled skill and agtermctl zmx reset's help now say that Reset Live Sessions also recreates sessions created before the recorded first launch with this zmx build, that zmx list marks those rows outdated, and that zmx.reset reports how many sessions that covers. The troubleshooting page gains the post-update case of an attached pane that still needs a key press. The plan moves to completed.
…ct the reset troubleshooting note

the engineering troubleshooting page still said the reset leaves every supervisor pane alone, which the outdated reason contradicts. ZmxBuildRecord's record fields, filename and advanced had no caller outside agtermCore, so only the type and launchCutoff stay public.
Copilot AI lite review requested due to automatic review settings September 24, 2026 23:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 00b292d
Status: ✅  Deploy successful!
Preview URL: https://b13fb2b6.agterm.pages.dev
Branch Preview URL: https://remote-attach-followups.agterm.pages.dev

View logs

@umputun
umputun merged commit be394eb into master Sep 25, 2026
8 checks passed
@umputun
umputun deleted the remote-attach-followups branch September 25, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants