[#158] Dead-code + stale-docs cleanup (final audit ticket)#174
Merged
Conversation
Deletion/extraction only; every deleted symbol/selector grep-proven to have
zero remaining references. No new deps, no stubs.
1. render/README.md: drop `speakerColor` / `speakerFontSize` / "speaker strip"
from the BubbleRender field table — those fields no longer exist (layout
tests already assert their absence).
2. studio.css: `.seq-id` was defined twice with diverging bodies; merge into
one block (keep the `font-size: var(--text-xs)`), delete the duplicate.
3. studio.css: delete the dead cut character-registry block (`.character-list`
/-row/-assign/-preview/-id/-lock-preview/-new) — no tsx consumers remain.
4. errors.ts: delete unused `isProjectIoError` (no importer); its now-unused
`ProjectIoError` import goes with it.
5. lib/export.ts: delete the dead `export { ConstraintCheck, formatBytes }`
re-export; the import stays (used internally by deriveConstraintChecks).
6. import-image.ts: keep the unreachable off-machine remote-gate as an
intentional seam — extract it to a tiny exported `requiresRemoteOptIn`
predicate and add a unit test so a future remote provider is gated by
construction (per the ticket's reviewer guidance).
7. episodes preview + reader routes: extract the duplicated sequence-shaping
(id maps, bubbles-by-cut, parallel art resolve) into one
`resolveEpisodeRenderInputs` helper in `@/lib/project` so the two routes
cannot drift.
8. transition.ts: adopt the corrected `layoutCardText` JSDoc wording from the
unlanded d5c9fb8 (WRAPS + auto-fits; one centered non-overlapping stack).
Closes #158.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
project7-interns
approved these changes
Jul 14, 2026
project7-interns
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: APPROVE
Epic Alignment: PASS
#158 removes stale/dead surfaces and consolidates the two authorized route-shaping paths, keeping docs and privacy seams trustworthy without unrelated refactoring.
Checked (evidence)
- Structural/UI gate: live PR body has filled EPIC Alignment, Self-Verification, and a Design Fidelity section documenting the identical .seq-id cascade.
- Items 1-5: live diff removes the stale render README fields, duplicate/dead selectors, unused error guard, and dead export re-exports; apps/studio/src/app/studio.css:392-399 retains the former winning .seq-id declarations.
- Item 6: packages/cli/src/commands/import-image.ts:63-82,113-116 makes the allowed remote-opt-in seam explicit; import-image.test.ts:166-179 proves remote gating and local manual-provider behavior.
- Item 7: apps/studio/src/lib/project.ts:160-195 is the smallest shared episode-input shape; both episode routes now consume it.
- Item 8: packages/render/src/transition.ts:487-496 documents the actual bounded auto-fit detail/label stack.
- Riskiest part: episode render-input extraction; it preserves the existing maps, bubble grouping, and parallel art resolution in one shared helper.
- Kill-list: scanned all ten changed files - clean; no dependency, stub, or unauthorized refactor.
- CI: gh pr checks 174 -> Node 20 PASS (1m22s); Node 24 PASS (1m13s).
Findings
- None.
Decision
All eight authorized cleanup items are implemented with the required grep/test evidence, and the only retained seam is explicitly permitted and tested.
Owner
Author
|
[@re2 REVIEW — APPROVE] (marked comment — @re2 formal Review of PR #174 (#158), commit Checked (evidence)
Clean to merge on my side. No further changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dead-code + stale-docs cleanup — the final audit ticket. Deletion/extraction only, no refactors beyond the eight listed items. Every deleted symbol/selector is grep-proven to have zero remaining references. No new runtime deps, no stubs.
The eight items
packages/render/README.mdspeakerColor/speakerFontSize/ "speaker strip" from theBubbleRenderfield table — those fields no longer exist on the type.layout.test.ts:59-60already asserts!("speakerColor" in r)and!("speakerFontSize" in r.text); doc was stale.apps/studio/src/app/studio.css.seq-idwas defined twice with the first block missingfont-size; consolidate into one block, delete the duplicate.grep -c '^\.seq-id {'= 1. Rendered cascade unchanged: the later duplicate hadfont-family+font-size+colorand won; the merged block carries the identical three declarations.apps/studio/src/app/studio.css.character-list/-row/-assign/-preview/-id/-lock-preview/-new).className="…character-…"usages inapps/studio/src.apps/studio/src/lib/errors.tsisProjectIoError(no importer) and its now-unusedProjectIoErrorimport.grep -rn isProjectIoErroracrossapps+packages= 0.safeErrorMessagenever referencedProjectIoError.apps/studio/src/lib/export.tsexport { ConstraintCheck, formatBytes }re-export.ConstraintCheck/formatBytesfrom@/lib/export. Theimportstays —deriveConstraintChecksuses both internally (ConstraintCheck[],formatBytes(...)).packages/cli/src/commands/import-image.tsrequiresRemoteOptIn(provider, allowRemote)predicate with a unit test.requiresRemoteOptIn gates a remote provider until --allow-remote.buildProviderstill ships only the localManualImportProvider(transmitsRemotely: false), so a future remote provider is gated by construction.apps/studio/.../episodes/[id]/page.tsx+.../[id]/read/page.tsxresolveCutArt) into oneresolveEpisodeRenderInputshelper in@/lib/project.packages/render/src/transition.tslayoutCardTextJSDoc from the unlandedd5c9fb8(WRAPS + auto-fits; the detail block and label form one vertically-centered, bounded, non-overlapping stack).EPIC Alignment
The EPIC is a local-first, agent-native production tool whose value rests on a trustworthy, single-source codebase: docs that match the types, one definition per symbol, no dead selectors or unreachable exports masquerading as live behavior. This final audit ticket removes drift (stale README fields, a diverged duplicate CSS rule, unused exports) and consolidates two episode routes onto one shaping helper so they cannot diverge — directly serving the "no renderer/route drift" invariant the render/project layers are built on. Item 6 preserves the off-machine-transmission opt-in as an explicit, tested seam, keeping the privacy boundary honest rather than deleting a guard that a future remote provider will need.
Design Fidelity
No visible UI changes. Item 2 consolidates a duplicate
.seq-idrule with an identical rendered cascade (verified: the winning duplicate's three declarations are preserved). Item 3 deletes CSS with no consumers. Everything else is docs, unused code, or a non-visual server helper extraction.Self-Verification
isProjectIoError→ 0 refs;.character-*selectors → 0 tsx usages;speakerColor/speakerFontSize→ absent fromrender/src(tests assert absence);.seq-id→ exactly 1 definition; no importer ofConstraintCheck/formatBytesfrom@/lib/export.pnpm check(typecheck + biome + public-safety scan + no-stub) — green. biome: 225 files, no fixes. scan: OK (300 files). no-stub: OK (211 files).turbo run test --force: 17/17 tasks pass, 0 fail.turbo run test --force: 17/17 tasks pass, 510 passing, 0 fail; new seam testrequiresRemoteOptIn gates a remote provider until --allow-remote✔.AGENTS.md/DESIGN-GUIDE.mdleft untracked (not committed).Closes #158. @re1 @re2 — requesting review.
🤖 Generated with Claude Code