fix(web): preserve project scope through settings - #9050
Closed
gsimone wants to merge 3 commits into
Closed
Conversation
Contributor
ApprovabilityVerdict: Approved at 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
force-pushed
the
t3code/persist-project-selection-settings
branch
from
September 4, 2026 11:26
e17e334 to
418c58b
Compare
macroscopeapp
Bot
dismissed
their stale review
September 4, 2026 11:26
Dismissing prior approval to re-evaluate 418c58b
Contributor
Author
|
@maria-rcks added visuals to this so it's easier to understand intend |
Contributor
Author
|
Superseded by #9416, which merged the same project-filter persistence behavior with persisted UI state and stale-project safeguards. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsxpnpm --filter @t3tools/web typecheckMade with GPT-5.6-Sol in T3 Code using the Codex harness.
Note
Preserve project scope in
AppSidebarLayoutacross settings navigationprojectScopeKeystate fromSidebarintoAppSidebarLayoutso the selected project survives settings routes that unmount the thread sidebar.Sidebarnow receivesprojectScopeKeyandonProjectScopeKeyChangeprops, reporting project key ornullfor all-projects and invalidation.Macroscope summarized 59479f8.