Skip to content

[codex] Add desktop local file editor#45

Merged
Fredoq merged 3 commits into
mainfrom
feature/local-track-file-editor
May 30, 2026
Merged

[codex] Add desktop local file editor#45
Fredoq merged 3 commits into
mainfrom
feature/local-track-file-editor

Conversation

@Fredoq
Copy link
Copy Markdown
Owner

@Fredoq Fredoq commented May 30, 2026

Summary

  • Add desktop-only local file editing for release and track flows, with separate File names and Tags modes.
  • Add Electron local edit inspection/apply bridge using music-metadata and taglib-wasm, including operation logs, overwrite validation, and tag-only writes.
  • Add settings UI for naming profiles and tag role mappings, plus import artist/label suggestions and tests for the local edit flows.

Notes

  • Browser mode still hides local filesystem editing controls.
  • The downloadable macOS desktop build was rebuilt after the latest tag serialization changes.

Validation

  • npm test
  • npm run lint
  • npm run build
  • npm run desktop:package:mac

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Warning

Review limit reached

@Fredoq, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3cd08102-37cc-423f-ac3d-72b7201c18fe

📥 Commits

Reviewing files that changed from the base of the PR and between 2cadbf3 and f9f8dbf.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (51)
  • .superdesign/design-system.md
  • .superdesign/init/components.md
  • .superdesign/init/extractable-components.md
  • .superdesign/init/layouts.md
  • .superdesign/init/pages.md
  • .superdesign/init/routes.md
  • .superdesign/init/theme.md
  • electron/local-edits.cjs
  • electron/local-edits.test.cjs
  • electron/main.cjs
  • electron/preload-contract.test.cjs
  • electron/preload.cjs
  • package.json
  • src/App.local-file-editor.test.tsx
  • src/App.local-file-tag-editor.test.tsx
  • src/App.settings-navigation.test.tsx
  • src/app/renderWorkspace.tsx
  • src/desktop.d.ts
  • src/features/catalog/api/catalogDefaults.ts
  • src/features/catalog/api/catalogEntityMappers.ts
  • src/features/catalog/api/catalogTypes.ts
  • src/features/catalog/api/httpClient.ts
  • src/features/catalog/api/ownedItemsClient.ts
  • src/features/catalog/api/settingsClient.ts
  • src/features/catalog/api/testCatalogStore.ts
  • src/features/imports/ImportArtistCreditsEditor.tsx
  • src/features/imports/ImportEntitySuggestions.test.tsx
  • src/features/imports/ImportEntitySuggestions.tsx
  • src/features/imports/ImportLabelsEditor.tsx
  • src/features/imports/importEntitySuggestionHooks.ts
  • src/features/localFiles/LocalFileEditPanel.tsx
  • src/features/localFiles/LocalFileNameEditor.tsx
  • src/features/localFiles/LocalFileTagEditor.tsx
  • src/features/localFiles/local-file-tags.css
  • src/features/localFiles/local-files.css
  • src/features/localFiles/localFileEditHelpers.ts
  • src/features/localFiles/localFileEditModel.test.ts
  • src/features/localFiles/localFileEditModel.ts
  • src/features/localFiles/localFileEditTypes.ts
  • src/features/releases/ReleaseDetail.tsx
  • src/features/releases/ReleasesWorkspace.tsx
  • src/features/settings/NamingProfileSettings.tsx
  • src/features/settings/SettingsWorkspace.tsx
  • src/features/settings/TagRoleMappingSettings.tsx
  • src/features/settings/settings.css
  • src/features/settings/settingsModel.ts
  • src/features/settings/settingsShared.tsx
  • src/features/tracks/TrackDetail.tsx
  • src/features/tracks/TracksWorkspace.tsx
  • src/features/tracks/tracksData.ts
  • src/test/appTestHarness.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/local-track-file-editor

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread electron/main.cjs Outdated
Comment on lines +112 to +115
ipcMain.handle('cratebase:local-edits:apply', async (_event, request) => {
return await applyLocalEdits(request, {
logRoot: path.join(app.getPath('userData'), 'local-edit-operation-logs'),
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Fredoq
Copy link
Copy Markdown
Owner Author

Fredoq commented May 30, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Fredoq Fredoq merged commit 4ef2859 into main May 30, 2026
2 checks passed
@Fredoq Fredoq deleted the feature/local-track-file-editor branch May 30, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant