Repository navigation
fix(mobile): scope the project picker to the Home scope and say just "Cloud" under Cloud - #6934
Conversation
…oud" under Cloud The new-session project picker listed every online machine's projects plus a Cloud section, choosing the place a second time when Home's scope filter already had. Targets now follow that scope: the selected machine's projects, or the API's cloud projects. Under Cloud the composer chip is a plain "Cloud" and opens nothing — a sandbox has no real project structure yet, and the legacy v2_projects row the create resolves against is not worth showing. Pickers also pad their scroll content by the bottom safe-area inset; the last row sat under the home indicator and only showed on over-scroll.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe Home scope now limits chat targets to the selected host or cloud projects. Cloud targets use a non-interactive ChangesScoped chat creation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The project picker now follows the selected Home scope and prevents Cloud from exposing a misleading project picker, while preserving server-side validation and picker layout fixes. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant HomeScope
participant NewChatTargets
participant HostProjectAPI
participant CloudProjectsAPI
participant NewChatWidget
HomeScope->>NewChatTargets: provide active host or cloud scope
alt host scope
NewChatTargets->>HostProjectAPI: list projects for selected online host
HostProjectAPI-->>NewChatTargets: return host targets
else cloud scope
NewChatTargets->>CloudProjectsAPI: list cloud projects
CloudProjectsAPI-->>NewChatTargets: return cloud targets
end
NewChatTargets-->>NewChatWidget: return scoped targets
NewChatWidget->>NewChatWidget: render project chip or Cloud chip
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description clearly explains what changed, why it changed, implementation behavior, testing, manual QA status, and known limitations. It does not reproduce the template headings and checklist verbatim, but it provides the required information in equivalent sections.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
Why / Context
#6651 fanned
project.listacross every online host and appended a cloud target per API project, and the picker rendered all of it in sections. Home already has a scope filter that picks Cloud or a machine, so the picker was choosing the place twice. Its Cloud section was also the retiredv2_projectscatalog — nothing writes that table since #6436 (docs/cloud-sandbox-considerations.md› Model tracks it as Open), so presenting it as a project structure was noise.Separately, the picker's scroll content had 8px of bottom padding, so the last row sat under the home indicator and was only visible by over-scrolling.
How It Works
useNewChatTargetsreadsuseWorkspaceScope+useSelectedHost. Host scope → that machine'sproject.listonly, and only while it's online (an offline pick offers nothing rather than quietly moving you to another host or Cloud — same stance as the scope filter). Cloud scope → the API's cloud projects only. The composer, branch query and create path all hang off this hook, so switching scope at the top of Home re-targets the composer without re-picking.ProjectPickerScreenis a flat list; the Cloud/host section headers are gone.NewChatWidget: under Cloud the project chip is a plain "Cloud" label and inert. The row the create resolves against is still picked the waydefaultTargetalways did (last used, else first alphabetically) — the request is unchanged, the id just isn't surfaced. The "· Cloud" chip suffix is gone under host scope since the scope filter already says where you are.insets.bottom + 8.Manual QA Checklist
Run on an iPhone 17 (iOS 26) sim against production with a live host:
Testing
bun run testinapps/mobile: 47 passbunx biome checkon the changed files: cleanbunx turbo typecheck --filter=@superset/mobile: no errors in the changed files (18 pre-existing errors inpackages/workspace-fs, unrelated)Known Limitations
v2_projectsrow. With several rows in an org, which repo the sandbox clones is an invisible last-used-or-first choice from the phone. Internal-only, and it goes away when the environment entity replaces the row — the UI here won't need to change.Summary by cubic
Scopes the new-session project picker to the place already picked at the top of Home, so it no longer lists every online machine's projects plus a Cloud section. Under Cloud scope the composer chip reads just "Cloud" and opens nothing, since a sandbox has no project structure yet. Also pads the picker scroll content by the bottom safe-area inset so the last row no longer sits under the home indicator.
v2_projectsrow, unchanged, but the id is no longer surfaced in the UI.Written for commit 46896da. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes