Skip to content

feat(web): filter sidebar from thread menu - #8719

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
saphid:feat/sidebar-thread-project-filter
Sep 18, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
saphid:feat/sidebar-thread-project-filter

Conversation

@saphid

@saphid saphid commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Filtering to a thread’s project currently requires opening the project picker in the sidebar header. This adds “Filter by ” to the sidebar thread’s context menu, changing to “Show all projects” when that project is already selected.

The action reuses the existing persisted project scope and resolves projects by environment and project ID. It leaves the open thread in place and shares the project-group lookup with “Project settings”. The chat-header menu omits this sidebar-only action.

Rebased onto main at c542b781c6. Upstream project-scope persistence (#9416), thread-menu project settings (#8925), and the compact sidebar header (#11315) are retained; none supplies this shortcut. No new store, wire contract, or server behavior is needed.

Verification

  • vp test run apps/web/src/components/threadActionMenu.logic.test.ts apps/web/src/components/Sidebar.logic.test.ts: 169 passed.
  • vp run typecheck in apps/web: passed after refreshing local dependencies with vp i.
  • vp lint and vp fmt --check on the four changed files: passed; existing Sidebar lint warnings remain.
  • Independent read-only Claude Fable 5 high review: two minor comment/test findings fixed, then no actionable findings on the final patch; process exit 0. The 12 menu tests and web typecheck passed again after those fixes.

Web and desktop share this menu. Native mobile uses a separate thread list and is unchanged. Desktop shell and remote/relay connections were not exercised; project matching includes the environment ID. The existing project picker remains another way to set or clear the same scope.

Before and after

These are earlier full-web-client recordings, using five threads across Harbor and cedar, light theme, at 1280×800. The GIFs focus on the sidebar. They show the same menu labels, icon, filter/reset actions and retained open thread as this patch. Upstream has since folded the project picker into the search row (#11315), so the surrounding header is older; these are not fresh captures of the rebased head. Both GIFs and linked MP4s were downloaded and decoded successfully during this update.

Before: the thread menu has no project-filter action.

Before: no project-filter action in the thread menu

After: “Filter by Harbor” hides the cedar thread; “Show all projects” restores it. The open Harbor thread stays selected.

After: filter to Harbor and restore all projects

Before recording · After recording

Coordination trace: T3 thread aaade76d-4ec0-4717-96ed-490d10a783a9

Updated with GPT-6 in the Codex harness (T3 Code). Independent review: Claude Fable 5 high via direct Claude Code CLI.

Summary by CodeRabbit

  • New Features

    • Added project filtering to thread context menus.
    • Users can filter the sidebar by a thread’s project or return to viewing all projects.
    • Menu labels and availability now reflect the currently active project scope.
    • Project filtering is available when a thread belongs to a recognized project.
  • Tests

    • Added coverage for project-filter menu visibility, labels, icons, and ordering.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 182f0507-35db-4d09-88b9-0abb7a5edd89

📥 Commits

Reviewing files that changed from the base of the PR and between a352597 and 44fa39e.

📒 Files selected for processing (3)
  • apps/web/src/components/Sidebar.tsx
  • apps/web/src/components/threadActionMenu.logic.test.ts
  • apps/web/src/components/threadActionMenu.logic.ts

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


📝 Walkthrough

Walkthrough

The thread action menu now supports project filtering. The sidebar resolves a thread’s project group, displays a filter or reset action, and updates the project scope. The chat-header menu keeps project filtering disabled.

Changes

Project filtering

Layer / File(s) Summary
Project filter menu contract
apps/web/src/components/threadActionMenu.logic.ts, apps/web/src/components/threadActionMenu.logic.test.ts, apps/web/src/hooks/useThreadActionMenu.ts
The menu supports conditional project-filter items with active and inactive labels. Tests validate visibility, icon, label, and order. The chat-header menu passes projectFilter: null.
Sidebar context-menu integration
apps/web/src/components/Sidebar.tsx
The sidebar resolves the thread project group, passes project-filter metadata, toggles projectScopeKey, reuses the resolved group for project settings, and updates callback dependencies.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Sidebar
  participant ThreadActionMenu
  User->>Sidebar: Open thread context menu
  Sidebar->>ThreadActionMenu: Provide projectFilter
  ThreadActionMenu-->>Sidebar: Show filter or reset action
  User->>Sidebar: Select project-filter action
  Sidebar->>Sidebar: Set or clear projectScopeKey
Loading

Suggested reviewers: t3code, maria-rcks

Merge Risk: ⚪ Minimal · up to 44fa3

The project-filter action is gated appropriately and toggles the selected thread’s project scope without affecting the chat-header menu.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly summarizes the main change: adding sidebar filtering from a thread context menu.
Description check ✅ Passed The description provides a clear change summary, rationale, UI recordings, verification results, scope limitations, and implementation context. It does not reproduce the template headings or checklist…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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:M 30-99 changed lines (additions + deletions). labels Aug 30, 2026

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

One finding: the new filter-by-project menu item is the only entry in the shared thread action menu without an icon, which misaligns its label in the web context-menu fallback. Details inline.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/threadActionMenu.logic.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a new context-menu workflow that changes the persisted sidebar scope and which threads are visible. The implementation is compact, but it modifies shared production sidebar behavior and lacks direct integration coverage for the dispatch path.

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

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 5, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 5, 2026 11:24

Dismissing prior approval to re-evaluate c845a73

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 5, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 7, 2026 04:04

Dismissing prior approval to re-evaluate 723f161

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@saphid
saphid force-pushed the feat/sidebar-thread-project-filter branch from b4477dc to a352597 Compare September 11, 2026 02:55
saphid and others added 2 commits September 13, 2026 06:16
Add "Filter by <project>" to a sidebar thread's context menu, and
"Show all projects" when the list is already scoped to that project.
It reuses the persisted sidebar project scope and is omitted from the
chat-header menu, which has no scoped list behind it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@saphid
saphid force-pushed the feat/sidebar-thread-project-filter branch from a352597 to 44fa39e Compare September 12, 2026 20:20
@saphid

saphid commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Reviewed the existing bot feedback against the rebased patch:

  • The missing-icon finding remains fixed: both project-filter labels use the existing folder-tree icon, with focused menu coverage. The inline thread is already resolved.
  • I am not adding docstrings solely to raise CodeRabbit’s coverage percentage. The current change adds no function, the project-filter state already documents its sidebar-only meaning, and AGENTS.md asks us to avoid narrating behavior that the source and tests already make clear. The warning also refers to six files, while this PR now changes four.
  • Macroscope’s request for human review is acknowledged; this update does not treat bot checks as maintainer approval.

No maintainer review requests were present. Upstream #9416, #8925 and #11315 do not supersede this shortcut; the branch retains their behavior and is rebased without merge commits.

@saphid

saphid commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Latest-head follow-up (44fa39e048): all checks have completed successfully or are neutral/skipped; CodeRabbit reviewed this head with no actionable findings.

Macroscope’s updated approvability note is accurate about automated coverage: the focused tests cover menu construction and sidebar logic, not a full rendered context-menu dispatch. The PR includes earlier full-client recordings exercising filter and reset, with the older header and untested current-head integration explicitly disclosed. I am retaining that limit for human review rather than adding a callback-wiring test that AGENTS.md expressly discourages. The neutral approvability result is not being presented as maintainer approval. No functional correctness finding or unresolved inline thread remains.

@juliusmarminge
juliusmarminge merged commit 256e630 into pingdotgg:main Sep 18, 2026
24 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 18, 2026
## What's Changed
* fix(web): keep PR panel actions in the current thread by @Bil0000 in pingdotgg/t3code#12320
* fix(web): keep browser pages aligned during panel animations by @juliusmarminge in pingdotgg/t3code#12329
* fix(server): bound provider event log records before serialization by @juliusmarminge in pingdotgg/t3code#12305
* fix(server): reject file rewind in shared workspaces by @juliusmarminge in pingdotgg/t3code#12306
* fix(server): capture checkpoints when baseline lookup fails by @juliusmarminge in pingdotgg/t3code#12307
* fix(server): refresh file search outside checkpoint processing by @juliusmarminge in pingdotgg/t3code#12308
* fix(web): keep chat from jumping when the scroll-to-end pill mounts by @Yash-Singh1 in pingdotgg/t3code#12317
* fix(server): checkpoint workspaces with empty nested repositories by @saphid in pingdotgg/t3code#12181
* chore(review): keep review bots out of the vendored .repos references by @juliusmarminge in pingdotgg/t3code#12333
* fix(server): pass Codex image attachments by path to avoid oversized requests by @saphid in pingdotgg/t3code#11050
* feat(web): filter sidebar from thread menu by @saphid in pingdotgg/t3code#8719
* feat(web): open diff files from a right-click context menu by @saphid in pingdotgg/t3code#11842
* fix(web): keep numbered jumps from stealing browser tabs by @Yash-Singh1 in pingdotgg/t3code#12315
* fix(mobile): define Clerk colors in every Uniwind theme by @juliusmarminge in pingdotgg/t3code#12344
* refactor(web): reuse searchable picker inputs by @juliusmarminge in pingdotgg/t3code#12353
* fix(web): share touch-visible pull request edit actions by @juliusmarminge in pingdotgg/t3code#12370
* fix(mobile): share accessible connection trace controls by @juliusmarminge in pingdotgg/t3code#12371
* fix(mobile): share settings control row layout by @juliusmarminge in pingdotgg/t3code#12356
* refactor(web): share diagnostic process actions by @juliusmarminge in pingdotgg/t3code#12358
* refactor(mobile): share Android toolbar search fields by @juliusmarminge in pingdotgg/t3code#12359
* refactor(web): share settings group surfaces by @juliusmarminge in pingdotgg/t3code#12360
* refactor(web): reuse inline settings actions by @juliusmarminge in pingdotgg/t3code#12362
* refactor(mobile): share thread list section controls by @juliusmarminge in pingdotgg/t3code#12363
* refactor(mobile): share connection form fields by @juliusmarminge in pingdotgg/t3code#12364
* refactor(mobile): share local environment lists by @juliusmarminge in pingdotgg/t3code#12365
* refactor(mobile): share file preview feedback by @juliusmarminge in pingdotgg/t3code#12368
* refactor(web): share standalone page layout by @juliusmarminge in pingdotgg/t3code#12354
* fix(mobile): share settings action row defaults by @juliusmarminge in pingdotgg/t3code#12369
* fix(mobile): share request action button defaults by @juliusmarminge in pingdotgg/t3code#12366
* fix(web): share accessible color picker controls by @juliusmarminge in pingdotgg/t3code#12355


**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260917.1880...v0.0.43-nightly.20260918.1895

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260918.1895
aorwall added a commit to aorwall/t3code that referenced this pull request Sep 18, 2026
Merges `pingdotgg/t3code` `6d1d549441..9946541` (50 commits) into the
fork.

Landed 304 files against 303 in the upstream range — the extra one is
`docs/fork/inventory.json`. Fork delta is 777 files, unchanged from the
last
merge. Everything upstream changed landed.

Six conflicts, each resolved with the verdict `preflight.mjs` printed;
five were
a single hunk. Details and reasoning are in
[the merge tracker](docs/fork/upstream-merge-log.md). The two worth
reading here:

- **`ChatView.tsx`** — pingdotgg#12306 added `activeWorktreePath !== null` to the
"Revert
  files too" button, on the line the fork gates with
`FEATURES.checkpointFileRestore`. Kept both as a conjunction: upstream's
condition is about a shared workspace, the fork's is about what Moatless
  serves, and they answer different questions.
- **`FilePreviewPanel.tsx`** (the one `decide`) — pingdotgg#10909 restructured
the file
read so a folder is knowable as a folder, adding `isDirectory` /
`previewPath`.
Took that whole and re-stated the fork's `onRetargetFile` effect on top.

`apps/web/src/routeTree.gen.ts` was regenerated rather than
hand-resolved.

One judgement call: pingdotgg#11598's new `/settings/storage` page is
deliberately **not**
given a `FEATURES` gate. It self-gates on two new capability booleans
Moatless
does not report and renders an explanatory notice, so a fork flag would
duplicate
a decision the wire already makes — and would have to be deleted again
the day
the capability is reported.

## Usable as-is

- Diff files open from a right-click context menu (pingdotgg#11842).
- Sidebar filtering from the thread menu (pingdotgg#8719).
- Command palette matches thread IDs (pingdotgg#11185).
- Mobile settings are easier to navigate and scope (pingdotgg#12272); favorites
in the
  mobile model picker (pingdotgg#12231).
- Thoughts collapse within tool groups (pingdotgg#12302); thoughts and failed
tool calls
  stay in one activity row (pingdotgg#12270).
- Folder links from chat open the file tree instead of a broken preview
(pingdotgg#10909).
- Chat no longer jumps when the scroll-to-end pill mounts (pingdotgg#12317);
numbered
jumps no longer steal browser tabs (pingdotgg#12315); composer banners stay
compact
  (pingdotgg#12166).
- A large batch of shared-component refactors across web and mobile
(pingdotgg#12353pingdotgg#12371).

## Unsupported in Moatless / needs implementation

- **Pull request files marked as viewed** (pingdotgg#7721) — adds
`pullRequests.filesViewed` and `pullRequests.setFilesViewed`, which
record
which files a reviewer has checked off, persisted server-side. Both
declare
  `PullRequestRpcError` and so arrived already refusing;
`unsupported-methods.mjs` reported ADD 0 / DROP 0 as a result. Closes
with the
  rest of the `pullRequests.*` group, not separately.
- **Multi-model threads in separate worktrees** (pingdotgg#12179) — one prompt
starts a
thread per selected model, each in its own worktree. The model picker is
the
same `worktree` send-mode control `FEATURES.worktreeSelection` already
gates,
  so the fan-out is simply not offered. The same commit adds a
  `requiredWorktreeBootstrap` capability the backend does not report.
- **Automatic storage cleanup settings** (pingdotgg#11598) — the
`/settings/storage` page,
gated by the backend's absent `storageCleanup` and
`projectWorktreeCleanup`
  capabilities. Needs the sweeper below before the page means anything.
- **Command palette entries for the pull requests and usage pages**
(pingdotgg#12211) —
  the PR half is covered by `FEATURES.pullRequestSurface`.

## Backend behavior to consider reproducing in Moatless

Eight items, recorded in full in [the gaps register](docs/fork/gaps.md)
under
_Runtime fixes upstream made to its own server_. Five are on the
checkpoint and
usage paths the previous merge already opened:

- **Reject a file rewind on a shared or nested-owner cwd** (pingdotgg#12306,
`CheckpointReactor.ts`) — a checkpoint holds the whole checkout, so
restoring
one erases a sibling's uncommitted work. Moatless isolates by sandbox,
but a
workspace with nested repositories has the same overlap inside one task.
- **Capture a checkpoint when the baseline lookup fails** (pingdotgg#12307) — the
case
  that silently leaves a turn with no restore point.
- **Move the file-search refresh off the checkpoint path** (pingdotgg#12308) — it
  extended every capture by an index walk.
- **Survive an empty nested repository, and clear a stale index lock**
(pingdotgg#12181,
`GitVcsDriver.ts`) — git cannot stage an embedded repository until it
has a
commit. The lock half matters most here: forced termination is the
normal end
  of a sandboxed task.
- **Bound the provider event log before serialization** (pingdotgg#12305,
`EventNdjsonLogger.ts`) — otherwise it grows proportionally to tokens
streamed.
- **Keep usage totals across transcript cleanup** (pingdotgg#12304,
`UsageService.ts`) and
  **resolve a contested fingerprint to the newest scan** (pingdotgg#10315,
  `usageMerge.ts`). Moatless serves `server.getUsageSummary` itself.
- **Pass provider image attachments by path** (pingdotgg#11050,
`CodexAdapter.ts`) — the
turn/start request stops scaling with attachment size. A sandbox adds a
hop, so
  an oversized request costs more there.
- **Sweep stale worktrees and transcripts against retention rules**
(pingdotgg#11598,
`storageCleanup.ts`, with a workspace lease so two servers cannot sweep
the
same directory). A sandbox per task bounds the worktree half;
transcripts
  outlive the sandbox.

## Verification

`verify.mjs` — all 9 checks green on the first full pass, tests included
(333 test files, 5071 tests). No flaky retries and no caveats.

Contract drift: ADD 0 / DROP 0, so `packages/contracts/src/rpc.ts`
needed no
change. The `orchestration-decode-boilerplate` duplicate-add exception
went stale
— the colliding line is gone — and was deleted from `inventory.json` in
this
merge.

Owned-concern sweep: the three new
`apps/mobile/src/features/connection/` files
are false positives, all upstream extracting shared mobile components
out of
files it already owned, with no fork delta in any of them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Moatless task:
https://moatless.soaplabstest.com/tasks/c83db5aa-7c47-47c6-93f4-fe2f6f9f548e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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.

2 participants