Repository navigation
refactor: delete what was not earning its place - #34
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
Stack — merge in order, bottom to top:
Each PR's diff is only its own commits; GitHub shows it against its parent branch. |
This was referenced Sep 14, 2026
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
PRODUCT.md is explicit that ads never sit between the user and an answer and never interrupt a calculation. Three components did exactly that, and none of them worked. The interstitial opened after two minutes of idle and simulated a video with a 15s setTimeout over an AdSense <ins> that plays nothing. The side rail rendered only above 1980px and styled itself with bg-card, a class this project never defined, so it had no background at any width. The adblock notice keyed off a no-cors fetch, which almost never rejects, so its catch branch was effectively unreachable. The idle scheduler that drove the interstitial goes with them: ad-manager drops from 137 lines to 29. Consent and a single ad slot below the content remain, and the e2e suite now asserts the ad never precedes the calculator. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Morning + afternoon + night bonus was computed three times — twice in the work-calculator hook and once in buildDayBreakdown — from the same calls, and the organism called two of them with nearly the same arguments. Three copies of the arithmetic that decides how much someone is owed is three places for it to drift. buildDayBreakdown already returned everything the hook rebuilt, so it becomes the source and the hook derives from it. The suite that passed before passes after, unchanged: the numbers did not move by a minute. Alongside it, the smaller duplicates: isRealTime was isRealDuration, isChronological was the ordering half of findJourneyIssue, the digit helpers were defined in two inputs, and the clock placeholder in two organisms. minutesToSeconds had no consumer but its own test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AGENTS.md makes atomic design the law of this repo, and twelve of thirty components broke it — which makes the convention useless as a guide, because a developer looking for the pattern finds the violation first. alert-banner, stat-box, collapsible-panel and google-ad compose no other component and become atoms. currency-input and masked-input compose the Input atom and become molecules. hero-panel and cookie-consent are whole sections with their own state and become organisms. theme-provider was sitting loose at the components root. In the same pass, form-field, currency-field and duration-field were the same wrapper three times — a div, a label and whichever input goes in the middle. One Field molecule replaces them, and journey-form stops re-implementing DurationField inline next to the real one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A flat 100% branch threshold over the whole tree meant every variant and size prop had to be exercised, and the only way to do that on a presentational atom is to assert its Tailwind class string. That produced tests that mirror the stylesheet: they break on any design change and fail for no real defect. The bar now follows the risk. lib/ and hooks/ hold the money and the hours and stay at 100%; app/ and components/ sit at 90%. The class-assertion cases are gone, the role, label and interaction cases stay. Playwright ran the entire suite at five viewports while no spec asserted anything width-specific. Three projects remain, and one wide-viewport spec checks 2560 and 3840 for overflow once instead of four times. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
devRMA
force-pushed
the
refactor/structural-cleanup
branch
from
September 14, 2026 20:18
2c7c9f6 to
179669c
Compare
Co-Authored-By: GPT-6.2-sol <noreply@openai.com>
Co-Authored-By: GPT-6.2-sol <noreply@openai.com>
devRMA
added a commit
that referenced
this pull request
Nov 20, 2026
Co-Authored-By: GPT-6.2-sol <noreply@openai.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
3 of 6 — stacked. Base:
fix/legal-accuracy(#33).A whole-repo over-engineering audit, applied. +669 / −1286 lines.
The ad surface that interrupted the calculation
PRODUCT.mdis explicit that ads never sit between the user and an answer and never interrupt a calculation. Three components did exactly that, and none of them worked:setTimeoutover an AdSense<ins>that plays nothing;bg-card, a class this project never defined — so it had no background at any width;no-corsfetch, which almost never rejects, making itscatchbranch effectively unreachable.The idle scheduler that drove the interstitial goes with them:
ad-manager.tsxdrops from 137 lines to 29. Consent and a single slot below the content remain, and the e2e suite now asserts the ad never precedes the calculator.One day calculation, not three
calculateWorkStats,creditedMinutesandbuildDayBreakdowneach recomputed morning + afternoon + night bonus from the same calls, and the organism called two of them with nearly the same arguments. Three copies of the arithmetic that decides how much someone is owed is three places for it to drift.buildDayBreakdownalready returned everything the hook rebuilt, so it becomes the source. The 486 tests that passed before pass after, unchanged — the numbers did not move by a minute.Atomic design that is actually true
AGENTS.mdmakes atomic design the law of this repo, and 12 of 30 components broke it — which makes the convention useless as a guide, because a developer looking for the pattern finds the violation first.alert-banner,stat-box,collapsible-panelandgoogle-adcompose nothing and become atoms;currency-inputandmasked-inputcompose theInputatom and become molecules;hero-panelandcookie-consentare whole sections with their own state and become organisms;theme-providerwas sitting loose at the components root.In the same pass:
form-field,currency-fieldandduration-fieldwere the same wrapper three times — a div, a label, and whichever input goes in the middle. OneFieldreplaces them, andjourney-formstops re-implementingDurationFieldinline next to the real one.The coverage bar was buying tests of CSS
A flat 100% branch threshold over the whole tree meant every
variantandsizeprop had to be exercised, and the only way to do that on a presentational atom is to assert its Tailwind class string. That produced ~310 lines of tests that mirror the stylesheet: they break on any design change and fail for no real defect.The bar now follows the risk — 100% in
lib/andhooks/, where the money and the hours live, 90% inapp/andcomponents/. Role, label and interaction cases stay; the class assertions are gone.Smaller cuts
isRealTimewasisRealDuration;isChronologicalwas the ordering half offindJourneyIssue; the digit helpers were defined in two inputs; the clock placeholder in two organisms;minutesToSecondshad no consumer but its own test. Playwright ran the full suite at five viewports while no spec asserted anything width-specific — three projects remain, and one spec checks 2560 and 3840 for overflow once instead of four times.Verified
biome check·tsc --noEmit· 463 unit tests · production build · Playwright (43 tests, ~15s) — all clean.🤖 Generated with Claude Code