Skip to content

Split mobile host screen layers - #17181

Merged
nwparker merged 36 commits into
mainfrom
ra/max-lines-bottom-15-mobile-host-screen
Aug 30, 2026
Merged

nwparker merged 36 commits into
mainfrom
ra/max-lines-bottom-15-mobile-host-screen

Conversation

@nwparker

@nwparker nwparker commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​14 $\color{#cf222e}{\Huge{\mathbf{−}}}$​8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6
Prod 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1861 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1415 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​446

Summary

  • split the mobile host route into focused state, synchronization, catalog, action, controller, and view modules
  • preserve the phone and embedded tablet host-list UI, route behavior, transport lifecycle, and workspace actions
  • remove the resolved mobile host index max-lines override and reduce the baseline from 72 to 71
  • retarget the activation and cross-client view-settings source-boundary tests to the extracted hooks

Preservation audit

  • all 27 callback and memo bodies preserved after accounting for controller namespace prefixes
  • all 7 effect bodies and dependency lists preserved exactly
  • exact 60 non-suppression comments, 157 source literals, 28 state initializers, and 9 refs preserved
  • native JSX element multiset preserved; four new composition boundaries wrap the extracted sections

Validation

  • pnpm tc
  • cd mobile && pnpm typecheck
  • cd mobile && pnpm lint
  • cd mobile && pnpm test — 479 files, 3,863 passed, 3 skipped
  • pnpm test src/renderer/src/app-shell/workspace-view-cross-client-sync.test.tsx — 14 passed
  • pnpm run check:code-quality:changed
  • pnpm check:max-lines-ratchet — 71 grandfathered suppressions
  • pnpm test config/scripts/check-max-lines-ratchet.test.mjs — 15 passed
  • changed-file formatting check
  • git diff --check

Rendered native validation was not run because the booted simulator has no Orca or Expo development build installed; this is a behavior-preserving extraction with styles, copy, and native JSX elements unchanged.

CI state

The replacement run passes mobile verification, typecheck, review, and 7/8 generic test shards, including the repaired shard 4/8 source pin. Two ancestor issues inherited from #17174 remain red:

  • static analysis: three existing import/no-cycle warnings in pane-terminal-output-scheduler.ts
  • shard 1/8: the earlier daemon split moved a direct child_process import to daemon-launched-child.ts without updating the boundary test allowlist

This branch does not touch either ancestor-owned surface.

Stacked on #17174.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR decomposes the mobile host route into focused state, synchronization, catalog, action, controller, and presentation modules while retaining the existing route entry point.

  • Extracts host identity, repository metadata, worktree catalog, view settings, and workspace actions into dedicated hooks.
  • Splits the host UI into header, workspace-list, overlay, and composed view components.
  • Removes the obsolete host-route line-count override and retargets source-boundary tests to the extracted modules.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
mobile/app/h/[hostId]/index.tsx Replaces the monolithic host-screen implementation with the extracted controller and view while retaining the route export and placeholder behavior.
mobile/src/host-screen/use-host-screen-controller.ts Composes host state, lifecycle, synchronization, catalog, actions, derived workspace sections, and responsive presentation data.
mobile/src/host-screen/use-host-screen-state.ts Centralizes the existing host-screen state variables and long-lived refs used by the extracted hooks.
mobile/src/host-screen/use-host-worktree-catalog.ts Extracts worktree fetching, snapshot admission, refresh lifecycle, cache updates, and reconnect-aware resynchronization.
mobile/src/host-screen/use-host-view-settings.ts Extracts local view-state updates and patch-oriented desktop synchronization.
mobile/src/host-screen/use-host-worktree-actions.ts Extracts navigation, activation, pinning, deletion, host removal, and new-workspace actions without an established behavioral change.
mobile/src/host-screen/host-screen-view.tsx Introduces the composition boundary for the extracted header, workspace list, and overlays.
mobile/src/host-screen/host-screen-header.tsx Extracts host connection status, navigation controls, search, and phone/tablet toolbars.
mobile/src/host-screen/host-workspace-list.tsx Extracts catalog-state presentation and the sectioned workspace list.
mobile/src/host-screen/host-screen-overlays.tsx Extracts filter, picker, confirmation, action-sheet, and new-workspace modal presentation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Route[Host route] --> Controller[useHostScreenController]
  Controller --> State[Host screen state]
  Controller --> Identity[Host identity]
  Controller --> Settings[View settings sync]
  Controller --> Catalog[Worktree catalog]
  Controller --> Actions[Workspace actions]
  Controller --> View[HostScreenView]
  View --> Header[HostScreenHeader]
  View --> List[HostWorkspaceList]
  View --> Overlays[HostScreenOverlays]
Loading

Reviews (3): Last reviewed commit: "Merge branch 'ra/max-lines-bottom-14-rel..." | Re-trigger Greptile

@greptile-apps

greptile-apps Bot commented Aug 30, 2026

Copy link
Copy Markdown

Too many files changed for review (123 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@nwparker
nwparker changed the base branch from ra/max-lines-bottom-14-relay-dispatcher to main August 30, 2026 03:16
@nwparker
nwparker merged commit 15abc3f into main Aug 30, 2026
4 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Split speech session lifecycle

* Split terminal output scheduler pipeline

* Split mobile browser pane modules

* Prune resolved max-lines suppressions

* Split pane tree equalization logic

* Extract mobile troubleshoot screen styles

* Split external automation manager

* Split main window service attachments

* Split hosted review creation checks

* Split automation dispatch event handling

* Split settings navigation metadata

* Split daemon initialization lifecycle

* Split GitLab item dialog

* Split relay dispatcher layers

* Split mobile host screen

* Retarget mobile view settings source test

* Fix F3-speech for stablyai#17123

* Fix F1-cycle for stablyai#17131

* Fix F4-navtest for stablyai#17157

* Fix F2-allowlist for stablyai#17161
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