fix: correct stale CLAUDE.md, serialize the build job, restore card descriptions - #73
Merged
Merged
Conversation
…escriptions
Three findings from a review of the whole refactor range, all mine.
**`CLAUDE.md` went stale in the two paragraphs the refactor rewrote.** I kept
the Scenarios, Data and Push-and-deploy paragraphs current as those milestones
landed, and missed the two that milestones 3 and 4 invalidated:
- **State** still described `Store<T>` as a pub/sub whose `set()` "notifies
subscribers, and persists", with a `{ session }` top-level shape. All three
were deleted; the store is now `load`/`save`/`clear` and notifies nobody.
- **Play screen draft state** still said the draft is a module-level
`currentDraft` reset BEFORE `onUpdate` because "the store notifies
synchronously". That is the file's most emphatic warning and it is now
backwards — following it means re-introducing the module-level draft and
the reset ordering that moving the draft into the closure removed.
Also corrected: the Architecture line claiming the root is replaced on every
store change (repaints no longer go through the store), and the Game logic
line sending readers to `renderRollStep` for `reroll_highest` (it lives in
`rules.ts` as `applyReroll` now). Added a paragraph for `src/paragraph.ts`,
which did not exist when the file was written.
**The build job was not serialized (deploy.yml).** Collapsing `ci.yml` into
`deploy.yml` moved `concurrency: {group: pages}` off the workflow and onto
`deploy` alone — correct for keeping PR checks out of the deploy queue, but it
left `build` unconstrained. Two pushes in quick succession then build in
parallel and reach `deploy` in whatever order they finish, so the older
commit's artifact can publish last and leave the site a commit behind. `build`
now shares the group; `check` stays free, which was the point of moving it.
`deploy` also regains `contents: read`, dropped when its job-level permissions
replaced the workflow-level block.
**The card `aria-label` hid the attribute pips (setup.ts).** #47 asked for an
explicit label carrying just the name, and that is what I wrote — but
`aria-label` *replaces* the accessible name computed from the subtree, so the
flavour text and the Penmanship/Language/Heart pips stopped being exposed at
all. A screen-reader user choosing a character heard "The Monk, button" and had
no way to reach the ratings the choice is actually based on — worse than the
run-on name the label was meant to fix.
Now `aria-labelledby` names the card from its title span and `aria-describedby`
points at the blurb and the pips, so the name is clean and the detail is still
reachable. Verified in the browser: name "The Monk", description carrying both
the flavour text and "Penmanship●●●Language●●○Heart●○○", no duplicate ids
across all three steps.
Not addressed here, and worth a decision rather than a quiet change:
`aria-pressed` on a mutually-exclusive group is toggle semantics where radio
semantics are meant.
Co-Authored-By: Claude
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three findings from a review of the whole refactor range (
c0843db..HEAD). All three are mine, introduced across the seven milestones.CLAUDE.mdwent stale in exactly the paragraphs the refactor rewroteI kept the Scenarios, Data and Push-and-deploy paragraphs current as those milestones landed, and missed the two that milestones 3 and 4 invalidated:
Store<T>as a pub/sub whoseset()"notifies subscribers, and persists", with a{ session }top-level shape. All three were deleted — the store isload/save/clearand notifies nobody.currentDraftreset beforeonUpdatebecause "the store notifies synchronously". That's the file's most emphatic warning and it is now backwards: following it means re-introducing the module-level draft and the reset ordering that milestone 4 specifically removed.Also corrected: the Architecture line claiming the root is replaced "on every store change" (repaints no longer go through the store), and the Game logic line sending readers to
renderRollStepforreroll_highest(it'sapplyRerollinrules.tsnow). Added a paragraph forsrc/paragraph.ts, which didn't exist when the file was written.The build job wasn't serialized
Collapsing
ci.ymlintodeploy.ymlmovedconcurrency: {group: pages}off the workflow and ontodeployalone. That was right for keeping PR checks out of the deploy queue — but it leftbuildunconstrained.Two pushes in quick succession now build in parallel and reach
deployin whatever order they finish, so the older commit's artifact can publish last and leave the live site a commit behind until the next push. Previously workflow-level concurrency serialized the whole run and ordering was guaranteed.buildnow shares the group;checkstays free, which was the point of moving it.deployalso regainscontents: read, dropped when its job-level permissions block replaced the workflow-level one.This one is real and I merged two PRs in quick succession during this work, so it was live.
The card
aria-labelhid the attribute pips#47 asked for "an explicit
aria-labelwith just the archetype or scenario name", and that's what I wrote. Butaria-labelreplaces the accessible name computed from the subtree — so the flavour text and the Penmanship/Language/Heart pips stopped being exposed to assistive technology at all.A screen-reader user choosing a character heard
"The Monk, button"with no way to reach the ratings the choice is entirely based on. That's worse than the run-on name it was meant to fix, and I should have caught it rather than following the issue's suggestion literally.aria-labelledbynow names the card from its title span, andaria-describedbypoints at the blurb and the pips:Clean name, detail still reachable, markup still conforming.
Not in this PR
aria-pressedon a mutually-exclusive group is toggle-button semantics where radio semantics are meant — AT announces three independently-pressable buttons rather than one choice of three. I flagged this in the milestone 6 plan and deferred it because properrole="radiogroup"changes keyboard navigation (arrows rather than tab). It deserves a decision rather than a quiet change.THEORY.mdandWALKTHROUGH.mdare stale wholesale — the review is correct, and it is deliberate. They're frozen by standing instruction and their staleness is not tracked work.bun run check:ciclean, 82 tests.