Skip to content

🤖 refactor: move settings from modal to route page (/settings/:section)#2361

Merged
jaaydenh merged 12 commits intomainfrom
settings-layout-28mw
Feb 13, 2026
Merged

🤖 refactor: move settings from modal to route page (/settings/:section)#2361
jaaydenh merged 12 commits intomainfrom
settings-layout-28mw

Conversation

@jaaydenh
Copy link
Contributor

Summary

Replaces the Settings modal dialog with a full-page Settings experience at /settings/:section, keeping the app left sidebar visible and hiding the workspace right sidebar.

Background

The modal overlay constrained settings layout, fought with focus traps and right-sidebar layering, and couldn't be deep-linked. A route-based page aligns with the existing route-driven architecture (/workspace/:id, /project) and enables deep-linking from the command palette, keyboard shortcuts, and contextual "open settings" actions.

Implementation

5 files changed, +96/−63 lines (net +33)

RouterContext (src/browser/contexts/RouterContext.tsx)

  • Parses currentSettingsSection from /settings/:section URL pattern
  • Added navigateToSettings(section?) and navigateFromSettings() helpers
  • Tracks last non-settings location via ref for proper back-navigation

SettingsContext (src/browser/contexts/SettingsContext.tsx)

  • isOpen and activeSection are now derived from the route instead of local useState
  • open() / close() / setActiveSection() delegate to router navigation
  • API shape unchanged — all existing callers (useSettings().open("providers"), command palette, keyboard shortcut, MCP/Providers prompts) work without modification
  • providersExpandedProvider one-shot hint preserved as local UI state

SettingsPage (src/browser/components/Settings/SettingsPage.tsx)

  • New full-page component replacing SettingsModal
  • Desktop: settings sidebar (left rail) + scrollable content pane
  • Mobile: horizontal tab row + scrollable content
  • All section definitions, experiment gates, and section-reset logic carried over from the modal

App wiring (src/browser/App.tsx)

  • Settings branch added before workspace/project/welcome in AppInner's main content area
  • <SettingsModal /> mount removed
  • Left sidebar stays visible; right sidebar naturally hidden (workspace-only)

Exports (src/browser/components/Settings/index.ts)

  • Re-exports updated from SettingsModalSettingsPage

Risks

  • Low: The SettingsContext API shape is preserved identically, so all callers continue working. The risk is limited to visual/layout differences vs. the old modal.
  • Medium-low: navigateFromSettings() falls back to / if no prior non-settings route was observed (e.g., app launched directly to a settings URL). This is reasonable behavior but differs from the modal's simple close-overlay behavior.

Generated with mux • Model: anthropic:claude-opus-4-6 • Thinking: xhigh • Cost: $7.91

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3292741c4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jaaydenh jaaydenh force-pushed the settings-layout-28mw branch 3 times, most recently from 3ccf052 to 661f40f Compare February 13, 2026 05:44
@jaaydenh jaaydenh force-pushed the settings-layout-28mw branch from 661f40f to 25852cc Compare February 13, 2026 06:32
@jaaydenh
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25852cc39c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

RouterContext used to snapshot only pathname+search before entering /settings and would
navigate back by URL string alone. That dropped the prior location.state, breaking
/project flows that depend on { projectPath } navigation state (including the legacy
?path= deep link rewrite).

This change snapshots both the URL and location.state, and restores state when leaving
settings. Added a unit test to prevent regressions.

---

_Generated with `mux` • Model: `openai:gpt-5.2` • Thinking: `xhigh` • Cost: `$16.46`_

<!-- mux-attribution: model=openai:gpt-5.2 thinking=xhigh costs=16.46 -->
@jaaydenh jaaydenh added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit 40847bf Feb 13, 2026
38 of 40 checks passed
@jaaydenh jaaydenh deleted the settings-layout-28mw branch February 13, 2026 09:01
github-actions bot pushed a commit that referenced this pull request Feb 13, 2026
Settings/index.ts re-exported SettingsPage, SettingsProvider, and
useSettings but had zero consumers — all call-sites already import
directly from the source modules (SettingsPage.tsx, SettingsContext.tsx).

Removing dead code left over from the SettingsModal → SettingsPage
rename in #2361.
github-actions bot pushed a commit that referenced this pull request Feb 13, 2026
Settings/index.ts re-exported SettingsPage, SettingsProvider, and
useSettings but had zero consumers — all call-sites already import
directly from the source modules (SettingsPage.tsx, SettingsContext.tsx).

Removing dead code left over from the SettingsModal → SettingsPage
rename in #2361.
github-actions bot pushed a commit that referenced this pull request Feb 13, 2026
Settings/index.ts re-exported SettingsPage, SettingsProvider, and
useSettings but had zero consumers — all call-sites already import
directly from the source modules (SettingsPage.tsx, SettingsContext.tsx).

Removing dead code left over from the SettingsModal → SettingsPage
rename in #2361.
github-actions bot pushed a commit that referenced this pull request Feb 14, 2026
Settings/index.ts re-exported SettingsPage, SettingsProvider, and
useSettings but had zero consumers — all call-sites already import
directly from the source modules (SettingsPage.tsx, SettingsContext.tsx).

Removing dead code left over from the SettingsModal → SettingsPage
rename in #2361.
github-actions bot pushed a commit that referenced this pull request Feb 15, 2026
Settings/index.ts re-exported SettingsPage, SettingsProvider, and
useSettings but had zero consumers — all call-sites already import
directly from the source modules (SettingsPage.tsx, SettingsContext.tsx).

Removing dead code left over from the SettingsModal → SettingsPage
rename in #2361.
github-actions bot pushed a commit that referenced this pull request Feb 15, 2026
Settings/index.ts re-exported SettingsPage, SettingsProvider, and
useSettings but had zero consumers — all call-sites already import
directly from the source modules (SettingsPage.tsx, SettingsContext.tsx).

Removing dead code left over from the SettingsModal → SettingsPage
rename in #2361.
github-actions bot pushed a commit that referenced this pull request Feb 16, 2026
Settings/index.ts re-exported SettingsPage, SettingsProvider, and
useSettings but had zero consumers — all call-sites already import
directly from the source modules (SettingsPage.tsx, SettingsContext.tsx).

Removing dead code left over from the SettingsModal → SettingsPage
rename in #2361.
github-actions bot pushed a commit that referenced this pull request Feb 16, 2026
Settings/index.ts re-exported SettingsPage, SettingsProvider, and
useSettings but had zero consumers — all call-sites already import
directly from the source modules (SettingsPage.tsx, SettingsContext.tsx).

Removing dead code left over from the SettingsModal → SettingsPage
rename in #2361.
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