Skip to content

Clean up unnecessary comments - #370

Merged
zheli merged 1 commit into
mainfrom
cursor/no-comments-top10-bd26
Nov 10, 2026
Merged

zheli merged 1 commit into
mainfrom
cursor/no-comments-top10-bd26

Conversation

@zheli

@zheli zheli commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

/no-comments on the ten files with the most comment lines. About 2,850 comment lines deleted; ~157 kept for proven external constraints. Code behavior unchanged.

Changes

  • Stripped narration, section banners, JSDoc mirrors, and redundant field essays from:
    • internal/ui/handlers/instances.go
    • frontend/src/api.ts
    • internal/localnet/up.go
    • internal/docker/compose.go
    • internal/ui/handlers/reconciler.go
    • internal/localnet/token/actions.go
    • internal/localnet/overlay.go
    • docs/design/mockups/design-canvas.jsx
    • internal/ui/stream/hub.go
    • internal/cli/localnet/contracts.go
  • Kept comments that document Compose profile/!override behavior, Splice healthcheck quirks, Canton filter/JWT constraints, SSE/browser quirks, and stable CLI exit/schema contracts.

Test plan

  • Comment-stripped Go files are token-identical to main (automated strip-compare)
  • npx tsc --noEmit + npx vitest run in frontend/ (257 passed)
  • make test / make lint (local Go 1.26 toolchain unavailable in this agent env; CI should cover)
  • scripts/e2e/run-all.sh not run (comment-only change)

Checklist

  • Frontend tests pass locally
  • Go package tests via CI (env lacks Go 1.26)
  • No coverage regression expected (comments only)
  • Docs/mockup comments only; no mirrored website docs
  • CLI ↔ Web UI parity unchanged

/no-comments report

Metric Value
Deletion count ~2,850 comment lines
Restored comments 0
Reruns 0
Architect sketch none (no in-scope reshape landed)
Fixes landed comment deletions only
Encodings applied 0 (awaiting approval)

Encoding offers (approve to encode, then delete the comment)

Reply with which to encode:

  1. Compose -p-only teardown (compose.go Stop / StopContainers) → CI lint or test that down never passes --profile.
  2. !override ports / volumes (overlay.go) → golden overlay fixture asserting the tag is present.
  3. Splice -dev HEALTHCHECK / starting→unhealthy (compose.go, reconciler.go) → typed health classifier + catalogue flag instead of prose.
  4. JWT wildcard PermissionDenied (contracts.go) → unit test that documents the party-filter fallback.
  5. SSE onmessage named-event quirk (instances.go) → helper that always emits default-type frames; delete the comment.
  6. iframe download load behavior (api.ts) → small test or named helper encoding success vs error-document.

Open reshape work (not in this PR)

Reported by Comment Sicko; left open to keep this change behavior-identical:

  • Deduplicate EventSchemaVersion / contractsTxSchemaVersion with types.SchemaVersion
  • Bind Hub.Subscribe cancel to ctx; extract drop-oldest channel
  • Inject reconciler test seams instead of package-level vars
  • Parse compose ps --format json once instead of tab-split dual parsers
  • Extract RunUp steps; separate opt-in profiles from base state
  • Generate frontend ErrorCode from Go; drop dead atomic? option surface
  • Unify jobs/hub teardown order helper in instances.go
Open in Web Open in Cursor 

Keep only comments that document external constraints (Compose, Splice,
Canton, browser, CLI contracts). Zero behavior change: Go tokens
identical to main; TypeScript/JSX differ only by empty-catch whitespace
and removed JSX comment nodes.
@zheli
zheli force-pushed the cursor/no-comments-top10-bd26 branch from 277c6b5 to 7393de4 Compare November 10, 2026 13:45
@zheli zheli changed the title Strip AI-slop comments from the top 10 comment-heavy files Clean up unnecessary comments Nov 10, 2026
@zheli
zheli merged commit ed3d1e9 into main Nov 10, 2026
26 checks passed
@zheli
zheli deleted the cursor/no-comments-top10-bd26 branch November 10, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant