Skip to content

refactor: halve code comments and cap comment blocks at four lines - #21514

Merged
maria-rcks merged 56 commits into
mainfrom
t3/prune-comments
Oct 25, 2026
Merged

maria-rcks merged 56 commits into
mainfrom
t3/prune-comments

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Comment lines kept growing after https://git.cafe/pingdotgg/t3code/pulls/19559, mostly as long "why" blocks that restate context the code already shows. This PR cuts JS/TS comment lines from 26,014 to 12,863 and adds checks so they don't grow back.

Prevention

  • t3code/no-low-value-comments fails a comment block over 4 lines (license headers exempt). Before this PR, about half of all comment lines sat in blocks of 4+ lines.
  • It also flags a bare #1234 issue or PR number (TODOs, regression: #123 test markers, owner/repo#123, code spans, and hex colors are exempt) and the copied @public Service construction is part of the canonical Effect module API. line.
  • AGENTS.md now says to default to no comment, use one line where possible and four at most, and not to explain the fix you just made.

Cleanup
Comments that restate names, narrate steps, label sections, or record history are deleted. Remaining why-comments are cut to the constraint they carry. Code is untouched: every changed file parses to the same Oxc AST as main once comments are ignored, and every directive comment is kept (1,835 files checked). Two oxlint-disable lines lost the comment above them that gave the reason, so the reason is now inline. The non-JS files that changed are marketing .astro, Rust, shell, PowerShell, and one Python script, all comment-only.

vp lint (0 errors) and the lint plugin tests (289 passed) pass on a Blacksmith testbox.

Written by claude-opus-5-5 (Claude Code, in T3 Code), with gpt-6.1-sol children doing the per-slice edits.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Oct 19, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 19, 2026
only21mil added a commit to only21mil/t3code that referenced this pull request Nov 1, 2026
Main renamed the provider adapter registry layer (pingdotgg#26238), changed
layerWsRpc to take four arguments and need ScratchThreadPromotion
(pingdotgg#26767), and caps comment blocks at four lines (pingdotgg#21514). The importer
layer, the ACP session RPC test and the importNativeHistory docblock
follow suit. The pending-history browser test now asserts through
expect.element, as AGENTS.md asks of browser tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant