Repository navigation
fix(textbox): the ornate treatment ignores a right-image choice - #198
Conversation
`blockConverters` passed `align={fields.imagePosition}` to `ContentTextBox`
but nothing to `OrnateTextBox`, which took no `align` prop. Every ornate
block rendered image-left, discarding the editor's choice — 122 of the 123
imported ornate blocks are right-image ones.
The warm gradient mirrors with the image. Left where it is, a right-image
layout puts the body column over the band at 2.34:1, failing WCAG AA; the
mirrored band measures 4.76–5.33:1 (issue decision 2A).
Both gradient strings are written out in full: Tailwind v4 emits an
arbitrary value only for a candidate it finds verbatim, so an interpolated
angle would compile to no gradient at all.
Also corrects `ContentTextBox`'s `align` JSDoc, which described the
opposite of what its code does, and is the doc the new prop is modelled on.
Refs #193
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KSzWA14QTxVQmr5sZeyk7Y
Nothing pinned the gradient's side, so the left variant needs its own assertion as much as the new right one does. The angle is asserted with the side: an interpolated angle compiles to no gradient, and only the pair proves the band still lightens the image's edge. Refs #193 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KSzWA14QTxVQmr5sZeyk7Y
Interpolating the side and the gradient as one string moved both class tokens to the end of the attribute. The order has no effect on the CSS, but it made the default render differ from the one in production, so the acceptance criterion could not be checked by comparison. Splitting the side from the gradient puts every token back where it was. The gradient assertion now reads the warm band's own class attribute: the brown ground is a gradient too, and matched first. Refs #193 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KSzWA14QTxVQmr5sZeyk7Y
Deploying wemeditate-design with
|
| Latest commit: |
c6a9966
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b9c80c41.wm-design.pages.dev |
| Branch Preview URL: | https://claude-fix-193-ornate-textbo.wm-design.pages.dev |
sydevs-bot
left a comment
There was a problem hiding this comment.
1 question for the reviewer, one per thread.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | c6a9966 | Commit Preview URL Branch Preview URL |
Oct 27 2026, 10:56 PM |
|
🤖 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
The diff matches the ticket one for one: one prop, one converter argument, the joined JSDoc fix, a story section, four tests. Nothing the ticket did not ask for, and no new layer — align is the prop ContentTextBox already had, with the same meaning, so the two side layouts now read one word one way instead of gaining a shared abstraction.
The contract holds. imagePosition is non-optional 'left' | 'right' | 'overlay', the overlay early return narrows it, and this repo is its only consumer, so no cast and no producer change.
The risk is not in the code: it flips 122 of 123 imported ornate blocks to right-image on the next publish, and no published page carries an ornate block, so the Ladle section is the entire verification surface. The body says so plainly, which is the right call.
Findings
consider— thealignJSDoc understates the prop's reach; the band is notlg:-gated (OrnateTextBox.tsx:53).consider— criterion 3's "both strings compile" is pinned by a manual check only, where the compile harness exists (OrnateTextBox.tsx:116).
What was checked
- Read whole:
OrnateTextBox.tsx,blockConverters.tsx,ContentTextBox.tsx, both test files, the story,layouts/tailwind.css,layouts/tailwind.test.ts. - The joined JSDoc fix is correct:
align='left'giveslg:flex-rowwithImagefirst, so the image sits left. - All four Tailwind candidates appear verbatim in a
@source-scanned file. - Both previews 200. In the deployed Ladle stylesheet:
lg:float-leftandlg:float-rightboth under@media(min-width:64rem),lg:ml-12andlg:mr-12emitted, both bands compiled —#ffffff05,#ffffff2e 25%,#ffc4af99at90degand270deg. - Not reopened: decisions 1A and 2A, the mobile-contrast question, the author-side pass.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`bandSide` and `bandGradient` carry no `lg:` prefix, so `align` moves the warm band at every width, not only at `lg` and above. The old wording claimed a narrower reach than the prop has. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZJEfH9MsdzrryYeDG
The band's angle must be written out, because Tailwind emits an arbitrary value only for a candidate it finds verbatim in a scanned file. Nothing caught an interpolated angle: `OrnateTextBox.test.tsx` reads the rendered class string, which is identical either way, so the stylesheet could lose the rule and the band draw as a bare transparent box while every test stayed green. Watched failing with the angle interpolated — both new cases red, the 11 component tests still green. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZJEfH9MsdzrryYeDG
The `@source inline()` rule reads as a ban on writing variants out in a component, which is what `OrnateTextBox`'s two band gradients do and what the new stylesheet test now enforces. The rule fires on a class built from runtime data, not on a ternary over two literals the scanner already sees. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZJEfH9MsdzrryYeDG
|
Both critic threads adopted. Branch already level with
Gate: lint 0 errors, The mobile-contrast question thread stays open. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
#200 moved `layouts/tailwind.test.ts`'s compile plumbing into `tests/guards/_source-scan.ts`; this branch had added a band-gradient case to the same import block. Took the shared helpers and kept the new case, reading the component source from the helper's `repoRoot` rather than a second local path. `@source "../components"` still covers `OrnateTextBox.tsx`, so #200's `source(none)` leaves the verbatim-candidate premise intact. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYtQC69PjzVdUcfhBC
|
Merged Worth a reviewer's eye: #200 also turned the scan set into Lean gate green on the merge — 0 lint errors, 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Below `lg` the body column is full-width and crosses the warm band, where the full-strength peach dropped body text to 2.31-2.48:1 against `text-white/90` — a WCAG AA failure already on `main`, which the right variant mirrored rather than caused. Option B of the PR's question thread: keep the wash, lower its alphas. The band now runs at an eighth of its stop alphas below `lg` (0.01/0.02/0.08) and an `lg:` override restores 0.02/0.18/0.6 from `lg` up, so nothing at or above `lg` moves. Measured in headless Chromium on `pnpm ladle:build`, sampling the strip where the band crosses the body text, across all four story sections: 4.62-5.91:1 at 360-1023px, against a 4.76:1 ceiling set by the brown ground with the band removed entirely. Desktop is unchanged at 4.76-6.26:1. Lowering the peach stop alone reaches only 3.45:1 — the white stop at 25% is the binding constraint past that point — so all three alphas scale. The four gradient strings stay written out whole: Tailwind v4 emits an arbitrary value only where it finds the candidate verbatim, and that now covers an interpolated alpha as well as an interpolated angle. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXYzrf7LftL4PQEjp8
|
Decision 3B built and pushed as
Gate: lint 0 errors, 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
…ontrast #198 reformatted the focus-ring assertion's surrounding lines, which brought back the one hunk the previous base merge already settled: main reads the ring and its band through a `token` closure local to that `it`, and this branch hoisted the same resolver to module scope as `resolve(css, value)` so the new 4.5:1 surface test could call it too. Taking main's side would reference a name no longer in scope. Nothing else overlaps. #198's own stylesheet cases pass against the retuned palette, and the brown ground `DESIGN_SYSTEM.md` measures `teal-300` on is unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXsYpiwtpVzLKg3cXD
Summary
OrnateTextBoxtakesalign, andblockConverterspassesimagePositioninto it — 122 of 123 imported ornate blocks are right-image ones that rendered left.lg(decision 3B), where the body column is full-width and crosses it. At full strength it fails AA there onmaintoday, in both alignments.ContentTextBox'salignJSDoc described the opposite of its code, and is the doc the new prop was modelled on.layouts/tailwind.test.ts, anddocs/rules/tailwind.mdsays where@source inline()stops applying.Change outline
Contract —
OrnateTextBoxThe prop
ContentTextBoxalready had, with the same shape and the same meaning.'overlay'never reaches either component, sofields.imagePositionneeds no cast.interface OrnateTextBoxProps components/organisms/OrnateTextBox/OrnateTextBox.tsx … sidetext?: string + align?: 'left' | 'right' # the IMAGE's float side at lg+, default 'left'Behaviour — what
alignmoves, and what it does notDecision 1A keeps the ornaments in place; decision 2A carves out the gradient, because it is the one that lands behind body text. Decision 3B then splits that gradient by width.
OrnateTextBox({ align }) brown ground unchanged — full bleed floral graphic unchanged — left-[45%], decision 1A sidetext unchanged — right-12, decision 1A - warm band left-0 + 90deg alphas 0.02/0.18/0.6 + warm band align === 'right' ? right-0 + 270deg : left-0 + 90deg # side, every width + below lg alphas 0.01/0.02/0.08 # decision 3B + lg: alphas 0.02/0.18/0.6 # as it is on main image float align === 'right' ? lg:float-right lg:ml-12 : lg:float-left lg:mr-12 body column unchanged — lg:flow-rootTwo things that look like they should change and must not:
lg:flow-rootgives it a block formatting context, and such a box cannot overlap a float's margin box on either side, so it shrinks away from the image whichever way the float points.Flow — the converter
blockConverters.textbox({ node }) components/organisms/RichText/blockConverters.tsx imagePosition === 'overlay' → ContentOverlay (early return, narrows the union) sideProps = { title, description, image… } - wisdomStyle → OrnateTextBox {...sideProps} # align dropped + wisdomStyle → OrnateTextBox {...sideProps} align={fields.imagePosition} else → ContentTextBox {...sideProps} align={fields.imagePosition} # already correctGuard — the scanning contract
A render-level assertion cannot see the hazard the code comment names: an interpolated angle or alpha produces the same class string, so every component test stays green.
Preview
Image on the Right) is the new variant. Both rebuild on this push. Narrow the window below 1024px to see decision 3B: the band should stay a visible warm wash and stop washing out the body text./about-meditation,/kundalini,/chakras-channels,/shri-mataji,/inspiration,/music-for-meditation). Nothing here can seed SahajCloud, so use the Ladle link to review the change.Every measurement below is from a local
pnpm ladle:buildofc6a9966, not from a deploy.Test results
.claude/skills/pr-prep/check.sh— lint (0 errors),tsc --noEmit, 907/907 testsOrnateTextBox,RichText,layouts/tailwind)pnpm ladle:build, used for the measurements belowVerified against real output rather than source:
All four gradients compile. In the built stylesheet, minified to hex-with-alpha:
#ffffff03,#ffffff05 25%,#ffc4af14at90degand270degin the base layer, and#ffffff05,#ffffff2e 25%,#ffc4af99at both angles under@media(min-width:64rem).lg:float-rightandlg:ml-12are emitted too.Nothing at
lgor above moves. Thelg:strings are byte-identical to the ones onmain, and the band is the only element whose class attribute this commit touches. Re-measured by forcingmain's full-strength band at every width: identical figures at 1280 and 1920.Contrast, measured in headless Chromium — body text hidden, the background it sat on sampled, white-at-90% composited against each sample. Worst sample per width, across all four story sections.
Below
lg, where the body column is full-width and crosses the band:lgmaintodayFrom
lgup, where the body column sits clear of the band — unchanged by this commit:AA holds at every width in both alignments. The
lgfigures come from the same 11-column sampling the issue used; a denser sweep finds a floor the band has no part in — see fix(textbox): body text sits 0.07 above the AA bar at lg #205 under Notes.Manual verification
lg+: image, warm band and body column should mirror; floral graphic and sidetext should not.lg, not gone — and the body text over it should read cleanly.lg+ too, not a flat box.textboxwith Image Position Right and Ancient Wisdom on should now render image-right on the site. Nothing in this PR could check that end of it — no published page carries an ornate block today.Notes for reviewer
main;c6a9966fixes it for both alignments.lg:block, so decision 3B does not reach it.lgbody rectangle densely (50 columns instead of 11) finds 4.47:1 at 1280px, in the default left-image layout. The warm band has no part in it — at 1280 the band ends at x=427 and the body text starts at x=601. The cause is the floral graphic'sopacity-40lightening the ground under the body column: hiding the graphic and changing nothing else gives 6.1–6.4:1. It reproduces withmain's band forced at every width, so it predates this PR, and the fix is a design decision about the graphic rather than the band./simplify's efficiency lens returned clean; its other three lenses stalled in the agent harness without handing back, so the quality pass here is/code-review high, which also independently re-verified the Tailwind scanning.Detail
Why 270deg and not a flip of the stops.
90degpoints right, so the peach stop at 100% lands on the right edge of aleft-0band — its inner edge.270degpoints left, so the same stop lands on the left edge of aright-0band, again the inner edge. The peach therefore stays against the body column in both, which is what makes the band read as lightening the image's edge rather than as a stripe.Why all three alphas scale, not just the peak. Decision 3B says lower the peak. Lowering the peach stop alone to 0.12 reaches only 3.45:1: past that point the white stop at 25% becomes the binding constraint, and at 0.18 it fails on its own. So the whole gradient scales by an eighth, which keeps its shape — the same wash, softer — rather than flattening it.
Why an eighth and not less. Removing the band entirely measures 4.76:1 at its worst, so there is only 0.26 of ratio between a bandless block and the AA floor. 0.01/0.02/0.08 spends about half of that and lands at 4.62:1. Going fainter buys almost nothing: 0.01/0.02/0.06 measures 4.62:1 too, because the brown ground is the floor by then.
Why the ornaments stay put. Decision 1A. The
lg:pr-24gutter on the Container already keeps a right-floated image clear of the sidetext, so mirroring the image costs nothing there.What the desktop floor comes from. Not the warm overlay — the
110degbrown ground, whose light end (#8a6f56) is on the left, and the floral graphic over it. A left-hand body column is inherently lower-contrast than today's right-hand one at every width. #205 has the breakdown.The empty
/sitemap.xmlon the preview is not a defect.isIndexableHostinserver/sitemap.tsexcludes*.workers.devand*.pages.devon purpose, so a preview never invites crawlers. Checked while hunting for an ornate page, and recorded here so the next run does not re-investigate it.Why the band pin lives in
layouts/tailwind.test.ts. The hazard is a stylesheet one, and that file already owns thecompile()harness. The source read stands in for the@sourcescan, which the harness bypasses by handingbuildits candidates directly. ANaNdegangle still compiles, so the compile half catches a malformed candidate, not a wrong value — the verbatim half is what catches interpolation. Each case also pins its own peach alpha, so a faint case cannot pass on the full-strength candidate.Closes #193
🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjXYzrf7LftL4PQEjp8