3 months ago
11c290dThe composer's upload progress bar animated with Math.random() on a 500ms tick up to 95% then snapped to 100%, lying to users about large uploads. There is no server-side byte-progress signal at any layer (attachments transfer as atomic payloads: inline base64, native file copy, or a single JSON-RPC upload), so the honest fix is an indeterminate bar driven only by the known uploading/ preparing state. - components/ui/progress.tsx: add indeterminate prop -> renders a third-width slug animated across the track via a new app-progress-indeterminate keyframe; exposes aria-busy + role=progressbar with no aria-valuenow (WAI-ARIA indeterminate pattern). - styles.css: add app-progress-indeterminate keyframe + prefers-reduced-motion fallback (static half-bar instead of motion). - ChatView.tsx: delete the uploadProgress state and Math.random/setInterval effect; pass only the existing isUploading boolean to ChatComposer. - ChatComposer.tsx: drop the uploadProgress prop, render <Progress indeterminate>, remove the fake % text, and add role=status / aria-busy / aria-live=polite. - test/progress.test.tsx: lock in indeterminate vs determinate rendering.
Parent386b936