Skip to content

feat(mobile): add opt-in Boring sidebar project folders - #29856

Open
ozeitis wants to merge 1 commit into
pingdotgg:mainfrom
ozeitis:feat/mobile-boring-sidebar
Open

ozeitis wants to merge 1 commit into
pingdotgg:mainfrom
ozeitis:feat/mobile-boring-sidebar

Conversation

@ozeitis

@ozeitis ozeitis commented Nov 3, 2026

Copy link
Copy Markdown

The native mobile Threads list is flat even when a user organizes their work with the web/desktop Boring sidebar. Mobile has project filters and repository grouping identities, but no option to browse the active list as collapsible project folders.

Add Settings → Labs → Boring sidebar (group by project) to the phone list and tablet navigation sidebar. This is an opt-in presentation of the established Boring sidebar capability from #21039; the default stays flat. It reuses mobile's existing project scopes, icons, preferences, and row components. There are no dependency, server, contract, or provider changes.

  • Pinned threads remain above folders. Snoozed and Settled remain separate shelves. Working threads stay in their project while this option is enabled; disabling it restores the previous Working shelf preference.
  • Folder state is saved on the device. Collapsed folders retain the selected thread and show hidden attention/unread state. Search lists matches across closed folders.
  • Repository grouping and environment/project filters keep their existing identities and behavior. Active rows within folders use recent user activity; pinned reordering is unchanged.

Verification

  • The grouping regression first failed on the implementation base because the grouping function did not exist, then passed with the change.
  • vp test run src/features/home/homeThreadList.test.ts src/features/threads/threadListV2.test.ts src/features/threads/useThreadListV2.test.tsx from apps/mobile: 69 passed.
  • vp run check:changed --concurrency 2: all checks passed, including 80 relevant tests, 14 selected React Compiler checks, affected typechecks, lint, formatting, and both knip checks.
  • Coverage includes host-scoped project identity, pins/shelves, ordering, collapse/reopen, selected rows, attention state, searching collapsed folders, mode-off restoration, and list identity across tab renders with 1,200 threads.

Native pass on iPhone 18 Pro and iPad Pro 13-inch (M5), iOS/iPadOS 27.0, Xcode 27.2, against an isolated server with three synthetic projects and nine threads:

  • Confirmed the initial flat list, enabled the Labs option, expanded/collapsed independent folders, filtered by project, and searched/opened a chat inside a collapsed folder.
  • Relaunched the iPhone app: the mode and collapsed folders persisted. Checked light/dark appearance, then disabled the option and confirmed the original flat list returned.
  • Checked the iPad sidebar in portrait and landscape, beside an open chat and after hiding/showing the sidebar. Collapsing the selected project's folder kept the selected chat visible and hid its sibling.

The shared fallback/Android sidebar is updated and typechecked, but Android runtime validation was not performed. Web and desktop retain their existing implementations. No live user data or real agent turns were used.

Before / after

All captures use synthetic fixtures. The images show the same build with the option disabled (existing behavior) and enabled.

iPhone: before iPhone: after
Flat mobile list Mobile project folders
iPad: before iPad: after
Flat tablet sidebar Tablet project folders

Collapse and search recording · Persisted folders in dark mode

Model and harness: GPT-6, OpenAI Codex.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Nov 3, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 6ec6d35

Macroscope's review found this PR approvable — Adds opt-in project folders to mobile thread navigation, with remembered collapse state and search across closed folders. Existing defaults remain unchanged, and turning the option off restores the previous layout and Working section preference.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

Adds an optional mobile setting that groups threads by project in the Threads list and tablet sidebar. Project folders can be collapsed, and their state is saved on the device. Search results remain available when folders are collapsed.

Changes: Mobile project folders

Layer / File(s) Summary
Save the sidebar preference
apps/mobile/src/persistence/mobile-preferences.ts, apps/mobile/src/features/threads/use-thread-list-v2-shelf-preferences.ts, apps/mobile/src/features/settings/ThreadSettingsSections.tsx, apps/mobile/src/features/settings/settings-search.ts
Adds the device-local Boring sidebar setting and collapsed-folder state. Adds the setting to Labs and its search terms. The Working shelf is disabled when Boring sidebar mode is enabled.
Build project-grouped list items
apps/mobile/src/features/threads/threadListV2.ts, apps/mobile/src/features/threads/useThreadListV2.ts, apps/mobile/src/features/threads/useThreadListV2.test.tsx
Adds project-folder list items and grouping by project. The list hook applies grouping when folder scopes are present and search is empty. Tests cover collapsed folders, ordering, search, and item-reference stability.
Wire folder rows into mobile lists
apps/mobile/src/features/threads/thread-list-v2-items.tsx, apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx, apps/mobile/src/features/home/homeThreadList.test.ts, docs/user/thread-sidebar.md
Adds the tappable project-folder row to the home list and tablet sidebar. Connects folder toggles and disables unpinned-row reordering in Boring sidebar mode. Adds grouping tests and mobile behavior documentation.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SettingsLabsRouteScreen
  participant MobilePreferences
  participant HomeScreen
  participant useThreadListV2
  participant ThreadListV2ProjectFolder
  SettingsLabsRouteScreen->>MobilePreferences: save boringSidebarEnabled
  HomeScreen->>useThreadListV2: pass folder scopes and collapsed project keys
  useThreadListV2-->>HomeScreen: return grouped list items
  HomeScreen->>ThreadListV2ProjectFolder: render project-folder item
  ThreadListV2ProjectFolder->>HomeScreen: request folder toggle
Loading

Suggested labels: size:L, 📱 Native Change

Suggested reviewers: juliusmarminge, maria-rcks, pixpmusic

Merge Risk: Minimal · up to 6ec6d

The opt-in project folders appear ready to merge after normal checks; no actionable issue was established in the reviewed behavior.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title "feat(mobile): add opt-in Boring sidebar project folders" matches the main change. The raw summary and PR objectives both describe an opt-in Boring sidebar setting that groups the mobile Thr…
Description check Passed The description covers the problem (flat mobile Threads list), the change (opt-in Labs setting reusing existing scopes, icons, preferences, and rows), and a detailed verification section with test cou…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(mobile): add opt-in Boring sidebar project folders" matches the main change. The raw summary and PR objectives both describe an opt-in Boring sidebar setting that groups the mobile Threads list and tablet sidebar into collapsible project folders. The title is specific, follows conventional-commit form, and stays within the changeset.

Full details: Description check

Explanation

The description covers the problem (flat mobile Threads list), the change (opt-in Labs setting reusing existing scopes, icons, preferences, and rows), and a detailed verification section with test counts, native device passes, and before/after screenshots. It also states what was not checked (Android runtime validation). The template's Scope and approval section is not clearly filled in: it does not link a triaged issue or maintainer approval. It cites #21039 as the established capability it configures, which partly addresses the focused-configuration exemption, but it does not explain why the option's effects stay within that capability or show approval. The template also asks for a model and harness line, which is present. Because the approval/scope justification is weak but the rest is thorough, the description is mostly complete.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ast-grep (0.51.1)

ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/rust/security/secrets-reqwest-hardcoded-auth-rust.yml

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between e1e520c and 6ec6d35.

Files selected for processing: 12
  • apps/mobile/src/features/home/HomeScreen.tsx
  • apps/mobile/src/features/home/homeThreadList.test.ts
  • apps/mobile/src/features/settings/ThreadSettingsSections.tsx
  • apps/mobile/src/features/settings/settings-search.ts
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/thread-list-v2-items.tsx
  • apps/mobile/src/features/threads/threadListV2.ts
  • apps/mobile/src/features/threads/use-thread-list-v2-shelf-preferences.ts
  • apps/mobile/src/features/threads/useThreadListV2.test.tsx
  • apps/mobile/src/features/threads/useThreadListV2.ts
  • apps/mobile/src/persistence/mobile-preferences.ts
  • docs/user/thread-sidebar.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

This PR now conflicts with main in apps/mobile/src/features/settings/ThreadSettingsSections.tsx and settings-search.ts. Main added a tool call visibility section and search terms in the same spots. Both sides are additive, so the fix is to keep both.

I have that merge ready, and check:changed plus the thread list tests pass on it. I can't push it because "Allow edits by maintainers" is off for this PR. Could you turn it on, or merge main yourself?

@Moulik-Budhiraja

Copy link
Copy Markdown

I opened ozeitis#1 against this branch. It makes the folders match desktop: no repeated project icon, one-line rows indented under the folder name, and the count only on collapsed folders. It also applies cleanly on top of the main merge Maria described.

@josham

josham commented Nov 7, 2026 •

Copy link
Copy Markdown

I tested 6ec6d352 on Android, which the description lists as untested: a physical Pixel 4a on Android 13, with a fresh dev-client build of this branch. The server was isolated, first seeded with migrate-dev-db, then with the synthetic projects from scripts/mobile-showcase-environment.ts.

Everything passed:

  • Settings → Labs → Boring sidebar turns on and off. Turning it off brings back the flat list.
  • Folders show per project, each with a thread count. Pinned threads stay above the folders, and Snoozed and Settled stay below them.
  • Collapsing a folder hides its threads. Search still finds a thread in a collapsed folder.
  • The setting and the collapsed folders are still there after force-stopping and relaunching the app.
  • Opening a thread from a folder and going back works.
  • Light and dark mode both look right.

I saw no Android-only problems.

Option off Option on
image image

@playcations

Copy link
Copy Markdown
Contributor

Sharing related Android work from #13141 in case it is useful to people following this PR. I’ve been maintaining a personal phone-focused fork that combines an inbox-style overview with collapsible project groups. It keeps Working as a separate section above the folders.

The current fork includes:

  • Collapsible project groups, with remembered open/closed state and a new-thread action per project. Grouped rows omit repeated project information, and searching reveals matches in closed folders.
  • A collapsible Pinned section, with its own saved state.
  • Working stays available with project grouping and appears above the project folders.
  • Optional Needs you, Failed, and Completed sections collect unpinned threads above Working and the project folders. Completed and Failed track finished runs you have not opened; an open thread stays in its section until you leave it.
  • Status counts on collapsed folders show working and unread completed threads, using the same status icons as their rows. Attention state remains visible while a folder is closed.
  • Mark unread in an open thread's More actions menu lets a finished thread return to its inbox section.
  • One shared Settled section, plus the existing Snoozed section below the folders.
  • Read-state handling after resume/sync waits briefly for a finished thread to be visible before marking it read, including when a terminal or inspector covers it.

Pinned currently stays first. The optional inbox sections and Working sit above the project groups; Snoozed and one shared Settled section stay below them. Grouping applies to the main active list, while the other sections remain global.

Updated Android prerelease and APK — 2.2.0-nightly.20261108, refreshed against November 8 upstream. The release includes the full feature list, source provenance, checksum, and the gallery below. It is an unofficial ARM64 build from this fork.

Actual Pixel / Android 10 captures with synthetic projects and chats:

Project with several chats Inbox sections and project groups
Three chats inside an expanded project Needs you and Failed above Completed, Working and project groups
Settings, collapsed overview, and Mark unread
Collapsed overview Labs controls
Collapsed sections with a single shared Settled section Current Labs controls for grouping and inbox sections

Mark unread with a short demo conversation

vp run check:changed passed, including 106 focused tests. The current build was exercised on a Pixel running Android 10; iOS and tablet runtime were not tested.

Prepared with GPT-6.1 Sol in Codex through T3 Code.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants