🤖 fix: make settings titlebar control toggle open/close#2429
Merged
ibetitsmike merged 3 commits intomainfrom Feb 14, 2026
Merged
🤖 fix: make settings titlebar control toggle open/close#2429ibetitsmike merged 3 commits intomainfrom
ibetitsmike merged 3 commits intomainfrom
Conversation
Summary: - Switch `SettingsButton` to route-aware toggle behavior. - Show cog/open affordance off settings routes and X/close affordance on settings routes. - Added regression test covering open->close route restoration behavior. --- _Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.01`_ <!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.01 -->
Summary: - Updated `settings.spec.ts` to assert the titlebar settings toggle (`data-testid=settings-button`) enters close mode. - Replaced ambiguous `/close settings/i` role locator with the settings toggle test id in the close-settings test. - Keeps the e2e scenario aligned with the new cog->X toggle behavior. --- _Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.01`_ <!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.01 -->
Summary: - Avoids setting global `window`/`document` to `undefined` in `SettingsButton.test.tsx` cleanup. - Adds a safe fallback `GlobalWindow` only when no DOM globals are present. - Keeps route-restore assertion stable by comparing to the captured initial pathname. --- _Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.01`_ <!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.01 -->
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.
Summary
When the settings route is active, the titlebar settings control now changes from a cog to an X and behaves as a close action.
Background
Users expect the same top-level control used to open settings to also close settings, instead of requiring a separate close button in the page content.
Implementation
SettingsButtonto readisOpenfromuseSettings().Xicon and callsclose(), which returns to the previous route via existing router logic.SettingsButton.test.tsxto verify open -> settings route -> close -> previous route behavior.SettingsButton.test.tsxcleanup so it no longer tears down shared global DOM between test files.tests/e2e/scenarios/settings.spec.tsto targetdata-testid="settings-button"for close-mode assertions/clicks so the scenario stays stable with the new toggle behavior.Validation
bun test src/browser/components/SettingsButton.test.tsxmake test-e2e PLAYWRIGHT_ARGS='tests/e2e/scenarios/settings.spec.ts'bun test src/browser/components/SettingsButton.test.tsx src/browser/components/AppLoader.auth.test.tsxmake static-checkRisks
Low risk and scoped to settings chrome + related tests. Existing route/page close controls remain unchanged.
Generated with
mux• Model:openai:gpt-5.3-codex• Thinking:xhigh• Cost:$0.01