Repository navigation
fix(ui): resolve file and folder picker buttons not adding inputs - #6
Conversation
- return paths in inputs:pick-files and inputs:pick-folder IPC handlers - directly merge already-scanned list in UI button handlers or fallback to addPaths
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughFile and folder picker IPC responses now include selected paths with pre-scanned input data. The renderer consumes returned lists directly, displays the truncation notice when needed, and retains path-based processing as a fallback. ChangesFile and folder picker inputs
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Picker selections now merge the scanned inputs into the table while preserving the existing path-processing behavior. No concrete introduced regression remains; the change appears ready to merge with normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
Autopilot could not be updated. Open Coding to check access and billing. |
Summary
Fixes an issue where clicking the "Add files..." (
btn-add-files) or "Add folder..." (btn-add-folder) buttons failed to add any selected files to the input table (the list remained at 0 files), even though dragging and dropping files worked normally.Root Cause
inputs:pick-filesandinputs:pick-folderIPC handlers inmain.jsreturned{ ok: true, ...buildInputs(r.filePaths) }, which containslistandtruncated, but does not return apathsproperty.app.js, the click handlers calledawait addPaths(r.paths). Becauser.pathswasundefined,addPathsaborted early (if (!paths || !paths.length) return), causing selected files to be silently dropped.addFileObjects, which directly resolved absolute paths from the dropped file objects and passed a valid array of path strings toaddPaths.Changes
ui/src/main.js:paths: r.filePathsin the return object ofinputs:pick-filesandinputs:pick-folder.ui/src/renderer/app.js:btn-add-filesandbtn-add-folder, directly merge the already scannedr.listviamergeInputs(r.list)(avoiding a redundant second filesystem scan across all selected files), with fallback toaddPaths(r.paths).Verification
npm run smoke).Summary by CodeRabbit