feat(voice): redesign voice-message composer UI (LC-499) #461
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-499-voice-composer-ui"
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?
What
Polish the voice-message composer UI (LC-499). The feature worked but both states were bare text. Pure frontend - Askama + HTMX + Tailwind + vanilla JS; no server/route/data changes.
Changes
Recording state - a styled card anchored above the input: pulsing red dot, prominent elapsed-time counter, a live mic-level meter driven by a Web Audio AnalyserNode (confirms the mic is actually capturing), and Stop (primary) + Cancel (subtle) as distinct buttons. The mic button itself now shows an obvious recording state (danger tint + ring) instead of just a color change.
Recorded-and-attached state - a playback preview that reuses the timeline
.lc-voiceplayer (play/pause + waveform + duration) so the user can listen before sending, plus a labeled Re-record action and a Remove (trash) button replacing the cryptic "x".Edge states & feedback - styled, actionable: mic-permission denied (with how-to-fix help), unsupported browser, start-failed, empty recording, upload-in-progress (Send disabled + spinner), and upload error (clear message + Retry that re-sends the retained blob, no re-record needed).
Sent voice messages - confirmed the timeline already renders a proper player (
partials/attachment.html+ the layout voice player); no change needed.How
composer.htmlvoice IIFE rewritten: styled recording card, AnalyserNode level meter, preview via the shared player, progress/error/retry flow; Send held disabled during upload via a new__lcUploadBusyflag in the shared__lcRefreshSendpredicate.layout.htmlexposeswindow.__lcScanVoiceso the composer can init the preview player it injects directly (no htmx swap fires for it).main.csstoken-driven (light/dark) styles; honorsprefers-reduced-motion.__lcI18n(en + es).Tests
just check(fmt + clippy, both builds),just test,just test-saasall green. This is frontend-only; the authed composer can't be exercised headlessly in CI (SSO-only login), so it was verified by build/check/tests + code review against the reference mockups.just verifybuilds the release binary clean (boot blocked only by the missing SSO env, as in prior PRs).