fix: Alerts editor layout, collapsible linked accounts, and test alert #107
No reviewers
Labels
No labels
auth
autorelease: pending
autorelease: tagged
bug
dependencies
devops
docker
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
javascript
maintenance
question
refactor
ui
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gitchegumi/GitchAlerts!107
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/alerts-editor-layout-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses four issues on the Alerts editor page.
Changes
1. Canvas jump + non-scrollable Alerts tab
The left panel is a grid item without
min-height: 0, so tall tab content (the Alerts list) grew the shell's middle1frrow past the viewport, pushing the stage down and clipping everything below the fold — which also prevented the list itself from scrolling. Capping the panel height lets the existingoverflow: autoon the tab panel take over. The Alerts list now scrolls and the canvas stays anchored to the top when switching tabs.2. Collapsible linked accounts
LinkedAccountBannergains acollapsibleprop (enabled on the Alerts page). It renders collapsed by default as a single header row with a connected-count summary (e.g. "Linked accounts · 2 connected") and a chevron toggle, and auto-expands after an OAuth connect/error so the result is still visible. Default behavior elsewhere is unchanged.3. Test alert button did nothing visible
It fired
manual.test(which bound canvases ignore, so nothing rendered in OBS) and the editor "preview" only swapped placeholder text values. The top-bar button now defaults to the first event key actually bound to the canvas (falling back tomanual.testfor unbound canvases), plays the canvas alert sound at its configured volume, and replays each element's entrance animation in the editor preview using the same keyframes as the live overlay. The per-alert Test buttons share this path.4. Removed "Live in OBS" pill
It was styling on the profile's
isActiveflag with no real signal. Removed from the top bar along with its unused CSS.Testing
pnpm --filter @multi-stream-alerts/web typecheck— passespnpm --filter @multi-stream-alerts/web test— 157/157 pass🤖 Generated with Claude Code
Dock, reviewed PR #107 — approving. Clean PR that addresses four real UX bugs on the Alerts editor page. CI is all green (typecheck, tests 157/157, lint, build, security scans), I re-ran typecheck and tests locally against the PR branch and both pass.
What the PR does
Canvas jump + non-scrollable Alerts tab — Adds
min-height: 0to the left panel's grid shell. Correct fix for the CSS grid1frrow overflow issue — without it, tall tab content expands the row past the viewport, pushing the stage down and clipping the list. The existingoverflow: autoon the tab panel now works as intended. Clean.Collapsible linked accounts — New
collapsibleprop onLinkedAccountBanner, enabled only on the Alerts page. Defaults to collapsed with a connected-count summary, auto-expands on OAuth connect/error. Default behavior unchanged elsewhere (only one call site, and it's the only consumer). Good use ofaria-expanded, button semantics are correct.Test alert button did nothing visible — Three-part fix, all sound:
alertEventKeys[0]withmanual.testfallback for unbound canvases. Matches the overlay's behavior (bound canvases ignore unassigned keys).new Audio(). MirrorsOverlayClient.tsx:68-89almost exactly — sameMath.max(0, Math.min(1, volume / 100))clamp, same.catch()for autoplay restrictions.${element.id}-${previewAlert?.id}) and settinganimationName/animationDurationconditionally oneditor.previewAlert. TheanimationNamehelper is a direct copy of the one inOverlayClient.tsx:215-220— same keyframe names, same fallback.Removed "Live in OBS" pill — Removed from
EditorTopBar.tsxand its CSS fromglobals.css. Grep confirms zero remaining references tocanvas-editor-live-badge,canvas-editor-live-dot, or "Live in OBS" in the codebase. Clean removal.Observations (non-blocking)
animationNamehelper —EditorStage.tsx:278-282andOverlayClient.tsx:215-220are identical. Could be extracted to a shared util, but given it's 4 lines and the two files serve different purposes (live overlay vs editor preview), the duplication is acceptable. Not worth a refactor here.collapsiblebehavior — The existingLinkedAccountBanner.test.tsonly testsgetLinkStatus. The collapse/expand logic andconnectedCountsummary are untested. CI passes because the tests run against pure functions, not the component. Worth adding a test in a follow-up but not blocking.testAlertaudio usesnew Audio()in the hook — Same pattern as the overlay client, and the.catch()swallows autoplay errors silently, which is the right call for a preview button.Verification
pnpm --filter @multi-stream-alerts/web typecheck— passespnpm --filter @multi-stream-alerts/web test— 157/157 pass🛶 Approving — ready to merge.
💡 Suggestion (non-blocking): The collapse/expand logic and
connectedCountsummary are untested —LinkedAccountBanner.test.tsonly coversgetLinkStatus. Worth adding component-level tests for thecollapsibleprop in a follow-up.💡 Suggestion (non-blocking): The
animationNamehelper here is identical to the one inOverlayClient.tsx:215-220. Consider extracting to a sharedcanvasUtils.tsin a follow-up if more shared logic accumulates between the overlay and editor preview. Not worth a refactor for 4 lines today.