Repository navigation
Daily dead-code sweep 2026-10-04: unused sprite symbols i-bin, i-tick - #169
Open
EnesYilmazcode wants to merge 4 commits into
Open
EnesYilmazcode wants to merge 4 commits into
EnesYilmazcode wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui7SPvLZPpTpR2fXhKEgSp
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui7SPvLZPpTpR2fXhKEgSp
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ui7SPvLZPpTpR2fXhKEgSp
This branch has not been deployed
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.
Checked against the open sweep PRs first, per the routine's rule: #148, #147, #146, #144, #143 are all still open, waiting on review. Read every diff before looking for anything new. Between them they already claim:
js/directions.js:MATRIX_MAX,matrix()(Daily dead-code sweep 2026-09-29: directions.matrix, TERM_NAMES #148)js/state.js:TERM_NAMES(Daily dead-code sweep 2026-09-29: directions.matrix, TERM_NAMES #148),inScheduledHours(Daily dead-code sweep 2026-09-23: bestGap, inScheduledHours #144),allWeekCodes(Daily dead-code sweep 2026-09-22: allWeekCodes, a test-only helper #143)index.html/scripts/test/screens.test.mjs: the#chipscompatibility shim (Daily dead-code sweep 2026-09-27: the #chips compatibility shim, expiry met #147)js/campus.js:inBounds(Daily dead-code sweep 2026-09-24: inBounds, a test-only helper #146)js/engine.js:bestGap(Daily dead-code sweep 2026-09-23: bestGap, inScheduledHours #144)None of that is touched again here, and none of it is re-listed as a finding below.
Found: two unused SVG sprite symbols (certain)
index.htmldefines a shared<svg>sprite sheet once, up top, and every icon in the app is a<use href="#i-...">against it. Two of the defined symbols are never referenced by any<use>anywhere:#i-bin— a trash-can icon,index.html:1097-1099(before this PR)#i-tick— a checkmark icon,index.html:1100How I proved it dead:
git log -S "i-bin"/-S "i-tick"onindex.htmlturns up exactly one commit each, The answer is one card you swipe, not a list you scan #119 ("The answer is one card you swipe, not a list you scan"), which introduced the swipe-card deck. That deck's two verdict buttons (#c-no/#c-yesinjs/app.js) render as a pin icon (#i-pin, "Show route") and a chevron (#i-chev, "Next room") plus text stamps —<span class="c-stamp no">NEXT</span>/<span class="c-stamp yes">GO</span>— not a tick or a bin. The two symbols are leftovers from a design that didn't ship this way.i-binandi-tickas literal strings acrossjs/,index.html,dev/,scripts/,docs/,spikes/: the only hits are the two<symbol id="...">definitions themselves.hrefconstruction (a template literal building#i-${name}) that could reach them indirectly — there is none. Every<use href="#i-...">in the whole app is a static string literal, so this grep is exhaustive, not a sample: there is no code path, reachable or not, that can ever ask for#i-binor#i-tick.grep -rn "i-tick\|i-bin" scripts/test/) — nothing pins the sprite sheet's shape.This is the one case in this sweep where static proof is actually stronger than a runtime trace: coverage can only tell you a reachable branch didn't run today, but there is no branch of any kind, anywhere in the shipped code, that can produce the string
"i-bin"or"i-tick"at runtime. Driving the real app (card deck swipes, every refusal screen, the day calendar, the browse/pick/about panes,?dev=1, offline reload, a blocked-fetch boot failure) only reconfirmed the same thing by absence: no screen ever lit either icon up, because nothing can ask for it.What would make me wrong: a future PR that's already in flight and adds a delete/confirm icon reusing one of these ids by name instead of adding a new symbol. I didn't find any such branch or open PR, open or merged.
Also re-measured: sw.js shell gzip figure
Removing the two symbols shrinks
index.htmlby 47 bytes gzipped. The header comment's figure had already drifted from several unrelated merges since it was last measured (2026-09-16 → today), so I re-measured all shell and data files exactly as the comment prescribes (git show HEAD:<file> | gzip -9 -c | wc -c, through the pipe) and rannode scripts/stamp-sw.mjs.scripts/test/sw.test.mjs's 1% shell tolerance was never actually at risk (the drift is ~0.2%), but the comment is a measurement record, not a guess, so it's updated rather than left stale.Driven and checked
node --test: baseline green before touching anything (935 tests, 931 pass, 4 skipped, 0 fail) and green after (same counts).CAMPUS_CLOSED), finals week (EXAM_REFUSAL), before-term-start (BETWEEN_TERMS), after-term-end (TERM_ENDED),?dev=1, and/dev/.scripts/check-dead-code.mjs(reports clean against currentmain, as expected — the sprite ids aren't identifiers it tracks), and a custom script to find every exportedjs//scripts/lib/name whose only outside-file reference is a test file. That surfaced the five names the open PRs above already claim, plusscripts/lib/fetch.mjs'sresetRequests/setRequests— which I did not remove, because the file says outright "Tests only, so the cap can be exercised without making 3000 stub calls". That's a deliberate test seam, not a fossil.node scripts/shoot.mjs --check: three pre-existing failures (list: the map is on screen with nothing on it,list: the sheet rests at 324px, not over the map,room: the sheet did not drop) reproduce identically on unmodifiedmainin this environment — confirmed by stashing this PR's changes and re-running againstmain's files directly. Not caused by this PR; not something I attempted to fix, since it's outside this sweep's scope and unrelated to the two deleted sprite symbols.Not removed, not proven
Nothing else cleared the bar today. Everything flagged by the test-only-export search beyond the two sprite symbols and the already-claimed five either turned out to be a constant genuinely consumed inside its own module (ranking weights in
js/engine.js, sheet geometry constants injs/sheet.js, etc. — reachable from production via the function that uses them, just not imported by name elsewhere) or the documented test seam infetch.mjsnoted above. I didn't find any CSS selector,data-*hook, or state field that failed every check — every class inindex.html's stylesheet resolves to at least one use outside the<style>block.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ui7SPvLZPpTpR2fXhKEgSp
Generated by Claude Code