Port search palette, phone capsule and sidebar bar to the app #637

Open
opened 2026-10-20 06:36:48 +00:00 by kayg · 4 comments
Owner

Port the approved search interface from the mockup (apps/mockup, branch issue/469-mockup-9a) into apps/web.

Branch: issue/search-port.

Scope:

  • the command-K palette: commands and notes in one ranked list, a preview pane on a desktop, keyboard navigation;
  • the phone Search capsule on list screens;
  • the sidebar bottom bar (avatar, app tabs, search icon), also the phone places screen, titled "Notes";
  • Tasks, Files and the microphone stay hidden behind Settings, Apps, "Show unfinished apps".

Evidence is in the comments below.

Port the approved search interface from the mockup (apps/mockup, branch issue/469-mockup-9a) into apps/web. Branch: `issue/search-port`. Scope: - the command-K palette: commands and notes in one ranked list, a preview pane on a desktop, keyboard navigation; - the phone Search capsule on list screens; - the sidebar bottom bar (avatar, app tabs, search icon), also the phone places screen, titled "Notes"; - Tasks, Files and the microphone stay hidden behind Settings, Apps, "Show unfinished apps". Evidence is in the comments below.
Author
Owner

Branch issue/search-port, head fdd82d68d0bafa88db6cd838f56831d469569f3f (pushed, no PR).

Tests

Command: build-slot.sh sh e2e-search.sh --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 search-palette palette-words keys-tab list-chrome

  56 skipped
  132 passed (5.2m)

(skipped = the phone-only tests on wide projects and the reverse.) svelte-check: COMPLETED 619 FILES 0 ERRORS 13 WARNINGS (the 13 warnings were there before).

Specs added in apps/web/e2e: search-palette.spec.ts (open and close by key, capsule, icon, Esc, click outside; typing with a frame-by-frame record that no frame is empty and the panel and preview keep their size; zero changes to html, body and the app shell while typing, via MutationObserver; arrows and Enter open a note; command synonyms; every prefix of "hidden", "markdown" and typos of them keep the command listed with no empty frame; a table in a note previews as a table; phone capsule at 390; phone places screen titled Notes; sidebar bar at 1440; unfinished apps hidden unless asked; light and dark; no sideways scroll), palette-words.spec.ts (command matching without a browser), search-perf.spec.ts (@perf and @throttled).

Existing specs touched because the bars moved: open Settings through the avatar menu (open-settings.ts), phone nav and back pill are now "Notes", the bottom-row dock is hidden where a test measures page colour (phone-bars, contrast).

Chromium full run before the last fixes: 1559 tests ran, failures were keys-tab (my selector edit), phone-bars/phone-edges (capsule glass under the sampled row, palette too near the status bar), contrast Trash rows (capsule over a row), all fixed and re-run green; sidebar-edge, swipe-rows, vim failed under load and passed alone. The tail of chromium-390 (everything after phone-edges), flow and contrast ran green except contrast (fixed, 4 passed). WebKit: only my specs and keys-tab, list-chrome were run (the train runs the rest).

Perf (chromium, software GL, shared host)

Quiet moments (load average 5 to 7), per key = capture-phase to bubble-phase of the input event, Svelte update included:

1440 glass : keyP50 0.9-1.3 ms  keyP95 4.6-4.9 ms  keyMax 12.5 ms  longTasks 0  open key->palette in DOM 17-66 ms
1440 flat  : keyP50 1.0-1.3 ms  keyP95 3.6-4.5 ms  keyMax 10.5-14.7 ms
390  glass : keyP50 0.4-0.6 ms  keyP95 4.4-5.2 ms  keyMax 11.9-15.2 ms  frames 69, max 33 ms (p95 16.7 to 33)
390  flat  : keyP50 0.5 ms      keyP95 4.2-5.4 ms  keyMax 11.6-12.6 ms  frames 72-77, max 16.8 ms

Under load (load average above 20) the same run gave p95 12.6 to 27 ms and long tasks, so the budget is not proven on this host; the perf VM must confirm it. 1440 frame gaps here are 90 to 300 ms even when typing in the note itself with no palette (software glass), so frame numbers at 1440 are not meaningful on this box. The 6x run was not completed: the throttled projects depend on the whole suite.

Open (key to palette in the page) is 17 to 66 ms here; under one frame is NOT shown.

What made typing cheap: titles and commands match on the client from the notes the app already holds (cached folded titles, no typo search on notes), the server answers a beat later; position reads (scroll to hit, selected row into view) happen in the next frame, not in the key's task; the matcher is run once on idle after opening; rows are one fixed height.

Screenshots

/tmp/claude-1001/-home-kayg-Developer-calternal-cloud/204dcdd3-9d56-4d02-bbcc-2d778e727281/scratchpad/search-port/ (chromium|webkit x 390|1440 x light|dark: -closed, -palette, and -account-menu at 1440; plus 1440-preview-table.png).

Branch `issue/search-port`, head `fdd82d68d0bafa88db6cd838f56831d469569f3f` (pushed, no PR). ## Tests Command: `build-slot.sh sh e2e-search.sh --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 search-palette palette-words keys-tab list-chrome` ``` 56 skipped 132 passed (5.2m) ``` (skipped = the phone-only tests on wide projects and the reverse.) `svelte-check`: `COMPLETED 619 FILES 0 ERRORS 13 WARNINGS` (the 13 warnings were there before). Specs added in `apps/web/e2e`: `search-palette.spec.ts` (open and close by key, capsule, icon, Esc, click outside; typing with a frame-by-frame record that no frame is empty and the panel and preview keep their size; zero changes to html, body and the app shell while typing, via MutationObserver; arrows and Enter open a note; command synonyms; every prefix of "hidden", "markdown" and typos of them keep the command listed with no empty frame; a table in a note previews as a table; phone capsule at 390; phone places screen titled Notes; sidebar bar at 1440; unfinished apps hidden unless asked; light and dark; no sideways scroll), `palette-words.spec.ts` (command matching without a browser), `search-perf.spec.ts` (`@perf` and `@throttled`). Existing specs touched because the bars moved: open Settings through the avatar menu (`open-settings.ts`), phone nav and back pill are now "Notes", the bottom-row dock is hidden where a test measures page colour (`phone-bars`, `contrast`). Chromium full run before the last fixes: 1559 tests ran, failures were `keys-tab` (my selector edit), `phone-bars`/`phone-edges` (capsule glass under the sampled row, palette too near the status bar), `contrast` Trash rows (capsule over a row), all fixed and re-run green; `sidebar-edge`, `swipe-rows`, `vim` failed under load and passed alone. The tail of chromium-390 (everything after `phone-edges`), `flow` and `contrast` ran green except `contrast` (fixed, 4 passed). WebKit: only my specs and keys-tab, list-chrome were run (the train runs the rest). ## Perf (chromium, software GL, shared host) Quiet moments (load average 5 to 7), per key = capture-phase to bubble-phase of the input event, Svelte update included: ``` 1440 glass : keyP50 0.9-1.3 ms keyP95 4.6-4.9 ms keyMax 12.5 ms longTasks 0 open key->palette in DOM 17-66 ms 1440 flat : keyP50 1.0-1.3 ms keyP95 3.6-4.5 ms keyMax 10.5-14.7 ms 390 glass : keyP50 0.4-0.6 ms keyP95 4.4-5.2 ms keyMax 11.9-15.2 ms frames 69, max 33 ms (p95 16.7 to 33) 390 flat : keyP50 0.5 ms keyP95 4.2-5.4 ms keyMax 11.6-12.6 ms frames 72-77, max 16.8 ms ``` Under load (load average above 20) the same run gave p95 12.6 to 27 ms and long tasks, so the budget is not proven on this host; the perf VM must confirm it. 1440 frame gaps here are 90 to 300 ms even when typing in the note itself with no palette (software glass), so frame numbers at 1440 are not meaningful on this box. The 6x run was not completed: the throttled projects depend on the whole suite. Open (key to palette in the page) is 17 to 66 ms here; under one frame is NOT shown. What made typing cheap: titles and commands match on the client from the notes the app already holds (cached folded titles, no typo search on notes), the server answers a beat later; position reads (scroll to hit, selected row into view) happen in the next frame, not in the key's task; the matcher is run once on idle after opening; rows are one fixed height. ## Screenshots `/tmp/claude-1001/-home-kayg-Developer-calternal-cloud/204dcdd3-9d56-4d02-bbcc-2d778e727281/scratchpad/search-port/` (`chromium|webkit` x `390|1440` x `light|dark`: `-closed`, `-palette`, and `-account-menu` at 1440; plus `1440-preview-table.png`).
Author
Owner

Second round. Branch issue/search-port, head 45d74390b772cea0ef5450acbcd92ac373fe50ab.

1. The gap in the notes list

Not virtualisation (the list only windows above 150 rows; this one had 26), not a row height, not the new bottom row. The rows were in the page and contiguous (checked with row rectangles at every frame); the screenshot caught the list's own arrival animation, where the newest rows were still at opacity 0 for about 400 ms. After it ends every row is drawn. NoteList's rows code is untouched by this branch. My screenshots now wait for the animations. New spec list-gap.spec.ts (both widths): at every frame from the first, the biggest gap between consecutive rows is at most 2 px, and once the animations have ended every row in view is drawn with no gap bigger than that.

2. Opening under one frame

Done as asked: the palette is built when the app is idle and stays in the page, hidden (visibility, own box, no opacity or will-change on it: that cut the glass off, glass.spec caught it); opening toggles visibility and, after a click, a transform spring; the recent notes and the top note's preview are worked out on idle; search-palette.spec checks that opening adds no node to the palette. The biggest cost was not the palette: the page dim wrote --edge-shown on the root, which restyles the whole page. That is only for the browser bars (a phone's, an iPad's), so a mouse-and-room window no longer does it, and a touch window does it two frames after the first.

Measured with search-open.spec.ts (waits for load under 2, via /proc/loadavg; both runs quiet: true, load 1.95 and 1.99), 20 openings each, key event to start of the next frame and to the task after that frame's paint. A bare layer with backdrop blur toggled the same way is the control (the test machines draw in software and sometimes make any one-layer change wait 80 to 100 ms for its frame):

1440  frame p50 2.4 ms  p95 93.1   paint p50 4.0 ms  p95 93.5   control (bare box) p50 133.3  p95 176.1
390   frame p50 10.6 ms p95 14.4   paint p50 11.8 ms p95 17.1   control (bare box) p50 16.9   p95 19.8
each, 1440: 83 4 3 16 6 3 4 89 3 4 4 5 4 94 5 22 3 3 4 4
each,  390: 17 13 12 10 12 12 11 11 9 12 15 10 14 15 11 12 12 11 12 12

Before: 1440 was 17 to 66 ms in the page and about 91 ms to a frame; 390 was 15 ms p50, 23 p95 (loaded).
The 1440 outliers (4 of 20, 70 to 94 ms) happen to a bare box too, so they are the machine's. p95 at 390 is 17.1 ms, a hair over one frame; p50 is under on both. Needs a confirming run on the perf VM.

3. No dead UI

Removed: the "Show unfinished apps" setting and its pref, the microphone, Tasks and Files tabs, lib/apps.ts. The sidebar tab strip is the single Notes tab. search-palette.spec.ts checks no Tasks, Files or voice button and no such setting exist (even with soon=on in the address).

4. Phone lists

No Filter field on phone list screens (Trash keeps its own: the palette does not search the Trash). The Search capsule searches that list: placeholder "Search #tag" or "Search Journal", the list's notes with nothing typed, no commands, hits outside the list dropped. The places screen's search icon (and the keyboard) search everything. Specs that used the phone Filter follow (empty, swipe-rows, list-chrome, contrast).

5. Server

Untouched.

Tests

chromium-1440, chromium-390, webkit-1440, webkit-390  (search-palette palette-words list-gap keys-tab list-chrome empty)
  74 skipped
  134 passed (4.1m)
chromium-390 phone-bars: 240 passed (7.3m)
svelte-check: COMPLETED 620 FILES 0 ERRORS 13 WARNINGS

Full chromium suite (chromium-1440, chromium-390, flow, contrast), run twice. The second run: 1051 passed, 708 skipped, 8 failed (53.5m). Six of the eight failures (glass drawer, link-suggest, no-hscroll 390, tags 320, vim /, swipe-rows pin) came from my running two Playwright jobs at once in the same test-results folder (one reported ENOENT on a trace file) and passed alone; the other two were search-palette click-outside (fixed: it now clicks .scrim.on) and a phone-bars screenshot protocol error that passed on rerun. Re-run of those files alone: 373 passed apart from those two. Not re-run after the click fix: the whole suite (the four-project run above and phone-bars were).

The gap spec, the open spec and search-perf.spec.ts (@perf, @throttled) are new. 6x results are not collected.

Screenshots: /tmp/claude-1001/-home-kayg-Developer-calternal-cloud/204dcdd3-9d56-4d02-bbcc-2d778e727281/scratchpad/search-port/

Second round. Branch `issue/search-port`, head `45d74390b772cea0ef5450acbcd92ac373fe50ab`. ## 1. The gap in the notes list Not virtualisation (the list only windows above 150 rows; this one had 26), not a row height, not the new bottom row. The rows were in the page and contiguous (checked with row rectangles at every frame); the screenshot caught the list's own arrival animation, where the newest rows were still at opacity 0 for about 400 ms. After it ends every row is drawn. NoteList's rows code is untouched by this branch. My screenshots now wait for the animations. New spec `list-gap.spec.ts` (both widths): at every frame from the first, the biggest gap between consecutive rows is at most 2 px, and once the animations have ended every row in view is drawn with no gap bigger than that. ## 2. Opening under one frame Done as asked: the palette is built when the app is idle and stays in the page, hidden (`visibility`, own box, no opacity or will-change on it: that cut the glass off, `glass.spec` caught it); opening toggles visibility and, after a click, a transform spring; the recent notes and the top note's preview are worked out on idle; `search-palette.spec` checks that opening adds no node to the palette. The biggest cost was not the palette: the page dim wrote `--edge-shown` on the root, which restyles the whole page. That is only for the browser bars (a phone's, an iPad's), so a mouse-and-room window no longer does it, and a touch window does it two frames after the first. Measured with `search-open.spec.ts` (waits for load under 2, via `/proc/loadavg`; both runs `quiet: true`, load 1.95 and 1.99), 20 openings each, key event to start of the next frame and to the task after that frame's paint. A bare layer with backdrop blur toggled the same way is the control (the test machines draw in software and sometimes make any one-layer change wait 80 to 100 ms for its frame): ``` 1440 frame p50 2.4 ms p95 93.1 paint p50 4.0 ms p95 93.5 control (bare box) p50 133.3 p95 176.1 390 frame p50 10.6 ms p95 14.4 paint p50 11.8 ms p95 17.1 control (bare box) p50 16.9 p95 19.8 each, 1440: 83 4 3 16 6 3 4 89 3 4 4 5 4 94 5 22 3 3 4 4 each, 390: 17 13 12 10 12 12 11 11 9 12 15 10 14 15 11 12 12 11 12 12 ``` Before: 1440 was 17 to 66 ms in the page and about 91 ms to a frame; 390 was 15 ms p50, 23 p95 (loaded). The 1440 outliers (4 of 20, 70 to 94 ms) happen to a bare box too, so they are the machine's. p95 at 390 is 17.1 ms, a hair over one frame; p50 is under on both. Needs a confirming run on the perf VM. ## 3. No dead UI Removed: the "Show unfinished apps" setting and its pref, the microphone, Tasks and Files tabs, `lib/apps.ts`. The sidebar tab strip is the single Notes tab. `search-palette.spec.ts` checks no Tasks, Files or voice button and no such setting exist (even with `soon=on` in the address). ## 4. Phone lists No Filter field on phone list screens (Trash keeps its own: the palette does not search the Trash). The Search capsule searches that list: placeholder "Search #tag" or "Search Journal", the list's notes with nothing typed, no commands, hits outside the list dropped. The places screen's search icon (and the keyboard) search everything. Specs that used the phone Filter follow (`empty`, `swipe-rows`, `list-chrome`, `contrast`). ## 5. Server Untouched. ## Tests ``` chromium-1440, chromium-390, webkit-1440, webkit-390 (search-palette palette-words list-gap keys-tab list-chrome empty) 74 skipped 134 passed (4.1m) chromium-390 phone-bars: 240 passed (7.3m) svelte-check: COMPLETED 620 FILES 0 ERRORS 13 WARNINGS ``` Full chromium suite (chromium-1440, chromium-390, flow, contrast), run twice. The second run: `1051 passed, 708 skipped, 8 failed (53.5m)`. Six of the eight failures (glass drawer, link-suggest, no-hscroll 390, tags 320, vim `/`, swipe-rows pin) came from my running two Playwright jobs at once in the same `test-results` folder (one reported `ENOENT` on a trace file) and passed alone; the other two were `search-palette` click-outside (fixed: it now clicks `.scrim.on`) and a `phone-bars` screenshot protocol error that passed on rerun. Re-run of those files alone: `373 passed` apart from those two. Not re-run after the click fix: the whole suite (the four-project run above and `phone-bars` were). The gap spec, the open spec and `search-perf.spec.ts` (`@perf`, `@throttled`) are new. 6x results are not collected. Screenshots: `/tmp/claude-1001/-home-kayg-Developer-calternal-cloud/204dcdd3-9d56-4d02-bbcc-2d778e727281/scratchpad/search-port/`
Author
Owner

kayg 2026-10-20 (agreed): searching inside a list (a tag, Journal) shows that list's matches first; the last row reads "Search everywhere for '…'" and widens the search in place.

kayg 2026-10-20 (agreed): searching inside a list (a tag, Journal) shows that list's matches first; the last row reads "Search everywhere for '…'" and widens the search in place.
Author
Owner

stale? later search ports shipped, but the agreed list-first search behavior and the full scope here have not been verified as complete in this cleanup.

stale? later search ports shipped, but the agreed list-first search behavior and the full scope here have not been verified as complete in this cleanup.
Sign in to join this conversation.
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#637
No description provided.