Repository navigation
feat(sheet): a class drags down to its key facts, not the shared open stop - #496
Conversation
… stop On a phone, one drag down from an open class landed on the shared 356px stop, where the sticky footer cut the chips and the time line. The class now has its own ladder: peek, a measured key-facts stop (chips and when/where above the footer, capped at two thirds of the frame), then its fit. Only a class too long to fit keeps the near-full stop, so a short class has no blank band above it. A sheet dragged to the key-facts stop holds that px however the fold remeasures, the camera frames for it, and class B tapped after class A opens at B's own fit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
One resolver (`resolveStop`) now names the stop vaul shows for any snap, and the camera's cover reads that same stop, so the two can no longer disagree. A stop the ladder dropped resolves to a named rung. The hook measures fit and fold in one pass. Only the facts row carries the key-facts marker, pinned by a spec. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ear full Leaving a class held at its key facts for a list resolved the stale px stop to the list's top rung for the one render before the reset effect ran, so the sheet could jump to near full and back. Only a near-full stop now resolves to the top. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
This PR is the size of its problem. A phone's drag down had no stop between the content height and the shared 356px, where the footer cut the facts; the fix is one pure module, one data attribute, and a second number from a measure pass the hook already made. Nothing is smuggled in, and the inline ladder it replaces was right to lift out.
No ticket is linked, so I judged it against its own body. Every claim in the outline matches the code except the fold's clamp, and the dismissals hold. Two things are missing rather than too much: the host-facing CHANGELOG, where #369's entry now states the opposite of this behaviour, and a test for the cap, the only other transform of this ladder. No contract surface is touched.
Findings
should-fix—use-fit-snap.ts:66foldHeight's floor is dead under a 540px frame; its JSDoc and its spec claim otherwiseshould-fix—DrawerStack.tsx:272no CHANGELOG entry, and #369's is now falseshould-fix—use-fit-snap.ts:69Streamline:SheetMeasureandUNMEASUREDhand-roll React's bail-outconsider—sheet-ladder.ts:19Streamline:SHORT_CLASShas one useconsider—sheet-ladder.ts:105Streamline:sheetCoverPxis one expression, one callerconsider—sheet-ladder.ts:93the cap belongs beside the ladder it transforms
What was checked
Read whole on the branch: DrawerStack.tsx (738 lines), use-fit-snap.ts, sheet-ladder.ts, EventFacts.tsx, config/responsive.ts, the specs. Consumers followed: useSheetCover, BootFallback's capStop, attribution.test.ts against the moved SNAP_POINTS, and every <EventFacts> call site — one row carries the marker, as claimed.
Streamliner: 18 pieces covered, 13 kept, 4 raised, 1 dropped — merging the two class returns loses the SNAP_POINTS identity a spec pins. The diff adds no dependency.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Under a 540px frame the two-thirds share is already below the shared open stop, so the clamp's upper bound wins and a landscape phone's key-facts stop lands at 247px. That is the right answer there — the sheet has no third of a map to spare, and `shortSheetCap` holds every stop lower still — but nothing said so and no case covered it. The floor is live and stays: `foldHeight` returns the open stop for a 120px fold on an 844px frame. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4DxAYgANiCBvJZpZ
`SheetMeasure` was exported and imported nowhere, and holding the measure as one object meant `UNMEASURED` plus a manual field compare to stop a re-render React already stops for itself. Two primitive states do that, and the shape the hook returns is unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4DxAYgANiCBvJZpZ
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | a5654dd | Nov 26 2026, 04:51 PM |
`SHORT_CLASS` was a module const with one use, so its comment sat two screens from the branch it explains. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4DxAYgANiCBvJZpZ
`sheetCoverPx` was one expression with one caller, and its export carried a describe block of its own. The why stays, above the line in DrawerStack that resolves the cover. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4DxAYgANiCBvJZpZ
The short-window cap was the one transform of this ladder left in DrawerStack, and so the one with no test. `capPoints` puts it in `sheet-ladder.ts`, which drops the inline `new Set` dedupe and covers what the cap does to a class: a 375px-tall frame whose key facts and fit both sit above its 300px cap climbs peek then cap, and one whose key facts fit under it keeps all three stops. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4DxAYgANiCBvJZpZ
CHANGELOG.md is the host-facing twin of this change and still described the old sheet: #369's entry said one drag down stops at the usual third-height, which this PR replaces. Adds the Unreleased entry and puts #369's sentence in the past. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4DxAYgANiCBvJZpZ
|
Six critic threads, six commits, pushed to
Lean gate green. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
…-content # Conflicts: # CHANGELOG.md # src/components/molecules/EventFacts/EventFacts.test.tsx
Four more PRs: #496 (a class drags down to its key facts), #498 (the class address ends with its postcode and copies on tap), and the contract re-syncs #497 and #499. - `CHANGELOG.md`: #496's and #498's entries above #490's, which keeps this branch's wording. - `translations.en.json`: taken from production again with `pnpm sync:translations --write`. Since the last sync SahajCloud#1278 dropped `common.errors.captcha_blocked`, and #498's `common.chrome.copied` replaced `share.copied`. `RETIRING_KEYS` loses its last entry, the key production no longer serves. `pnpm types:cms` wrote no change. #496's ladder changes write only where the sheet can collapse, so the inline column is untouched by them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Change outline
Flow — the stop a phone sheet shows, and what the camera reserves
DrawerStackused to comparesnapagainst stops inline. It now asks one resolver for the stop vaul shows, and the camera's cover reads that same stop.Files — where the ladder lives
src/views/DrawerStack/ +├── sheet-ladder.ts # PEEK/OPEN/FIT_SNAP, SNAP_POINTS, sheetLadder, resolveStop, capPoints, heldFoldPx (pure) ├── use-fit-snap.ts # + foldHeight (pure), measures fit and fold together └── DrawerStack.tsx # wires them; no inline ladder, stop or cap logic src/components/molecules/EventFacts/EventFacts.tsx # default variant carries data-sheet-fold CHANGELOG.md # Unreleased entry, and #369's correctedPreview
Preview pending: no Cloudflare branch alias exists yet. Once it does, open these at phone size (375×667 or 390×844):
/gb/south-east/london/balham-library/1392. Drag down once: the room and street sit above Register, and the pin shows above the sheet./ie/dublin/1355. It opens at its content height, and dragging up leaves no blank band.Test results
test:run)src/views/DrawerStack/, plusEventFacts.test.tsxandattribution.test.tsManual verification
pnpm dev, open the Balham class at 375×667, and drag down once. Title, tags, time and full address sit above the footer, and the pin shows. Drag again to reach the peek./gb/south-east/london, tap a class, press Back. The list returns at 356px.pnpm dev --host), run the Balham checks with the home indicator below the footer.Notes for reviewer
useSheetCover) had already landed in fix(ui): iPhone panel, pin tap and phone framing fixes from the 6 Nov bug sweep #369. This PR adds only the key-facts stop and the class ladder.resolveStopand by reading the cover offvaulSnap.EventFactsin the class body.EventDetailsrenders exactly one; list cards usecompact, Share and Registration usecard, and neither is marked.cardis unmarked, now pinned by a spec.jsx-sort-propsdetach. The comment sits outside the opening element.pinned at a 375px frame;
SheetMeasureandUNMEASUREDare gone, two primitive states lettingReact bail out on an unchanged measure;
SHORT_CLASSandsheetCoverPxare inlined at their oneuse each; the short-window cap moved into
sheet-ladder.tsascapPoints, with the class ladderunder the cap now covered; and
CHANGELOG.mdcarries the host-facing entry. One part of thefirst finding did not land: the floor is not dead code —
foldHeightreturns the open stop for a120px fold on an 844px frame, and a spec has pinned that since the first push.
/simplifysuggestions:FOLD_SNAPtoken. A token would move a sheet the visitor dragged.data-sheet-fold. It has one writer and one reader, likedata-sheet-fit, and is pinned by a spec.BootFallbackreusingOPEN_SNAP. That is outside this diff.Detail
useSheetFit,snappedForanduseClassSheet. Main already hasuseFitSnapanduseSheetCover, so this PR builds on those.attribution.test.tsnow readsSNAP_POINTSfromsheet-ladder.ts.sheet-ladder.test.tsadds a behavioural check that every ladder bottoms out at the peek.Cannot update a component while renderingconsole error from DrawerStack/ReadClient also appears on unmodified main.🤖 Generated with Claude Code