Capture strip
- Twin of the point-capture strip, embedded inside #ytpWrap. Two time slots
(Start + optional End) with the scrubber driving whichever is "active".
Editable mm:ss inputs, zoom (1x/5x/20x), inline note + coach name + emoji
chip picker. Cancel / Save on the right; Delete in edit mode.
- ▶ preview button plays Start → End and auto-pauses at End; click again to
stop early. Playback uses the live overlay so previewing shows what the
viewer will see.
- Removed the #reviewModal popup; openAddReviewModal(), setReviewEmoji(),
saveReview() and the reviewForm submit binding are gone.
Live-preview overlay + drag-to-position
- As the user types, the coach-note overlay updates on the video in real
time. In capture mode the overlay is grab-able and draggable to any spot
over the video (mouse + touch), with a red dashed outline + "↕ drag me"
hint.
- Overlay position is stored as normalized 0..1 CENTER coords of the video
wrap and applied via `left: X%; top: Y%; transform: translate(-50%,-50%)`
so the overlay stays at the same relative spot on any resize / fullscreen.
- Font-size, padding and border-radius scale with the player width via CSS
container queries (`container-type: inline-size` on #ytpWrap + `clamp(...cqi)`),
so the note grows/shrinks proportionally.
- Draggable overlay lives above the strip (z-index 70 vs 60) so it can be
dropped anywhere including over the strip.
Persistence (schema change)
- Migration 2026_08_08_000001_add_position_to_coach_reviews: adds nullable
decimal(6,4) position_x / position_y to coach_reviews.
- CoachReview fillable + casts updated. store/updateReview validate
position_x / position_y as numeric between 0 and 1 and persist them.
- showCoachNoteOverlay(text, pos) applies the saved position on playback.
Cards: timeline design (Option B from the mockup)
- Vertical spine with red dots on the left; each review is a chapter-style
time label above a subtle card. Card body: emoji as the leading indicator,
note text, then coach name + tools (▶⏳ / ✏️ / 🗑).
- ▶⏳ = playReviewSlowmo(id): plays Start → End once at 1×, then loops back
and plays again at 0.5×, then pauses and hides the overlay. Only rendered
when the review has an end_time > start_time.
- Card body still clickable for the classic "jump-and-play-once" behaviour.
- Fixes a latent bug where the primary Save button stayed disabled after a
successful save, silently swallowing the next click. Both the review and
point capture strips now re-enable the button in their cancel handlers.
Also
- Design mockup file at public/coach-review-mockups.html shows the four
candidate layouts side by side (kept for future design iterations).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the point Add/Edit popup with an in-player capture strip and fixes
the underlying running-score bug.
Backend (MatchEventController)
- storePoint used pluck('points','competitor'), which collapses same-side
points into a single row (last value wins) and excluded same-timestamp
points (< instead of <=). Same-moment Blue+Red produced 1-0 / 0-1 instead
of 1-1. Replaced with recomputeRoundScores($roundId), a single pass over
the round ordered by (timestamp_seconds, id) that walks a running total
and updates each row. Called after create/update/delete so edits ripple.
Player-embedded capture strip (match.blade.php)
- Adding / editing points no longer opens a modal; the video's chrome
bottom-bar is swapped for a strip inside #ytpWrap that survives fullscreen.
- Editable mm:ss field + draggable red marker + −1s/+1s nudges. Zoom control
(1x / 5x / 20x) narrows the slider window around the current time for
frame-level positioning; nudges scale with zoom. Auto-recentre on edge.
- Inline form: Blue / Red / Both toggle (equal-width segments), action text,
points number. Both mode splits into two per-side rows. Values carry over
when switching modes so nothing is retyped.
- Enter saves, Esc cancels. Save button auto-disables during in-flight
requests. On mobile the buttons collapse to icon-only (× / ✓).
Grouped highlights entry
- Points sharing a timestamp within a round collapse into ONE card with a
chip per side (equal-width Blue/Red pills), a single ✏️/🗑 pair, and a
meta line coloured by role: ROUND N in amber, blue score in blue, red
score in red.
- ✏️ on a grouped entry opens the strip in Both mode with both sides
pre-filled. Saving PUTs both rows; switching to a single competitor
keeps that side and deletes the other.
- 🗑 on a grouped entry deletes both rows via the shared custom-confirm.
- loadMatchData now writes back to window.matchRounds so subsequent
edit/lookup handlers find newly-added points without a page reload.
Removed
- #pointModal HTML block and the openAddPointModal / savePoint /
confirmDeletePoint helpers (superseded by the capture strip).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>