Keyboard never animates; Tab reaches the note in a few stops (#344, #349) #376

Closed
kayg wants to merge 0 commits from issue/344-keyboard-no-motion-3 into dev
Owner

Replaces #361 (bar-stable fix; #359 before it). Fixes #344 and #349.

#344, keyboard never animates

  • One input-source signal, packages/ui/src/lib/inputSource.svelte.ts (data-last-input on the root); ui.lastInput reads it. The attribute is written only when it changes, and reads "typing" while words go into a field, so typing does not pay for the rule. On-screen keyboard keys count as keyboard (commented).
  • After an acting key every CSS transition is off (base.css); the bar swap, drawer slide/fade and backdrop shade read the same signal. Morph change: two duration: 0 returns. bar.css untouched (#287).

#349, keyboard navigation

  • "Skip to the note" is the first Tab stop (shown only while focused). Places and notes lists are one Tab stop each (roving.ts, batched, writes only on change). Note landmark labelled; splitter focus bar 3px accent; Keyboard settings says Esc then Tab moves on.

Tests (Chromium and WebKit, 1440): keys-no-motion.spec.ts (no running animation after Ctrl+, Ctrl+K, Ctrl+, Ctrl+. and list arrows), keys-tab.spec.ts (note in at most 5 stops, one stop per list, accent ring on each stop, Esc then Tab leaves, Tab still nests list items). shortcuts.spec tooltip test fixed: it passed only while the old bar was fading out. tabs.spec "Notes keeps its editor" fails on clean dev too.

Typing cost (1,000-note list, keystroke to paint, Chromium, shared machine so noisy, 5 interleaved runs each, an arrow key pressed first so the keyboard rule is on):

median p50 median p95
dev 77 ms 262 ms
this PR 84 ms 266 ms
A first version (rule on for every keystroke) measured median p95 329 ms against 276 ms with the rule removed, which is why typing now switches it off.

Screenshots (Tab stops at 1440, narrow 320/360/375/390, light and dark, Chromium and WebKit) are on #349.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T

bar-stable in WebKit (fix in this PR): logged the 4 mutations: they were .morph and .morph-halo taking their size (250 to 308 px, data-morph-until, style), not roving focus, not the layer exit and not data-last-input (that is on <html>, outside the bar). A keyboard action swaps the row at once, so the test's "leaving layer is gone" check now passes before WebKit has drawn the frame in which the capsule takes its row's size (it was 250 px against a 308 px row when the window opened); the old 100 ms exit animation used to hold the test back by a frame. The test now also waits for the capsule to match its row and two frames before watching for rest. No app change.
Checked with --repeat-each 3: bar-stable, keys-tab, keys-no-motion in chromium-1440, webkit-1440, chromium-390, webkit-390: 66 passed.

Replaces #361 (bar-stable fix; #359 before it). Fixes #344 and #349. **#344, keyboard never animates** - One input-source signal, `packages/ui/src/lib/inputSource.svelte.ts` (`data-last-input` on the root); `ui.lastInput` reads it. The attribute is written only when it changes, and reads "typing" while words go into a field, so typing does not pay for the rule. On-screen keyboard keys count as keyboard (commented). - After an acting key every CSS transition is off (`base.css`); the bar swap, drawer slide/fade and backdrop shade read the same signal. Morph change: two `duration: 0` returns. `bar.css` untouched (#287). **#349, keyboard navigation** - "Skip to the note" is the first Tab stop (shown only while focused). Places and notes lists are one Tab stop each (`roving.ts`, batched, writes only on change). Note landmark labelled; splitter focus bar 3px accent; Keyboard settings says Esc then Tab moves on. **Tests** (Chromium and WebKit, 1440): `keys-no-motion.spec.ts` (no running animation after Ctrl+\, Ctrl+K, Ctrl+, Ctrl+. and list arrows), `keys-tab.spec.ts` (note in at most 5 stops, one stop per list, accent ring on each stop, Esc then Tab leaves, Tab still nests list items). `shortcuts.spec` tooltip test fixed: it passed only while the old bar was fading out. `tabs.spec` "Notes keeps its editor" fails on clean dev too. **Typing cost** (1,000-note list, keystroke to paint, Chromium, shared machine so noisy, 5 interleaved runs each, an arrow key pressed first so the keyboard rule is on): | | median p50 | median p95 | |---|---|---| | dev | 77 ms | 262 ms | | this PR | 84 ms | 266 ms | A first version (rule on for every keystroke) measured median p95 329 ms against 276 ms with the rule removed, which is why typing now switches it off. Screenshots (Tab stops at 1440, narrow 320/360/375/390, light and dark, Chromium and WebKit) are on #349. 🤖 Generated with [Claude Code](https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T) https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T **bar-stable in WebKit (fix in this PR):** logged the 4 mutations: they were `.morph` and `.morph-halo` taking their size (250 to 308 px, `data-morph-until`, `style`), not roving focus, not the layer exit and not `data-last-input` (that is on `<html>`, outside the bar). A keyboard action swaps the row at once, so the test's "leaving layer is gone" check now passes before WebKit has drawn the frame in which the capsule takes its row's size (it was 250 px against a 308 px row when the window opened); the old 100 ms exit animation used to hold the test back by a frame. The test now also waits for the capsule to match its row and two frames before watching for rest. No app change. Checked with `--repeat-each 3`: `bar-stable`, `keys-tab`, `keys-no-motion` in chromium-1440, webkit-1440, chromium-390, webkit-390: 66 passed.
Keyboard never animates; Tab reaches the note in a few stops (#344, #349)
Some checks failed
CI / server (pull_request) Successful in 21s
CI / rust (pull_request) Successful in 1m59s
CI / web (pull_request) Failing after 2m24s
b1ec5bea64
One input-source signal in packages/ui (data-last-input) switches off every CSS transition
after a key; script-driven motion (bar swap, drawer) reads it too. The attribute is written
only when it changes and reads "typing" while words go into a field, so typing does not pay
for the rule. Skip link, one Tab stop per list (roving focus), labelled note landmark,
thicker splitter ring.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
e2e: bar-stable waits for the capsule to reach its row before watching for rest (#344)
Some checks failed
CI / server (pull_request) Successful in 20s
CI / rust (pull_request) Successful in 1m38s
CI / web (pull_request) Failing after 1m55s
4e334b1dfc
A keyboard action swaps the row at once, so the 'leaving layer is gone' check passes before
WebKit has drawn the frame in which the capsule takes its size. Nothing in the app touches the
bar late; the test's rest point was only held back by the old exit animation.

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

Landed in merge train #381.

Landed in merge train #381.
kayg closed this pull request 2026-10-14 22:40:59 +00:00
Some checks failed
CI / server (pull_request) Successful in 20s
CI / rust (pull_request) Successful in 1m38s
CI / web (pull_request) Failing after 1m55s

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!376
No description provided.