feat: console music command with 8-bit soundtrack - #1
Conversation
Dependency-free terminal widget on the homepage. Launcher button opens a draggable floating window (~80x24), dockable to the bottom quarter. Commands: theme, history, clear, close, help. On open it shows the site title as a Bulbhead FIGfont banner (parser + font embedded, no npm dep). Progressive enhancement: launcher and window stay hidden without JS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBF9sk8L2MdbSC1Pbz9tkH
theme + music now use the subcommand pattern (bare cmd prints usage block). music synthesises a square-wave chiptune via WebAudio, with play/stop/volume. Add CLAUDE.md documenting the theme and console command style. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This reverts commit 96c6f62.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Frontend reviewSolid overall — no-dep vanilla JS, pure Accessibility1. ASCII banner is announced to screen readers — real defect. Correctness / robustness2. 3. 4. Performance5. Whole figfont base64'd into every page. Dead code6. Design — passesMonochrome, single VerdictShip-worthy after #1 (one line). #6 is a free deletion. #2–#5 are follow-ups, not blockers. |
This reverts commit 0f06f88.
The banner <pre> lives inside .console__log, which is role="log" aria-live="polite". Without aria-hidden a screen reader announces the decorative ASCII art character-by-character. Mark it hidden. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
- music play now reports "blocked by the browser" instead of claiming "♪ music on" when AudioContext.resume() rejects. on() returns a promise so the caller can tell success from failure. - rename voice()'s per-note gain param vol -> peak (was shadowing the module-level master vol used by setVolume). - rename local history array -> cmdHistory (was shadowing window.history). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
write() only ever creates <div> lines — no code path renders an anchor, so this selector matched nothing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
The figfont was base64-encoded into a data-font attribute on every page (~6KB of HTML each). Publish it as a fingerprinted resource and fetch it once at runtime instead — cached across the whole site, and the banner render moves off the initial HTML payload. Falls back to no banner if the fetch fails; the console still works. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bgxxw4baXATznPYP4ARHzW
|
Issues all fixed with Claude. |
What
Adds a
musiccommand to the floating console, plus a subcommand refactor of the console command style.music— synthesises a calm C-major pentatonic 8-bit tune live with WebAudio (no audio files, no deps). Triangle lead + sine bass pad.music play/music stop/music volume <0-10>musicprints a usage blocktheme— refactored to the same subcommand style:theme list/theme set <mode>, barethemeprints usagehelp— reformatted to alignedname : descriptionSelf-check (
node assets/js/console.js) covers every new branch and passes.🤖 Generated with Claude Code