Repository navigation
refactor(web): pin the landing week grid to its stylesheet - #5436
Conversation
crt.css owns the homepage grid's geometry: .week-backdrop sets --columns and --day-offset, and every card is positioned from them, so the days on screen are [--day-offset, --day-offset + --columns - 1]. journey.js kept its own copy of that range in four places, including the 540px breakpoint, and nothing tied the two files together. Move the breakpoint in one of them and the demo nudges its draft off the visible columns, where the card disappears from the week and the demo cannot be finished. Neither file can import a shared constant: the stylesheet is plain CSS and the script is a non-module file, both copied to the build verbatim. So journey.js names the five numbers once and derives the range from them, and landing-week-grid.test.ts compares them to the stylesheet's own. Behavior is unchanged: every call site resolves to the number it already held, and the media-query listener's clamp, now unconditional, is the identity on the wide range. Also records the 2026-12-04 tech-debt sweep in judged-fine.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmwVQEBySdRQ5z19FyenbA
|
Boot bundle: 608.6 KB gzip (+0.0 KB vs main) |
|
Merged as Promotion: deferred, batched with the next substantive release.
Production stays on Generated by Claude Code |
What and why
The 2026-12-04 tech-debt sweep found one divergence, and this closes it.
crt.cssowns the homepage week grid's geometry:.week-backdropdeclares--columns: 7/--day-offset: 0at the top level and--columns: 3/--day-offset: 3inside@media (max-width: 540px), and every card'sinset-inline-startis(var(--day) - 1 - var(--day-offset)) * 100% / var(--columns). The days actually on screen are therefore[--day-offset, --day-offset + --columns - 1]: Sun to Sat wide, Wed to Frinarrow. #5434's guided demo has to know that same range to decide where a draft
may go, and it carried its own copy of it in four places: the
540pxliteral inmatchMedia,narrowGrid.matches ? 5 : 6inrefreshGuide,min/maxinact, andMath.min(5, Math.max(3, draft.day))in thechangelistener.Nothing tied the two files together. No test reads
crt.cssat all(
copy-static-assets.tsonly copies it), ande2e/onboarding/homepage.spec.tsasserts the transcript and the step counter, not where the card sits in the
grid; its 320px case taps Thu to Fri, both of which stay on screen under a
drifted offset, so a divergence passes. Move the breakpoint in the stylesheet
alone and, between the two values, the script believes the grid is wide while
the CSS has already narrowed it: a draft nudged left off Wed renders at
--day - 1 - 3 = -2columns, so the card disappears from the week, the democannot be finished, and
panDraftOnMobilemeasures a card that is not onscreen. Change
--day-offseton its own and the same thing happens at the otheredge. This is the
WEEKS_PER_ROWshape on the top of the funnel.Closed mechanically rather than by refactor, following the #5412 landing-pricing
and #5416 demo-seed precedents: the stylesheet is plain CSS and the script is a
non-module file, both copied to the build verbatim, so neither can import a
shared constant, and reading the custom properties out of
getComputedStyleatruntime would trade a latent divergence for new startup code on a page that is
being iterated daily. Instead
journey.jsnames the five numbers once andderives the range through
firstVisibleDay/lastVisibleDay, andlanding-week-grid.test.tsreads both files and compares those numbers to thestylesheet's own. Values, not layout: the breakpoint and the range can change
freely as long as both files change together.
Behavior is identical by construction, every call site resolving to the number
it already held. The one deliberate change is that the
changelistener nowclamps unconditionally, which is the identity on the wide range for any day in
0 to 6. The pin was confirmed to fail in all five drift directions (the
breakpoint from either file, either file's narrow range, the stylesheet's wide
range) and to pass against the real values.
judged-fine.mdrecords the rest of the sweep, so the next one does not redothe reading: the window was the 11 merges the 2026-12-03 entry did not cover
(#5417, #5423 to #5426, #5429 to #5431, #5433 to #5435), Gate step 1 was clean
on all three detectors, and the churn guard does not bind, with no
refactorcommit on
journey.jsorcrt.cssin 30 days. Also examined and kept: #5434'sdeletion of
landing-pricing-copy.test.ts, which was correct because the newhomepage quotes no price, interval or trial length anywhere; #5431's 12-hour
chip notation, where all 23 advertised hours were checked to round-trip through
resolveQuickTimeStart; #5430's invitee RSVP branch, which is a different rulefrom the host roll-up beside it; and #5429 and #5435, which both read their
owning module rather than copying its rule.
One finding is reported to a human instead of shipped, because its fix changes
behavior: #5433's new
reviveflag onProviderPatchInputis setunconditionally for every provider but honored only by
GoogleEventWriter.Apple cannot reach that branch, Microsoft can, and the repair needs a writer
capability plus a product decision about what Compass should do when a provider
cannot revive a cancelled occurrence. The entry records the reasoning.
Verify
No PRE-EXISTING or NEW failures. An earlier strict run on this same commit
reported
e2e/accessibility/datepicker-a11y.spec.ts › sidebar datepicker › light theme meets baseline accessibility and contrast checksas NEW while classifyingthe same spec as FLAKY under
test:e2ein the same run. It is a known flake,not reachable by this diff: the diff touches only
apps/calendar-web/src/landing/(served at
/start/*and referenced by the landing page at/, never by thecalendar bundle) plus
judged-fine.md, and the spec exercises the in-app sidebardatepicker. Run five times in isolation on this branch it failed once and passed
four times, its axe failure each time being
color-contrastreporting"background color could not be determined because it is overlapped by another
element". The same spec was reported FLAKY on #5400, #5416 and #5419.
Generated by Claude Code