Skip to content

fix(glitch-invaders): fix the UX review's start error, console overflow, and LIVE badge - #39

Merged
theycallmeswift merged 4 commits into
mainfrom
fix/glitch-invaders-ux-review
Nov 2, 2026
Merged

theycallmeswift merged 4 commits into
mainfrom
fix/glitch-invaders-ux-review

Conversation

@theycallmeswift

@theycallmeswift theycallmeswift commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the Glitch Invaders findings from the 2026-11-01 challenge UX review (closes #32). Setup now seeds an unplayed glitch-progress.json, so Pi's first read no longer fails. The Incident Console scrolls inside a viewport-bounded panel with its actions pinned. The mode badge follows the evidence source. A pad tap moves one lane. Toasts sit at the top of the arena and clear after 2.5 s. The end card points to the debrief. Pi saves questions for when an incident closes. The glitch-state line is visually hidden but stays in the accessibility tree.

Station step-check lag: the cause was in the package. Hud.update rewrote #stat-shield's data-state every frame (about 60 mutation records a second), so the station's 8 s quiet period never elapsed and every check waited for its 22 s cap. DOM writes from the frame loop now happen only on change. In Chromium the page now records 0 mutations a second at intro, in idle play, while paused, and with the console open. On main it records about 60.

Decide

  • File a station issue for the lag that remains during active combat? Score and hull changes still reset the station's 8 s quiet window, and arrow keys and Space don't count as interactions, so a check can still wait up to 22 s mid-fight. Recommend: file it in MLH/boothstrap.sh, because the fix belongs in the station. The idea is to let a manifest or monitor skill name a state element whose text change starts a run after 1 s. I haven't filed it, since that posts outside this repo.
  • Arrow pads: a tap now moves one lane (64 px), instead of labelling the pads "hold". Recommend: keep it, because a tap is the first thing people try, it needs no extra text in a tight dock, and holding still moves continuously.
  • Layout guards: the console, toast and state-line tests read styles.css and index.html as text, because the repo has no browser test tier. The 597 px fit itself was measured in Chromium, below. Recommend: keep them until a browser tier exists, because they're the only check that fails if the pinned-actions structure is removed.
  • done_when for the four game steps now says the state line is in the page's accessibility snapshot, not that the page "shows" it. Recommend: keep it, because the line is no longer on screen and the monitor reads the snapshot.

Ready gate

Step Evidence
Tests and lint npm run verify: ok on all 4 packages. npm test: 286 pass, 0 fail. npm run lint: 0 issues in 18 files. ✅
Red run Each new test was run with its fix reverted and failed: setup seeding (5 tests failed with ENOENT), pinned console layout, idle-frame writes for the HUD and boss loading, the badge falling back to simulated, the tap moving a lane (including pointerleave after pointerup, the opposite-pad cancel, and the two-lane tap cap from both sides), the hint scrolling into view, the setStyle cache, the end-card line, toast placement, and the state-line class. The releaseAll test is extra coverage with no fix behind it. ✅
Sibling sweep Searched the package for "visible", "shows the line" and state-line. Updated the package README, monitor/SKILL.md and the four done_when lines. No .spacer or .state-line rules are left. ✅
Docs and specs Package README.md (setup seeds progress, hidden state line), monitor/SKILL.md, skills/start-challenge/SKILL.md. Repo docs/ unchanged, because the architecture didn't change. ✅
Standalone run Followed the authoring guide's plain-Pi flow with google/gemini-3.8-flash. Setup exited 0, the server answered 200, and an unplayed progress file was present. Pi's first tool call read it with no error. Start in Chromium set launched=yes in the state line and the file. Follow-up nudges asked no questions. Cleanup exited 0, stopped the server and emptied the workspace. ✅
Editorial pass Reread against docs/style/. Split multi-exercise tests into one exercise each, removed a constant-only test and a duplicate assertion, and removed the skill's contradiction about when to ask questions. ✅
Skipped tests None. ✅
Secrets, permissions Not touched. ✅

Layout at a 597 px tall viewport, measured in Chromium: every console stage's action, the pads, Skip ahead, both Reset buttons and the end card's buttons are in view and clickable at 1000 and 800 px wide (96 of 96 checks pass). Continue to Diagnose moved from 659 px to 550 px. The topbar stays on one row at 1000 px (38 px tall), with the mode badge visible down to 760 px.


Generated by Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b0eaec0b-5b37-471f-bdf8-be4e67f6cb5b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@theycallmeswift
theycallmeswift marked this pull request as ready for review November 2, 2026 04:52

@theycallmeswift theycallmeswift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Orchestrator review of dbcaebe, merged with current main: clean. verify (4 packages), npm test (299) and lint pass. Spot-checked in headless Chrome at 1000×597: 0 DOM mutations in 3 s at intro and in idle play, the pads, Skip ahead, Reset and badge are all within 597 px, and the state line stays in the accessibility tree. All nine issue items are covered. The done_when rewording is valid against the contract and matches monitor/SKILL.md.

Decide items:

  • Station issue for the lag during combat: no new issue needed. The 8 s quiet / 22 s cap is BS-BROW-5 as specced, and MLH/boothstrap.sh#623 ("Check browser challenge steps sooner after the page changes") already tracks shortening it.
  • A tap moves one lane: sound.
  • CSS-text layout guards: fine as a stopgap until a browser test tier exists.
  • Reworded done_when: sound.

Nits, for a follow-up:

  • The CSS-text guards in test/glitch-invaders.test.mjs break on harmless restyles and miss real overlaps. Replace them with a headless-Chrome layout check when the repo gets a browser tier.
  • diagnosePane() in incident-console.mjs sets this.newestHint while it builds DOM. Return it with { content, actions } instead.

Generated by Claude Code

@theycallmeswift
theycallmeswift merged commit 6ab5e03 into main Nov 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glitch Invaders: fix the review's start error, console overflow, and LIVE badge

2 participants