feat(workspace): name tonight's first tuning plan on the map - #1010
feat(workspace): name tonight's first tuning plan on the map#1010seonghobae wants to merge 15 commits into
Conversation
Name the owning part, owned tuningPlan copy, labeled section, and time so a player can lock that tuning before rehearsal. Open scrolls the renderer-owned song-structure section.
|
Warning Review limit reachedNext included review available in 58 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (26)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
| function resolveTuningPlanRenderer(origin: HTMLElement): HTMLElement | null { | ||
| const selector = '[data-testid="song-structure-grid"]'; | ||
| const localScope = origin.closest("aside")?.parentElement ?? null; | ||
| const localRenderers = localScope?.querySelectorAll<HTMLElement>(selector) ?? []; | ||
| if (localRenderers.length === 1) { | ||
| return localRenderers[0] ?? null; | ||
| } | ||
| if (localRenderers.length > 1) { | ||
| return null; | ||
| } | ||
|
|
||
| const globalRenderers = document.querySelectorAll<HTMLElement>(selector); | ||
| return globalRenderers.length === 1 ? (globalRenderers[0] ?? null) : null; | ||
| } |
There was a problem hiding this comment.
📝 Info: Renderer scoping fails closed on ambiguity
resolveTuningPlanRenderer returns null when the callout's local scope holds 0 or more than one song-structure-grid. Only Workspace.tsx emits that testid today, so scoping holds. Adding a second grid to the same CardContent would make Open silently do nothing.
Was this helpful? React with 👍 or 👎 to provide feedback.
Buyer next action
The mounted rehearsal workspace now names tonight's first tuning plan so a part can lock the owned tuning before rehearsal starts.
Demo: Bass Guitar still has Tune the E string down to D so the verse riff sits on the open fifth. Open is the next action: it moves to the matching rendered song-structure section.
Protected base:
develop@acdbea6344fe1231c39535b575f4de35e4c607c9.Exact current head:
8c4f173230bc0323ed63afa72f761494f983a267onfeat/workspace-first-tuning-plan.What the player sees
tuningPlancopy, the labeled section, and the time.Authority boundary
harmonicExplanation, or confidence notes.RehearsalRole.tuningPlanis distinct fromsetupNoteandtranspositionPlan.section.idis never DOM-ID authority. Open uses renderer-owneddata-section-index.Docs
AGENTS.md, CLAUDE.md, ARCHITECTURE.md, CHANGELOG.md, and
docs/design-system/component-contract.mdname this next action. Reduced-motion Open usesbehavior: "auto".Security Notes
partGraph, identity accessors) plus DOM navigation against the mounted song-structure renderer.nulland keep the callout guidance-only.Dependency / merge gate
pdfjs-dist/nanoid/undiciHIGH findings are not copied or suppressed here. No lockfile change.