Skip to content

fix(web): preserve project filter through settings - #6480

Open
edoedac0 wants to merge 1 commit into
pingdotgg:mainfrom
edoedac0:agent/preserve-sidebar-project-filter-settings
Open

fix(web): preserve project filter through settings#6480
edoedac0 wants to merge 1 commit into
pingdotgg:mainfrom
edoedac0:agent/preserve-sidebar-project-filter-settings

Conversation

@edoedac0

@edoedac0 edoedac0 commented Aug 13, 2026

Copy link
Copy Markdown

Problem

The new sidebar kept its project filter in ThreadSidebar component state. Opening Settings replaces that component with the settings navigation, so returning to the thread sidebar reset the filter to “All projects.”

Fix

Hoist the selected project scope into AppSidebarLayout, which remains mounted across Settings navigation, and pass the value and setter into ThreadSidebar. Existing project validation and filtering behavior remains unchanged, and the filter is not persisted across reloads.

Impact

Users can open Settings and return without losing their selected sidebar project filter.

Validation

  • Manual web verification of filter → Settings → Back
  • pnpm --filter @t3tools/web typecheck
  • vp test run src/components/Sidebar.logic.test.ts src/components/ui/sidebar.test.tsx --project unit (111 tests)
  • Formatting and git diff --check

No screenshots included because the change only preserves state across navigation and has no visual before/after difference.

Note

[!NOTE]

Preserve project filter in sidebar across settings navigation

Lifts projectScopeKey state from Sidebar.tsx into AppSidebarLayout.tsx so the selected project filter survives re-renders caused by navigating through settings. The sidebar now receives the key and its change handler as props instead of managing its own local state.

Macroscope summarized 2439c03.


Note

Low Risk
Small React state lift with no API, auth, or persistence changes; behavior is limited to preserving in-session UI state across sidebar swaps.

Overview
Fixes the new thread sidebar resetting its project filter to “All projects” after visiting Settings.

projectScopeKey is lifted from Sidebar into AppSidebarLayout, which stays mounted when Settings replaces the thread sidebar with settings nav. ThreadSidebar now receives projectScopeKey and onProjectScopeKeyChange as props instead of owning local state. Existing validation (clearing the scope when the project disappears) and list filtering behavior are unchanged; the filter is still not persisted across reloads.

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

@coderabbitai

coderabbitai Bot commented Aug 13, 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: 67879be4-50dd-4c37-9a51-ddc1e220c714

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

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:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 13, 2026
@edoedac0
edoedac0 marked this pull request as ready for review August 13, 2026 15:09
@macroscopeapp

macroscopeapp Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 4c4b495

This PR performs a standard React state-lifting refactor, moving projectScopeKey from Sidebar to AppSidebarLayout to preserve the project filter when navigating to settings. The change is mechanical, limited in scope, and introduces no new functionality.

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

@edoedac0
edoedac0 force-pushed the agent/preserve-sidebar-project-filter-settings branch from 4c4b495 to 2439c03 Compare August 13, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 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.

1 participant