Skip to content

feat(mobile): show a computer's connection in its page subtitle, with one action per list state - #48655

Merged
AmoabaKelvin merged 7 commits into
mainfrom
mobile-host-status-and-words
Nov 27, 2026
Merged

AmoabaKelvin merged 7 commits into
mainfrom
mobile-host-status-and-words

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

When a computer went offline, its page stacked up to five banners in four styles above the title, and offered Retry or Reconnect up to three times. Now the line under the computer's name is the only status: "Offline since 9:41 PM" with one Reconnect, and the rows stay readable but quieter. The page's empty and error states each get one clear action, and the options sheet uses plain words.

Files Added Deleted Net
Test 0 0 0 0
Prod 27 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​289 $\color{#cf222e}{\Huge{\mathbf{−}}}$​645 $\color{#cf222e}{\Huge{\mathbf{−}}}$​356

What Changed

  • Status line (host-screen-header.tsx): offline reads "Offline since " (when the drop was seen) with one 44 pt Reconnect on the right of the page title's line. A relay's own reason ("Sign in…", "… is off") still shows instead; a Tailscale hint is kept after the time. A refused pairing reads "Not connected". The bar's collapsed title shows the same line without Reconnect.
  • No banners (host-workspace-list.tsx): the offline banner, auth banner, "View network diagnostics" card and notice banners are gone. Diagnostics and Edit stay in ⋯. Action errors, server notices and route notices are toasts; an error raised while a sheet is open waits until it closes.
  • Offline rows dim to 60% and stay readable; the bottom bar's + and the project + hide until a new workspace can start.
  • States (host-workspace-list-states.tsx, host-screen-view.tsx):
    • Refused pairing replaces the list with "Pairing was refused" and Re-pair (plus Retry where the app can rebuild the connection).
    • Empty: "No workspaces" + New workspace (only while connected); with filters on: Clear filters.
    • Load failure: "Couldn’t load workspaces" + Retry.
    • "Host not found" is a state view with Back instead of bare red text.
  • Words: "Floating workspace", Back reads "Back".
  • Workspace options sheet (workspace-options-sheet.tsx): "Hosts" → "Computers"; "Hide automation workspaces", "Hide CLI workspaces", "Hide other devices’ workspaces", "Hide workspaces with no branch". "Synced across your devices" and the "Saving to the host" row are replaced by a "Saving…" subtitle while the computer hasn't taken a change.
  • Deleted AuthFailedBanner (+ its web variant and override entry) and HostDiagnosticsLink.

Rebuilt on main without #48649 (the one-line row redesign, which isn't landing). Card layout, Show properties and Card display stay in the options sheet, since today's rows still draw what they choose; only their neighbours' words changed.

Why

The audit (R2, P5, P7, P8) found connection trouble shown in four styles and up to three Reconnects, 25–31 pt targets, and states with no way forward. The status line follows the page title pattern the phone already uses; the states use MobileStateView with one action, like Tasks and Files.

Linked Issue

None. This is the approved phone UX round (host connection state, list states, options words).

Visual Proof

Re-shot on the real page in Chromium over a shell double; offline and refused are real state frames from the shell. Before = main, after = this branch.

pr3-offline

pr3-states

pr3-options

Testing

  • I manually tested these changes locally. Chromium, dark and light: connected, offline with rows, refused pairing, empty, the options sheet, the ⋯ menu.
  • Automated tests added/updated, or explained why not below. UI-only; no new tests, per the repo's test policy.
  • Every added test fails without this change and avoids the test anti-patterns

pnpm check:changed passes. pnpm build:mobile-web passes; eager bytes +4.3 KB across the stack (11,513,830 of 11,550,720).

Performance

None, because the status line reuses the offline banner's own state hook and the toasts replace banners one for one.

Risk

The riskiest part is the status line: if the time were wrong, a user would read when the computer dropped incorrectly. It uses the same drop-or-read time the old banner's "As of" did. Removing the auth banner's Remove button leaves removal on Home and the Edit page. A plain revert backs it out.

Level: Low

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

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

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)
  • I stated the risk: what could break, for whom, and how to back it out
  • 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)

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The host screen updates its status display, reconnect behavior, error state, and primary action. The workspace list adds authentication-refusal handling, revised empty and catalog-error actions, dimmed outage rows, and timed notice toasts. The workspace-options sheet changes filter labels and displays save progress for pending view changes. Related components, styles, web overrides, and locale strings are removed or updated.

Merge Risk: Low · up to cd7c5

Some toast notices can expire while a bot-group sheet covers them. The offline timestamp, a hidden-project edge case, and a few untranslated filter labels are minor open issues. None blocks core workflows, and the risk is low.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a computer's connection status now appears in its page subtitle, and each list state gets one action. The diff matches this. It removes the banners and adds a status l…
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.
Description check Passed The description follows the repository template and fills in most sections. The ELI5, What Changed, Why, Visual Proof, Testing, Performance, Risk, and Checklist sections are all substantive. The Perfo…
Full details: Title check

Explanation

The title names the main change: a computer's connection status now appears in its page subtitle, and each list state gets one action. The diff matches this. It removes the banners and adds a status line to the header, and it adds one action per state in the list-state component. The title is specific and uses the conventional feat(mobile) prefix, though it is long at 95 characters.

Full details: Description check

Explanation

The description follows the repository template and fills in most sections. The ELI5, What Changed, Why, Visual Proof, Testing, Performance, Risk, and Checklist sections are all substantive. The Performance section gives a reason, and the Risk section names the riskiest part and a rollback method. The Linked Issue section says "None" and explains that this is an approved UX round. The template says outside contributors must link an actual issue, but the author's context suggests an internal change, so this is a gap to flag rather than a failure. The Visual Proof section uses before and after images. The AI Disclosure section is blank, which is acceptable only if the author is a StablyAI team member. The Review section has an unchecked upstream-boundary item that the author marked as not applicable, so it is not an issue. The Testing checklist does not show that automated tests were added, but the author explains why none were added.

Finishing Touches

Fix failing CI checks

  • 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

@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: 6

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: 71e53b26-d2c2-444b-a0d2-0dbfa372fade
Commits

Reviewing files that changed from the base of the PR and between a40d14c and 5a4d5c4.

Files selected for processing: 65

  • config/tsconfig.tc.web.json
  • mobile/src/agent-history/worktree-navigation-actions.ts
  • mobile/src/bots/MobileBotsSectionHeader.tsx
  • mobile/src/bots/host-bot-sections.ts
  • mobile/src/bots/items/MobileBotItemLinks.tsx
  • mobile/src/bots/use-mobile-bots-list-parts.tsx
  • mobile/src/components/host-connection/AuthFailedBanner.tsx
  • mobile/src/components/host-connection/AuthFailedBannerActions.tsx
  • mobile/src/components/host-connection/AuthFailedBannerActions.web.tsx
  • mobile/src/components/host-connection/HostDiagnosticsLink.tsx
  • mobile/src/components/host-connection/auth-failed-banner-styles.ts
  • mobile/src/components/sheets/ActionSheetModal.tsx
  • mobile/src/host-screen/host-bottom-bar.tsx
  • mobile/src/host-screen/host-screen-header.tsx
  • mobile/src/host-screen/host-screen-operations.ts
  • mobile/src/host-screen/host-screen-overlays.tsx
  • mobile/src/host-screen/host-screen-primary-styles.ts
  • mobile/src/host-screen/host-screen-secondary-styles.ts
  • mobile/src/host-screen/host-screen-view.tsx
  • mobile/src/host-screen/use-host-screen-controller.ts
  • mobile/src/host-screen/use-host-screen-state.ts
  • mobile/src/host-screen/view-settings/use-host-view-settings.ts
  • mobile/src/host-screen/workspace-actions/use-host-worktree-actions.ts
  • mobile/src/host-screen/workspace-actions/use-workspace-row-menu-actions.ts
  • mobile/src/host-screen/workspace-actions/workspace-delete-confirm-sheet.tsx
  • mobile/src/host-screen/workspace-actions/workspace-details-sheet.tsx
  • mobile/src/host-screen/workspace-actions/workspace-status-sheet.tsx
  • mobile/src/host-screen/workspace-list/host-pending-creation-row.tsx
  • mobile/src/host-screen/workspace-list/host-section-header.tsx
  • mobile/src/host-screen/workspace-list/host-workspace-list.tsx
  • mobile/src/host-screen/workspace-options/phone-card-property-choices.ts
  • mobile/src/host-screen/workspace-options/workspace-option-controls-copy.ts
  • mobile/src/host-screen/workspace-options/workspace-option-controls.tsx
  • mobile/src/host-screen/workspace-options/workspace-options-sheet.tsx
  • mobile/src/i18n/en-runtime-required.json
  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json
  • mobile/src/new-workspace/creation/forms/new-worktree-modal-types.ts
  • mobile/src/new-workspace/creation/modal/NewWorktreeModal.tsx
  • mobile/src/new-workspace/creation/runtime/use-new-workspace-repositories.ts
  • mobile/src/session/MobileSourceControlButton.tsx
  • mobile/src/tasks/item-detail/mobile-tasks-item-state-glyph.ts
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentChildDisclosure.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentList.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentRow.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentSummary.tsx
  • mobile/src/worktree/agent-lineage/worktree-agent-child-rows.ts
  • mobile/src/worktree/execution-hosts/host-workspace-list-state.ts
  • mobile/src/worktree/execution-hosts/host-workspace-list-states.tsx
  • mobile/src/worktree/row-presentation/WorktreeListRow.tsx
  • mobile/src/worktree/row-presentation/WorktreeMetaGlyphs.tsx
  • mobile/src/worktree/row-presentation/pr-state-color.ts
  • mobile/src/worktree/row-presentation/worktree-list-row-layout.ts
  • mobile/src/worktree/row-presentation/worktree-list-row-styles.ts
  • mobile/src/worktree/row-presentation/worktree-meta-glyph-presence.ts
  • mobile/web-entry/web-overrides.json
Files with no reviewable changes: 18

  • config/tsconfig.tc.web.json
  • mobile/src/components/host-connection/AuthFailedBanner.tsx
  • mobile/src/components/host-connection/AuthFailedBannerActions.tsx
  • mobile/src/components/host-connection/AuthFailedBannerActions.web.tsx
  • mobile/src/components/host-connection/HostDiagnosticsLink.tsx
  • mobile/src/components/host-connection/auth-failed-banner-styles.ts
  • mobile/src/host-screen/host-screen-operations.ts
  • mobile/src/host-screen/workspace-options/phone-card-property-choices.ts
  • mobile/src/host-screen/workspace-options/workspace-option-controls-copy.ts
  • mobile/src/i18n/en-runtime-required.json
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentChildDisclosure.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentList.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentRow.tsx
  • mobile/src/worktree/agent-lineage/presentation/WorktreeAgentSummary.tsx
  • mobile/src/worktree/agent-lineage/worktree-agent-child-rows.ts
  • mobile/src/worktree/row-presentation/WorktreeMetaGlyphs.tsx
  • mobile/src/worktree/row-presentation/worktree-meta-glyph-presence.ts
  • mobile/web-entry/web-overrides.json

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

const outage = isConnectionOutage(connectionVerdict)
// When the shown rows were last live: the drop this document saw, else when they were read.
const offlineAsOf =
useHostOfflineBanner({

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.

Minor · Functional Correctness · Quick win

Date "Offline since" from the observed drop, not from a stale read.

When the rows were read before this status component mounted, the hook returns that earlier read time as "Offline since" if the client connects and then drops before another successful catalog read. The hook records the drop in droppedAt, but the readThisDocument gate discards it. The status then reports the cache time instead of the time the connection was lost.

Use the observed drop time when one is recorded. Fall back to the read time only when no drop has been observed. This matches the later decision to date the offline state from the drop.

// Notices and action errors are one-line toasts, not banners stacked over the title. A sheet
// over the list would hide one, so it shows once the sheets close, then clears itself.
const sheetOpen = state.showWorkspaceOptions || state.actionTarget !== null
const notice = sheetOpen ? null : state.actionError || state.serverNotice || routeNotice || null

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.

Minor · Functional Correctness · Quick win

Catalog refreshes clear action errors before the deferred notice can show.

While Workspace options or an action sheet is open, notice is null. The catalog success effect still runs on each successful read and calls setActionError(''). Its only sheet check covers the new-workspace sheet (showNewWorktree), and the catalog query receives no sheet state. An action error raised while a sheet is open can therefore be cleared by the next poll or refetch. When the sheet closes, notice is null and the error does not appear.

An action error raised while a sheet is open must stay available until the sheet closes. The clear on a confirmed catalog read must not remove it while either sheet is open. Errors that already reached the notice, or that were raised outside a sheet, keep the current clear behavior.

Comment thread mobile/src/i18n/locales/en.json Outdated
Comment on lines +970 to +973
"hideAutomationWorkspaces": "Hide automation workspaces",
"hideCliWorkspaces": "Hide CLI workspaces",
"hideOtherDevicesWorkspaces": "Hide other devices’ workspaces",
"hideNoBranch": "Hide workspaces with no branch",

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.

Minor · Functional Correctness · Quick win

Add localized values for the four renamed workspace filter keys.

The workspace options sheet now reads hostScreen.workspaceOptionsSheet.hideAutomationWorkspaces, hideCliWorkspaces, hideOtherDevicesWorkspaces, and hideNoBranch. These keys exist only in en.json. The de, es, fr, ja, ko, and pt catalogs drop the old keys (hideAutomationCreated, hideCliCreated, hideOtherClientWorkspaces, hideDetachedHead) and do not add the replacements. Those locales therefore show English for these four filter labels. Before this change, the same controls showed localized text.

Add the four replacement keys to the hostScreen.workspaceOptionsSheet object in each non-English catalog. Translate the current English text for each key. Use the removed values only where the meaning matches:

  • hideAutomationWorkspaces replaces hideAutomationCreated.
  • hideCliWorkspaces replaces hideCliCreated.
  • hideOtherDevicesWorkspaces replaces hideOtherClientWorkspaces.
  • hideNoBranch does not replace hideDetachedHead. The new label covers workspaces with no branch. The old label covers detached HEAD workspaces. Translate the new label from its own text.

// Hidden projects drop out as on desktop, except the one this form was opened for.
const eligible = pickerRepos(getNewWorkspaceDialogEligibleRepos(allRepos), initialRepoId)
return initialRepoHost
return initialRepoHost && onlyInitialRepoHost

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.

Minor · Functional Correctness · Quick win

Match the hidden-project exception on execution host, not only repository ID.

When onlyInitialRepoHost is false, pickerRepos(..., initialRepoId) keeps every hidden repo whose ID equals the initial repo's ID, on any host. The host filter that ran before this PR removed those rows, but it now runs only when onlyInitialRepoHost is true. A hidden repo with the same ID on another host therefore reaches the returned repos list. Apply the exception only to the initial repo's own host copy. Keep the shared pickerRepos helper unchanged.

Suggested fix

-import { pickerRepos } from '../../../../../src/shared/project/catalog/hidden-projects'
+import { isRepoHidden } from '../../../../../src/shared/project/catalog/hidden-projects'
-    const eligible = pickerRepos(getNewWorkspaceDialogEligibleRepos(allRepos), initialRepoId)
+    const eligible = getNewWorkspaceDialogEligibleRepos(allRepos).filter(
+      (repo) =>
+        !isRepoHidden(repo) ||
+        (repo.id === initialRepoId && getRepoExecutionHostId(repo) === initialRepoHost)
+    )

@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-host-status-and-words branch 2 times, most recently from 03c879f to cd7c524 Compare November 27, 2026 09:40

@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

  • 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: 3a4cd75e-19c0-462e-980c-4fb4de02f3b9
Commits

Reviewing files that changed from the base of the PR and between 03c879f and cd7c524.

Files selected for processing: 12

  • mobile/src/host-screen/workspace-list/host-workspace-list.tsx
  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json
Files skipped from review as they are similar to previous changes: 11

  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json

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

Comment on lines +87 to +88
const sheetOpen =
state.showWorkspaceOptions || state.actionTarget !== null || state.showNewWorktree

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.

Minor · Functional Correctness · Quick win

Keep the workspace notice held while bot-group sheets are open.

The notice gate at lines 87-89 checks only the workspace options, workspace actions, and new-workspace sheets. The bot-group sheets from useMobileBotGroupEditor render through bots.sheets at line 321, but they use separate open state. While one of them is visible, sheetOpen stays false. A serverNotice or actionError then stays on screen behind the native sheet, and the three-second timer at lines 96-104 clears it before the user can read it.

Expose a sheet-open signal from useMobileBotGroupEditor, pass it through useMobileBotsListParts, and include it in sheetOpen. The signal should be true while any of these is visible:

  • newBot !== null
  • reordering && canReorder
  • actions !== null
  • editing !== null with client
  • deleting !== null
  • deleteFailure !== null

Match the visibility conditions of MobileBotGroupDeleteConfirm and MobileBotGroupMembers to this list.

@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-host-status-and-words branch from cd7c524 to 3f3819d Compare November 27, 2026 09:51
@AmoabaKelvin
AmoabaKelvin merged commit 2d543c9 into main Nov 27, 2026
27 of 28 checks passed
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