Mockup Views round 2: on search r5, .calternal/views.md, every row opens (#312) #438

Closed
kayg wants to merge 11 commits from issue/312-views-r2 into dev
Owner

Views mockup, round 2 (#312): kayg's feedback and the iPhone test. Mockup only; production is unchanged. Stacked on #436 (search r5, which carries #405), and it replaces #430: Views now build on r5's search instead of their own.

Preview: https://preview.calternal.cloud/views.html#/note/2026-10-13?list=view:health

Views use search's own pieces (A). A View's query is r5's Field.svelte with its chips, read by the same functions. The phone search panel hugs its content and follows the keyboard (hug.ts). My round-1 token field and word reader are gone. The small changes to r5's code that make this possible:

  • search/state.svelte.ts: QueryState and queryOf(). Search keeps its own query; a View edits its own with the same functions. Search's behaviour is unchanged.
  • search/Field.svelte: optional q, onmore (⋯), small, clearable, label, hint. Clear, ⋯ and esc now share one glass pill (kayg's fix 3); Cancel stays a word on a phone. Under 360 px, search's clear moves into ⋯.
  • packages/ui/src/search/words.ts: V10, so "notes" is a filter only first, or last with nothing after it. Tests included; 35 pass.
  • lib/fit/viewport.svelte.ts: the first measure is a microtask. A focusout during the panel's teardown used to write state mid-update, which threw state_unsafe_mutation on Esc in Chromium. This is an r5 bug, fixed here.

The rest:

  • V7a/V7b: Views live in .calternal/views.md, one ## Name section per View with key: value lines (query: required, id: added once). The app changes only the heading, query: and a missing id:; unknown keys, free text and sections without a query survive byte for byte. The menus no longer say "Kept in …". The Mockup panel shows the live file.
  • V11: a View never lists the tag itself.
  • Every row opens: a photo or a file opens its preview large over the app (search/ItemViewer.svelte), with its day one tap away.
  • Phone (B): the list screens reach under Safari's floating toolbar (100lvh; --under is the difference, 0 on a Home Screen app). The + button and Update view rise by it and float with no strip behind them.
  • Sidebar: double-click rename now works. Pointer capture for dragging had retargeted the double-click to the row, so this was broken for tags too.

Checked: 54 scripted checks pass in Chromium and WebKit, at 1440 and with touch at 390. Screenshots at 320/360/375/390/900/1440, light and dark, are on #312. Emulators can't show Safari's floating toolbar, so #312 has a device checklist for B and C.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T

Views mockup, round 2 (#312): kayg's feedback and the iPhone test. Mockup only; production is unchanged. **Stacked on #436** (search r5, which carries #405), and it **replaces #430**: Views now build on r5's search instead of their own. Preview: https://preview.calternal.cloud/views.html#/note/2026-10-13?list=view:health **Views use search's own pieces (A).** A View's query is r5's `Field.svelte` with its chips, read by the same functions. The phone search panel hugs its content and follows the keyboard (`hug.ts`). My round-1 token field and word reader are gone. The small changes to r5's code that make this possible: - `search/state.svelte.ts`: `QueryState` and `queryOf()`. Search keeps its own query; a View edits its own with the same functions. Search's behaviour is unchanged. - `search/Field.svelte`: optional `q`, `onmore` (⋯), `small`, `clearable`, `label`, `hint`. Clear, ⋯ and esc now share one glass pill (kayg's fix 3); Cancel stays a word on a phone. Under 360 px, search's clear moves into ⋯. - `packages/ui/src/search/words.ts`: **V10**, so "notes" is a filter only first, or last with nothing after it. Tests included; 35 pass. - `lib/fit/viewport.svelte.ts`: the first measure is a microtask. A focusout during the panel's teardown used to write state mid-update, which threw `state_unsafe_mutation` on Esc in Chromium. **This is an r5 bug, fixed here.** **The rest:** - **V7a/V7b:** Views live in `.calternal/views.md`, one `## Name` section per View with `key: value` lines (`query:` required, `id:` added once). The app changes only the heading, `query:` and a missing `id:`; unknown keys, free text and sections without a query survive byte for byte. The menus no longer say "Kept in …". The Mockup panel shows the live file. - **V11:** a View never lists the tag itself. - **Every row opens:** a photo or a file opens its preview large over the app (`search/ItemViewer.svelte`), with its day one tap away. - **Phone (B):** the list screens reach under Safari's floating toolbar (`100lvh`; `--under` is the difference, 0 on a Home Screen app). The + button and *Update view* rise by it and float with no strip behind them. - **Sidebar:** double-click rename now works. Pointer capture for dragging had retargeted the double-click to the row, so this was broken for tags too. **Checked:** 54 scripted checks pass in Chromium and WebKit, at 1440 and with touch at 390. Screenshots at 320/360/375/390/900/1440, light and dark, are on #312. Emulators can't show Safari's floating toolbar, so #312 has a device checklist for B and C. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
kayg added 12 commits 2026-10-15 12:03:31 +00:00
Mockup search, round 3: glass pills, one lighter material, pull to search (#275, #320, #321)
Some checks failed
CI / server (pull_request) Successful in 23s
CI / web (pull_request) Failing after 25s
CI / rust (pull_request) Successful in 1m57s
e8233d6db9
kayg on round 2: the band behind the filter buttons "looks bad", and search should be "more
transparent and less blurry so more content can be seen", on one material shared with the bar,
sheets and menus (#319).

- The bottom progressive-blur band is gone. Date, Tag, Sort, Trash and Clear are glass pills on
  the shared floating tokens (--glass-float, --glass-float-filter, --glass-float-edge), floating
  straight over the list. On a phone, unset filters show just their icon (with a tooltip and a
  name that says the setting) so the row fits; Clear becomes an icon pill.
- The panel and the phone sheet use only the floating tokens (no more one-off 72 px blur).
- styles/glass.css tries the lighter material on those shared tokens, mockup-wide: tint 0.30 /
  0.36 (light / dark) and blur 20 px, down from 0.40 / 0.42 and 44 px. Proposed for tokens.css
  on #319; production is unchanged.
- Pull to search (#320): a small gesture plugin (search/pull.svelte.ts) plus its hint pill.
  A downward pull from the top third of any phone screen follows the finger with resistance,
  arms at 72 px ("Let go to search"), opens the sheet coming down from the top, and springs back
  if let go early. It starts only when what's under the finger is at its top (or on a header),
  never from the left edge, never with words selected or inside text being edited, and cancels
  touch moves only once the pull is its own, so iOS overscroll can't fight it.
- Search now floats over Settings too, so the pull works on every screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Search list clears its pills; the selector capsule never animates from the keyboard (#275)
Some checks failed
CI / server (pull_request) Successful in 24s
CI / web (pull_request) Failing after 25s
CI / rust (pull_request) Successful in 1m45s
8abd41a897
- Search: the results list ends a pill, its gap to the edge (with the home indicator on a
  phone) and 24 px of air further down, so the last row always scrolls fully out from under the
  floating filter pills. One measure (--clear-of-pills) sets both the padding and the keyboard's
  scroll padding. Checked at 1440, 390 and 390 with a 34 px home indicator, Chromium and WebKit.
- Selector (packages/ui): the capsule no longer fades in on first appearance, and changes from
  the keyboard (arrows, Enter, Space) or from outside (a link, another control) jump without
  any fade or slide, reduced motion included. Only a pointer's click glides or fades. Two new
  e2e checks: nothing runs on first appearance or after keyboard choices, and a pointer's first
  choice does fade in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Search: the tab bar steps aside, one pill size, rows never rest under the pills (#350)
Some checks failed
CI / web (pull_request) Failing after 24s
CI / server (pull_request) Successful in 23s
CI / rust (pull_request) Successful in 2m0s
4ec278eacb
- While search is open, the app's bottom bar (tabs and note tools) and the phone's + button are
  hidden at every width, so nothing shows under the sheet's filter pills (it did at 320).
- The filter pills are one size: --f tall (36 px with a 44 px hit area on touch), and square
  when they show only their icon, the Trash included.
- The results list now stops above the pill row instead of running under it, so no row rests
  or scrolls under the pills at any scroll position; its last 14 px fade instead of ending on a
  hard edge. The pills keep their own glass. Checked at the top, mid-list and the end, at 320,
  390, 900 and 1440, light and dark, Chromium and WebKit.

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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
- packages/ui/src/search/words.ts: a small pure parser for English filter words
  (kinds, before/after/on/in/since/until/between dates with ISO or relative days,
  #tags, pinned, in trash, newest/oldest), with unit tests run by CI.
- The search field shows recognised words as tokens; a tap turns one back into
  words, and they stay words. Words become tokens when a space, paste or
  suggestion finishes them; deleting never makes one.
- The bottom pills (Date, Tag, Sort, Trash) and the kind row are gone on every
  width. Best match by default; "newest" or "oldest" reorders.
- An empty field shows recent things plus three examples to try; they step
  aside after a few filter words.
- Phone: the panel hangs from the top and ends above the keyboard and Safari's
  bar (visualViewport), and springs back when the keyboard goes down.
  Scrolling the results puts the keyboard away.
- Rows: a held row never starts the system drag, callout or selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Search r4: the token line fades at its edge when scrolled (#399)
Some checks failed
CI / server (pull_request) Successful in 30s
CI / rust (pull_request) Successful in 3m0s
CI / web (pull_request) Failing after 43m31s
9e73419bc9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
- hug.ts: the panel is laid out once at full height and shows only as much
  as its content and the keyboard allow, by a clip on the glass and the words
  and a scale on the shadow layer, moved by springs (no re-layout per frame).
  Results coming and going use a soft spring; keyboard moves use a quicker
  one with no overshoot, tuned to the keyboard.
- viewport.svelte.ts: the panel doesn't wait for Safari's late viewport
  report (WebKit 265578, 226689). A blur means the keyboard is leaving (the
  whole page, at once); a focus means it's coming (last time's height, at
  once). Safari's numbers then correct it on the same spring.
- While the keyboard is up, the list pads its end so every row can scroll
  above it.
- "Search everything" on phones; a link opens search without selecting the
  words; compact word-only tokens under 360 px (S18).

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
- lib/fit/hug.ts and lib/fit/viewport.svelte.ts: the hug and keyboard logic
  as a shared module any mockup panel can use (Views, #312).
- The mockup gets the app's edge treatment (#105, #226, #396): the backdrop
  publishes --sky-edge, the phone's list screens set data-edge with the
  glass's colour and melt into it at the top and bottom, and the Home Screen
  app is sized by the real screen. glass-edge.ts and home-screen.ts move to
  packages/ui so the app and the mockup share them (the app re-exports).
- While search is open the app behind is inert (a modal dialog), which also
  leaves iOS's form bar arrows nowhere to go. On a phone a tap below a short
  panel closes search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Builds on search r5 (#399) instead of its own search: a View's query is
search's own field with its chips (Field takes a query of its own, `q`), read
by the same functions (QueryState, queryOf in state.svelte.ts). The phone panel
hugs and follows the keyboard (hug.ts) on this page too.

- V7a/V7b: Views live in .calternal/views.md, a heading per View with
  `key: value` lines. Unknown keys, free text and sections without a query are
  kept exactly; the app only changes the heading, `query:` and adds `id:`.
  The "Kept in Views.md" line is gone. The Mockup panel shows the live file.
- V10: "notes" is a filter only first, or last with nothing typed after it
  (words.ts, with tests). V11: a View never lists the tag itself.
- A photo or a file opens its preview large over the app (ItemViewer), with
  its day one tap away. Every row opens its item.
- The field's clear, ⋯ and esc share one glass pill.
- Phone: list screens reach under Safari's floating toolbar (100lvh); + and
  Update view rise by the difference and float with no strip behind them.
- Double-click rename works on sidebar rows (pointer capture had retargeted
  the double-click to the row).
- viewport.svelte.ts: the first measure is a microtask, so a focusout during
  teardown doesn't write state mid-update (state_unsafe_mutation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Mockup Views: room for chips on narrow phones; a View's query shows its chips at rest (#312)
Some checks failed
CI / server (pull_request) Successful in 32s
CI / rust (pull_request) Successful in 2m35s
CI / web (pull_request) Failing after 36m34s
2d14c660e1
A View's field has no clear button (clearing a whole View is no use) and its
input can shrink further; at rest it shows its tokens from the start. Under
360 px, search's clear moves into its ⋯ menu so the tokens keep their room.

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

Superseded by #452 (Views round 2c).

Superseded by #452 (Views round 2c).
kayg closed this pull request 2026-10-15 22:40:30 +00:00
Some checks failed
CI / server (pull_request) Successful in 32s
CI / rust (pull_request) Successful in 2m35s
CI / web (pull_request) Failing after 36m34s

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