Skip to content

refactor(web): remove dead code biome flags in ui#95

Open
lukaso-bot wants to merge 1 commit into
mainfrom
chore/partial-result-dead-locals
Open

refactor(web): remove dead code biome flags in ui#95
lukaso-bot wants to merge 1 commit into
mainfrom
chore/partial-result-dead-locals

Conversation

@lukaso-bot

Copy link
Copy Markdown
Collaborator

What

Removes three noUnusedVariables/noUnusedImports warnings biome flags in packages/web/src/ui, but the gate tolerates (warnings, not errors) — so they had slipped every cycle:

  • result-card.tsxPartialResult computed repoDisplay and sha but never rendered them. The "taking longer" card uses result.urls.commit directly for both the CLI command box and the "View commit on …" button.
  • layout.tsx imported hono/html's html helper, but only raw is used. The <html lang="en"> is a JSX tag, not the imported function.

Why

"A warning that lives forever trains everyone to ignore lint." These sat on the partial-result surface (the partial ≠ not-yet-released invariant), so worth clearing on a quiet cycle.

Is this a latent gap?

Investigated before deleting. The released card renders repoDisplay + shortSha in its .answer-meta row, and NotYetReleased shows the short sha inline — but the partial card is intentionally CTA-focused (CLI command + View button, both already carry the full commit URL). So these are leftover scaffolding, not a missing feature. Rendering new UI here would be a design call needing DESIGN.md, out of scope for a lint cleanup.

Verification

Pure dead-code removal; render output is byte-identical.

  • pnpm --filter @released/web exec biome check src → 0 warnings (was 3)
  • pnpm -r typecheck → green (all 4 packages)
  • pnpm -r test → 534 passed / 0 failed (core 256, cli 45, web-og 13, web 220)
  • ./scripts/validate.sh → exit 0

🤖 Generated with Claude Code

PartialResult computed repoDisplay + sha but never rendered them (the
card uses result.urls.commit directly for both the CLI box and the View
button); layout.tsx imported hono/html's `html` helper but only `raw` is
used (the `<html>` tag is JSX, not the import). biome flags all three as
noUnusedVariables warnings — tolerated by the gate (warnings, not
errors), so they had slipped every cycle, but they train the lint to be
ignored. Pure dead-code removal; render output is byte-identical.

Co-Authored-By: Claude <noreply@anthropic.com>

@lukaso-bot lukaso-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In-house adversarial review (Copilot perpetually quota-blocked on this repo → in-house pass per review-policy). Verified each removal against the source — all genuinely dead, render-output-identical:

  • layout.tsx html import: the only html tokens in the file are the import line and the <html lang="en"> JSX tag (line 28 / 64) — that's JSX, not the hono/html html template helper. No html\`` / html(` anywhere. Safe to drop.
  • result-card.tsx repoDisplay + sha: neither is referenced anywhere in the PartialResult body. The partial card is CTA-focused — it uses result.urls.commit directly for both the CLI-command box and the "View commit on …" button. Leftover scaffolding, not a missing render.

Pure removal; byte-identical output. Cleared.

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