Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Hive activity monitor sounds no longer go silent after a reload: when the browser's autoplay policy holds the audio engine back (every reload β€” including the dashboard's automatic reload on a new hive version β€” starts without user activation), the πŸ”Š chip turns amber and a one-time toast with an **Enable sounds** action says a click or key press on the page is needed, instead of each zap/buzz being dropped silently. Gesture plays (β–Ά Play, turning sound on) now start their voices inside the click itself so Safari unlocks the engine, a `resume()` that settles before the state flips waits for `statechange` rather than counting as blocked, and priming also listens for click/touchend.
4 changes: 2 additions & 2 deletions src/docs/dashboard-sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,9 @@ Fed by `GET /api/stage-tracker`. Every issue and pull request follows the same p

**Group.** The **Group** control next to **Sort** switches between **None** (one flat list, the default) and **Repo**. Grouped by repo, rows sit under a sticky header per repository showing the `owner/repo`, its row count, how many of those rows need attention, and a mini distribution of rows across the pipeline columns; the primary repo's group comes first, then groups by row count. The chosen **Sort** still orders rows within each group. A header's chevron collapses that group to its header alone; collapsed repos are remembered across reloads (`hive.tracker.group.collapsed`), as is the Group choice itself (`hive.tracker.group`), which is also available in the settings modal. Group headers are keyed by repo so a refresh keeps them in place while rows move, and a header leaves only after the last row in its group has played its exit animation.

**Sounds.** The πŸ”‡/πŸ”Š chip at the right end of the toolbar turns on two optional, browser-made sounds: a "bug zapper" that plays when a pull request already on the list merges while you have the page open (never on first load, never for issues, once per pull request, at most two zaps per refresh, silent while the tab is hidden), and a short bee-like buzz when an issue or pull request first appears on the list (never on first load, once per item, at most two buzzes per refresh, same hidden-tab rule). Both are off by default and remembered per browser; switching them on plays each sound once so you know what to listen for. They fire for every repo the hive governs β€” there is no primary-repo scoping in the detection.
**Sounds.** The πŸ”‡/πŸ”Š chip at the right end of the toolbar turns on two optional, browser-made sounds: a "bug zapper" that plays when a pull request already on the list merges while you have the page open (never on first load, never for issues, once per pull request, at most two zaps per refresh, silent while the tab is hidden), and a short bee-like buzz when an issue or pull request first appears on the list (never on first load, once per item, at most two buzzes per refresh, same hidden-tab rule). Both are off by default and remembered per browser; switching them on plays each sound once so you know what to listen for. They fire for every repo the hive governs β€” there is no primary-repo scoping in the detection. Browsers only let a page make sound after you have clicked or pressed a key on it, and that permission does not survive a reload β€” including the dashboard's own automatic reload when a new hive version is published. If sound is on but the browser is still holding the audio engine back, the πŸ”Š chip turns amber (hover it for the reason) and, once per page load, a toast offers an **Enable sounds** button; pressing it, or any click or key press on the page, releases the engine and the chip returns to normal. A zap or buzz that fell in that window is skipped (the toast says so) rather than queued to burst out later.

**Sound settings (βš™ on the card header).** The gear on the Hive activity monitor card opens an in-app settings modal with a **Play sounds** master toggle (the same preference as the toolbar chip), a **Volume** slider (0–100, applied to the built-in sounds and to your own files alike, remembered per browser), and one row per event β€” **Open sound** (a new issue or pull request appears) and **Merge sound** (a pull request merges). Each row shows what currently plays ("Built-in (bee buzz)" / "Built-in (zapper)" or your file's name), a **β–Ά Play** preview (the button reads *Playing…* while the sound runs; if the browser refuses to start audio, a toast says so rather than failing silently), a **Choose WAV…** picker that accepts `.wav` or any other audio your browser can decode (up to 4 MB; larger files are refused with a toast), and **Reset to built-in**. Uploaded files are kept in this browser only (IndexedDB) and decoded with the Web Audio API; if a stored file cannot be decoded the built-in sound plays instead and the row says so. **β–Ά Play both** auditions the merge sound followed by the open sound. Previews start the browser's audio engine inside the click itself and wait for it to come up (about a second at most) before playing, so they work in Safari and on a page that has never made a sound; an automatic zap or buzz on an engine the browser still holds back waits only briefly and otherwise skips rather than queueing up to burst out on your next click, and the next click or key press re-arms it.
**Sound settings (βš™ on the card header).** The gear on the Hive activity monitor card opens an in-app settings modal with a **Play sounds** master toggle (the same preference as the toolbar chip), a **Volume** slider (0–100, applied to the built-in sounds and to your own files alike, remembered per browser), and one row per event β€” **Open sound** (a new issue or pull request appears) and **Merge sound** (a pull request merges). Each row shows what currently plays ("Built-in (bee buzz)" / "Built-in (zapper)" or your file's name), a **β–Ά Play** preview (the button reads *Playing…* while the sound runs; if the browser refuses to start audio, a toast says so rather than failing silently), a **Choose WAV…** picker that accepts `.wav` or any other audio your browser can decode (up to 4 MB; larger files are refused with a toast), and **Reset to built-in**. Uploaded files are kept in this browser only (IndexedDB) and decoded with the Web Audio API; if a stored file cannot be decoded the built-in sound plays instead and the row says so. **β–Ά Play both** auditions the merge sound followed by the open sound. Previews start the browser's audio engine and schedule their sound inside the click itself (Safari only unlocks audio for work done synchronously in a user gesture) and otherwise wait for the engine to report it is running (about a second at most), so they work in Safari and on a page that has never made a sound; an automatic zap or buzz on an engine the browser still holds back waits only briefly and otherwise skips rather than queueing up to burst out on your next click, and the next click or key press re-arms it.

**Movement animation (βš™ on the card header).** When a refresh moves an item's lit chevron to a different column β€” forward (advance) or backward (regress) β€” the row plays a short, subtle three-beat sequence so the eye can see where it went: first the chevron it is *leaving* flashes the active highlight twice (two ~140 ms pulses with a short gap), then the chosen effect travels from that chevron to the new one, and finally the new chevron lands lit β€” the whole sequence takes about a second. Pick the travel effect in the same settings modal, under **Movement animation** below the sound settings: **None**, **A Sliding puck** (a highlight glides from the old chevron to the new one and settles), **B Ripple** (each chevron between old and new lights in turn), **C Ghost crossfade** (the old highlight fades out while the new one fades in with a slight slide), **D Comet** (a streak with a bright head travels the strip and lands on the destination), **E Destination bump** (the destination chevron scales briefly with a fading direction arrow), or **F Colour wash** (default β€” a tinted sweep flows across the intermediate chevrons). Each option has a *Preview* button that plays the full flash β†’ move β†’ land sequence on a sample row inside the dialog. The choice is remembered per browser (`localStorage` key `hiveStageTrackerMotion`). Items that stay put never move; a row that leaves the list (merged, closed, or filtered away) collapses and fades out over `--ham-move-exit-ms` and a row that arrives fades in over `--ham-move-enter-ms`; nothing animates on first load, and at most twelve rows animate per refresh (a filter or page change that turns over more rows than that redraws at once). The list is reconciled row by row on every refresh rather than rebuilt, so a move keeps playing while the hive keeps publishing. When the operating system asks for reduced motion (`prefers-reduced-motion: reduce`), every style falls back to a single soft flash followed by a plain crossfade and departing rows only fade, regardless of the setting; **None** disables the flash, the effect and the row fades entirely. Durations, the flash timing (`--ham-move-flash-ms`, `--ham-move-flash-gap-ms`, `--ham-move-flash-count`) and tints come from the `--ham-move-*` tokens in `tokens.css`.

Expand Down
3 changes: 2 additions & 1 deletion src/pkg/dashboard/stage_tracker_merge_sound_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestStageTrackerMergeSoundWiring(t *testing.T) {
`window.AudioContext || window.webkitAudioContext`,
`if (ctx.state === 'running') return stageTrackerScheduleVoices(ctx, voice, count, gain, startOffsetS);`,
`stageTrackerResumeContext(ctx, STAGE_TRACKER_AUTO_RESUME_MS).then(`,
`() => stageTrackerSoundPrime());`,
`() => stageTrackerSoundHeldNotice(true));`,
`high.type = 'highpass';`,
`data[i] = snap + sizzle * env;`,
`ctx.createBufferSource()`,
Expand Down Expand Up @@ -504,6 +504,7 @@ func TestStageTrackerSoundSelection(t *testing.T) {
"function stageTrackerZapVoice(ctx, out, at) { out.voices.push('zap'); }",
"function stageTrackerBuzzVoice(ctx, out, at) { out.voices.push('buzz'); }",
"function stageTrackerSoundPrime() {}",
"function stageTrackerSoundHeldNotice() {} function stageTrackerSoundHeldClear() {}",
"function stageTrackerSoundSyncButton() {}",
"function stageTrackerRenderSettings() {}",
"function stageTrackerPlayTest() {}",
Expand Down
Loading
Loading