Skip to content

fix(mobile): show a renamed terminal tab's name on the phone - #30163

Merged
AmoabaKelvin merged 1 commit into
mainfrom
show-renamed-terminal-tab-on-mobile
Oct 18, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
show-renamed-terminal-tab-on-mobile

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​56 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​56
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 0

ELI5

When you renamed a terminal tab from the phone, the desktop showed the new name but the phone kept the old one. The phone now shows the name you picked.

What Changed

  • Before: on a desktop host, renaming a terminal tab from the phone answered accepted: true and renamed the tab on the desktop, but the phone's tab strip kept showing the terminal's own title, for example ✳ Claude Code. This happened on every terminal that sets its own window title, including a plain shell tab, not only agent tabs.
  • After: the phone's tab strip shows the new name right away, and it stays while the agent keeps changing its own title. Clearing the name brings the terminal's live title back. The agent icon and status are unchanged.
  • Mechanism: the phone draws its tab strip from the title that session.tabs.list publishes. The host built that title from the terminal's live title first (tracker, pane and PTY titles), and agents set a new one every few seconds. The user's name was already in the same snapshot as customTitle, but title never looked at it. The host now publishes customTitle as title when one is set and falls back to the live title otherwise (runtime-mobile-session-projection.ts).

Why

The phone already listens for tab updates and renders title, so fixing the title on the host fixes every phone version, old builds included, with no phone release and no change to what the host and phone send each other. The other option was having the phone read customTitle itself. That needs a new phone build, older phones would stay broken, and the CLI and other readers of session.tabs.list would still get the stale title.

The custom name skips normalizeCompatibleAgentTitleForOwner, because that function rewrites agent-branded titles and could change a name the user typed.

Linked Issue

Fixes #28665

Visual Proof

N/A: no layout change. The tab text is now the name the user chose. The live run under Testing shows the title before and after.

Testing

  • Live, on macOS: hidden dev desktop on a scratch profile, with Claude running in a terminal tab. I sent the same terminal.rename call the phone sends, then read session.tabs.list.

    • Before the fix: the desktop tab showed "My Renamed Tab", and the phone's list still had "title": "✳ Claude Code" with "customTitle": "My Renamed Tab". A shell tab behaved the same way.
    • After the fix: the list returned "title": "Fix Check". I had Claude run a slow task. Its live title changed every frame (◐ Slow counting with Bash sleep), the published title stayed "Fix Check", and the status went from working to done. Clearing the name published the live title again.
  • New test in mobile-session-tabs-part-05.spec.ts: a renamed tab is published under its name over a newer agent title, and under the live title once cleared. It fails on main with "⠂ Claude Code".

  • src/main/runtime/orca-runtime.test.ts: 1,431 tests pass. The one failure, preserves existing badgeColor on runtime cloneRepo folder->git dedupe upgrade, also fails on unmodified main on macOS.

  • pnpm lint, pnpm tc, check:code-quality:changed, check:react-doctor:changed, check:zustand-selector-fanout.

  • I did not open the phone app itself, and I did not run a server with no desktop window live. A server with no desktop window publishes customTitle the same way since fix(remote): make the host's tab name the one source for CLI and desktop renames #30037, so the same line covers it.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

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

SSH and folder workspaces: the rule runs wherever the terminal's host builds the phone's tab list, and it does not depend on the workspace type. Mixed versions: an older host leaves customTitle out, so the title falls back to the live title as it does today, and older phones get the fix with no update.

Not changed: terminal.list still reports the live title, so the phone's rename box opens with the terminal's title filled in instead of the current custom name.

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)

The host published the terminal's live title, which agents repaint every
few seconds, so a rename from the phone never showed up there.

Fixes #28665
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ad08b4e6-4623-4119-8e10-3f7805c51866
📥 Commits

Reviewing files that changed from the base of the PR and between 1b3113d and cb0e0ad.

📒 Files selected for processing: 2
  • src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-05.spec.ts
  • src/main/runtime/runtime-mobile-session-projection.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

The mobile session tab projection now uses a trimmed custom title when it is non-empty. Otherwise, it uses the normalized live title. A new test checks that the custom title remains visible after an OSC title update, and that clearing the custom title exposes the updated OSC title.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to cb0e0

Renamed titles remain visible in the mobile tab list across live-title updates, and clearing a custom title restores the live title. No introduced merge-blocking risk is identified.

Pre-merge checks: Passed 2 · Failed 3

Failed Failed checks: 3 warnings

Check name Status Explanation Resolution
Linked Issues check Warning Direct issue [#28665] requires the renamed title to persist across both session.tabs.list and terminal.list refreshes. This PR updates only projectRuntimeMobileSessionTabs in `runtime-mobile-ses… Update the relevant terminal.list projection or rename persistence path so the custom title persists across terminal.list refreshes. Add or update automated coverage for that requirement while preserving agent status, icon, and live-tit…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description covers the required sections and explains the user impact, implementation, rationale, linked issue, testing, limitations, and compatibility considerations. However, it marks Visual Pro… Attach before-and-after screenshots or a video showing the mobile tab title before and after renaming, or provide a repository-approved exception for this required visual proof.
Passed Passed checks: 2 passed
Check name Status Explanation
Out of Scope Changes check Passed The changes are limited to the mobile session-tab title projection and one focused test. The projection prefers a trimmed customTitle and otherwise retains the existing live-title normalization. The…
Title check Passed The title clearly and concisely describes the primary change: showing renamed terminal tab names on mobile.
Full details: Out of Scope Changes check

Explanation

The changes are limited to the mobile session-tab title projection and one focused test. The projection prefers a trimmed customTitle and otherwise retains the existing live-title normalization. The test verifies the renamed title and the live title after clearing. These changes directly support [#28665].

Full details: Linked Issues check

Explanation

Direct issue [#28665] requires the renamed title to persist across both session.tabs.list and terminal.list refreshes. This PR updates only projectRuntimeMobileSessionTabs in runtime-mobile-session-projection.ts. The PR notes that terminal.list still returns the live title, so the terminal.list requirement remains unmet. The added test covers the custom title in the mobile session projection and restoration after clearing.

Resolution

Update the relevant terminal.list projection or rename persistence path so the custom title persists across terminal.list refreshes. Add or update automated coverage for that requirement while preserving agent status, icon, and live-title restoration after clearing.

Full details: Description check

Explanation

The description covers the required sections and explains the user impact, implementation, rationale, linked issue, testing, limitations, and compatibility considerations. However, it marks Visual Proof as N/A even though the change affects visible tab text.

Resolution

Attach before-and-after screenshots or a video showing the mobile tab title before and after renaming, or provide a repository-approved exception for this required visual proof.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[Bug]: Renaming an Agent terminal tab on Mobile does not take effect

1 participant