Repository navigation
Show mobile workspace creation at the bottom right - #6663
brennanb2025 wants to merge 15 commits into
Conversation
Co-authored-by: Orca <help@stably.ai>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds a mobile floating action button for workspace creation in the sidebar and mobile app, plus touch/hover-specific CSS, target-selection helpers, and tour-handoff support for an initial repo id. It also updates 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/components/sidebar/WorktreeList.tsx (1)
3878-3888: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winOnly add the mobile bottom spacer when the FAB is shown.
Line 3888 always applies
worktree-mobile-create-scroll-padding, so touch layouts still reserve space whenshowMobileCreateFabisfalse. That leaves dead space after the last row in repo-less or fully filtered states.Suggested fix
- className="worktree-mobile-create-scroll-padding worktree-sidebar-scrollbar h-full overflow-y-scroll overflow-x-hidden pl-1 scrollbar-sleek outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset pt-px" + className={cn( + showMobileCreateFab && 'worktree-mobile-create-scroll-padding', + 'worktree-sidebar-scrollbar h-full overflow-y-scroll overflow-x-hidden pl-1 scrollbar-sleek outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset pt-px' + )}
🧹 Nitpick comments (3)
src/renderer/src/components/sidebar/mobile-worktree-create-target.test.ts (1)
58-80: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid source-string assertions that depend on formatting.
This block couples the test to
WorktreeList.tsxlayout instead of behavior; the literal at Line 76 will fail on a harmless reflow or indentation change. Prefer rendering the component, or at least asserting the relevant tokens separately instead of matching a formatted multiline slice.src/renderer/src/components/contextual-tours/workspace-creation-tour-handoff.test.ts (1)
42-62: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winThis case never enters the handoff branch.
activeContextualTourIdstaysnull, so the new test only verifies the plain modal-open path. Add a variant withworkspace-agent-sessions/ step1and assert thatinitialRepoIdsurvives alongsidecontextualTourSource.src/renderer/src/components/sidebar/WorktreeList.tsx (1)
616-620: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReplace the ad-hoc FAB shadow with a shared token.
Line 620 hard-codes both the shadow tier and color in the component. Move this to an existing sidebar token/class, or define a named token in
src/renderer/src/assets/main.css, so the mobile FAB stays aligned with the documented system.As per coding guidelines, "All UI work — layout, color, typography, spacing, component selection, UX behavior — must follow
docs/STYLEGUIDE.mdand use tokens defined insrc/renderer/src/assets/main.css" and "src/renderer/src/**/*.{ts,tsx,css}: Never invent new color values, font sizes, or shadow tiers when a documented one in STYLEGUIDE.md already covers the role."Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d0b851fe-e3db-4354-a8f8-673f5857999f
📒 Files selected for processing (17)
src/renderer/src/assets/main.csssrc/renderer/src/components/contextual-tours/workspace-creation-tour-handoff.test.tssrc/renderer/src/components/contextual-tours/workspace-creation-tour-handoff.tssrc/renderer/src/components/sidebar/SidebarHeader.test.tsxsrc/renderer/src/components/sidebar/SidebarHeader.tsxsrc/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsxsrc/renderer/src/components/sidebar/WorktreeList.tsxsrc/renderer/src/components/sidebar/mobile-worktree-create-target.test.tssrc/renderer/src/components/sidebar/mobile-worktree-create-target.tssrc/renderer/src/components/workspace-cleanup/WorkspaceCleanupDialog.tsxsrc/renderer/src/components/workspace-cleanup/workspace-cleanup-presentation-fixtures.tssrc/renderer/src/components/workspace-cleanup/workspace-cleanup-presentation.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e8c3c299-fd1a-42c7-8b3e-8192d9e2bbf0
📒 Files selected for processing (2)
tests/e2e/helpers/orca-app.tstests/e2e/helpers/seeded-repo-worktree-visibility.ts
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
mobile/app/h/[hostId]/index.tsx (1)
1179-1186: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the extra FAB clearance in the nearby why-comment.
This padding now reserves space for both the bottom inset and the floating create button, but the comment still only explains the inset case. Please mention the FAB too so the extra clearance does not look accidental.
Suggested comment update
- // Why: edge-to-edge — the list scrolls under the system nav bar - // while reserving insets.bottom keeps the last worktree row reachable - // above the Samsung 3-button nav / iOS home indicator. + // Why: edge-to-edge — reserve the system bottom inset and, on phone + // layouts, extra clearance so the last row can scroll above the FAB.Source: Coding guidelines
mobile/src/worktree/mobile-worktree-activation-source.test.ts (1)
4-5: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftReplace source-snapshot assertions with behavior checks
These expectations are tied to JSX/style formatting, so harmless refactors can break the test while real runtime regressions still pass. RenderHostScreen/MobileCreateWorkspaceFaband assert the FAB’s visibility/state directly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5cbd4365-ee1f-4160-a96d-07b0264a736c
📒 Files selected for processing (6)
mobile/app/h/[hostId]/index.tsxmobile/src/worktree/MobileCreateWorkspaceFab.tsxmobile/src/worktree/mobile-worktree-activation-source.test.tstests/e2e/golden-core-flows.spec.tstests/e2e/helpers/orca-app.tstests/e2e/helpers/seeded-repo-worktree-visibility.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/e2e/helpers/orca-app.ts
Co-authored-by: Orca <help@stably.ai>
|
@brennanb2025 oops I might have checked in some code for this already |
|
@brennanb2025 here is my PR #6710 I think your PR has more stuff? not sure why it has a lot more files |
Co-authored-by: Orca <help@stably.ai>
|
Closing this because the actual mobile host-list FAB fix landed separately in #6710. This PR contains extra exploratory/stabilization work beyond the original request. |
Summary
Moves the new-workspace
+action on the actual Orca Mobile host/worktree list from the phone top toolbar to a floating bottom-right button. The button opens the existingNewWorktreeModalControllerpath; this does not add a new creation backend path or change SSH/RPC creation behavior.Embedded/tablet host-list layouts keep their existing toolbar
New workspaceaction.Design Approach
mobile/app/h/[hostId]/index.tsxso the phone toolbar no longer renders the new-workspace+.NewWorkspaceFabcomponent for the bottom-right mobile action, with mobile design tokens, accessibility state, shadow/elevation, and safe-area-aware placement.SectionListbottom clearance on phone layouts so the last worktree row remains reachable above the floating button./tmp/orca-piddock-designs/mobile-host-worktree-fab.md.Design Review
Design review completed cleanly. The reviewer added guardrails to keep the FAB token-based, accessible, and scoped to the phone host list while preserving the embedded toolbar action.
Implementation
mobile/app/h/[hostId]/index.tsx: removed the phone-toolbar create button, renders the bottom-right FAB after the list, and reserves bottom clearance.mobile/src/components/NewWorkspaceFab.tsx: provides the accessible phone FAB used by the host list.mobile/src/worktree/mobile-worktree-activation-source.test.ts: covers phone placement, FAB accessibility/elevation, and embedded toolbar preservation.tests/e2e/golden-core-flows.spec.ts: fixed CodeRabbit's earlier stabilization finding by only using display-name repo fallback when it is unique.Completeness
Completeness verification confirmed the requested behavior is implemented for the actual mobile host/worktree list from Brennan's screenshot. Embedded/tablet behavior remains intact.
Headline Behavior
Implemented: on phone mobile, the add-worktree/new-workspace
+is now a bottom-right floating button instead of a top-toolbar button.Performance
Perf audit result: clean.
Touched hot paths:
Pressableoutside theSectionListrows.No polling, subprocess, cache, startup, subscription, or row-render logic changed.
Code Review
Two-reviewer code-review loop completed. One reviewer was clean; the other found the missing floating elevation/shadow treatment. That was fixed and covered by regression tests.
CodeRabbit actionable feedback was addressed:
Remaining CodeRabbit notes are non-actionable nits about preferring render tests over source assertions.
Validation
Merge-confidence validation verdict:
land.Local checks run:
pnpm exec vitest run --config mobile/vitest.config.ts mobile/src/worktree/mobile-worktree-activation-source.test.tspassed, 4 testspnpm exec oxlint 'mobile/app/h/[hostId]/index.tsx' mobile/src/components/NewWorkspaceFab.tsx mobile/src/worktree/mobile-worktree-activation-source.test.ts tests/e2e/golden-core-flows.spec.tspassedpnpm exec oxfmt --check 'mobile/app/h/[hostId]/index.tsx' mobile/src/components/NewWorkspaceFab.tsx mobile/src/worktree/mobile-worktree-activation-source.test.ts tests/e2e/golden-core-flows.spec.tspassedpnpm run typecheckpassedpnpm run lintpassed with one unrelated existinguseGitStatusPolling.tswarningpnpm run test:e2e -- tests/e2e/golden-core-flows.spec.tspassed, 2 testsgit diff --checkpassed before commitsAdditional delegated validation reported:
pnpm --dir mobile test src/worktree/mobile-worktree-activation-source.test.tspassed, 4 testspnpm --dir mobile test src/worktree/workspace-list-sections.test.ts src/worktree/workspace-view-settings.test.ts src/worktree/workspace-list-picker-options.test.ts src/host-route-action-state.test.tspassed, 33 testspnpm --dir mobile exec tsc --noEmitpassedManual screenshot evidence:
xcrun simctlis unavailable andorca emulator attach 'iPhone 17 Pro'returnsemulator_simctl_unavailable./var/folders/.../mobile-touch-fab-visible.pngevidence validated the desktop/touch sidebar surface, not the actual Orca Mobile screen, and should not be treated as evidence for this corrected request.Post-PR Stabilization
Complete for head
d663fa2f4ceb8387d56174af7eb378ab9376b226.CI checks passing:
verifyverifygolden e2e linux experimentgolden e2e mac experimentMergeability:
mergeable:MERGEABLEmergeStateStatus:CLEANSecurity And Compatibility
No new privileged operations, provider-specific behavior, network calls, subprocesses, or SSH/runtime execution paths were added. The FAB reuses the existing mobile new-worktree modal flow.
Remaining Risk
The remaining gap is visual device/simulator verification for the corrected mobile-app screen because Simulator tools are unavailable in this environment. Static/source validation and focused tests cover placement, action wiring, accessibility, embedded preservation, and list clearance, but they do not replace a real device screenshot.