You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add edit mode toggle with in-place title editing and score locking for concurrent editing
Edit mode:
- Add edit-mode toggle button in arrangementPalette bottom-right corner
- Decouple toggle via requisitions: button sends editModeChanged,
App reacts with state change, allowing any component to toggle
- Header auto-pins during edit mode (forceExpanded)
- Hide pin button during editing (redundant while force-pinned)
Title editing:
- In-place editing: native input replaces label with identical styling
- Right-aligned, auto-width via fit-content (grows with text)
- Focus selects all text, Enter/Blur saves only when title differs
- Escape reverts to original and selects all
- Title changes now tracked in undo/redo history (previously ignored)
- Arrangement scoreId persisted through snapshots for localStorage round-trips
Score locking:
- New score_locks table: score_id (PK, FK→scores), user_id, username,
lock_token, locked_at with 30-minute expiry timeout
- lockScore endpoint: auth + permission check, returns token or conflict
(409 with username/lockedAt). Supports silent re-lock via prevToken
- unlockScore: token-validated release
- forceUnlockScore: admin-only override for stuck locks
- handleUpdateScore validates optional lock token; rejects with 409
- Client acquires lock on edit-mode enter, releases on exit
- Local-only arrangements skip locking (no DB scoreId)
- Data model passes lockToken on save; 409 conflict surface as error
Fixes:
- Remove duplicate arrangement-title id: use separate instances with
-collapsed suffix
- Fix title editing corrupting arrangement after undo (stale state)
- Remove placeholder from title input (Chrome native popup)
- Remove data-tooltip=expand from arrangement title
- Suppress browser context menu app-wide
- Remove section comments from Requsitions.ts
- Remove dead code: handleKeyUp, DisplayMode enum, editingTitle state
Tests:
- score-locks.spec.ts: 5 tests for getArrangementSnapshot scoreId
inclusion and applyArrangementSnapshot scoreId restoration
- UndoRedoStack.spec.ts: updated title change test to reflect new
tracking behavior
Signed-off-by: Mike Lischke <mike@lischke-online.de>
0 commit comments