Repository navigation
feat(web,mobile): organize projects and threads with Spaces - #22655
nguyenphutrong wants to merge 17 commits into
Conversation
Persist context membership and themes, filter navigation and search, preserve draft context, and add Space navigation shortcuts. Focused mobile tests, TypeScript, lint, and SwiftLint passed. Native runtime verification is unavailable because device access is disabled.
Add context switching, assignment, scoped search and palette navigation, recent-thread restoration, and per-Space themes for web and desktop. Preserve draft context across retargeting and recover composer state when settings persistence fails. Focused tests, TypeScript, lint, independent review, and integrated Browser verification passed.
Use bottom dots and Ctrl+1–9 to switch Spaces, and show scoped projects in themed columns with pointer or long-press drag. Keep inherited threads moving with projects and explicit overrides in place. Reuse existing persistence and drag libraries, update untouched stored thread shortcuts, and retain custom bindings. Focused tests, scoped types/lint, independent review, and Browser verification passed; native device verification remains unavailable.
Show the active Space as a named pill among the sidebar dots and give the overview its own board icon, so the current context is visible without hovering. Spaces overview columns now size to their projects while keeping full-height drop zones, mark the current Space, and drop repeated captions and single-environment labels. Whole cards drag by mouse or long press, keyboard drag stays on the grip, and the drag preview matches the card. The Create a Space dialog uses the standard header, panel, and footer.
Create, rename, theme, and delete Spaces from the overview instead of a separate Settings section. One dialog handles create and edit, with theme balls drawn like Appearance so each option previews itself, and deleting asks for confirmation.
A Space theme pinned the appearance to its theme's base mode, so the Color scheme setting had no effect inside that Space. Space themes now swap only the palette; picking the Light or Dark theme for a Space still sets its mode.
While a Space with its own theme is open, the Themes cards change that Space's theme instead of the hidden app theme, and Use app theme returns the Space to the app-wide theme.
# Conflicts: # apps/web/src/components/ChatView.tsx
assignCreatedProjectSpace and assignCreatedThreadSpace run after the project or thread exists. A rejected settings write aborted the onboarding import after its first project and skipped the follow-up steps in other create flows; it now shows the Spaces error toast instead.
SpaceAssignment reads settings.spaces through a selector; the mock returned the whole settings object.
…paces # Conflicts: # apps/mobile/src/features/home/HomeRouteScreen.tsx # apps/mobile/src/features/home/HomeScreen.tsx # apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx # apps/mobile/src/features/projects/AddProjectScreen.tsx # apps/mobile/src/features/settings/SettingsRouteScreen.tsx # apps/mobile/src/features/threads/NewTaskDraftScreen.tsx # apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx # apps/mobile/src/features/threads/ThreadRouteScreen.tsx # apps/mobile/src/features/threads/new-task-flow-provider.tsx # apps/mobile/src/persistence/mobile-preferences.ts # apps/mobile/src/state/pending-new-tasks-model.test.ts # apps/mobile/src/state/queries.ts # apps/mobile/src/state/use-composer-drafts.test.ts # apps/server/src/keybindings.ts # apps/server/src/orchestration-v2/ThreadSearch.ts # apps/web/src/components/ChatView.tsx # apps/web/src/components/CommandPalette.tsx # apps/web/src/components/LegacySidebar.tsx # apps/web/src/components/PullRequestThreadDialog.test.ts # apps/web/src/components/PullRequestThreadDialog.tsx # apps/web/src/components/Sidebar.tsx # apps/web/src/components/settings/ProjectSettingsPanel.test.tsx # apps/web/src/components/settings/ThemeSettings.tsx # apps/web/src/hooks/useHandleNewThread.ts # apps/web/src/hooks/useNewProject.ts # apps/web/src/hooks/useScratchProject.ts # apps/web/src/hooks/useTheme.test.ts # apps/web/src/hooks/useThreadActionMenu.ts # apps/web/src/keybindings.test.ts # apps/web/src/keybindings.ts # apps/web/src/routes/_chat.index.tsx # apps/web/src/state/queries.ts # docs/user/keybindings.md # packages/contracts/src/keybindings.test.ts # packages/contracts/src/settings.ts # packages/shared/src/keybindings.ts
|
This PR does not currently meet the contribution guide's prior-approval requirement. Adds Spaces, assignment and navigation of projects/threads. Scope section says no maintainer has approved the direction; discussion #6733 supplies no approval for this implementation. Please obtain explicit upstream maintainer approval of the direction and scope in the relevant Ideas discussion and link the approval comment when requesting reconsideration. For a substantial bug fix, establish the failure and intended behavior through maintainer issue triage. Verification and draft status do not replace that requirement. Thank you for trying to help improve T3 Code. If you think this closure was a mistake and the PR should be reopened, please tag @UtkarshUsername. Closed at the request of @UtkarshUsername. |
Problem
Users with many projects have no way to separate unrelated work (for example Work and Personal) in the sidebar, command palette, or thread search. Everything shows in one list. Discussion: #6733.
Change
Adds device-local Spaces that group projects and their threads.
spaces.next/spaces.previous(Alt+Shift+→/←) andCtrl+1–9switch from the keyboard.Why it spans several packages:
packages/contracts: theSpacesStatesettings schema and the Space keybinding commands.packages/client-runtime: the shared membership rules used by web and mobile.apps/server:ThreadSearchaccepts an optional thread-id filter, so search results are limited to the Space before the result limit applies.apps/webandapps/mobile: the UI.Keybinding change:
Ctrl+1–9on Windows and Linux toCtrl+Alt+1–9.Cmd+1–9on macOS is unchanged.Scope and approval
Proposed with screenshots in #6733 (comment). No maintainer has approved the direction yet. I'm happy to split this (web/desktop first, mobile later) or drop parts such as per-Space themes.
Verification
Focused tests, all passing on the merged head:
packages/client-runtime:src/state/spaces.test.ts,src/state/threadSearch.test.ts(17 tests)apps/server:src/orchestration-v2/ThreadSearch.test.ts,src/keybindings.test.ts(25 tests; covers both legacy thread-jump defaults, removals, and a full config)packages/contracts:src/keybindings.test.ts(3 tests)apps/web:useSpaces,useHandleNewThread,useThreadActionMenu,keybindings,PullRequestThreadDialog(58 tests)apps/mobile:use-composer-drafts,features/spaces,reactCompilerCoverage,dependency-graph(979 tests)Manual check on web/desktop. Before, the sidebar has no Spaces. After:
Not checked: the mobile drag-and-drop overview on a device or simulator after the latest merge from
main.Written with GPT-6.1 SOL and Opus 5.5 (Claude Code).