Show MyPressKit download progress and remember output format - #103
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR adds validated output-format hydration and persistence, throttles download progress reporting, improves progress rendering for unknown sizes, and applies backpressure to ChangesOutput format hydration
Download progress reporting
Response stream backpressure
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant App
participant URLParser
participant LocalStorage
Browser->>App: start application
App->>URLParser: readRequestedOutputFormat(search)
App->>LocalStorage: readStoredOutputFormat(storage, key)
URLParser-->>App: validated OutputFormat or null
LocalStorage-->>App: validated OutputFormat or null
App->>LocalStorage: persist selected output format
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@webui/src/components/App.tsx`:
- Around line 1533-1555: Update the progress rendering conditions in the job
progress UI around the progress bar and stats to treat numeric totalBytes
values, including 0, as known totals. Replace truthiness checks on
job.progress?.totalBytes with an explicit numeric validation, preserving
indeterminate rendering and omitted totals only when totalBytes is absent or
non-numeric.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 80eba19f-6825-4b37-83fe-259cfc316dd9
📒 Files selected for processing (6)
src/deepLink.test.tssrc/mypresskit.tssrc/safeOutboundUrl.tssrc/types.tswebui/src/components/App.tsxwebui/src/components/deepLink.ts
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
MyPressKit downloads often stream without
Content-Length, so the Web UI stayed at 0% until metadata. Progress now updates from received bytes (with an indeterminate bar when the total is unknown), andsafeFetchapplies backpressure so progress isn't skipped while the body buffers.The selected output format is also persisted in
localStorageand restored on reload, matching browser mode.Test plan
Content-Lengthstill shows a normal percentage bar?outputFormat=flacand confirm that overrides the stored preferenceMade with composer in Cursor
Summary by CodeRabbit
New Features
Bug Fixes