Skip to content

fix(ui): preserve flash message after keyboard refresh all feeds#4360

Open
leno23 wants to merge 1 commit into
miniflux:mainfrom
leno23:fix/keyboard-refresh-all-feeds-flash-message
Open

fix(ui): preserve flash message after keyboard refresh all feeds#4360
leno23 wants to merge 1 commit into
miniflux:mainfrom
leno23:fix/keyboard-refresh-all-feeds-flash-message

Conversation

@leno23

@leno23 leno23 commented May 25, 2026

Copy link
Copy Markdown

Summary

  • Fix the R keyboard shortcut not showing the success alert after refreshing all feeds
  • Use fetch with redirect: "manual" so session flash messages are not consumed before browser navigation
  • Reuse the same navigation helper for generic confirmation POST actions that rely on flash messages

Root cause

The keyboard shortcut POSTed to /feeds/refresh via fetch, which automatically followed the redirect to /feeds. That internal redirect request consumed the session flash message before window.location.href navigation, so the success alert was missing.

The menu button uses a native form POST + redirect, so the flash message was shown correctly.

Test plan

  • On /unread, press R to refresh all feeds
  • Verify the success alert appears after navigation to /feeds
  • Verify the "Refresh all feeds" menu button still shows the same alert
  • Verify other confirmation POST actions with flash messages still work

Fixes #4358

Use fetch redirect: manual for POST actions that rely on session flash
messages. Automatic redirect following consumed the success alert before
the browser navigation, so the R shortcut did not show the same feedback
as the menu button.

Fixes miniflux#4358

Co-authored-by: Cursor <cursoragent@cursor.com>

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

Copy link
Copy Markdown

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: e29a21e1ba

ℹ️ 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 on lines +54 to +55
const locationHeader = response.headers.get("Location");
if (locationHeader) {

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 Handle opaque redirect responses before navigating

This helper assumes it can read Location/redirect info after sendPOSTRequest(..., { redirect: "manual" }), but browser fetch returns an opaqueredirect response for server 302s in manual mode (empty headers and no usable redirect target). As a result, both redirect checks fail and execution falls through to window.location.reload(), so actions like /feeds/refresh do not navigate to the server’s redirect destination (/feeds) and the intended flash-message flow is still broken.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Inconsistent visual feedback between "Refresh all feeds" menu and the R keyboard shortcut

1 participant