Skip to content

feat(app): rebuild Settings and top-anchor every dialog - #171

Merged
iamnbutler merged 2 commits into
mainfrom
codex/settings-refresh
Oct 7, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
codex/settings-refresh

Conversation

@iamnbutler

@iamnbutler iamnbutler commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #170.

Dialogs were vertically centered, so Settings jumped whenever late-loading content or a section switch changed its height. Every dialog now sits at a fixed top position. Settings is rebuilt as a fixed two-column shell.

Shared dialog geometry (packages/ui/src/ui/dialog.tsx)

  • The dialog top is fixed at clamp(1rem, 40dvh - 8rem, 20dvh). --dialog-max is the room left below it. Generic dialogs, Settings and CommandPalette all size from it, which replaces the palette's inline 100vh sizing.
  • Widths use physical w/max-w utilities. twMerge couldn't override sm:max-inline-sm, so Settings and the palette were stuck at 24rem.
  • The open animation is opacity plus a 98% scale from the top edge, wrapped in motion-safe.

Settings

  • Fixed rail and header with a scrolling content pane, 56rem × min(40rem, room below the top). In narrow windows the rail stacks above the content.
  • Five sections:
    • General: the existing theme preference and default model
    • Providers
    • Computer use (desktop only)
    • This Mac/This host
    • Updates (desktop only)
  • Label and description on the left, compact controls on the right. Diagnostics such as tool paths, the directory URL, the helper log, Login Items and refresh sit under Troubleshooting. Errors and recovery actions stay visible.
  • Every existing control and state is kept: key add/replace/check/remove, overrides, helper approval/command-line-host/start/restart/stop, permissions and clipboard policy, automatic check vs explicit install, cancel/resume, and ace:updates.
  • Sections stay mounted after their first visit, so in-flight key and helper actions survive a section switch. Computer use polling runs only while that section is visible. Provider settings, which touch Keychain, are read only for General and Providers.

Validation (local evidence on natembp: /tmp/ace-ui-refresh-20261006/settings-evidence)

Viewport Top before (5194bf7), while loading and switching sections Top after (b11535a)
1440×900 355→166, then 166→350→248 180 (896 wide, 184px rail)
1280×560 42→180→78 96
390×700 52→250→148 140
  • Browser, source host:
    • Ctrl+, opens Settings, and Escape returns focus to the account menu.
    • A real Anthropic key check verified, and an invalid OpenAI key was rejected. Switching sections mid-request kept the result.
    • Escape in the key form closes only the form.
    • Troubleshooting opens and the pane scrolls at 1280×560 without moving the dialog.
    • Open Project and Rename open at top 180. Rename selects the name and returns focus on Escape.
  • Native, signed Ace-dev:
    • The dialog top stayed fixed across seven section switches.
    • Computer use shows Ready, granted permissions and the clipboard policy.
    • This Mac shows the command-line host with Restart and Stop… disabled.
    • Updates shows the development-disabled state.
  • bun types, bun run ci, the app build and CI pass. React Doctor scores 90/100; its warnings are the existing icon-export pattern and Settings complexity.

Not exercised: the managed helper's start/stop/restart and approval states (source builds never attach a helper, and Canary's was left alone); update available/download/error states (dev build); the permission "Enable…" prompts (everything was already granted); and CommandPalette, which has no apps/app consumer and is reviewed in source and CSS only. Tab focus briefly escaping a modal happens on 5194bf7 too; it is tracked in #172.

Built in Ace

Built in an Ace channel. Root Codex coordinated and did read-only review outside Ace (#9).

Gaps:

@iamnbutler

Copy link
Copy Markdown
Contributor Author

Rename evidence re-measured with an explicit navigation to candidate host 127.0.0.1:4197 (origin asserted), Channels page sidebar RowMenu → Rename channel: top 180, width 320, focus in "Channel name" with full selection [0,13]; Escape closes and returns focus to the rename-target row. Tested head b11535a. CommandPalette has no apps/app consumer, so it has no product route to exercise; its change is source/CSS-reviewed only.

@iamnbutler
iamnbutler merged commit 39191bb into main Oct 7, 2026
1 check passed
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.

Rebuild Settings and top-anchor every modal

1 participant