Skip to content

Redesign example app with task-based download manager UI#25

Merged
linroid merged 7 commits intomainfrom
redesign-example-app
Feb 8, 2026
Merged

Redesign example app with task-based download manager UI#25
linroid merged 7 commits intomainfrom
redesign-example-app

Conversation

@linroid
Copy link
Owner

@linroid linroid commented Feb 8, 2026

Summary

  • Replace static sample file sections with a dynamic download task list
  • Add Material 3 Scaffold layout with TopAppBar, FAB, and LazyColumn
  • Add download dialog with URL input and auto-filled filename
  • Each task card shows status badge, filename, URL, progress bar, speed, and state-specific action buttons (pause/resume/cancel/retry/remove)
  • Support task restoration on app launch via kdown.restoreTasks()
  • Add dismissible error banner for failed download starts
  • Show paused state with frozen progress bar and percentage
  • Verified builds on all 5 platforms: JVM, WasmJs, iOS Arm64, iOS Simulator Arm64, Android

Test plan

  • Run desktop app and verify empty state displays correctly
  • Add a download via FAB → dialog and verify filename auto-fills from URL
  • Verify progress bar and speed stats update during download
  • Test pause/resume/cancel operations
  • Test retry on failed/canceled downloads
  • Test remove on completed/failed/canceled tasks
  • Verify URL validation rejects non-http URLs
  • Verify builds on all platforms: ./gradlew :examples:app:compileKotlinJvm :examples:app:compileKotlinWasmJs

🤖 Generated with Claude Code

Replace static sample file sections with a dynamic download task list using
Material 3 Scaffold, LazyColumn, and FAB. Features: add download dialog with
URL auto-fill, per-task status badges, live progress tracking, state-specific
action buttons (pause/resume/cancel/retry/remove), error banners, and task
restoration on launch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

Test Results

128 tests  ±0   128 ✅ ±0   0s ⏱️ ±0s
 15 suites ±0     0 💤 ±0 
 15 files   ±0     0 ❌ ±0 

Results for commit bb74d49. ± Comparison against base commit 307b565.

♻️ This comment has been updated with latest results.

linroid and others added 6 commits February 8, 2026 16:26
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Pause: tonal icon button (secondary emphasis)
- Resume: filled icon button (primary, most prominent action)
- Cancel: icon button with error color
- Retry: tonal icon button
- Remove/Delete: icon button with error color
- FAB: Add icon instead of "+" text
- Add material-icons-extended dependency for Pause, PlayArrow,
  Close, Delete, Refresh, and Add icons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Tap task card to toggle pause/resume (downloading taps to pause,
  paused taps to resume)
- Replace text action buttons with icon buttons:
  - Cancel (Close icon, error color) for active/paused tasks
  - Remove (Delete icon, error color) for paused/completed/failed tasks
  - Retry (Refresh icon, tonal) for failed/canceled tasks
  - Add (Add icon) for FAB
- Keep cancel and remove as separate operations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After canceling, remove the DownloadTask from activeTasks so the UI
falls back to the TaskRecord state (CANCELED) instead of showing the
stale live state. This was especially visible when canceling a paused
task, since the coordinator already removed the ActiveDownload during
pause and couldn't update the stateFlow on cancel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linroid linroid merged commit 355ac45 into main Feb 8, 2026
6 checks passed
@linroid linroid deleted the redesign-example-app branch February 8, 2026 09:22
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