Uh oh!
There was an error while loading. Please reload this page.
refactor(landing): delete unreachable effects and orphaned CSS (#344 phase 1) - #496
Conversation
…phase 1) Phase 1 of the landing redesign: dead-code removal only, no visual change. Removed, each verified unreachable rather than assumed: startCounters (18 lines) — its only caller was the `landing-stat-fade-up` branch of the fade-up observer, and that class appears in no markup anywhere. The observer itself stays; `.landing-fade-up` is live at three call sites, so only the stat branch and the dead selector go. the spotlight mouse-follow effect (42 lines) — opens with `if (cards.length === 0) return`, and `.landing-spotlight-card` is applied in no markup, so it early-returned on every mount. 16 orphaned CSS rules across .landing-btn-shimmer, .landing-spotlight-card and .landing-icon-container — zero consumers outside globals.css, in both the unscoped and the .landing-page-scoped copies. Net: 117 lines deleted, 1 added. One consequence worth recording, because it looks alarming in the diff: the eslint suppressions baseline swaps `react-hooks/immutability` for `react-hooks/set-state-in-effect` on (public)/page.tsx. That is not a new violation. The deleted code mutated DOM styles and drove requestAnimationFrame loops, which made React Compiler bail out on the whole component — masking a pre-existing `setState` inside the mount-time URL-error effect at :110. Removing the dead code made the file analyzable again and the latent violation surfaced. Verified by swapping main's page.tsx into this branch: with main's file the full lint is 0 errors, with mine it is 1. The pattern itself (reading window.location on mount) predates this PR and cannot move to lazy state init, since the initializer would also run during SSR where `window` is undefined. Suppression count for the file is unchanged: one out, one in. NOT done in this commit, deliberately — the wider de-dup of the unscoped vs .landing-page-scoped rule blocks. I verified it is safe in principle (all 21 unscoped landing selectors have scoped twins, the two apparent property gaps are comment-parsing artifacts, and no .public-surface content page uses a landing-* class), but the two blocks are interleaved with 11 unrelated rules so it cannot be a range delete, and the phase's own gate is "screenshot diff shows no change" — which I cannot run here, since Turbopack refuses the symlinked node_modules in a worktree. Left for a follow-up that can be screenshotted. part of #344 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Deploying with |
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs | frontend-staging | cbf88c8 | Commit Preview URL Branch Preview URL | Jul 31 2026, 07:47 AM |
AndresL230
commented
Jul 31, 2026
Local e2e cycle — greenRun at Disclosure: an earlier run of this cycle was discarded, not reported. I switched the primary checkout to Gates: |
Uh oh!
There was an error while loading. Please reload this page.
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe landing page observer no longer starts statistic counters. The related ESLint suppression now targets ChangesLanding page cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Phase 1 of the landing redesign: dead-code removal only, no visual change. Phases 2–4 need your and Jack's taste input and aren't touched.
Removed — each verified unreachable, not assumed
startCounters(18 lines)landing-stat-fade-upbranch of the fade-up observer, and that class appears in no markup anywhereif (cards.length === 0) return, and.landing-spotlight-cardis applied in no markup — it early-returned on every mount.landing-btn-shimmer,.landing-spotlight-card,.landing-icon-container— zero consumers outsideglobals.css, in both the unscoped and scoped copiesThe observer itself stays:
.landing-fade-upis live at three call sites, so only the stat branch and the dead selector go.Net: 117 deleted, 1 added.
One thing in the diff that looks alarming and isn't
The suppressions baseline swaps
react-hooks/immutability→react-hooks/set-state-in-effecton(public)/page.tsx. That is not a new violation.The deleted code mutated DOM styles and drove
requestAnimationFrameloops, which made React Compiler bail out on the whole component — masking a pre-existingsetStateinside the mount-time URL-error effect at:110. Removing the dead code made the file analyzable again, and the latent violation surfaced.Verified by swapping main's
page.tsxinto this branch: with main's file the full lint is 0 errors, with mine it's 1. Same suppressions file both times.The pattern itself predates this PR and can't move to lazy state init — the initializer would also run during SSR, where
windowis undefined. Suppression count for the file is unchanged: one out, one in.Deliberately not done
The wider de-dup of the unscoped vs
.landing-page-scoped rule blocks. I verified it's safe in principle:landing-*selectors have scoped twins.public-surfacecontent page (about/careers/privacy/terms) uses alanding-*classBut the two blocks are interleaved with 11 unrelated rules (
.glass-panel,.liquid-glass-*,.glass-input,:root, toast keyframes…), so it can't be a range delete — and this phase's own gate is "screenshot diff shows no change", which I can't run here: Turbopack refuses the symlinkednode_modulesin a worktree. Left for a follow-up that can actually be screenshotted, rather than shipping ~200 lines of CSS deletion on the acquisition surface unverified.Also untouched: the hint text (
"SEE WHAT'S INSIDE","Scroll the catalog","— end of catalog") and the page indicator. Both are visible changes, so they belong with your phase-2 sign-off, not in a zero-visual-change cleanup.Gates
tsc --noEmitclean ·npm run lint0 errors ·npx vitest run58 files / 415 testspart of #344
Summary by CodeRabbit