fix: preserve metadata overrides and upload job state#167
Conversation
|
Warning Review limit reached
More reviews will be available in 17 minutes and 43 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (17)
📝 WalkthroughWalkthroughAdds a ChangesCLI UseSeasonEpisode flag and override signature keying
MetadataOverrides end-to-end propagation
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@gui/frontend/src/app.tsx`:
- Around line 1443-1476: The metadata override builder in metadataOverrideState
is still serializing cleared text fields as empty strings. Update the
Distributor and OriginalLanguage handling so touched-but-empty edits are treated
as unset (not emitted in overrides), letting normalizeMetadataOverrides drop
them and revert to auto behavior. Use the existing metadataTouched,
metadataEdits, and normalizeMetadataOverrides flow to ensure only non-empty text
overrides are written.
In `@gui/frontend/src/hooks/useScreenshots.ts`:
- Around line 144-145: The screenshot follow-up mutations in useScreenshots are
using the live metadataOverrideState at click time, which can drift from the
snapshot used when the screenshots were loaded. Capture and reuse the same
normalized override snapshot from the initial load path (the call that uses
normalizeMetadataOverrides in useScreenshots) for the save/delete/update flows,
and thread that snapshot through the relevant handlers instead of reading
current overrides again. Make sure the handlers around the follow-up calls in
useScreenshots all reference the same loaded override state so the UI plan and
the mutation target stay aligned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 62da0244-2c1d-469b-b193-fc8cd46688c1
📒 Files selected for processing (28)
cmd/upbrr/cli_options.gocmd/upbrr/cli_options_test.gocmd/upbrr/main.gogui/frontend/src/app.test.tsgui/frontend/src/app.tsxgui/frontend/src/hooks/useScreenshots.tsgui/frontend/src/hooks/useUploadImages.tsgui/frontend/src/pages/input/index.tsxgui/frontend/src/pages/menu_images/index.tsxgui/frontend/src/types.tsgui/frontend/src/utils/helpers.test.tsgui/frontend/src/utils/helpers.tsgui/frontend/src/utils/index.tsgui/frontend/src/utils/runtime.test.tsgui/frontend/src/utils/runtime.tsinternal/core/core.gointernal/core/description_builder_test.gointernal/guiapp/app.gointernal/guiapp/app_core_test.gointernal/guiapp/dupe_jobs.gointernal/guiapp/run_options_test.gointernal/guiapp/upload_jobs.gointernal/webserver/app_routes.gointernal/webserver/backend.gointernal/webserver/backend_repo_test.gointernal/webserver/jobs.gopkg/api/core.gopkg/api/services.go
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 `@gui/frontend/src/hooks/useScreenshots.ts`:
- Line 65: The screenshot flow only snapshots MetadataOverrides in
useScreenshots, so later preview/capture/upload work can still read live
idOverrideState and releaseOverrideState from app.tsx and drift from the loaded
plan. Update the plan-loading path to persist the full override tuple together
with the loaded plan, using the existing loadedMetadataOverridesRef and the
related screenshot workflow entry points, then make screenshot
preview/capture/upload-candidate reuse that stored snapshot instead of current
override state. Keep the loaded ID and release overrides bound to the same
snapshot across the remaining screenshot steps.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 17bc02d6-da06-429d-a0df-6b67204e5496
📒 Files selected for processing (3)
gui/frontend/src/app.test.tsgui/frontend/src/app.tsxgui/frontend/src/hooks/useScreenshots.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- gui/frontend/src/app.test.ts
- gui/frontend/src/app.tsx
Summary by CodeRabbit
season-episodeCLI/app release override (including help text and flag alias support).