Skip to content

fix(ui): revalidate request list after approving or declining a request#3283

Open
aaamoeder wants to merge 3 commits into
seerr-team:developfrom
aaamoeder:fix-request-list-revalidate
Open

fix(ui): revalidate request list after approving or declining a request#3283
aaamoeder wants to merge 3 commits into
seerr-team:developfrom
aaamoeder:fix-request-list-revalidate

Conversation

@aaamoeder

@aaamoeder aaamoeder commented Jul 22, 2026

Copy link
Copy Markdown

Description

When approving or declining a request from the request list, only the individual request item and the request counts are revalidated — the list itself is not. With the default "Pending" filter active, the approved/declined request therefore stays visible in the list until a full page refresh.

The delete actions in the same component (deleteRequest, deleteMediaFile) already call revalidateList() after their API call; modifyRequest does not. This PR adds that call to modifyRequest so the list updates immediately after approving or declining, consistent with the existing delete behavior.

I could not find an open issue for this; it is reproducible on 3.3.0 and current develop.

How Has This Been Tested?

  • Applied the patch to a 3.3.0 Docker build and deployed it on a live instance (Jellyfin flavor, ~900 requests). With the "Pending" filter active, approving or declining a request now removes it from the list immediately; before the patch it remained visible until a page refresh.
  • pnpm build succeeds.
  • pnpm i18n:extract produces no changes (no new translation keys).

Screenshots / Logs (if applicable)

N/A — one-line behavioral fix.

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly. (not applicable — no documentation changes required)
  • All new and existing tests passed. (Cypress e2e suite not run locally; no existing tests cover this code path as far as I can tell)
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required) (not applicable)

AI Disclosure: This fix was identified and authored with AI assistance (Claude Code). I reviewed the one-line change myself and verified the resulting behavior on my own live instance before submitting.

Summary by CodeRabbit

  • Bug Fixes
    • Request lists now refresh immediately after a request is successfully modified.
    • Request counts and existing success/error notifications continue to update as expected.

@aaamoeder
aaamoeder requested a review from a team as a code owner July 22, 2026 12:50
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 21117fef-bbfb-46b9-a827-e26ae2543882

📥 Commits

Reviewing files that changed from the base of the PR and between 0adbf50 and 179e535.

📒 Files selected for processing (1)
  • src/components/RequestList/RequestItem/index.tsx

📝 Walkthrough

Walkthrough

After a successful request modification, RequestItem now calls revalidateList() alongside the existing SWR revalidation and request-count cache mutation. Failure handling and toast behavior are unchanged.

Changes

Request modification flow

Layer / File(s) Summary
Revalidate the request list
src/components/RequestList/RequestItem/index.tsx
The successful modifyRequest path now invokes revalidateList() after the modification POST.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: gauthier-th

Poem

A rabbit taps the refresh button bright,
The request list hops to updated sight.
POST succeeds, the data gleams,
Counts and rows align like dreams.
One small call, and all is right!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: revalidating the request list after approving or declining a request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

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