~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/hud

A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts

0
0

A Covers' bar shows while picking in Panes

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/hud:web/select-bar

On a phone-sized web profile, tapping Select showed the pick circles, but no Cancel, "N selected" or Delete bar on screen. The bar now stays at the bottom of the screen, above the tabs, at every width. Grain gets it through a HUD release and just hud-version.

Claude Opus 5.5 · high

What changes

Covers in Panes. While you pick covers in a Panes (Select in its row, as on Grain's profile), the bar with Cancel, how many are selected and the action stays at the bottom of the screen as it scrolls. On a phone it sits above the shell's floating tabs; at 1440 it sits at the bottom of the column. While picking, the strip of panes shows only the pane in use and doesn't scroll. When picking ends, the strip scrolls back to that pane.

Why

The bar is position: sticky; bottom, so it sticks within its nearest scroll container. Inside a Panes, that container was the strip of panes (overflow-x: auto, which makes overflow-y hidden), not the screen. The strip doesn't scroll vertically, so the bar never stuck. It sat at its natural place after the last cover in the strip, often off screen: y=1436 in an 844-tall window at 390, and y=2579 in a 900-tall window at 1440. Nothing covered it.

While picking, the strip can't change panes anyway (it holds still for that already), so it stops being a scroller and drops the other panes. The bar then sticks to the shell's screen (.level). Sticky stays inside the scroller's padding, and .level's bottom padding is already the room the floating tabs take. So the bar sits above the tabs without a new inset variable. I tried adding one, --hud-inset-bottom on .level for the bar's bottom, but it lifted the bar a second tab-bar's height, because sticky already stays clear of that padding. Stack.svelte now has a comment saying its padding is what keeps sticky content clear of the tabs.

HUDKit and hudkit (Android) draw Cancel, the count and the action as a line over the grid (ResolvedMedia.swift head, Media.kt CoversHead). It takes the place of the row's Select, so it's on screen when it appears and isn't sticky. This pull doesn't touch them.

How it was checked

  • npm run check: 0 errors, 0 warnings.
  • npm run ssr: passes, including server-drawn equals hydrated.
  • npm run unit: 45 passed.
  • node harness/layers.mjs and node harness/docs.mjs: pass.
  • New SSR check: the renderer's server test now mounts the profile's Panes at 390 with the build's stylesheet. It taps Select, picks two covers and checks:
    • the bar reads "Cancel 2 selected Delete 2" and is sticky;
    • no box between it and the screen's scroller scrolls or hides it;
    • Cancel lets the strip scroll again.
  • With Panes.svelte reverted, the check fails with "the bar is in a box that scrolls or hides it (strip …: overflow hidden hidden …)".
  • By hand in Chromium: Grain's next/ (feature/hud) was built with this branch's packages, on a release HUD with HUD_WORKSPACE=off, grain-serve and grain's harness PDS, as alice.test with 33 galleries.
    • At 390 with touch and at 1440, own profile, Select, two picked: the bar is on screen and stuck at the bottom while the screen scrolls. At 390 it ends 20px above the tabs.
    • Delete asked "Delete 2 galleries? This cannot be undone." Confirming removed both from the profile, the PDS and the index (33 to 31, then 29).
    • Cancel cleared the picks and gave the focus back to Select. Afterwards, the strip swiped to Favorites and back.

Before (390, two picked, no bar) and after (390 and 1440) are attached.

Before, 390: own profile, two galleries picked, no Cancel or Delete bar anywhere on screen

After, 390: two picked, the bar with Cancel, 2 selected and Delete 2 above the floating tabs

After, 390: Delete 2 asks "Delete 2 galleries? This cannot be undone."

After, 1440: two picked, the bar at the foot of the column

Approved

This pull makes the Covers' pick bar stay on screen in a Panes. While a pane is picking, the strip stops being a scroller (overflow: visible) and hides the inert panes. The sticky bar then sticks to the shell's .level instead of the strip's own bottom. When picking ends, an effect scrolls the strip back to the shown pane.

I read the diff and the full Panes.svelte, and found nothing that must change. The held guards in onscroll and measure keep a scroll reset to 0 from moving progress or chosen. The restore effect uses untrack for at, so it only runs when picking stops. The change file, the comment in Stack.svelte, and the new SSR check with its failure case all match what the repo asks for.

One thing to look at by hand. While held, the hidden panes are display: none, so any ResizeObserver-driven heights entries for them may drop to 0 until they come back. The pane shown is unaffected. If the ResizeObserver doesn't remeasure promptly on release, the strip's tall height could be stale for a frame after Cancel. Your hand check of swiping to Favorites and back suggests it is fine.

On the heights note: when picking ends, progress is still the pane shown (the held guards kept it), so between.f is 0 and tall is heights[at] alone. The hidden panes' zeros are weighted out until they're measured again. The ResizeObserver watches every box, so each one that comes back from display: none is measured again as soon as it shows. Leaving it as is.

Merged as 1317bba