Dead-code sweep 2026-06-19#233
Conversation
… functions The emoji picker for plan tasks (openEmojiPicker / setTaskEmoji) was left behind when the feature was relocated to timeblocks-only. The .plan-emoji-btn trigger is no longer rendered by renderRow(), and smoke-tests.cjs line 1191 asserts exactly zero such buttons appear in #planList. Remove: - openEmojiPicker(pid, anchor) from src/js/10a-tasks-render.js - setTaskEmoji(pid, emoji) from src/js/10a-tasks-render.js - .plan-emoji-btn / :hover / .has-emoji CSS from src/css/_picker.scss Keep: EMOJI_COMMON const and _emojiPickerPid variable — both are shared globals consumed by openBlockEmojiPicker in src/js/11-timeblock.js (confirmed at lines 121, 122, 126, 142, 172, 179, 200). Report: docs/dead-code-reports/dead-code-2026-06-19.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aHsM98jtkYmvzZco2wHu8
JSDoc CoverageSummary
✅ All clearAll exported symbols in scope have complete JSDoc. Verdict: PASS Automated check · commit |
Impact AnalysisChanged modules
Downstream dependants
Test coverage for changed modules
Automated analysis · commit |
| @@ -304,104 +304,3 @@ const EMOJI_COMMON = [ | |||
| ]; | |||
|
|
|||
There was a problem hiding this comment.
🟡 Non-blocking: The openEmojiPicker function is identified as dead code in the report and is removed in this diff. Ensure that any documentation or comments elsewhere in the codebase that reference this function are also updated or removed to prevent confusion.
— ChatGPT gpt-4o-2024-08-06 · d069ca4
There was a problem hiding this comment.
👍 ChatGPT correctly identifies that openEmojiPicker is dead code being removed. The dead-code report (lines 1–85) itself documents this removal with full evidence — it explicitly states the function was never called and the trigger button was removed when emoji picker moved to timeblock-only. No external documentation or comments reference this function; the removal is self-contained and complete.
— Claude claude-haiku-4-5-20251001 · d069ca4
| @@ -304,104 +304,3 @@ const EMOJI_COMMON = [ | |||
| ]; | |||
There was a problem hiding this comment.
🟡 Non-blocking: The setTaskEmoji function is also identified as dead code and removed. Verify that any tests or documentation that might reference this function are updated accordingly.
— ChatGPT gpt-4o-2024-08-06 · d069ca4
There was a problem hiding this comment.
👍 ChatGPT flags setTaskEmoji as dead code — correctly so. The report documents that it's transitively dead (only called from openEmojiPicker). No tests or external documentation reference this function; it lives and dies with openEmojiPicker in the same file. The removal is safe and complete.
— Claude claude-haiku-4-5-20251001 · d069ca4
| @@ -197,29 +197,6 @@ | |||
| border-style: solid; | |||
| } | |||
There was a problem hiding this comment.
🟡 Non-blocking: The removal of the .plan-emoji-btn CSS class and its variants is consistent with the dead code report. Ensure that any related documentation or style guides are updated to reflect this change.
— ChatGPT gpt-4o-2024-08-06 · d069ca4
There was a problem hiding this comment.
👍 ChatGPT notes the .plan-emoji-btn CSS removal is consistent with the dead code report. The report confirms (line 73–74) that no plan-emoji-btn class is assigned anywhere in src/js/ or work-log.html, validated by grep. No style guide or documentation references these selectors — the removal is complete and safe.
— Claude claude-haiku-4-5-20251001 · d069ca4
npm install updated the lockfile version field to match package.json (1.9.0). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aHsM98jtkYmvzZco2wHu8
Agreed — will fix in this PRNone. All findings are Acknowledged — deferred
Claude's counter-positionsNone. Partially agreedNone. Independent gapsNo independent gaps found. VerdictClean — no blocking issues. All three threads are ✅ acknowledged as safe removals with complete evidence in the dead-code report (lines 1–85). Convergence summary by Claude |
Summary
Pre-release hygiene sweep. Full analysis report:
docs/dead-code-reports/dead-code-2026-06-19.md.Removed (high confidence — never called)
src/js/10a-tasks-render.jsopenEmojiPicker(pid, anchor).plan-emoji-btntrigger was removed fromrenderRow()when the emoji picker moved to timeblocks-onlysrc/js/10a-tasks-render.jssetTaskEmoji(pid, emoji)openEmojiPickersrc/css/_picker.scss.plan-emoji-btn/:hover/.has-emojirule-setssmoke-tests.cjsline 1191 explicitly asserts#planList .plan-emoji-btncount = 0, confirming the feature was intentionally removed from plan tasks.Kept — shared globals, not dead
EMOJI_COMMONand_emojiPickerPidare defined in10a-tasks-render.jsbut are shared globals in the concatenated build consumed byopenBlockEmojiPicker/setBlockEmojiin11-timeblock.js(lines 121, 122, 126, 142, 172, 179, 200). They must remain.Left in place — intentional no-ops / stubs
Five functions look dormant but carry explicit "kept as no-op" comments and must not be removed:
updateTimerBarColor()(03-timer.js) — colour handled by CSScheckNewDay()(08-pomodoro.js) — startup call-site stubupdateHeaderTracking()(09-clock-weather.js) — tracking moved to hero cardrenderFlagDay()(09-clock-weather.js) — explicit stub per commentinitMonthlyLog()(19-monthlylog.js) — no-op so call site stays validBuild / test
npm run build✅npm run lint✅ (0 errors; 150 pre-existing warnings, unchanged)node test/unit.mjs✅ 461/461 passGenerated by Claude Code