Skip to content

fix(mobile): preserve grouped project workspaces - #4642

Merged
shivamhwp merged 30 commits into
pingdotgg:mainfrom
shivamhwp:agent/fix-mobile-project-grouping
Aug 5, 2026
Merged

fix(mobile): preserve grouped project workspaces#4642
shivamhwp merged 30 commits into
pingdotgg:mainfrom
shivamhwp:agent/fix-mobile-project-grouping

Conversation

@shivamhwp

@shivamhwp shivamhwp commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

What

  • move physical-project deduplication and logical grouping into the shared client runtime
  • keep every matching workspace selectable in the mobile New Task picker through expandable repository groups
  • add the same global repository, repository-path, and separate grouping choices on mobile
  • make Home, the sidebar, and New Task follow that one global mobile choice, with no per-project grouping menu
  • store the mobile grouping choice in device-local preferences, with a compatibility write for the old boolean setting
  • migrate the web sidebar and mobile Home grouping onto the same shared grouping core

Why

Mobile grouped projects only by repository identity and then selected the first project in that group. With t3code, t3code-2, and t3code-3 pointing at the same upstream, only one activity-dependent row appeared. Grouping should organize projects without discarding their physical workspace targets.

Impact

  • repository grouping remains the default
  • grouped rows display and expand to all physical workspaces
  • New Task auto-selection now occurs only when exactly one physical workspace exists
  • mobile uses one global grouping mode across Home, the sidebar, and New Task; there are no per-project dropdowns
  • desktop and mobile share grouping behavior while keeping each client's selected setting local
  • the old mobile-only repository grouping implementation is removed

Screenshots

Captured on the connected A142 Android device against the current PR UI. The repository group contains five selectable workspaces.

Repository grouping Global “Keep separate” Global grouping options
Expanded pingdotgg/t3code repository group containing five selectable Android workspaces Keep separate mode showing physical workspaces as top-level Android project rows Android Project Grouping settings with the current chevron header and descriptions

Checks

  • vp test run packages/client-runtime/src/state/projectGrouping.test.ts apps/web/src/environmentGrouping.test.ts apps/mobile/src/features/home/homeThreadList.test.ts apps/mobile/src/features/home/home-list-options.test.ts apps/mobile/src/state/project-grouping.test.ts apps/mobile/src/features/threads/new-task-project-selection.test.ts — 46 tests passed
  • vp run --filter @t3tools/client-runtime typecheck
  • vp run --filter @t3tools/web typecheck
  • vp run --filter @t3tools/mobile typecheck
  • targeted lint, formatting, and git diff --check
  • physical Android device verification using the T3 Code Preview variant with the signed-in T3 Connect account and five same-repository workspaces across two environments — passed; repository grouping retained every target and Keep separate persisted across a route reload

Note

Preserve grouped project workspaces in mobile new task flow and settings

  • Introduces buildProjectGroups in client-runtime as a shared grouping mechanism, replacing per-client logic in both mobile and web sidebar grouping.
  • Replaces the mobile project grouping toggle with a dedicated settings screen (SettingsProjectGroupingRouteScreen) supporting repository, repository_path, and separate modes.
  • Mobile preferences now persist an explicit projectGroupingMode alongside the legacy boolean, with a resolver that prefers the new field and falls back to the old one.
  • The new task project picker now uses projectScopes from shared home scope logic, supporting expandable logical groups and auto-selecting when only one physical project exists.
  • Behavioral Change: grouped project titles and membership in the new task flow and home list now come from buildProjectGroups rather than the deleted repositoryGroups logic, which may change group labels for some workspace configurations.

Macroscope summarized db0db83.


Note

Medium Risk
Touches shared grouping logic used by web and mobile plus navigation/task-creation flows; behavior and labels can shift for some workspace layouts, though coverage is strong and legacy prefs are migrated.

Overview
Fixes mobile treating same-repo clones as a single selectable project by moving deduplication and logical grouping into shared buildProjectGroups in client-runtime, then wiring Home, sidebar, and New Task through that path (web sidebar grouping is refactored onto the same core).

Mobile settings replace the on/off Project Grouping switch with a Project Grouping screen offering repository, repository_path, and separate, persisted as projectGroupingMode with a dual-write to the legacy projectGroupingEnabled boolean for OTA rollback. New Task lists projectScopes with expandable groups when a logical group has multiple workspaces; draft auto-select runs only when exactly one physical project exists (resolveDraftProjectSelection). Singleton group labels now use the physical project title rather than repository display name.

Removes repositoryGroups / groupProjectsByRepository from mobile. Minor Android header spacing on settings sub-screens.

Reviewed by Cursor Bugbot for commit db0db83. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2aeb02f8-3c50-407f-af8f-e0a80bc83f0d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Jul 27, 2026
Comment thread apps/mobile/src/features/threads/NewTaskRouteScreen.tsx Outdated
Comment thread packages/client-runtime/src/state/projectGrouping.ts Outdated
@shivamhwp shivamhwp added the 🚀 Mobile Continuous Deployment Trigger Expo preview build label Jul 27, 2026
@shivamhwp shivamhwp removed the 🚀 Mobile Continuous Deployment Trigger Expo preview build label Jul 27, 2026
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Jul 27, 2026
@shivamhwp
shivamhwp marked this pull request as ready for review July 27, 2026 21:01
Comment thread apps/mobile/src/features/threads/NewTaskDraftScreen.tsx
Comment thread apps/mobile/src/features/home/home-list-options.ts
Comment thread packages/client-runtime/src/state/projectGrouping.ts
@macroscopeapp

macroscopeapp Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new settings screen for project grouping and refactors core grouping logic across web and mobile platforms. The changes add new user-facing functionality (expandable workspace groups, 3-way grouping mode selection) beyond what the 'fix' title suggests, warranting careful review of the behavioral changes.

You can customize Macroscope's approvability policy. Learn more.

Comment thread apps/mobile/src/features/threads/new-task-project-selection.ts
@shivamhwp
shivamhwp force-pushed the agent/fix-mobile-project-grouping branch from e6da0ca to fd21fbc Compare July 31, 2026 21:45
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Jul 31, 2026
T3 Code Test and others added 4 commits August 1, 2026 03:33

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 68550f9. Configure here.

Comment thread apps/mobile/src/state/project-grouping.ts
@shivamhwp
shivamhwp merged commit 47dfc65 into pingdotgg:main Aug 5, 2026
15 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 5, 2026
## What's Changed
* fix(mcp): unblock Kimi models in OpenCode with preview tools by @hwanseoc in pingdotgg/t3code#5128
* fix(web): clear main branch lint warnings by @t3dotgg in pingdotgg/t3code#5384
* fix(mobile): preserve grouped project workspaces by @shivamhwp in pingdotgg/t3code#4642
* fix(mobile): prevent Android thread search crash by @shivamhwp in pingdotgg/t3code#5386
* fix(web): truncate long project switcher names by @FllipEis in pingdotgg/t3code#5348
* fix(mobile): avoid double dividers between thread sections by @shivamhwp in pingdotgg/t3code#5391
* fix(web): keep the composer command menu anchored to the composer by @StiensWout in pingdotgg/t3code#5336
* fix(web): restore terminal link hover styles by @StiensWout in pingdotgg/t3code#5382
* fix(ci): isolate releases from shared API rate limits by @t3dotgg in pingdotgg/t3code#5394


**Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260805.1002...v0.0.32-nightly.20260805.1005

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260805.1005
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Aug 6, 2026
Co-authored-by: T3 Code Test <t3code-test@example.com>
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Aug 6, 2026
Co-authored-by: T3 Code Test <t3code-test@example.com>
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Aug 6, 2026
Co-authored-by: T3 Code Test <t3code-test@example.com>
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Aug 6, 2026
Co-authored-by: T3 Code Test <t3code-test@example.com>
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Aug 6, 2026
Co-authored-by: T3 Code Test <t3code-test@example.com>
vortechron pushed a commit to vortechron/void that referenced this pull request Aug 6, 2026
Co-authored-by: T3 Code Test <t3code-test@example.com>
(cherry picked from commit 47dfc65)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant