Tabs: instant switch with a subtle fade; arrows walk Settings (#173) #230

Closed
kayg wants to merge 0 commits from issue/173-tab-switch into dev
Owner

Closes #173.

Notes and Settings now stay mounted under each other. A tab switch is a style change, never a build, so it can't wait on the editor, the list or the network.

  • App.svelte: each tab is built once it has been seen (and both are built ahead when the app goes idle after sign-in). The one you are not on is visibility: hidden, inert and untouchable. A click or tap fades the new tab in over 140 ms, opacity only, with the old one fading out underneath; keyboard switches and reduced motion never animate. The fade lives in swapTabs in lib/motion.ts.
  • Shell.svelte and PhoneStack.svelte take an active flag and keep the note, list, focus and stack depth you left while Settings is on top (the route no longer says them).
  • Settings.svelte: keeps its section while hidden, loads Devices ahead (no "Looking..." on switch), and up/down move through Appearance, Writing, Keyboard, Account, Devices. The sections replace each other in the history so holding a key doesn't fill it, and the focus follows so the next arrow starts from the right row. The arrows leave fields, option groups and sliders alone.
  • e2e/tabs.spec.ts (Chromium and WebKit): the very same editor element is there after a trip through Settings, the arrows walk the sections, the history doesn't grow, Devices never says it is looking.

Measured on a 10k Home, with numbers and screenshots on the issue.

🤖 Generated with Claude Code

Closes #173. Notes and Settings now stay mounted under each other. A tab switch is a style change, never a build, so it can't wait on the editor, the list or the network. - `App.svelte`: each tab is built once it has been seen (and both are built ahead when the app goes idle after sign-in). The one you are not on is `visibility: hidden`, `inert` and untouchable. A click or tap fades the new tab in over 140 ms, opacity only, with the old one fading out underneath; keyboard switches and reduced motion never animate. The fade lives in `swapTabs` in `lib/motion.ts`. - `Shell.svelte` and `PhoneStack.svelte` take an `active` flag and keep the note, list, focus and stack depth you left while Settings is on top (the route no longer says them). - `Settings.svelte`: keeps its section while hidden, loads Devices ahead (no "Looking..." on switch), and up/down move through Appearance, Writing, Keyboard, Account, Devices. The sections replace each other in the history so holding a key doesn't fill it, and the focus follows so the next arrow starts from the right row. The arrows leave fields, option groups and sliders alone. - `e2e/tabs.spec.ts` (Chromium and WebKit): the very same editor element is there after a trip through Settings, the arrows walk the sections, the history doesn't grow, Devices never says it is looking. Measured on a 10k Home, with numbers and screenshots on the issue. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Tabs: Notes and Settings stay mounted; instant switch with a short fade; arrows walk Settings (#173)
Some checks failed
CI / web (pull_request) Failing after 21s
CI / rust (pull_request) Successful in 1m54s
8cc1a1599f
Both tabs are built once (and ahead, when the app goes idle) and the one you
are not on is only hidden, so a switch builds and removes no DOM. A click or tap
fades the new tab in over 140 ms (opacity only); the keyboard never animates.
Settings keeps its section while hidden, loads Devices ahead, and up/down move
through Appearance to Devices without filling the history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Author
Owner

Review: both tabs stay mounted, so a switch builds 0 DOM nodes instead of 114 and 401. Clicks get a 140 ms opacity-only fade and the keyboard gets none. Arrow keys walk the Settings sections without growing history, and Devices loads ahead.

svelte-check reports 0 errors after merging dev. The Today-chip wrap the agent saw is already fixed on dev by #148 (nowrap).

Merging.

Review: both tabs stay mounted, so a switch builds 0 DOM nodes instead of 114 and 401. Clicks get a 140 ms opacity-only fade and the keyboard gets none. Arrow keys walk the Settings sections without growing history, and Devices loads ahead. svelte-check reports 0 errors after merging dev. The Today-chip wrap the agent saw is already fixed on dev by #148 (nowrap). Merging.
kayg closed this pull request 2026-10-14 10:18:48 +00:00
Some checks failed
CI / web (pull_request) Failing after 21s
CI / rust (pull_request) Successful in 1m54s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!230
No description provided.