Show import upload progress toast for PPTX and DOCX#299
Conversation
Importing a .pptx/.docx uploads embedded images serially with no UI feedback during the upload phase. Capture the brainstormed design for a live toast.loading 'Uploading images X / N' that morphs into the existing success/error toast. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Switch the design from threading a progress counter through every parse context to wrapping the injected uploader once at the single injection point — same behavior, far fewer files touched. Add the bite-sized TDD plan. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Add onProgress callback to ImportPptxOptions. Wrap the injected uploadImage once at the single injection point in index.ts: count image files under ppt/media/ as total, emit (0, total) up-front, then bump done in a finally block after each upload so soft-failed uploads still advance the bar. Export EXT_TO_MIME from image.ts so index.ts can filter the media list to image files only. Extend the fixture builder with imageCount so progress tests can generate decks with embedded images. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Wrap the injected imageUploader once at the top of DocxImporter.import to emit onProgress(done, total) without threading a counter through uploadImages/parseHeaderFooter. total = word/media/ image-file count; done increments in a finally so a soft-failed upload still advances. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Wire onProgress from importPptx/DocxImporter through the action helpers into the document-list handlers so a live loading toast tracks image upload progress and morphs in place into the final success or error toast. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Capture the implementation outcome, risk notes, known limitations, and lessons (wrapper-at-injection-point, finally-invariant, pragmatic denominator, commit-hook gotcha) and index the paired task docs. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 27 minutes and 31 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Verification: verify:selfResult: ✅ PASS in 182.5s
Verification: verify:integrationResult: ✅ PASS |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
These tasks landed on main per recent commit log: docker-publish-arm64 (#296), import-progress-toast (#299), pptx-blipfill-fillrect-crop (#297), release-v0.4.2 (#295), slides-textbox-autogrow (cf83a49), and slides-textbox-edit-theme-color (#300). Move their docs to archive/2026/05 and regenerate the task indexes. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
These tasks landed on main per recent commit log: docker-publish-arm64 (#296), import-progress-toast (#299), pptx-blipfill-fillrect-crop (#297), release-v0.4.2 (#295), slides-textbox-autogrow (cf83a49), and slides-textbox-edit-theme-color (#300). Move their docs to archive/2026/05 and regenerate the task indexes. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Importing a
.pptx/.docxfrom the document list uploads each embeddedimage serially to
/imageswith no UI feedback — only the Import buttonsare disabled. This adds a live
toast.loading"Uploading images X / N"during the upload phase that morphs in place into the existing
success/error toast.
onProgress—importPptx(options field) andDocxImporter.import(optional 3rd positional param). Implemented bywrapping the single injected upload callback at its one injection point
(no counter threaded through parse contexts).
donebumps in afinally, so a soft-failed upload still advances the bar.total= image-file count underppt/media//word/media/— apragmatic denominator; drift is clamped with
Math.minand overriddenby the final toast.
pickAndImport*forward{ done, total, fileName };the document-list handlers lazily create the toast on the first
progress tick (so a cancelled picker shows no toast) and morph it into
the existing success/error toast in place.
onProgressis optional everywhere; CLI andexisting callers are unchanged.
Test plan
pnpm verify:selfgreen (lint, all unit tests, all builds,dead-code, doc-staleness)
images; DOCX: progress, zero images
pnpm dev: import an image-heavy.pptxand.docx; confirm the toast appears only after a file is chosen,counts
X / Nupward, morphs to success on completion, shows notoast on picker cancel, and morphs to error on failure
🤖 Generated with Claude Code