feat(editor): add tempo map sync point actions - #74
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe tempo sync inspector now computes insert/delete permission state, adds Insert/Delete controls, and updates refresh behavior to apply those controls. Tests now cover the new state fields for no selection, interior sync points, and edge sync points. ChangesTempo Sync Inspector Controls
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant InsertDeleteButtons
participant refreshTempoSyncInspector
participant tempoSyncInspectorStatePure
refreshTempoSyncInspector->>tempoSyncInspectorStatePure: compute state (canInsert, canDelete, deleteTitle)
tempoSyncInspectorStatePure-->>refreshTempoSyncInspector: return state
refreshTempoSyncInspector->>InsertDeleteButtons: set disabled/title
User->>InsertDeleteButtons: click Insert or Delete
InsertDeleteButtons->>refreshTempoSyncInspector: invoke insert/delete handler
Related Issues: None referenced. Related PRs: None referenced. Suggested labels: enhancement, ui Suggested reviewers: None specified. Poem: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.44.1)screen.jsast-grep timed out on this file Comment |
21bed52 to
b9eb1d8
Compare
d71ce10 to
adc8c77
Compare
There was a problem hiding this comment.
Pull request overview
Adds explicit Insert and Delete actions to the Tempo Map sync-point inspector UI, with state-driven enablement (Delete only enabled for interior sync points) and expanded helper test coverage to validate the new action state.
Changes:
- Extend
_tempoSyncInspectorStatePure()to computecanInsert,canDelete, anddeleteTitle. - Add Insert/Delete buttons to the inspector UI and wire them to
_tempoInsertSyncPoint()/_tempoDeleteSyncPoint(). - Update
tests/tempo_sync_inspector.test.jsto assert the new action enablement/title behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
screen.js |
Adds inspector action buttons and extends the pure inspector-state helper to drive enablement/tooltips. |
tests/tempo_sync_inspector.test.js |
Adds assertions covering insert/delete enablement and delete tooltip/title logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const state = _tempoSyncInspectorStatePure(visible ? _tempoMeasures() : [], visible ? S.tempoSel : -1); | ||
| const sig = `${visible}|${S.tempoSel}|${state.label}|${state.bpmValue}|${state.bpmDisabled}|${state.numeratorValue}|${state.denominatorValue}|${state.signatureDisabled}|${state.hint}`; | ||
| const sig = `${visible}|${S.tempoSel}|${state.label}|${state.bpmValue}|${state.bpmDisabled}|${state.numeratorValue}|${state.denominatorValue}|${state.signatureDisabled}|${state.canInsert}|${state.canDelete}|${state.hint}`; | ||
| _tempoSyncInspectorState = sig; |
Summary
Validation
Summary by CodeRabbit
New Features
Bug Fixes