Repository navigation
chore: prune non-critical comments across src - #97
Merged
Merged
Conversation
Comment lines in src/ drop from 785 to 333 (-58%) across 112 files. The bar
for keeping a comment: a reader would be confused, or likely break something,
without it.
Removed:
- JSX section markers ({/* Top bar */}, {/* stats */}, {/* certificates */})
- Step/narration comments that restate the next statement
- JSDoc that only repeats the symbol name, including the /** Locale-aware base
path ... */ prop doc duplicated across four components
- Payload/Next template boilerplate: the 27-line ImageMedia loader essay,
@PARAM blocks on deepMerge/getMediaUrl/formatAuthors, defaultPopulate notes,
the shadcn preamble in ui.ts, and a stale note in Media.ts claiming uploads
land in public/media (they go to Vercel Blob)
- ~10 near-identical "session-free so it stays in the ISR cache" headers; kept
one authoritative copy on getCatalogData.ts plus the two documenting a
specific trap (generateStaticParams, useSearchParams)
- Commented-out code in VideoMedia. That left a useEffect registering an empty
'suspend' listener, so the dead effect and its useEffect import went too --
the only non-comment change in the diff, and provably inert.
Kept: security invariants (collection access rationale, role-escalation
warning, FK delete ordering), framework workarounds (Payload's empty-array
minRows loophole, the cyrillicSlugify NULL-vs-'' unique-constraint fix,
better-auth's #fragment rejection, plugin-search per-locale writes), magic
number provenance (certificate PDF coordinates, rate-limit thresholds), CSS
tricks (StepsList minmax(0,1fr), the -50% ticker keyframe), and all functional
directives (eslint-disable, @ts-expect-error, @ts-nocheck, empty-catch markers).
About 20 surviving multi-line headers were shortened to their load-bearing
sentence rather than deleted outright.
tsc --noEmit and eslint are clean on all changed files. Prettier's failing-file
set is unchanged from HEAD (40 files were already failing).
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
Comment lines in
src/drop from 785 to 333 (-58%) across 112 files. The bar for keeping a comment: a reader would be confused, or would likely break something, without it.Removed
{/* Top bar */},{/* stats */},{/* certificates */},{/* avatar with XP level ring */}// Step 1: Email entry,// Find the verification record,// Increment attempt counter/** Total XP a course awards. */, and the/** Locale-aware base path ... */prop doc duplicated across four componentsImageMedialoader essay,@paramblocks ondeepMerge/getMediaUrl/formatAuthors,defaultPopulatenotes, the shadcn preamble inui.ts, and a stale note inMedia.tsclaiming uploads land inpublic/media(they go to Vercel Blob)getCatalogData.tsplus the two documenting a specific trap (generateStaticParamsin[locale]/page.tsx,useSearchParamsinCourseCatalog.tsx)VideoMedia— see belowKept
Security invariants (collection access rationale, the role-escalation warning on
Users, FK delete ordering), framework workarounds (Payload's empty-arrayminRowsloophole inCourses.ts, thecyrillicSlugifyNULL-vs-''unique-constraint fix, better-auth's#fragmentrejection, plugin-search's per-locale writes), magic-number provenance (every measured coordinate in the certificatepdf.tsx, rate-limit thresholds), CSS tricks (StepsListminmax(0,1fr), the-50%ticker keyframe), and all functional directives (eslint-disable,@ts-expect-error,@ts-nocheck, empty-catch markers).About 20 surviving multi-line headers were shortened to their load-bearing sentence rather than deleted outright —
rate-limit.ts,ukrainianAdmin.ts,revalidateCourse.ts,xp.ts,contentCounts.tsand others.Reviewer note: one non-comment change
Removing the commented-out code in
src/components/Media/VideoMedia/index.tsxleft auseEffectregistering an empty'suspend'listener, so the dead effect and its now-unuseduseEffectimport went too. Provably inert — the listener body was entirely commented out — but it is the only change in the diff that is not purely a comment.Verification
tsc --noEmit— cleaneslinton all 112 changed files — clean--checkat HEAD; the failing set is unchanged after these edits.env, so there is no Neon branch to point at. For a comments-only diff the typecheck is the meaningful signal.🤖 Generated with Claude Code