Skip to content

fix(catune): repair tutorial highlighting after Peak/FWHM migration#143

Merged
daharoni merged 1 commit into
mainfrom
fix/catune-tutorial-peak-fwhm
Apr 22, 2026
Merged

fix(catune): repair tutorial highlighting after Peak/FWHM migration#143
daharoni merged 1 commit into
mainfrom
fix/catune-tutorial-peak-fwhm

Conversation

@daharoni
Copy link
Copy Markdown
Contributor

Summary

The tutorial overlay was misbehaving in CaTune because several of its driver.js step selectors no longer pointed at real DOM elements after the kernel parameter migration from tau_rise/tau_decay to Peak/FWHM.

Broken selectors:

  • [data-tutorial="slider-decay"] — renamed to slider-fwhm in ParameterPanel, never updated in the tutorial content (3 references across 3 tutorials).
  • [data-tutorial="slider-rise"] — renamed to slider-peak, same story (2 references across 2 tutorials).
  • [data-tutorial="resize-handle"] — never existed; the Card component's resize-handle div was unlabeled.

So the tutorial would highlight nothing (or fall back to a sibling/parent, depending on driver.js's behaviour for missing targets) on any step touching a kernel-param slider or the "Card Height" step.

Fixes in this PR:

  • Selector renames in tutorial content (slider-decayslider-fwhm, slider-riseslider-peak).
  • Added data-tutorial="resize-handle" to the Card resize handle in @calab/ui.
  • Rewrote step titles, body text, and comments that still described τ_rise / τ_decay so the popover narrative matches the slider it highlights. Mapping used: Decay Time → FWHM (event width); Rise Time → Peak Time. Tuning order / parameter coupling / artifact causes updated accordingly.
  • The 05-theory tutorial and 04-features (community scatter plot axes) continue to reference τ values directly because the underlying kernel math and the community submission schema still use them — left untouched.
  • Stale JSDoc example in packages/tutorials/src/types.ts.

Cross-checked every selector referenced in tutorial content against live data-tutorial= attributes across apps/catune/src and packages/*/src: no unmatched selectors remain.

Test plan

  • npx tsc -b apps/catune — clean
  • npx prettier --check on touched files — clean
  • npm test --workspaces — 62/62 pass (catune + io, no regressions)
  • Needs human UI verification: launch each of the three tutorials (basics, workflow, advanced), step through to completion, and confirm the highlight box lands on the right slider / resize handle at each step and the popover text matches.

🤖 Generated with Claude Code

The 01-basics, 02-workflow, and 03-advanced tutorials still targeted
`[data-tutorial="slider-decay"]` and `[data-tutorial="slider-rise"]`,
which no longer exist — the kernel parameterization was migrated from
tau_rise/tau_decay to Peak/FWHM some time ago. driver.js found no
matching element, so the highlight either landed nowhere or fell back
to something nearby, depending on the step.

One selector was also broken by omission: `[data-tutorial="resize-handle"]`
never had a matching attribute anywhere — the Card component's resize
handle div was unlabeled.

This commit:

- Renames selectors in tutorial content:
  `slider-decay` → `slider-fwhm`, `slider-rise` → `slider-peak`.
- Adds `data-tutorial="resize-handle"` to the Card resize handle in
  `packages/ui/src/Card.tsx`.
- Updates step titles, body text, and section comments that still
  described τ_rise / τ_decay semantics so the popover narrative matches
  the slider it's highlighting. Mapping used:
    Decay Time → FWHM (event width)
    Rise Time → Peak Time
  Advice about tuning order, parameter coupling, and artifact causes is
  rewritten accordingly. The underlying kernel math (exponentials,
  τ_rise/τ_decay) is still discussed where appropriate — the 05-theory
  tutorial and the community scatter plot still refer to τ values
  directly, so those remain unchanged.
- Fixes a stale JSDoc example in `packages/tutorials/src/types.ts`.

Cross-checked every selector referenced by tutorial content against
live `data-tutorial=` attributes in apps/catune/src and packages/*/src
— no unmatched selectors remain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@daharoni daharoni merged commit 0dca859 into main Apr 22, 2026
6 checks passed
@daharoni daharoni deleted the fix/catune-tutorial-peak-fwhm branch April 22, 2026 04:27
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