PR #10224 review: delete 93 quick-fix comments
Summary
The PR deletes 244 comment lines in 75 files. It targets comments that defend a delay, fallback, workaround, or temporary shim, on the grounds that AGENTS.md wants rationale in commit messages. No code line changes. The only added line is the regenerated terminalHtml.generated.ts.
Verdict
Needs changes
Many deletions are fine, but a large group removes comments that AGENTS.md says to keep: traps the next reader would walk into, and constraints that live outside the repo (released clients). Some deletions also leave dangling @deprecated pointers.
Findings
Released-client constraints removed from the tRPC/shared contract. AGENTS.md keeps comments for "a constraint that lives outside the repo", and packages/trpc/AGENTS.md rule 2 asks for @deprecated markers on kept-for-compat shapes. These comments are the only place in code that says which released builds need the shape and when it can go:
packages/trpc/src/router/cloud-workspace/client-status.ts:5— the client floors (desktop 1.31.0–2.0.9, CLI 2.0.9, mobile 1.2.2, SDK) and the removal condition, including theapi_procedure_calledcheck.packages/shared/src/cloud-workspace-status.ts:49— whyready/deletedare still accepted (OTA updates under an old version).SUPER-3018is now gone from the codebase.packages/trpc/src/root.ts:103—v2Hostalias now looks like a duplicate router someone can delete.packages/trpc/src/router/cloud-workspace/cloud-workspace.ts:242—NO_PRESENCElooks dead without the "released builds still readpresence" note.packages/trpc/src/router/billing/billing.ts:78—@deprecatedon output fieldstatus; editors no longer warn new client code that reads it.
Fix: restore these blocks. If dates are the objection, drop only the date and keep the constraint plus @deprecated.
Trap comments removed from ordering-sensitive code. Each explains why an innocent-looking defer or flag must stay; without it, the next "simplify" pass will turn it into a synchronous call and bring back the bug.
apps/desktop/src/renderer/lib/terminal/write-coalescer.ts:162—queueMicrotask(onDrained): a direct call re-enters xterm's parse loop.apps/desktop/src/renderer/lib/terminal/terminal-addons.ts:102— syncclearTextureAtlas()wipes the atlas mid-rasterization.packages/pty-daemon/src/Server/Server.ts:342and:351—setImmediatebefore handoff andkillSessions: false; changing either kills the shells the upgrade just preserved.apps/web/src/app/(app)/(page)/integrations/components/IntegrationErrorHandler/IntegrationErrorHandler.tsx:179— thesetTimeout(show, 0)is deliberately never cancelled; adding the "obvious" cleanup drops the toast.packages/pty-daemon/src/Pty/Pty.ts:574— why resize spawnssttyon the master fd (no native TIOCSWINSZ binding).
Fix: keep these, shortened to one line each if wanted (e.g. // Deferred: called inside xterm's parse loop.). Name-first alternatives (e.g. deferOutsideParseLoop()) also work.
Dangling @deprecated pointers. packages/auth/src/lib/billing/legacy/plan-ids.ts:9 and :17 still say @deprecated See PRO_MONTHLY_PLAN_ID, but the PR removed the doc on PRO_MONTHLY_PLAN_ID (and it is no longer deprecated itself). Same for stripe-routes-shim.ts:81,89,168,185 — "see withAutumnBilling", whose doc was removed. The result is inconsistent: some legacy exports struck through, the ones they point at not.
Fix: restore the @deprecated blocks on the eight legacy exports (the TODO date can go), or remove all of them consistently.
Mixed batch makes the good deletions hard to land. Roughly half the deletions are clearly fine (e.g. RenameInput.tsx "Delay to allow context menu to fully close", RepositoryList.tsx "Refetch after a short delay", oauth/consent/page.tsx "Defensive", packages/panes/.../utils.ts "shouldn't happen"). Fix: split: land the plain "for now"/"defensive"/restating comments now; keep or reword the two groups above.
Evidence
This PR changes no behavior, so there is no UI, desktop, iOS or API surface to run. Evidence is command output at 90eb8dd4:
- Comment-only check: parsed
gh pr diff 10224; every one of the 244 removed lines (outside the generated file) starts with//,*,/*,{/*or#. No other added lines. - Generated file: ran
bun run scripts/generate-terminal-html.tsinapps/mobile;git statusclean afterwards, so the committed file matches its source. - Lint:
bunx biome checkon the 72 changed .ts/.tsx files:Checked 72 files … No fixes applied. - Shell:
bash -n apps/review-host/watchdog.sh: ok.
Not run: desktop/web/mobile surfaces — not applicable (comment-only).
Questions for the author
- Does "rationale belongs in commit messages" cover constraints about released clients?
git blameon a removal line now points at this PR, not at the commit that had the reason. - Was the
@deprecatedremoval inpackages/auth/src/lib/billing/legacy/meant to be partial? Several exports still carry it. - Is
SUPER-3018tracked anywhere that will remind someone to remove the status mapper now that the code no longer names it?
Test / CI notes
- At
90eb8dd4: 20 checks pass (including Lint, Typecheck, Test, Vale), 6 skipped, CodeRabbit pending. No failures. - Local: biome on changed files passes; generated terminal HTML reproduces exactly.