Skip to content

ux(wasm): polished demo — progress bar, mobile, two-phase UI#31

Merged
unamedkr merged 1 commit intomainfrom
ux/wasm-polish
Apr 10, 2026
Merged

ux(wasm): polished demo — progress bar, mobile, two-phase UI#31
unamedkr merged 1 commit intomainfrom
ux/wasm-polish

Conversation

@unamedkr
Copy link
Copy Markdown
Collaborator

Summary

Complete UX overhaul based on hands-on testing. Every rough edge found has been addressed.

Before → After

Area Before After
Layout Single page, dropzone stays visible Two-phase: onboard → chat (clean transition)
Input <input> single line <textarea> auto-resize, Shift+Enter for newlines
Download Text-only "Downloading 45%" Visual progress bar with fill animation
Generation No way to stop Stop button (Send/Stop toggle)
Mobile Scroll bounce, cards overflow 100dvh, responsive cards, no zoom on focus
Header Empty after load Shows model name + size
Stats Sparse Model name + tokens + tok/s
System messages 3 redundant messages Zero — info moved to header/stats
Cache detect Broken (text matching + toLowerCase) Stable (explicit cardId/metaId)
Bugs generating=false set twice Fixed

Test plan

  • Click Qwen3.5 → progress bar fills → chat screen appears
  • Cached reload → "Cached — instant load" badge → instant transition
  • Type message → Thinking... → streaming tokens → Stop works
  • Shift+Enter inserts newline, Enter sends
  • Mobile viewport: no scroll bounce, cards stack vertically
  • Drop custom GGUF file → loads correctly

🤖 Generated with Claude Code

Complete UX overhaul of the WASM browser demo:

UI Architecture:
- Two-phase layout: onboarding screen → chat screen (clean transition)
- Onboarding hidden after model load, chat area takes full viewport
- 100dvh layout with overflow: hidden — no scroll bounce on mobile
- Model name + size shown in header bar after load

Input:
- Replaced <input> with auto-resizing <textarea> (Shift+Enter for newline)
- Stop button appears during generation (Send/Stop toggle)

Progress:
- Visual progress bar with fill animation during download
- Percentage + MB counter overlay
- "Cached — instant load" badge auto-detected on page load

Chat:
- Chat bubbles with directional radius (user right-aligned, assistant left)
- Max-width 85% for readability
- Removed redundant system messages (Runtime ready, Model loaded)
- Model info moved to header bar and stats bar

Stats:
- Model name + token count + tok/s in compact footer
- "prefill..." shown during prompt processing

Mobile:
- Responsive card layout (stacks vertically on <600px)
- viewport maximum-scale=1.0 prevents zoom on input focus
- Compact padding and font sizes

Bug fixes:
- Removed double-set of generating=false
- Cache detection uses stable cardId/metaId instead of text matching
- Model cards properly disabled during download

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@unamedkr unamedkr merged commit 3fdbaf6 into main Apr 10, 2026
@unamedkr unamedkr deleted the ux/wasm-polish branch April 10, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant