Repository navigation
refactor: cut comments to what the code cannot say, and check new ones - #22
Merged
Merged
Conversation
aicayzer
marked this pull request as ready for review
December 3, 2026 16:45
Contributor
Author
|
Reviewed by a separate agent; every check passed on this head. Merged by admin, as August directed for comment-cull pull requests (3 December). |
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.
Summary
Cuts the comments in every hand-written file to what the code cannot say, and adds a check that stops new banned comments from being added. No behavior changes.
Changes
src/,styles.css,scripts/and.github/workflows/go from 1552 to 503 (whole-line comments plus lines inside block comments; the new check script and its test are not counted).scripts/check-comments.mjsandscripts/check-comments.test.mjs, ported from InkKit without the Swift and DocC rules. They fail an added whole-line comment that names our issue or pull request, holdsTODOorFIXME, says "previously" or "used to be", or leaves a TSDoc paragraph over four prose lines.ci.yml: thebuildjob checks out full history, runs the check on pull requests and runs its tests. No new job or required check.AGENTS.md: new## Commentssection, a pointer to it in Conventions, and a Comments rule in Code Review Rules.#100%as an issue number.Testing
pnpm types:check,pnpm test(382 tests),pnpm buildandpnpm pack:checkpass.node --test scripts/check-comments.test.mjs: 51 pass.node scripts/check-comments.mjs --allreports nothing.TODO, an issue reference and "previously" failed the check with exit 1 on all three lines, then was dropped.Notes for reviewers
node_modules: Fumadocs behavior instyles.css,code-tabs.tsx,cards.tsx,page-table-of-contents.tsx,search.ts(Orama tokenizer and row limits), and PostHog behavior inanalytics.ts(cookieless mode, person profiles). Each stays as one line because it guards working code.Varyhandling, the 406 wildcard, the slash redirect's absolute URL, noGITHUB_SHAinbuildCommit, scan-not-regex inpage-limits.tsandcanonical.ts, Dependabot hold and concurrency groups in the workflows, the Steps animation and focus waits.analytics.ts,search.tsandstyles.css; the reasons that remain are one line each.Checklist