Skip to content

Audit: guard what the UI/UX review fixed - #11

Merged
devmtnaing merged 2 commits into
mainfrom
audit-ux-checks
Sep 28, 2026
Merged

devmtnaing merged 2 commits into
mainfrom
audit-ux-checks

Conversation

@devmtnaing

Copy link
Copy Markdown
Owner

What this changes

The checks I wrote while working on #3–#9 lived in a scratchpad. This PR moves the ones that guard what those PRs fixed into npm run audit, so a page that undoes a fix now fails the audit.

Stacked on #10, which describes these rules in the skill. Until #10 merges, this diff also shows its commit.

New checks in scripts/audit.mjs

Guards Check
#5 heading order Headings never skip a level, on any step of any approach.
#9 empty states No answer slot, empty-stage note or ledger shows only · or —. A · in a stage cell is notation and is allowed.
#4 phone layout Nothing scrolls sideways at 320px, in both languages at the first, middle and last step. This uses one code language, since page width doesn't depend on the listing. 400px still walks every code language.
#3 keys Real key presses: Space on a focused Next moves one step without starting playback, and → on an approach tab moves to the next tab rather than stepping.
#6 shared links An untouched page has no query. After changing the approach, code language, preset and step, the link reopens all of them in a fresh load, along with the Part 3 pane, and "Report an issue" carries the same state.

Repeated findings collapse to one line per approach, naming the first step where the problem appears.

Docs

CONTRIBUTING.md (the audit paragraph and the checklist), SKILL.md step 8, and the "Checking" section of lesson-kit.md now describe what the audit checks.

Checked

  • Passes on main: npm run audit passed on all 46 pages and the home page.
  • Fails when it should: I reverted four fixes on purpose (the · answer slots, x-sum's stage <h3>, the Space guard, reading the link) and ran the audit on x-sum and two-sum. It failed with 18 findings, each a readable line naming the approach and first step. Then I restored the code.
  • Cost: the full audit went from 238s to 284s, about 46 seconds more.

lesson-kit.md now describes the page as it is after #3-#9 (LeetCode links
past a divider, the sticky transport and wrapping strip, part 3 folding to
the chosen approach) and adds the rules a lesson can still break:
- mode ids and control keys are in every shared link; parse(format(v))
  must give back v
- a rejection message is a short phrase
- modes[0] is what 2·2 and part 3 open on
- a custom stage's headings are <h5 class="as-h3">
- empty says what it waits for; slots()/blank()/stageEmpty(), and a dot
  only as notation
- a widget's own clickable elements are 40px tall on touch

SKILL.md gains one judgement call: a kit change is measured on every
lesson before choosing, with a before/after when it changes how pages look.
npm run audit now also fails a page when:
- a heading skips a level on any step
- an answer slot, empty-stage note or ledger shows only a dot or dash
  (a dot in a stage cell is notation and allowed)
- anything scrolls sideways at 320px (one code language; 400px keeps
  walking all of them)
- space on a focused Next starts playback instead of pressing it, or → on
  an approach tab steps instead of moving between tabs
- an untouched page has a query, a shared link reopens a different
  approach, step, code language, Part 3 pane or input, or "Report an
  issue" names a different state

Repeats collapse to one line per approach, naming the first step. Each
check was confirmed to fail with its fix reverted. CONTRIBUTING.md and the
skill describe the new checks.
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

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

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a9ba3b22-17c5-4f7f-bd99-03be6d5ef54c


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

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ c87b71c 2026-09-28T08:21:28.182Z Visit the dashboard ↗

@devmtnaing
devmtnaing merged commit 756ddf6 into main Sep 28, 2026
7 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.

1 participant