Green web CI: a drag holds the sidebar still, the list catches up once live, and six specs stop racing (#410) #441

Merged
kayg merged 28 commits from train/2026-10-15k into dev 2026-10-15 14:34:17 +00:00
Owner

Fixes #410: the CI web job is red on dev, with 9 failures in glass, tag-rename, keys-no-motion, tooltips and flow.

Two app bugs, and the rest were test races. The cause of each failure and the evidence are on #410.

App

  • Sidebar: a drag found rows by their place in the list, both when pressed and when let go. If tags changed in between (another device renaming, merging or adding one), the drop asked to merge the wrong tags. On CI the bar asked "Merge #keep-… into #glass…" after #merge-…-src was dropped onto #merge-…-dst. Now the list holds still from press to release, and a move is placed next to the same row in the list as it is then. A new test adds a tag mid-drag: it fails before this change and passes after.
  • List: a first live connection starts at the journal head. A note saved between the app reading its list and the socket connecting stayed out of the list, or stayed the blank row a just-made note has, until something else changed (seen in a full webkit-1440 run). Once the first connection is live, the app reads the newest page again. A new test (list-catch-up) holds the list response and the socket: it fails before this change and passes after.

Tests (none weakened; each now checks what it meant to)

  • glass and keys-no-motion: these opened notes in the shared lists, where other tests' notes keep arriving and the rows slide in and make room. Each test now opens its note in a tag list of its own. keys-no-motion also counts only animations you can see (the hidden Settings screen eases its switches when other tests save preferences), as glass.spec already does.
  • tag-rename: the dst-…/src-… pair had every other test's d-to-s tag between them, so in a full run the list was long and scrolled. The pair now shares one stem, is scrolled into view, and the drag checks it picked up the right row.
  • tooltips: the test hovered triggers in the hidden, inert Notes screen (opacity 0 since #287; Playwright counts opacity 0 as visible). It now skips inert triggers.
  • flow: the "Made …" toast's clock is held while Settings is on top (#324, #325), so on a fast run the toast was still over the note tools when the test came back. The test now waits for the toast to come, then for it to go.
  • bar-focus (from train l): it passes on clean dev but runs 7 to 25 s of the default 30 s on WebKit, so the test now gets 60 s. No assertion changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T

(Replaces #421, merged with current dev. Review on #421.)

Fixes #410: the CI web job is red on dev, with 9 failures in glass, tag-rename, keys-no-motion, tooltips and flow. Two app bugs, and the rest were test races. The cause of each failure and the evidence are on #410. **App** - **Sidebar:** a drag found rows by their place in the list, both when pressed and when let go. If tags changed in between (another device renaming, merging or adding one), the drop asked to merge the wrong tags. On CI the bar asked "Merge #keep-… into #glass…" after `#merge-…-src` was dropped onto `#merge-…-dst`. Now the list holds still from press to release, and a move is placed next to the same row in the list as it is then. A new test adds a tag mid-drag: it fails before this change and passes after. - **List:** a first live connection starts at the journal head. A note saved between the app reading its list and the socket connecting stayed out of the list, or stayed the blank row a just-made note has, until something else changed (seen in a full webkit-1440 run). Once the first connection is live, the app reads the newest page again. A new test (`list-catch-up`) holds the list response and the socket: it fails before this change and passes after. **Tests** (none weakened; each now checks what it meant to) - **glass and keys-no-motion:** these opened notes in the shared lists, where other tests' notes keep arriving and the rows slide in and make room. Each test now opens its note in a tag list of its own. keys-no-motion also counts only animations you can see (the hidden Settings screen eases its switches when other tests save preferences), as glass.spec already does. - **tag-rename:** the `dst-…`/`src-…` pair had every other test's d-to-s tag between them, so in a full run the list was long and scrolled. The pair now shares one stem, is scrolled into view, and the drag checks it picked up the right row. - **tooltips:** the test hovered triggers in the hidden, inert Notes screen (opacity 0 since #287; Playwright counts opacity 0 as visible). It now skips inert triggers. - **flow:** the "Made …" toast's clock is held while Settings is on top (#324, #325), so on a fast run the toast was still over the note tools when the test came back. The test now waits for the toast to come, then for it to go. - **bar-focus** (from train l): it passes on clean dev but runs 7 to 25 s of the default 30 s on WebKit, so the test now gets 60 s. No assertion changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T (Replaces #421, merged with current dev. Review on #421.)
kayg added 28 commits 2026-10-15 14:34:10 +00:00
Storage: SQLite flushes with fdatasync, half the wait per commit (#298)
Some checks failed
CI / server (pull_request) Successful in 1m1s
CI / web (pull_request) Failing after 2m18s
CI / rust (pull_request) Failing after 1m52s
a7494fbdca
The SQLite that rusqlite bundles is built without HAVE_FDATASYNC, so it
flushes with fsync(), which on Linux also writes the file's times: every
durable commit (history, auth) waited for the file system's log as well
as the data. fdatasync() is all SQLite needs (its own source says so).
LIBSQLITE3_FLAGS in .cargo/config.toml turns it on for every build;
the Containerfile copies it in.

Adds storage-bench (crates/perf): history commits and note saves timed
straight against the real code on a chosen disk, with readers or a big
upload running at the same time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Storage: big writes go to the disk in 1 MiB steps, so saves don't wait behind them (#298)
Some checks failed
CI / server (pull_request) Successful in 1m20s
CI / rust (pull_request) Successful in 1m38s
CI / web (pull_request) Failing after 2m11s
56adbb5377
A file written in one go (an upload) sat in memory and went to the disk
all at once; on a ZFS volume every flush carries what was written
before it, so a note save during a 1 GB upload waited 2 to 3 s. Now
write_atomic and the new write_atomic_from (for streams) flush each
1 MiB step before writing the next and drop it from the page cache. A
save waits behind at most one step.

storage-bench gets `--upload paced` and `--upload-dir`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Notes: a save writes its file while history records it (#298)
Some checks failed
CI / server (pull_request) Successful in 22s
CI / rust (pull_request) Failing after 1m13s
CI / web (pull_request) Failing after 44m28s
2fb4583df5
A note save made four flushes one after another: the pending record in
history, the new file, the folder, and the "done" record. Now the new
file is written and flushed under its temporary name while history
records the pending save, and swapped in once that is durable (history
before the file still holds, ADR 0020). Three waits instead of four.

The "done" record is still waited for: if it were lost in a crash and
the file then changed outside, the next start could no longer tell our
save from an outside edit (tests::outside::edit_while_closed_is_merged_on_open
catches exactly that).

fsio's write_unless_changed is now Prepared::new (write and flush the
temporary file) plus Prepared::place (check and swap in).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Notes: save at least every 5 s while someone types nonstop (#297)
Some checks failed
CI / server (pull_request) Successful in 31s
CI / rust (pull_request) Successful in 2m34s
CI / web (pull_request) Failing after 44m7s
95995a8005
A room saved its file only after 750 ms of quiet, so someone typing
without a pause kept pushing the file write back, and the .md that
outside tools, sync and backups see could lag for minutes. Now the save
also happens 5 s after the first unsaved change at the latest
(`Options::flush_max`). Failed saves keep their backoff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Contrast tokens and calm empty states (#345, #347)
Some checks failed
CI / server (pull_request) Successful in 25s
CI / rust (pull_request) Successful in 1m43s
CI / web (pull_request) Failing after 2m33s
16871ca46b
Contrast (#345): the Filter hint takes its own --placeholder token (and
--glass-placeholder on glass) instead of the browser's grey. The light theme
over a night or dusk sky gets a thicker, warmer glass tint and a brightness
lift, so the phone's lists read as cream, not grey-lilac fog. contrast.spec
now measures the field hint too, and the phone's screens (320 and 390 wide)
at every sky hour, in both looks.

Empty and missing states (#347): one EmptyState (icon, one kind line, at
most one action) for Pinned, Trash, tags, Journal, an empty All notes, a
filter with no match and a note that is not there. An unknown note id shows
"This note isn't here any more" with a way back and no note tools in the bar.
The Trash gets a Filter field like every list, the header lines up with the
others, a zero count is not shown, and "Opening the Trash..." is gone. The
mockup's data=worst blank page was the editor drawing nothing for a missing
note (no crash); it now shows the same state. The search surface says
"Try fewer words".

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Merge remote-tracking branch 'origin/dev' into issue/345-347-contrast-empty-2
Some checks failed
CI / server (pull_request) Successful in 26s
CI / rust (pull_request) Successful in 2m1s
CI / web (pull_request) Failing after 45m22s
04f5f62184
# Conflicts:
#	apps/web/src/components/NoteList.svelte
#	apps/web/src/components/PhoneStack.svelte
#	apps/web/src/components/Shell.svelte
Block swipe on iPhone: claim the swipe early, hold the block against iOS's own selection (#397)
Some checks failed
CI / server (pull_request) Successful in 26s
CI / rust (pull_request) Successful in 1m55s
CI / web (pull_request) Failing after 49m7s
feac92f680
On iOS a sideways drag over editable text is also the system's text selection.
WebKit lets only touchstart hold back the loupe and double-tap-drag: a prevented
touchmove can stop pans, and can stop a gesture that hasn't fired yet. We called
preventDefault only at 32px and never listened for touchcancel, so iOS won.

- touch.ts: a swipe is claimed on its first quick (<300ms), clearly sideways
  move past 10px. Every move after that is prevented. A hold, a scroll, or a drag
  right after a tap is left to the phone. A touchcancel during a claimed swipe
  still selects the block.
- swipe-hold.ts: while a swipe is claimed, and until the phone's selection has
  been quiet for 400ms (3s at most), a selection change from the screen is
  turned back into the selection we had. Text can't be selected while swiping.
- e2e: an early claim, scroll, hold, double-tap-drag, touchcancel, and a stray
  native selection during the hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Home Screen app fills the screen to both edges (#396)
Some checks failed
CI / server (pull_request) Successful in 24s
CI / rust (pull_request) Successful in 2m0s
CI / web (pull_request) Failing after 45m46s
16ec96c69e
On an iPhone Home Screen, iOS 26/27 report 100svh (and dvh, innerHeight, sometimes lvh) one
status bar short while position: fixed boxes reach the real bottom (WebKit bug 301994). The app,
sized by 100svh, stopped ~62pt above the bottom; the backdrop's page-colour floor showed under it
as a flat band, and the list, a sheet and its dim all ended above it. The edge strips that only
exist to meet Safari's own bars (#226) made the top flat too.

- lib/home-screen.ts: on iOS Home Screen only, a zero-width fixed probe (ResizeObserver, no scroll
  work) measures the real screen and writes --vh and the new --screen-h (only on change), and the
  root gets data-home-screen.
- The backdrop and body size from --screen-h (100lvh by default) instead of a fixed 100lvh.
- On the Home Screen, PhoneStack's .edge strips and the backdrop's .scrim are off: the glass and
  the picture run to the top and bottom edges.
- Safari tabs, Android and desktop are unchanged.
- e2e/home-screen.spec.ts models the Home Screen bug (short units, __homeScreen) at 320/360/375/390,
  light and dark, list/note/sheet; it fails on dev (stack 47px short) and passes here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Hide Width in the Style sheet on phones (#395)
Some checks failed
CI / server (pull_request) Successful in 24s
CI / rust (pull_request) Successful in 1m56s
CI / web (pull_request) Failing after 44m13s
4986b845f6
The page is always the screen's width on a phone, so Width did nothing there. The phone check
now lives in lib/media.svelte.ts so the Style sheet and App share the same breakpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
- glass, keys-no-motion: the usual lists keep receiving other tests' notes on the shared
  server, and their rows glide in (row-in) and make room (FLIP). That is the list following
  changes from elsewhere, not motion at rest or from a key. Each test now opens its note in a
  tag list of its own.
- tag-rename (drop to merge): tags are listed A to Z, so `dst-…` and `src-…` had every other
  test's tag from d to s between them; in a full run that list was long, scrolled and changing
  mid-drag, and the drop never landed on the other tag. The pair now shares one random stem,
  next to each other, and is scrolled into view before the drag.
- tooltips: Notes stays mounted under Settings at opacity 0 and inert (#287). Playwright
  counts opacity 0 as visible, so the test hovered triggers nobody can reach; it skips inert ones.
- flow: the "Made …" toast from → takes the bar for 8 s of on-screen time, held while Settings
  is on top (#324, #325). On a fast run it was still over the note tools when the test came back
  for Show markdown. The test lets it run out where it appears.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Sidebar: a pressed row holds the list still, so a drop never merges the wrong tags (#410)
Some checks failed
CI / server (pull_request) Successful in 26s
CI / rust (pull_request) Successful in 2m5s
CI / web (pull_request) Has been cancelled
4e03c94cac
The drag found rows by their place in the list when pressed and again when let go. Tags that
changed in between (another device renaming, merging or adding one) moved those places, and
the bar asked to merge two tags nobody had touched: CI's full run showed "Merge #keep-… into
#glass…" after dragging #merge-…-src onto #merge-…-dst. Now the list holds still from press to
release; a move is placed next to the same row in the list as it is then. What changed shows
the moment the row is let go.

Tests:
- tag-rename: a tag arriving mid-drag (fails before this change, passes after); the drag
  checks it picked up the row it meant to before moving it, since the list can move between
  measuring a row and pressing it.
- keys-no-motion: counts only what can be seen. Settings, mounted under Notes at opacity 0,
  eases its switches when preferences saved by other tests arrive (as glass.spec already does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Mentions: say when search is behind, and push search.caught_up when it is not (#414)
Some checks failed
CI / server (pull_request) Successful in 31s
CI / rust (pull_request) Successful in 2m15s
CI / web (pull_request) Failing after 40m25s
3a57a9873f
notes.backlinks no longer waits: it compares the journal head with the
newest entry the index has taken in (two reads) and sets incomplete when
behind. The indexer records search.caught_up {seq} once it reaches that
entry, over the existing live socket, and the Info sheet re-asks once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Mentions: read the journal head from a plain atomic (#414)
Some checks failed
CI / server (pull_request) Successful in 25s
CI / rust (pull_request) Successful in 2m0s
CI / web (pull_request) Failing after 43m49s
eda6c25f86
The store already keeps its head in an AtomicI64 updated on every append.
Journal::head now hands that out once; behind() reads it, with no
subscription per call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Focus rings only for Tab navigation, never modifiers, shortcuts or typing (#415)
Some checks failed
CI / server (pull_request) Successful in 35s
CI / rust (pull_request) Successful in 2m17s
CI / web (pull_request) Failing after 44m46s
a86481f8d9
The ring switch (data-input) was set in apps/web for Tab and every arrow key, anywhere, so
arrows in the link picker turned on the editor's own :focus-visible ring (a contenteditable
always matches it). It now lives next to the motion signal in packages/ui inputSource and
flips to keyboard only on Tab / Shift+Tab, or arrows / Home / End on a roving control
(data-roving lists, tablist, radiogroup, menu, listbox, separator), never inside a field or the
editor, never with a modifier held. The note text never draws a ring. data-last-input (no
motion after shortcuts) is unchanged and separate. Both attributes are written only on change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Tests: flow waits for the "Made …" toast to come before waiting for it to go (#410)
Some checks failed
CI / server (pull_request) Successful in 27s
CI / rust (pull_request) Successful in 2m19s
CI / web (pull_request) Has been cancelled
1a6dfefcac
The toast comes when the server's job is done, which can be after the new note opens. On a
fast run the wait for it to be gone passed before it had come, and it then sat over the note
tools when the test came back from Settings (seen once in a full local run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
List: once live, read the newest page again, so a note saved while the app opened shows (#410)
Some checks failed
CI / server (pull_request) Successful in 31s
CI / rust (pull_request) Successful in 3m6s
CI / web (pull_request) Failing after 43m38s
6e99a6ee80
A first live connection starts at the journal's head: a note saved between the app reading its
list and the socket connecting stayed out of the list, or stayed the blank row a just-made note
has ("No text yet", no tags), until something else changed. Seen in a full webkit-1440 run:
the test's note was saved 40 ms before the list was read, and the sidebar never showed its tag.
A reconnect resumes from its token and misses nothing; only the first connection reads again.

New test (list-catch-up): the note is saved while the list response and the socket are held;
fails before this change, passes after.

bar-focus: 60 s instead of the default 30. One long walk through the text bar and the Style
sheet, where a control that slid away waits out its 5 s; 7-25 s on CI, over 30 s on a busy
machine (train l). No assertion changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Merge remote-tracking branch 'origin/issue/414-mentions-live-2' into train/2026-10-15k
Some checks failed
CI / server (pull_request) Successful in 1m2s
CI / rust (pull_request) Successful in 3m12s
CI / web (pull_request) Failing after 42m5s
0d0b300349
# Conflicts:
#	crates/calternal/src/main.rs
kayg merged commit 5cd1ba7968 into dev 2026-10-15 14:34:17 +00:00
kayg deleted branch train/2026-10-15k 2026-10-15 14:34:17 +00:00
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!441
No description provided.