Removed dead code and consolidated duplicated logic across the project - #39
Merged
Conversation
Drops the export keyword from 40 types, interfaces, constants and functions that no other module, test or story imports (knip and a repo-wide reference trace agree). Each symbol stays in use in its own file, so nothing becomes unused. SaveTarget also loses its never-read handle field. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
Removes two ffmpeg wrapper functions with no caller, a ContainerInfo re-export nobody imports, ambient declarations TypeScript 5.9 already ships (FileSystemFileHandle, FileSystemWritableFileStream), an audioTracks member and a fourcc fallback mp4box never populates, the never-applied wide grid-item option and its rule, the details.teach-more rules, two var(--mono) references with no definition, the unemitted .savings-sub rule, two orphaned JSDoc blocks, a JSDoc attached to the wrong function, a fake-indexeddb import overwritten in every test, and a no-op statement in the pool test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
Drops ten fields that were populated on every load and never read: AppState.timescale, AppState.audioTrack (with MediabunnyMetadata's copy), AppState.presentationOrder (kept as a local for the keyframe list), EncodeTestState.zoom, SampleInfo.offset/dtsSec/duration, BoxNode.hdrSize, TrackInfo.packetCount and SizeEstimate.encodedSegmentBytes, plus the mp4box ambient members that only fed them. Test and story fixtures lose the same stale keys. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
Local rewrites with identical results for every input: guards that an invariant one line earlier already guarantees, values computed twice, fallbacks that cannot fire, a select built and wired even when it is never shown, listeners that re-found by id the elements the same function had just built, a helper that dispatched on which caller invoked it, a window-shadowing local, a generated AV1 level table, and type spellings that already had a name (VideoInfo, MatrixQuality, CanvasSink, Placement, ZoomStep). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
…src/ui One home each for: HTML escaping (analysisDoc reuses dom's escapeHtml), slugify (inspectToc reuses analysisDoc's), the VP9 chroma table, the effective CRF, scale-as-percent labels, the current URL query and history commit, the archive assets URL, the busy/calm stretch sentence, the ffmpeg crash-recovery wrapper and read-back copy, the 64-bit FNV fallback hash, summing a run's stretches, error-to-message, the signed size-change percentage, the file base name, the video and audio track lookups, the initial app and encode-test state (resetState now reuses the same factories), the size estimate for a set of windows, the A/B quality and resolution descriptions, the overview title and overall bitrate, the track fact formatters, the seeking-test headers, rows and summary (new lib/seekReport.ts), a held-bytes helper, the container table derived from one record list, and evictStore hoisted to module scope. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
dom.ts gains button(), section(), dataTable() and svgText(), replacing 26 button-plus-type pairs, 11 card openers, two hand-built tables and six hand-built SVG labels. formControls gains progressBar(), resetProgressFill() and finishFill() for the eight places that built, reset or finished a bar by hand. encodeTab's three checkbox fields share one builder; abPanel gets iconButton, a scrubSeconds closure and drawFrame at module scope; compareTab gets tickedCombos, repaintMatrix (renderMatrixSection no longer takes the section it always received from ui), markMeasured, sweepNote and axisCountLabel, and builds the run controls before the axis fold so onAxisChange no longer forward-references ui; zoomPan shares dragTo/beginDrag between mouse and touch; seekTab passes its progress fill instead of re-querying it; fileLoading's loadSource takes a typed request instead of a kind plus untyped payload. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
Folds six sets of byte-identical declarations into selector lists at positions that keep the cascade intact: the split .grid .item block, the reel labels that copied the sample picker's tick labels, the bitrate chart's axis rules that copied the seek scatter's, the sweep summary's typography that copied the savings strip's, the three disclosure bars' caret rules, and .tab-action.on beside .tab.on. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
Moved the video track, the command builder's defaults, the sample-table builders, the size-estimate input and the BEP047 demo path into tests/fixtures, and pointed the tests that carried their own copies at them. Folded the repeated per-test reset and load sequences into helpers in the files that used them. No test's inputs or assertions changed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
Spelled the BEP047 session path once, used the X264 fragment in the six calls that wrote it out in full, gave the reference's audio flags a fragment of their own, dropped the hand-kept session counter in favour of the entry list's length, and made the always-present description part of every index entry. The dataset it writes and the ffmpeg arguments it runs are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
|
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
CodyCBakerPhD
commented
Sep 2, 2026
Signed-off-by: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com>
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.
Behaviour-preserving cleanups from the code review, one commit per approved group so each reads on its own:
src/libandsrc/uiNo observable behaviour, public API or configuration changes; tests, lint, types and pre-commit pass after every commit. The demo generator was run before and after with stubbed ffmpeg/ffprobe and writes an identical dataset with identical ffmpeg argv. Groups 10 and 11 of the review and its "needs verification" items are left for later, as asked.
Prompts
Original request:
Follow-ups, in order (the session was also resumed several times with "Continue from where you left off."):
🤖 Generated with Claude Code
https://claude.ai/code/session_01EG5Tqc6NC6f9PCzXm7qS6t
Generated by Claude Code