Skip to content

fix(mobile): phone terminal and chat tab names match the desktop - #31384

Merged
AmoabaKelvin merged 1 commit into
mainfrom
host-tab-titles
Oct 21, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
host-tab-titles

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​187 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​182
Prod 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​84 $\color{#cf222e}{\Huge{\mathbf{−}}}$​25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​59

Two places where the phone showed something different from the desktop for the same tab.

Terminal tab names. The phone used the tab's live agent title every time a desktop rename wasn't set. It ignored the generated name, the saved Claude/Codex session name and the quick-command label, all of which the desktop ranks above the live title. So a Cursor tab changed name with every frame (⠋ Cursor Agent, <task> - ⏳ Working ...), even when the desktop showed a steady name. Now the host ranks names the same way the desktop does (resolveTerminalTabTitle) and uses its own fresher live title as the input. The window snapshot, the layout-owner projection and a headless host rebuilding from its saved session all send those names for single-pane tabs. A generated name is only used while the desktop is showing generated names, including on a headless host's first rebuild from its saved session, which used to show the generated name even with the setting off. Split panes keep their own pane titles there too, as the window sends them.

Chat tab names. Renaming a native chat tab on the desktop had no effect on the phone. It kept the saved conversation name or "Claude Chat". Now main reads the rename from the workspace session it already mirrors, the same source the orchestration sender name uses. It renames chat rows whenever that session is written, so the new name reaches the phone about 150ms after the desktop saves. Clearing the name brings back the saved conversation name.

Related:

Builds on #22865 by @innocarpe.

Verified with focused tests. Each fails on main and passes here:

  • A generated name published by the window outranks the live OSC title on the host, and the live title returns once the name is gone.
  • A headless host rebuilt from its saved session shows the generated name over ⠋ Cursor Agent, and its saved title when generated names are off.
  • A headless split keeps the quick-command name off its panes and shows each pane's own title.
  • A desktop chat rename reaches the phone, and clearing it returns the saved conversation name.

Visual Proof

Hidden dev desktops (one built from main, one from this branch) with the same scratch workspace. The terminal tab runs a script that repaints Cursor's frames every second (⠋ Cursor Agent, Fix login redirect - ⏳ Working ...). Generated tab names are on, and the tab's generated name is "Fix the login redirect bug". The Claude chat tab was renamed "Release notes" from the desktop's Change Title menu. Phone: Orca Mobile 0.0.58 (release APK) on the Android emulator.

Desktop, both builds

(screenshot removed: contained real product data)
(screenshot removed: contained real product data)

Phone, BEFORE (main): the tab name follows each frame.

(screenshot removed: contained real product data)
(screenshot removed: contained real product data)

(screenshot removed: contained real product data)

Phone, AFTER (this branch): the desktop's name, steady through the same frames.

(screenshot removed: contained real product data)

(screenshot removed: contained real product data)

Chat tab rename. The release APK doesn't list this desktop's native chat tab, so here is the host's session.tabs.list, the feed phones read:

BEFORE (main)                              AFTER (this branch)
agent-session | Reply with ok              agent-session | Release notes
terminal | Fix login redirect - ⏳ Working  terminal | Fix the login redirect bug

On main the chat row keeps the saved conversation name ("Reply with ok") while the desktop shows "Release notes".

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Mobile tab projections now resolve terminal titles with pane-aware rules and carry eligible title metadata. Runtime projections use the shared title resolver. Workspace-session writes refresh agent-session tab titles using matching desktop labels or saved conversation names. Tests cover desktop name precedence, generated titles, live OSC titles, and split-pane behavior.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to f0d08

Split mobile tabs can display the same custom name instead of their individual pane names; fix this localized title regression before merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 12 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description clearly explains the user impact, implementation, rationale, limitations, testing, and visual proof. However, it does not follow the required template structure and omits the mandatory… Add the missing template sections. Provide an actual linked issue using Fixes #<issue-number> or the repository-approved issue link format. Complete the testing and checklist items, and mark non-applicable sections explicitly where approp…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: aligning phone terminal and chat tab names with desktop behavior.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the user impact, implementation, rationale, limitations, testing, and visual proof. However, it does not follow the required template structure and omits the mandatory Linked Issue section with a Fixes #... entry, the testing checkboxes, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections.

Resolution

Add the missing template sections. Provide an actual linked issue using Fixes #&lt;issue-number&gt; or the repository-approved issue link format. Complete the testing and checklist items, and mark non-applicable sections explicitly where appropriate (for example, N/A with a reason).

✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 497d1b00-3c20-43ba-b3b3-6229a0863568
📥 Commits

Reviewing files that changed from the base of the PR and between f7c0740 and 217dc36.

📒 Files selected for processing: 12
  • src/main/runtime/mobile-session-terminal-projection.ts
  • src/main/runtime/orca-runtime-desktop-tab-names.test.ts
  • src/main/runtime/orca-runtime-hook-agent-status-projection.test.ts
  • src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-05.spec.ts
  • src/main/runtime/runtime-mobile-agent-status-builder.ts
  • src/main/runtime/runtime-mobile-session-projection.ts
  • src/main/runtime/session-lifecycle/projection/prune-mobile-session-tab-group-layout.ts
  • src/main/runtime/session-tabs/mobile-session-hydration.ts
  • src/renderer/src/runtime/sync-runtime-graph/mobile-session-terminal-tabs.ts
  • src/shared/runtime-mobile-session-tab-contracts.ts
  • src/shared/tab-title-resolution.ts
  • src/shared/workspace-layout/old-client/old-client-session-tabs-projection.ts

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

Comment on lines +83 to +85
...(tabWide && generatedTitlesEnabled && tab.generatedTitle?.trim()
? { generatedTitle: tab.generatedTitle.trim() }
: {}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Apply the generated-title setting to the fallback title.

If a saved tab has generatedTitle and tabAutoGenerateTitle is off, this condition omits the metadata. Line 65 still places the generated name in title. The runtime resolver then displays that name on the phone despite the disabled setting. Apply generatedTitlesEnabled when selecting the initial title as well. The PR objective requires generated names to respect this setting.

@AmoabaKelvin
AmoabaKelvin force-pushed the host-tab-titles branch 2 times, most recently from 389bb5c to f3c934d Compare October 21, 2026 05:29
@AmoabaKelvin AmoabaKelvin changed the title fix(mobile): phone tab names match the desktop for terminal and chat tabs, and renaming a Claude pane keeps its chat fix(mobile): phone terminal and chat tab names match the desktop Oct 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: deddc7f2-b3a7-4976-ae64-fe9e9522749f
📥 Commits

Reviewing files that changed from the base of the PR and between f3c934d and f0d08ce.

📒 Files selected for processing: 1
  • src/main/runtime/mobile-session-terminal-projection.ts

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

generatedTitlesEnabled,
fallbackTitle
)
: tab.customTitle?.trim() || liveTitle || fallbackTitle

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,180p' src/main/runtime/mobile-session-terminal-projection.ts
sed -n '1,220p' src/shared/runtime-mobile-session-tab-contracts.ts
sed -n '1,180p' src/shared/tab-title-resolution.ts
rg -n -C 5 "customTitle|titlesByLeafId|resolveTerminalTabTitle|generatedTitle" src/main src/renderer/src src/shared

Repository: stablyai/orca

Length of output: 45664


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- targeted references ---'
rg -n -F --glob '*.ts' --glob '*.tsx' \
  -e 'RuntimeMobileSessionTerminalTab' \
  -e 'resolveTerminalTabTitle' \
  -e 'customTitle' \
  -e 'titlesByLeafId' \
  -e 'parentTabId' \
  src/main/runtime src/shared src/renderer/src 2>/dev/null | \
  rg -n 'mobile|Mobile|runtime|Runtime|terminal|Terminal|customTitle|titlesByLeafId|parentTabId|resolveTerminalTabTitle' | \
  head -n 1200 || true
printf '%s\n' '--- likely mobile files ---'
rg --files src/main src/shared src/renderer/src | rg -i 'mobile|runtime.*tab|session.*tab|terminal.*tab' | head -n 300

Repository: stablyai/orca

Length of output: 42885


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- exact resolver references ---'
rg -n -F --glob '*.ts' --glob '*.tsx' 'resolveTerminalTabTitle' \
  src/main/runtime src/renderer/src/runtime src/renderer/src/hooks src/shared || true
printf '%s\n' '--- mobile terminal projection files ---'
sed -n '1,260p' src/main/runtime/runtime-mobile-session-projection.ts
sed -n '1,260p' src/renderer/src/runtime/sync-runtime-graph/mobile-session-terminal-tabs.ts
sed -n '1,220p' src/main/runtime/mobile-session-tab-merge.ts

Repository: stablyai/orca

Length of output: 30012


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- headless builder callers ---'
rg -n -F --glob '*.ts' --glob '*.tsx' 'buildHeadlessMobileSessionTerminalTabs' src/main src/shared src/renderer || true
printf '%s\n' '--- mobile runtime projector callers ---'
rg -n -F --glob '*.ts' --glob '*.tsx' 'projectRuntimeMobileSessionTabs' src/main src/shared src/renderer || true
printf '%s\n' '--- exact main resolver block ---'
nl -ba src/main/runtime/runtime-mobile-session-projection.ts | sed -n '175,215p'
printf '%s\n' '--- resolver contract ---'
nl -ba src/shared/tab-title-resolution.ts | sed -n '1,35p'
printf '%s\n' '--- focused renderer title projection ---'
nl -ba src/renderer/src/runtime/sync-runtime-graph/sync-projections.ts | sed -n '1,70p'
nl -ba src/renderer/src/runtime/sync-runtime-graph/mobile-session-terminal-tabs.ts | sed -n '65,135p'

Repository: stablyai/orca

Length of output: 13031


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- headless hydration path ---'
nl -ba src/main/runtime/session-tabs/mobile-session-hydration.ts | sed -n '175,245p'
printf '%s\n' '--- runtime projector caller ---'
nl -ba src/main/runtime/session-lifecycle/projection/prune-mobile-session-tab-group-layout.ts | sed -n '70,120p'
printf '%s\n' '--- projector imports and snapshot types ---'
nl -ba src/main/runtime/session-lifecycle/projection/prune-mobile-session-tab-group-layout.ts | sed -n '1,75p'
rg -n -F --glob '*.ts' --glob '*.tsx' \
  -e 'RuntimeMobileSessionTabsSnapshot' \
  -e 'terminalTabs' \
  -e 'snapshot.tabs' \
  src/main/runtime/session-tabs src/main/runtime/session-lifecycle src/main/runtime | \
  head -n 500 || true

Repository: stablyai/orca

Length of output: 41346


🏁 Script executed:

printf '%s\n' '--- headless split projection ---'
nl -ba src/main/runtime/mobile-session-terminal-projection.ts | sed -n '55,92p'
printf '%s\n' '--- downstream terminal result ---'
nl -ba src/main/runtime/runtime-mobile-session-projection.ts | sed -n '88,105p'
nl -ba src/main/runtime/runtime-mobile-session-projection.ts | sed -n '180,190p'
nl -ba src/main/runtime/runtime-mobile-session-projection.ts | sed -n '235,255p'
printf '%s\n' '--- hydration to projection boundary ---'
nl -ba src/main/runtime/session-tabs/mobile-session-hydration.ts | sed -n '207,235p'
nl -ba src/main/runtime/session-lifecycle/projection/prune-mobile-session-tab-group-layout.ts | sed -n '95,104p'

Repository: stablyai/orca

Length of output: 7750


🏁 Script executed:

nl -ba src/main/runtime/runtime-mobile-session-projection.ts | sed -n '255,315p'

Repository: stablyai/orca

Length of output: 3223


Preserve leaf titles in split tabs.

When a split tab has a custom title, use each leaf's liveTitle and omit customTitle from split rows. The downstream mobile projection otherwise passes that metadata to resolveTerminalTabTitle, which restores the tab-wide title.

🐛 Suggested fix
           : resolveTerminalTabTitle(
               { ...tab, title: liveTitle },
               generatedTitlesEnabled,
               fallbackTitle
             )
-          : tab.customTitle?.trim() || liveTitle || fallbackTitle
+          : liveTitle || fallbackTitle
         return [
           {
             type: 'terminal' as const,
             id: `${tab.id}::${leafId}`,
             parentTabId: tab.id,
             leafId,
             title,
-            customTitle: tab.customTitle?.trim() || null,
+            ...(tabWide ? { customTitle: tab.customTitle?.trim() || null } : {}),

@AmoabaKelvin
AmoabaKelvin merged commit ba8f237 into main Oct 21, 2026
53 checks passed
@AmoabaKelvin
AmoabaKelvin deleted the host-tab-titles branch October 21, 2026 18:23
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.

1 participant