[codex] Add desktop local file editor#45
Conversation
|
Warning Review limit reached
More reviews will be available in 35 minutes and 49 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (51)
✨ 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30f968e24c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ipcMain.handle('cratebase:local-edits:apply', async (_event, request) => { | ||
| return await applyLocalEdits(request, { | ||
| logRoot: path.join(app.getPath('userData'), 'local-edit-operation-logs'), | ||
| }) |
There was a problem hiding this comment.
Gate local edit IPC before touching arbitrary paths
In the desktop app, any script running in the renderer can call this handler with arbitrary absolute currentPath/targetPath values, and applyLocalEdits will rename files or write tags without checking that the path belongs to the authenticated catalog item. If the renderer ever renders malicious metadata or has an XSS bug, this bridge turns it into arbitrary local file modification; the main process should validate the requested ownedItemId/path against trusted backend state or a user-approved file scope before applying edits.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in f9f8dbf. The Electron main process now verifies each local edit request against the authenticated owned item from the backend before inspect, preview, or apply can touch the filesystem, and target paths are constrained to the verified local edit scope.
| } | ||
| }, [entityType, normalizedQuery]) | ||
|
|
||
| return normalizedQuery.length < minimumQueryLength ? [] : suggestions |
There was a problem hiding this comment.
Clear stale import suggestions on query change
After suggestions for one query have loaded, changing to another 2+ character query keeps returning the previous suggestions until the debounced search finishes. During that window the artist/label editor shows stale rows, and clicking one adds the wrong existing entity ID for the current input; clear the state when normalizedQuery or entityType changes or associate results with the query they came from.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in f9f8dbf. Import suggestions now carry the query/entity they were loaded for, and the hook returns an empty list while the current query is waiting for its own debounced result. Added a regression test for stale artist suggestions.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
music-metadataandtaglib-wasm, including operation logs, overwrite validation, and tag-only writes.Notes
Validation
npm testnpm run lintnpm run buildnpm run desktop:package:mac