Debloat the repository: comments cut to the reasons, docs to their decisions #229
No reviewers
Labels
No labels
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente!229
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "debloat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The repository was about 40% comments by volume, and
docs/was long-form essays. This PR cuts both down to the reasons, removes dead code and duplication, and changes nothing a member can see.Tracked text: 2.87 MB → 1.91 MB (−34%), 58.8k → 45.9k lines. That excludes migrations, binaries, vendored
sortable.min.jsand lockfiles, none of which were touched.docs/src/tests/deploy/.claude/,tools/,.forgejo/CLAUDE.mdComment share: C# 39% → 21%, Razor 33% → 12%, JS 40% → 21%, CSS 41% → 17%.
What stays, what goes
Comments that stay: a non-obvious why, an invariant, a trap (in one clause), a security reason, a measurement behind an odd shape, and upstream issue numbers. Comments that go: anything restating the code, history, repetition,
<remarks>essays and banners.Docs: every page keeps its
Covers:line and every decision, trap and command. One page owns each topic and the others link to it.CLAUDE.mdkeeps its routing table, commands and every convention, each compressed to one line.Code, beyond comments
Behaviour is preserved throughout.
CardService.PlaceAt).auth-enter.jsare one factory. The old and new versions were diffed under a fake DOM across 13 scenarios.SettingsPage) and a frame component (SettingsFrame). The rendered markup is identical..ics404 handling, the rate-limit policies, the sign-in claim builders, and the encryptor's error messages.AccessRequestService.CountPendingAsync,AllowlistOptions.Members(and its unused config key),BoardPalette.Count, and theisPhoneViewportJS export.app.css: Blazor form-validation and error-boundary classes,--infoand--success-bg, and a@keyframesthat a later one with the same name always overrode.data-*attributes, interop names, test titles, and the behaviour of every deploy script. The deploy scripts are line-identical once comments are removed.Tests
Fixtures.cs.DocumentationTestskeeps every check and threshold.tests/e2e/helpers/, replacing about 20 private copies.Verification
dotnet build Ponente.sln -c Release: 0 warnings, 0 errors.dotnet test: 558/558.ponentestack was never touched. The first run failed one test (a local variable shadowing a new helper incalendar.spec.js); that is fixed inacd2c13.Not in this PR
These are pre-existing issues found along the way and filed as separate tasks:
restore.shexits silently with no.envbeside it.backups.mddocuments atouch .envworkaround for now.release.shprints a wrong next step.GetColumnsAsynccomment says "one query", but the app-wide default isSplitQuery.No changelog entry: members see no change.
🤖 Generated with Claude Code
🤖 Reviewing this PR — the review will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the review runs.
💬 Verdict: comment — the reviewer did not submit a structured review; the raw output follows.
(empty)
⏱ 30m 3s · 142 steps · $0.9926 · tokens: 1648.3k in / 40.9k out (+24129.3k cache-read) · Go: 5h 0% · wk 83% · mo 74%
📜 Full session transcript
🔧 Let opencode-bot fix this — tick the box and opencode-bot picks up the review above, on this PR branch. Nothing runs until you do.
@claude-reviewer
🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
✅ Verdict: approve — no blocking issues found.
This is a large, mechanical debloat pass (comments, docs, dead code, duplication) spanning ~256 files. Given the size, I sampled the highest-risk merges rather than reading every hunk line-by-line:
CardService.PlaceAt/ColumnService's use of it: the extracted midpoint-placement routine is byte-for-byte equivalent to the two inlined copies it replaces (clamp, midpoint switch, precision-exhaustion renormalize guard all preserved).BoardServicesoft-delete/restore consolidation (MarkDeletedAsync/UndeleteAsync): the moderation-delete guard on restore (DeletedAsModeration && !asSuperAdmin) is preserved correctly for both the owner-admin and super-admin paths.AesGcmDataEncryptor/IDataEncryptor: purely comment/doc trimming plus a trivial two-line factoring of the exception messages (TooShort()/WrongKey()); crypto logic untouched.All three held up — the PR's "behaviour is preserved" claim checks out where I looked. The doc/comment trims read reasonably (reasons kept, restated-code and history dropped), matching the stated policy in CLAUDE.md. I did not fully re-verify the
auth-enter.jsentrance-gate factory or theSettingsPage/SettingsFramemarkup-identity claim beyond skimming — those are plausible given the PR's own claimed diff-under-fake-DOM verification and the passing full Playwright run, but are lower-confidence in my own review.No correctness issues found in the portions reviewed. Given the scale (256 files, 13k net line delta) and that this is inherently hard to fully audit by hand, approving on the strength of the sampled checks plus the reported build/test/e2e results.
⏱ 1m 7s · 18 turns · tokens: 109.9k in / 5.7k out (+1873.5k cache-read)
📜 Full session transcript