Skip to content

fix(web): filter the archive by the shared settings scope - #198

Merged
pandec merged 2 commits into
devfrom
fix/archive-settings-scope
Sep 14, 2026
Merged

pandec merged 2 commits into
devfrom
fix/archive-settings-scope

Conversation

@pandec

@pandec pandec commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Picking a project on Settings > Archive always showed "This project is no longer available." The archive kept its own filter in the ?project= search key, as <environmentId>:<projectId>. Upstream's shared settings scope (pingdotgg#10636) now reads that same key as a logical group key, so every pick resolved to a missing project and the layout hid the page.

The archive now reads the shared settings scope instead of owning a filter. The project axis narrows by logical group, so a grouped project keeps every checkout's threads together, and the environment and checkout axes narrow the threads inside a group. The page's own project dropdown is gone since the breadcrumb selects already cover it. Deep links from the command palette, project settings, and the legacy sidebar pass the group key.

Fork-only change, so no screenshots.

Model: Claude Fable 5.1 through T3 Code with the Claude Code harness.

Summary by CodeRabbit

  • New Features

    • Archived threads now follow the environment, project, checkout, or machine scope selected in the settings breadcrumb.
    • Opening archived threads from a project or command palette action automatically applies the relevant project scope.
    • Archived thread search now works within the active scope.
  • UI Changes

    • Replaced the archived-thread project picker with a simpler search-focused layout.
    • Updated empty-state messaging to reflect scope-based filtering.
    • Clarified documentation for archived-thread navigation and filtering.

Picking a project on Settings > Archive showed "This project is no longer
available." The archive stored its filter in the same `?project=` search
key the settings layout now reads as the shared scope, but wrote a
`<environmentId>:<projectId>` value where the layout expects a logical
group key. The lookup failed and the layout replaced the page with the
unavailable-scope message.

The archive now reads the shared scope instead of keeping its own filter.
The project axis narrows by logical group, so every checkout of a grouped
project stays together, and the environment and checkout axes narrow the
threads inside a group. The page's own project dropdown is gone; the
breadcrumb selects cover it. Deep links from the command palette, the
project settings page, and the legacy sidebar pass the group key.
Review follow-ups. A project scope now also matches an archive group that
keys one of the project's live checkouts under a different logical key,
which happens when the archive snapshot carries a fresher repository
identity than the live project. A scope pinned to one environment only
fetches that environment's archive, so another machine's outage or slow
load no longer marks the view failed or pending. The global "open
archived threads" actions clear the scope explicitly, since the settings
layout keeps the previous selection when a navigation names no keys.
@pandec
pandec marked this pull request as ready for review September 14, 2026 05:50
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

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: e56576b2-9c0f-462c-8d1b-0e422f9bc0aa

📥 Commits

Reviewing files that changed from the base of the PR and between 701c59d and 2ca13b6.

📒 Files selected for processing (11)
  • README.md
  • apps/web/src/archivedProjectFilter.test.ts
  • apps/web/src/archivedProjectFilter.ts
  • apps/web/src/components/CommandPalette.logic.test.ts
  • apps/web/src/components/CommandPalette.logic.ts
  • apps/web/src/components/CommandPalette.tsx
  • apps/web/src/components/LegacySidebar.tsx
  • apps/web/src/components/Sidebar.tsx
  • apps/web/src/components/settings/ProjectSettingsPanel.tsx
  • apps/web/src/components/settings/SettingsPanels.tsx
  • apps/web/src/routes/settings.archived.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Archived-thread filtering now follows the settings scope. The project picker and route-level project filter were removed. Navigation resolves logical project groups or preserves the current scope.

Changes

Archived thread scope

Layer / File(s) Summary
Scope resolution and matching
apps/web/src/archivedProjectFilter.ts, apps/web/src/archivedProjectFilter.test.ts
The filtering API now resolves environment, project, checkout, and machine scope identities. Archived groups and threads match those identities. Tests cover grouped projects, environments, checkouts, alternate keys, and deferred empty states.
Scoped archive panel
apps/web/src/components/settings/SettingsPanels.tsx, apps/web/src/routes/settings.archived.tsx
ArchivedThreadsPanel reads settings scope directly, limits environment queries when scoped, applies scope matching, and removes the project picker. The route renders the panel directly without project search parsing.
Archive navigation and documentation
apps/web/src/components/CommandPalette.tsx, apps/web/src/components/CommandPalette.logic.ts, apps/web/src/components/CommandPalette.logic.test.ts, apps/web/src/components/LegacySidebar.tsx, apps/web/src/components/Sidebar.tsx, apps/web/src/components/settings/ProjectSettingsPanel.tsx, README.md
Archive entry points now pass logical project keys, clear explicit filters, or preserve the current settings scope. Command palette tests, comments, and README text describe the updated behavior.

Priority: ⬇️ Low

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant SettingsScope
  participant ArchivedThreadsPanel
  participant ArchivedSnapshotQuery
  participant ScopeMatchers
  SettingsScope->>ArchivedThreadsPanel: provide resolved settings scope
  ArchivedThreadsPanel->>ArchivedSnapshotQuery: query scoped environment IDs
  ArchivedThreadsPanel->>ScopeMatchers: match archived groups and threads
  ScopeMatchers-->>ArchivedThreadsPanel: matching archived items
Loading

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 2ca13

Archive navigation and filtering preserve the intended settings scope without exposing unrelated threads. The change is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 10 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: filtering the archive by the shared settings scope.
Description check ✅ Passed The description clearly explains the problem, implementation, filtering behavior, affected navigation paths, and scope. It does not use the template headings or include the checklist, and it states th…
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: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 10 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/archive-settings-scope

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.

@pandec
pandec merged commit ca041bb into dev Sep 14, 2026
4 checks passed
@pandec
pandec deleted the fix/archive-settings-scope branch September 14, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant