Skip to content

fix(web): preserve project scope through settings - #9050

Closed
gsimone wants to merge 3 commits into
pingdotgg:mainfrom
gsimone:t3code/persist-project-selection-settings
Closed

fix(web): preserve project scope through settings#9050
gsimone wants to merge 3 commits into
pingdotgg:mainfrom
gsimone:t3code/persist-project-selection-settings

Conversation

@gsimone

@gsimone gsimone commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The selected sidebar project reset to All projects after visiting Settings because the thread sidebar owned the scope state and Settings replaces that component in the app sidebar slot.

Lift the ephemeral project scope to AppSidebarLayout, which spans both thread and Settings routes, and keep ThreadSidebar controlled by that owner. This preserves navigation state without persisting it across app reloads or introducing a global store.

Visual evidence

Atlas remains selected after opening Settings and returning to the thread view:

project-scope-settings-round-trip.mp4

Testing

  • pnpm --filter @t3tools/web test src/components/AppSidebarLayout.test.tsx
  • pnpm --filter @t3tools/web typecheck
  • Targeted formatter and linter on the three changed files
  • Integrated browser pass with disposable Atlas and Orbit project fixtures

Made with GPT-5.6-Sol in T3 Code using the Codex harness.

Note

Preserve project scope in AppSidebarLayout across settings navigation

  • Moves projectScopeKey state from Sidebar into AppSidebarLayout so the selected project survives settings routes that unmount the thread sidebar.
  • Sidebar now receives projectScopeKey and onProjectScopeKeyChange props, reporting project key or null for all-projects and invalidation.
  • Adds a test harness with a minimal in-memory DOM and an integration test verifying scope persistence through a settings route round-trip.

Macroscope summarized 59479f8.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 1, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 1, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 418c58b

Macroscope's review found this PR approvable — The PR makes a small, isolated UI state-lifetime fix: project scope is retained while the settings sidebar temporarily replaces the thread sidebar. Production changes are limited to existing sidebar components, and the navigation behavior is covered by a focused test.

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

@gsimone
gsimone force-pushed the t3code/persist-project-selection-settings branch from e17e334 to 418c58b Compare September 4, 2026 11:26
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 4, 2026 11:26

Dismissing prior approval to re-evaluate 418c58b

@gsimone

gsimone commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@maria-rcks added visuals to this so it's easier to understand intend

@gsimone

gsimone commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #9416, which merged the same project-filter persistence behavior with persisted UI state and stale-project safeguards.

@gsimone gsimone closed this Sep 7, 2026
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: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