Skip to content

refactor(web): pin the landing week grid to its stylesheet - #5436

Merged
tyler-dane merged 1 commit into
mainfrom
claude/kind-dirac-exz4lr
Dec 4, 2026
Merged

tyler-dane merged 1 commit into
mainfrom
claude/kind-dirac-exz4lr

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

What and why

The 2026-12-04 tech-debt sweep found one divergence, and this closes it.
crt.css owns the homepage week grid's geometry: .week-backdrop declares
--columns: 7 / --day-offset: 0 at the top level and --columns: 3 /
--day-offset: 3 inside @media (max-width: 540px), and every card's
inset-inline-start is (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 Fri
narrow. #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 540px literal in
matchMedia, narrowGrid.matches ? 5 : 6 in refreshGuide, min/max in
act, and Math.min(5, Math.max(3, draft.day)) in the change listener.

Nothing tied the two files together. No test reads crt.css at all
(copy-static-assets.ts only copies it), and e2e/onboarding/homepage.spec.ts
asserts 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 = -2 columns, so the card disappears from the week, the demo
cannot be finished, and panDraftOnMobile measures a card that is not on
screen. Change --day-offset on its own and the same thing happens at the other
edge. This is the WEEKS_PER_ROW shape 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 getComputedStyle at
runtime would trade a latent divergence for new startup code on a page that is
being iterated daily. Instead journey.js names the five numbers once and
derives the range through firstVisibleDay/lastVisibleDay, and
landing-week-grid.test.ts reads both files and compares those numbers to the
stylesheet'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 change listener now
clamps 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.md records the rest of the sweep, so the next one does not redo
the 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 refactor
commit on journey.js or crt.css in 30 days. Also examined and kept: #5434's
deletion of landing-pricing-copy.test.ts, which was correct because the new
homepage 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 rule
from 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 revive flag on ProviderPatchInput is set
unconditionally 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

Summary
Selected packages: web
Checks run: test:web, type-check, lint, knip, test:a11y, test:e2e (baseline: no new failures)
Checks skipped: (none)

Baseline against origin/main:
FLAKY, passed on rerun (1):
- test:e2e: [chromium-desktop] › e2e/accessibility/ui-focus-u-i.spec.ts › u returns focus from the month picker to the grid

✓ All checks passed
VERDICT: PASS

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 checks as NEW while classifying
the same spec as FLAKY under test:e2e in 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 the
calendar bundle) plus judged-fine.md, and the spec exercises the in-app sidebar
datepicker. Run five times in isolation on this branch it failed once and passed
four times, its axe failure each time being color-contrast reporting
"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

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
@tyler-dane
tyler-dane enabled auto-merge December 4, 2026 12:11
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Boot bundle: 608.6 KB gzip (+0.0 KB vs main)

@tyler-dane
tyler-dane added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 6f9c1ac Dec 4, 2026
23 checks passed
@tyler-dane
tyler-dane deleted the claude/kind-dirac-exz4lr branch December 4, 2026 12:25

Copy link
Copy Markdown
Contributor Author

Merged as 6f9c1acb4, tagged v1.5.21. Main is green on every check.

Promotion: deferred, batched with the next substantive release.

v1.5.21 is staging-verified: deployed to staging-cloud and staging-selfhosted, both health checks passed (Release on main run 47334090327). It is eligible to promote, and the reason not to is that there is nothing in it to verify in production. The diff is behavior-identical by construction: every call site in journey.js resolves to the number it already held, the only semantic change is a clamp that is the identity on the wide range, and the rest is a new test file plus a ledger entry. No user-visible change, no bug fixed, nothing urgent. AGENTS.md says to batch routine changes and deploy urgent fixes promptly; this is the former.

  • Condition to promote: fold into the next release carrying a customer-visible change or a fix worth deploying on its own. No separate production deploy is needed for this tag.
  • Owner: compass-maintainers, or whichever agent run ships the next release.
  • Rollback target if it is promoted: v1.5.20 (930083e97), the tag currently in production, deployed 2026-12-04T01:15Z.

Production stays on v1.5.20 until then.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants