You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(runtime): a restarted managed server republishes restored tab titles right away - #29654
After an SSH host's Orca server restarts, its terminal tabs used to show "Terminal 1", "Terminal 2" for a while before their real titles came back. Now the real titles come back right away.
What Changed
Before:#29623 made a restarted managed server read each surviving terminal's title from the daemon when it re-attaches. But the session-tabs feed had already been published once with default titles, and nothing republished after the title arrived. So a tab showed Terminal 1 until something unrelated triggered the next publication, which was over 15s in the soak.
After: the tab shows Terminal N for about 0.5s (the first snapshot sent before the re-attach), then the real title. Measured live: title-pub-99 → Terminal 2 → title-pub-99 within 503 ms of the reconnect.
Mechanism:seedTerminalRestoreTail now calls touchMobileSessionSnapshotsForPty after it seeds a restored title. That is the same coalesced publication path a live OSC title already takes in terminal-title-tracker.
Why
Why this approach: the seed only wrote the records. Live titles and seeded titles should reach clients the same way, so I reused the existing publication call rather than adding one.
Alternative considered: having the renderer keep its old title when the host sends a default one. I rejected it because a client connecting for the first time has no old title to keep.
No wire change.
Linked Issue
No pre-existing issue. Follow-up to #29623, found in the SSH soak.
Visual Proof
N/A. Title text only. The live trace of the tab titles is under Testing.
Testing
Live, on an isolated desktop and managed server on Linux (omarchy): I set an OSC title, killed orcad, and polled the desktop's tab titles every 500 ms.
Before: the default title stayed until the next unrelated publication, observed at more than 15s.
After: the real title was back 503 ms after the default flashed.
Tests:
pnpm test src/main/runtime/terminal-restore-record-seed.test.ts. New: a seeded title republishes session tabs. It fails on main.
Full local replay of the pr.yml static-analysis job (typecheck via pnpm tc).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
The publication is coalesced. A spawn-path reattach seed now also touches publication once, which costs the same as one live title change.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
📝 Walkthrough
When a restore payload contains a title, seedTerminalRestoreTail now touches mobile session snapshots for the PTY after applying seeded agent status. A test verifies that the touch call receives the seeded PTY ID.
Priority: ⬇️ Low
Merge Risk:⚪ Minimal · up to 591a1
Restored nonempty titles now trigger the mobile snapshot refresh; no concrete user-impacting issue warrants blocking merge.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly and concisely describes the primary change: republishing restored tab titles after a managed server restart.
Description check
The description is complete and relevant. It explains the user impact, mechanism, rationale, alternative considered, testing, and checklist items. The Linked Issue section references follow-up to #296…
Docstring Coverage
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description is complete and relevant. It explains the user impact, mechanism, rationale, alternative considered, testing, and checklist items. The Linked Issue section references follow-up to #29623 but does not use the requested “Fixes #” format.
Full details: Docstring Coverage
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.
✨ Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
After an SSH host's Orca server restarts, its terminal tabs used to show "Terminal 1", "Terminal 2" for a while before their real titles came back. Now the real titles come back right away.
What Changed
Before: #29623 made a restarted managed server read each surviving terminal's title from the daemon when it re-attaches. But the session-tabs feed had already been published once with default titles, and nothing republished after the title arrived. So a tab showed
Terminal 1until something unrelated triggered the next publication, which was over 15s in the soak.After: the tab shows
Terminal Nfor about 0.5s (the first snapshot sent before the re-attach), then the real title. Measured live:title-pub-99 → Terminal 2 → title-pub-99within 503 ms of the reconnect.Mechanism:
seedTerminalRestoreTailnow callstouchMobileSessionSnapshotsForPtyafter it seeds a restored title. That is the same coalesced publication path a live OSC title already takes interminal-title-tracker.Why
Why this approach: the seed only wrote the records. Live titles and seeded titles should reach clients the same way, so I reused the existing publication call rather than adding one.
Alternative considered: having the renderer keep its old title when the host sends a default one. I rejected it because a client connecting for the first time has no old title to keep.
No wire change.
Linked Issue
No pre-existing issue. Follow-up to #29623, found in the SSH soak.
Visual Proof
N/A. Title text only. The live trace of the tab titles is under Testing.
Testing
Live, on an isolated desktop and managed server on Linux (omarchy): I set an OSC title, killed orcad, and polled the desktop's tab titles every 500 ms.
Tests:
pnpm test src/main/runtime/terminal-restore-record-seed.test.ts. New: a seeded title republishes session tabs. It fails on main.Full local replay of the pr.yml static-analysis job (typecheck via
pnpm tc).I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
The publication is coalesced. A spawn-path reattach seed now also touches publication once, which costs the same as one live title change.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)