Skip to content

Show a details card when tapping phone session tabs - #36395

Merged
brennanb2025 merged 35 commits into
mainfrom
brennanb2025/mobile-tab-card
Oct 31, 2026
Merged

brennanb2025 merged 35 commits into
mainfrom
brennanb2025/mobile-tab-card

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​930 $\color{#cf222e}{\Huge{\mathbf{−}}}$​50 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​880
Prod 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​631 $\color{#cf222e}{\Huge{\mathbf{−}}}$​233 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​398

ELI5

Phone session tabs truncate long names. Tap a tab to select it and see the same full-title details available from the desktop tab card.

What changed

The first tap opens details immediately beneath the tab. Another tab moves the card; tapping the same tab again or elsewhere closes it. Outside taps still activate the control they hit. A terminal second tap within the existing 300 ms window closes the card and opens rename. A user drag dismisses the card; programmatic reveals and layout changes keep it aligned.

Terminal and chat tabs show their full title, confirmed activity status, and agent name/icon or Terminal. File and markdown tabs show the filename, relative path, and Editor. Browser tabs show the page title and URL or Browser.

The session title and tabs share one anchored card, one request owner, one visual slot, one Back claim, and one scope. Existing title-card behavior is preserved. There are no saved-data or wire changes.

Based on merged #30389 and retargeted to main. This PR ships a complete feature on its own.

Design and intended differences

The common pattern anchors details to the real selectable tab control. The existing phone card supplies the required tap, Back, retained exit, and safe-area behavior. Selection and rename remain direct actions; delayed measurement can only discard stale presentation.

Intended: the phone data contract lacks shell-override names, favicons, agent-driving labels, and naming-failure alerts, so these desktop-only details remain omitted. Native RN outside-tap handling matches the existing title card. The shipped RNWeb phone page supports outside-close without changing the native input path. Existing local/remote hosts, mixed paired-server versions, and folder workspaces use the same data contract.

Review and validation

Full review path: this generalizes a shared request/visual lifecycle and has an approved plan. The full review covers the shared card lifecycle and its reference, readiness, and performance contracts. The late supported empty-OSC terminal input is also repaired: the card derives the existing localized Terminal label for an empty heading while preserving the raw session title and every nonempty full title. Review fixes preserve a different pending tab when an old retained tab disappears, re-anchor after sibling layout changes, and keep geometry updates from rerendering or rescanning every tab. A reader-local theme subscription keeps cached footer colors current. The main sync preserves compact Duo without a session title while allowing tab cards from the strip; title disappearance removes only its own request or retained visual.

CI passed on reviewed head 1cd362: PR checks and Mobile checks. This includes mounted real Surface/Footer output, dark/light/dark appearance, header Back, compact Duo, title disappearance, request/removal/layout races, cleanup, and N=20/200 trigger operation/render bounds. The empty-title regression checks the actual heading through name/empty/name updates and a Japanese locale change without reopening the card. The bundle guard passes without a table change. No mobile dependency install was run in the development worktree; CI supplies the renderer dependencies. Continued correctness and independent final reference/readiness/performance source reviews are clean. The required quick iOS screenshot run passed for terminal and browser tab cards on the shipped screen; evidence and limits are below.

Visual proof

Quick branch-only screenshot run on iPhone 17 Pro, iOS 26.5, signed shell 0.0.60, normally paired to an isolated headless host at exact reviewed head 1cd362. The loop inspected both native screenshots. The terminal card shows its readable Terminal heading and footer; the browser card moves beneath the selected tab and wraps the full URL inside it. The simulator was deleted, owned processes stopped, and the gate released.

(screenshot removed: contained real product data)

(screenshot removed: contained real product data)

The exact empty-OSC command was emitted, but ordinary host reads did not expose the raw projected title; its exact empty value is unverified in the app run. CI independently checks actual empty-heading and Japanese-locale output. Browser is the plan-approved second tab type because file tabs cannot open on a headless host through the ordinary API. No full native matrix, file screenshot, or agent run is claimed.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source copied.

A sideways phone caps the title at 160pt beside the tabs, so long worktree names were cut off with no way to read them. Tapping the title now opens a card under the top bar, built like desktop's tab hover card, with the full name, the worktree's path and the host. It fades and slides in over 150ms (fade only with Reduce Motion), and any tap outside closes it.
…itle-card

# Conflicts:
#	mobile/src/session/MobileSessionHeader.tsx
…r-30389

# Conflicts:
#	mobile/app/_layout.web.tsx
#	mobile/src/layout/host-sidebar-reveal.test.tsx
#	mobile/src/session/MobileSessionHeader.tsx
#	mobile/src/session/MobileSessionSurface.tsx
#	mobile/src/session/use-live-worktree-name.ts
#	mobile/src/transport/use-workspace-client.ts
#	mobile/src/transport/workspace-server.test.ts
#	mobile/src/transport/workspace-server.ts
@brennanb2025
brennanb2025 marked this pull request as ready for review October 30, 2026 16:20
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/mobile-title-card to main October 30, 2026 20:48
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The change adds shared state management for anchored detail cards and connects it to session titles and tabs. Card content and footers vary by tab type, and browser session tokens are redacted from displayed URL details. Tab interactions update or dismiss cards, while focus boundaries and back navigation account for the active source. Tests cover card behavior, content, focus, layout changes, and session integration.

Merge Risk: Moderate · up to 1cd36

If a browser title contains a Kagi session URL, the card can reveal its bearer token. Redact the title 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 6.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description clearly explains the user-visible behavior, implementation scope, rationale, testing, visual proof, and upstream-boundary status. It does not include the required Linked Issue entry wi… Add the required sections and content: provide an actual linked issue under “## Linked Issue” using the repository’s expected format; add “## AI Disclosure” or state the applicable exemption; add “## Notes” covering security, cross-platform…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title "Show a details card when tapping phone session tabs" matches the main change: the PR adds a details card that opens when a phone session tab is tapped. The raw summary confirms the anchored…
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: Title check

Explanation

The title "Show a details card when tapping phone session tabs" matches the main change: the PR adds a details card that opens when a phone session tab is tapped. The raw summary confirms the anchored detail-card hook, the tab-card content, and the tab-strip wiring. The title is short, specific, and names the primary user-facing change, so it passes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 16 functions across 17 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description clearly explains the user-visible behavior, implementation scope, rationale, testing, visual proof, and upstream-boundary status. It does not include the required Linked Issue entry with an actual issue link, AI Disclosure section, Notes section, or Checklist. The Testing section also does not include the required checklist items.

Resolution

Add the required sections and content: provide an actual linked issue under “## Linked Issue” using the repository’s expected format; add “## AI Disclosure” or state the applicable exemption; add “## Notes” covering security, cross-platform support, Remote SSH, Mobile, compatibility, and performance; add the full “## Checklist” with completed or explicitly deferred items; and include the required Testing checklist items with platform coverage.

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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Major · Redact browser titles before rendering the details… · mobile-session-tab-card-content.ts:43-66

mobile/src/session/mobile-session-tab-card-content.ts:43-66
Major · Security & Privacy · Quick win

Redact browser titles before rendering the details card.

The existing tab truncates its visible title to one line, but the details card renders the full title as selectable text and uses it as its accessibility label. A Kagi session URL supplied as tab.title can therefore expose its bearer token in the card. Redact the selected title at this shared consumer so the fix covers both server-hosted and client-hosted browser tabs.

Suggested fix
-          ? tab.title
+          ? redactKagiSessionToken(tab.title)

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6ed398eb-a5db-4acf-83ca-8f280bc7a64f
Commits

Reviewing files that changed from the base of the PR and between ad867e8 and 1cd362e.

Files selected for processing: 3
  • mobile/src/session/MobileSessionTabStrip.test.tsx
  • mobile/src/session/mobile-session-tab-card-content.test.ts
  • mobile/src/session/mobile-session-tab-card-content.ts

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

@brennanb2025

brennanb2025 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Phone session tabs truncate long names and previously offered no tap-accessible details. Tapping now selects a tab and immediately opens its full-title card, with the existing terminal/agent, file, or browser details. Another tab moves the card; same-tab/outside taps close it; terminal double-tap still renames. Only a user drag dismisses during scrolling, while layout changes and programmatic reveals keep the card aligned.

The full review is clean at 1cd362. Fixes preserve a valid pending tab when an old card disappears, refresh anchors after sibling layout changes, avoid all-tab work on geometry updates, and keep cached footer colors current. The supported empty-OSC terminal input now gets the existing localized Terminal heading without changing its raw session title or any nonempty full title. Main's compact Duo and auto-close strip remain; compact Duo still opens tab cards. One request owner, visual slot, Back claim, and scope serve title and tab cards. No saved-data or wire change.

Verified on reviewed head 1cd362e: PR checks and Mobile checks pass. Actual mounted coverage checks selection, content/footer output, dark→light→dark appearance, request/removal/layout races, header Back, title disappearance, compact Duo, cleanup, and separate operation/render bounds for real triggers at 20/200 tabs. The empty-heading case covers live name/empty/name updates and Japanese localization without reopening. The bundle guard passes unchanged. No local mobile dependency install, full native QA matrix, or agent run was used; this mobile UI change takes the tests row.

The independent final reference/readiness/performance comparison and continued correctness review are clean. Intended differences: phone content uses its existing data contract, and native outside-tap behavior matches the existing title card; the shipped RNWeb page supports outside-close. No open blocking finding or temporary design exception remains.

For Brennan's review:

Quick branch-only screenshot run on iPhone 17 Pro, iOS 26.5, signed shell 0.0.60, normally paired to an isolated headless host at exact reviewed head 1cd362. The loop inspected both native screenshots. The terminal card shows its readable Terminal heading and footer; the browser card moves beneath the selected tab and wraps the full URL inside it. The simulator was deleted, owned processes stopped, and the gate released.

(screenshot removed: contained real product data)

(screenshot removed: contained real product data)

Limits: the exact empty-OSC command was emitted during a foreground sleep, but ordinary host CLI reads did not expose the raw projected title, so its exact empty value remains unverified in the app run. CI separately covers actual empty-heading updates and Japanese localization. The allowed browser option covered the second screenshot: Files opens a standalone viewer and headless hosts cannot create file tabs through the ordinary open API. No file screenshot, full native matrix, or agent run is claimed. The dev rig also dropped some typed URL characters, displayed an Expo Tools overlay, and listened on all interfaces while running; cleanup is complete. Only the real Claude config hash changed; its contents were not opened and no cause was inferred.

Judgment spots: single card owner, tap and rename gesture, full-title and empty-heading derivation.

@brennanb2025
brennanb2025 merged commit 852391d into main Oct 31, 2026
26 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/mobile-tab-card branch October 31, 2026 00:58
AmoabaKelvin added a commit that referenced this pull request Nov 4, 2026
Reverts 852391d (#36395). The card popped up on every tab switch.
Tapping a tab switches tabs again, and the session title card goes back
to its own owner from #30389. Keeps later changes to these files: tab
press feedback, the compact top bar's + button, and #36866's keyboard
keep-focus for title taps.
AmoabaKelvin added a commit that referenced this pull request Nov 4, 2026
Reverts 852391d (#36395). The card popped up on every tab switch.
Tapping a tab switches tabs again, and the session title card goes back
to its own owner from #30389. Keeps later changes to these files: tab
press feedback, the compact top bar's + button, and #36866's keyboard
keep-focus for title taps.
AmoabaKelvin added a commit that referenced this pull request Nov 4, 2026
…abs (#38206)

* revert(mobile): drop the details card on session tab taps

Reverts 852391d (#36395). The card popped up on every tab switch.
Tapping a tab switches tabs again, and the session title card goes back
to its own owner from #30389. Keeps later changes to these files: tab
press feedback, the compact top bar's + button, and #36866's keyboard
keep-focus for title taps.

* fix(mobile): hide branch and folder when the setting is off

The phone's workspace row always printed the branch or folder path, so the
Branch name / Branch / folder path toggle under Card display did nothing.
The shared card details now carry that rule, and the row reads it.

* fix(mobile): centre the chevron on Home list rows

* fix(mobile): scroll sheets taller than the screen

Content-sized sheets ride the keyboard by translation, but their height cap ignored that lift, so a tall sheet pushed its top off screen with no way to scroll back to it. The cap now gives back the keyboard lift. Sheets that scroll their own list can now shrink to the cap instead of clipping it, and the GitHub Pages picker no longer nests its list inside the drawer's ScrollView.

* feat(mobile): show each desktop's machine kind and model

The desktop now reports whether it is a laptop, desktop or server, and its
model, on status.get. The phone stores it with the other last-known host
fields and turns it into a line like "MacBook Pro · macOS".

* feat(mobile): edit a host from its screen and align the Automations bar

The host screen's menu gains Edit host and Network diagnostics. Edit host moves
onto the standard bar and gains Remove host. Automations uses the standard bar
with its switcher pinned under it, as Source Control does.

* feat(mobile): arrange Home and bring back stats and account usage

Home drops the Jump back in times, names the repo on every Jump back in row
(#37642), shows each desktop's machine kind, and adds stats and account usage
at the bottom. A new Arrange button reorders and hides sections, saved on the
phone.

* fix(mobile): keep the page bundle within budget and show the machine on the host screen

The edit route gets a web stub so its native-only removal flow stays out of
the page's chunks, and Automations keeps its own segment style. The host
screen header shows the machine line like Home does.

* fix(mobile): give the edit route's page stub its own module

A bare re-export of the catch-all route compiled to the same asset as
[...page], so the page manifest listed it twice and the desktop template's
inventory check refused the build.

* feat(mobile): turn Home into Feed, Usage, Automations and Settings tabs

Feed keeps agents (needs-you first, five then Show all), desktops with a
needs-you count, and Tasks; New workspace moves to a floating button.
Usage shows stats and per-desktop account usage, Automations a per-desktop
summary with on/off switches that opens the page for editing (new=1 opens
its editor). Settings becomes a tab. Arrange Home is removed: tabs replace
the long scrolling Home it was for.

* style(mobile): darken the accent blue slightly

* style(mobile): give the Home Tasks row the desktop tile icon

* style(mobile): condense the Home Feed

Smaller tiles, type and gaps; a desktop is two lines with its needs-you
count as an amber pill; the Tasks row drops its duplicate heading.

* style(mobile): drop the Last known prefix on Home desktop rows

* chore(mobile): bump to 0.0.63 and Android versionCode 27

* test(mobile): re-record Linear task recordings for the darker accent blue

* test(mobile): check the page Back stack on Tasks now that Edit host is native

* fix(mobile): pass the Usage tab's limit window to the shared usage helpers

* fix(mobile): type the Usage tab test to the account-slot limits and keep the tab under 400 lines
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