Skip to content

Cheat sheet: push-aside panel with exercise-aware focus - #46

Merged
NeoVand merged 1 commit into
mainfrom
feat/cheatsheet-focus-main
Jul 22, 2026
Merged

Cheat sheet: push-aside panel with exercise-aware focus#46
NeoVand merged 1 commit into
mainfrom
feat/cheatsheet-focus-main

Conversation

@NeoVand

@NeoVand NeoVand commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Re-lands #45, which was accidentally merged into its base branch ui/sidebar-cleanup instead of main (#44 merged a minute earlier, so GitHub never retargeted the stack). This is the identical commit cherry-picked onto main — see #45 for the full description and verification notes.

  • Cheat sheet pushes content aside (desktop reading mode, own 21rem width) instead of overlaying
  • Exercise-aware focus: at a playground/challenge the sheet narrows to that exercise's commands, with a toolbar toggle and a strip naming the exercise
  • Panel title shortened to "Cheat Sheet"; pinned aria-labels untouched
  • New pure module exercise-commands.ts + 10 unit tests; 548 vitest and 51 Playwright pass

🤖 Generated with Claude Code

Two changes to make the cheat sheet a working companion rather than an
overlay:

- It now pushes the content aside like the Agent and Playground panels
  (desktop reading mode, at its own 21rem width), so a learner can keep
  an inline exercise and the reference on screen together.

- When the learner is at a playground or challenge, the sheet narrows
  itself to the commands that exercise reaches for — playgrounds via
  their suggested-command walkthrough, challenges via the whole salted
  kit (the sheet explains, it never solves). A ListFilter toggle in the
  toolbar turns the focus off and on, and only appears when there is an
  exercise to focus on; a tinted strip names the exercise so the short
  list reads as a feature, not missing content.

The mapping is pure and tested (exercise-commands.ts): scroll-spy
anchors ARE scenario/challenge ids, and challenge-parsing's existing
splitSegments/commandWordOf resolve command words per pipeline segment,
sudo unwrapped. The panel title drops to "Cheat Sheet" to make room for
the new toolbar control; aria-labels stay pinned for e2e.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NeoVand
NeoVand merged commit fce61a8 into main Jul 22, 2026
3 checks passed
@NeoVand
NeoVand deleted the feat/cheatsheet-focus-main branch July 22, 2026 04:52
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