Skip to content

Dead-code sweep 2026-06-19#233

Draft
lupinesse wants to merge 2 commits into
mainfrom
claude/cool-heisenberg-jaihgs
Draft

Dead-code sweep 2026-06-19#233
lupinesse wants to merge 2 commits into
mainfrom
claude/cool-heisenberg-jaihgs

Conversation

@lupinesse

Copy link
Copy Markdown
Owner

Summary

Pre-release hygiene sweep. Full analysis report: docs/dead-code-reports/dead-code-2026-06-19.md.

Removed (high confidence — never called)

File What was removed Evidence
src/js/10a-tasks-render.js openEmojiPicker(pid, anchor) No call site exists anywhere; .plan-emoji-btn trigger was removed from renderRow() when the emoji picker moved to timeblocks-only
src/js/10a-tasks-render.js setTaskEmoji(pid, emoji) Transitively dead — only ever called from openEmojiPicker
src/css/_picker.scss .plan-emoji-btn / :hover / .has-emoji rule-sets No element with this class is created by any JS or HTML

smoke-tests.cjs line 1191 explicitly asserts #planList .plan-emoji-btn count = 0, confirming the feature was intentionally removed from plan tasks.

Kept — shared globals, not dead

EMOJI_COMMON and _emojiPickerPid are defined in 10a-tasks-render.js but are shared globals in the concatenated build consumed by openBlockEmojiPicker / setBlockEmoji in 11-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 CSS
  • checkNewDay() (08-pomodoro.js) — startup call-site stub
  • updateHeaderTracking() (09-clock-weather.js) — tracking moved to hero card
  • renderFlagDay() (09-clock-weather.js) — explicit stub per comment
  • initMonthlyLog() (19-monthlylog.js) — no-op so call site stays valid

Build / test

  • npm run build
  • npm run lint ✅ (0 errors; 150 pre-existing warnings, unchanged)
  • node test/unit.mjs ✅ 461/461 pass
  • Smoke tests (Playwright): ⚠️ Playwright browser not installed in this environment — pre-existing environment issue, not related to this change

Generated by Claude Code

… 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
@github-actions github-actions Bot added the chatgpt-review Second PR review by ChatGPT for larger features label Jun 19, 2026
@claude-reviewer-work-log

claude-reviewer-work-log Bot commented Jun 19, 2026

Copy link
Copy Markdown

JSDoc Coverage

Summary

Status Count
✅ Complete 0
⚠️ Partial 0
❌ Missing 0

✅ All clear

All exported symbols in scope have complete JSDoc.

Verdict: PASS


Automated check · commit 2c06da7

@claude-reviewer-work-log

claude-reviewer-work-log Bot commented Jun 19, 2026

Copy link
Copy Markdown

Impact Analysis

Changed modules

  • src/css/_picker.scss
  • src/js/10a-tasks-render.js

Downstream dependants

Changed module Modules that import it Risk
_picker.scss (none) 🟢 Low
10a-tasks-render.js (none) 🟢 Low

Test coverage for changed modules

Module Test coverage
_picker.scss ❌ not found
10a-tasks-render.js ❌ not found

Automated analysis · commit 2c06da7

@@ -304,104 +304,3 @@ const EMOJI_COMMON = [
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 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 = [
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 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

Comment thread src/css/_picker.scss
@@ -197,29 +197,6 @@
border-style: solid;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 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
@claude-reviewer-work-log

Copy link
Copy Markdown

Agreed — will fix in this PR

None. All findings are 👍 agree_noted.

Acknowledged — deferred

  • Thread 0 src/js/10a-tasks-render.js:305openEmojiPicker dead code removal. Claude verified: no external documentation or comments reference this function; removal is self-contained and complete.
  • Thread 1 src/js/10a-tasks-render.js:304setTaskEmoji dead code removal. Claude verified: no tests or external documentation reference it; transitively dead via openEmojiPicker only.
  • Thread 2 src/css/_picker.scss:198.plan-emoji-btn CSS removal. Claude verified: grep confirms no class is assigned anywhere; no style guide or documentation references these selectors.

Claude's counter-positions

None.

Partially agreed

None.

Independent gaps

No independent gaps found.

Verdict

Clean — 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 claude-haiku-4-5-20251001 · commit d069ca4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chatgpt-review Second PR review by ChatGPT for larger features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants