feature nvs: blob upload#110
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThis PR adds blob upload and replacement functionality to the NVS editor's Blobs dialog. Users can select a local file to replace an existing blob, and the editor distributes the file bytes across the blob's data chunk entries, updates size and CRC checksums, synchronizes the blob index if present, re-parses the NVS data, and refreshes the UI. ChangesBlob Upload and Replacement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
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 `@js/nvs-editor.js`:
- Around line 1815-1892: The loop over dataEntries must track how many chunk
slots are actually populated and erase any trailing unused slots instead of
leaving them as zero-sized orphan chunks; inside the for (const { item, maxSize
} of dataEntries) loop, increment a populatedChunks counter when writeLen > 0,
and when writeLen === 0 invoke the same erase/bitmap-zeroing logic used by
_deleteEntry (wipe the slot payload/header and clear its bitmap flag) rather
than only setting size=0 and header CRC; after the loop, if
blob.indexEntry/datatype === 0x48 update its totalSize (at idxOff + 24) and also
write the new chunkCount (at idxOff + 28) to populatedChunks, then recompute and
write the header CRC via NVSEditor.crc32Header (as currently done) so the index
entry and bitmap stay consistent with actual populated chunks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
@coderabbitai is the NVS blob write solid with commit 3f7e648 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainLet me read the implementation carefully before answering. 🏁 Script executed: Length of output: 65408
✅ What's correct
|
Summary by CodeRabbit