Skip to content

fix(email): preserve reader folder for message actions#5593

Open
adabarbulescu wants to merge 1 commit into
odysseus-dev:devfrom
adabarbulescu:fix-5569-reader-folder
Open

fix(email): preserve reader folder for message actions#5593
adabarbulescu wants to merge 1 commit into
odysseus-dev:devfrom
adabarbulescu:fix-5569-reader-folder

Conversation

@adabarbulescu

Copy link
Copy Markdown
Contributor

Summary

Reader-level email actions now keep using the opened message's original folder/account instead of the currently selected
library folder, so permanent delete and related actions address the correct IMAP mailbox. Destructive reader actions also
check backend {success:false} responses before removing the email from the UI, preventing failed deletes from looking
successful.

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If
    your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #5569

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)

Checklist

  • I searched open issues and [open PRs](https://github.com/
    pewdiepie-archdaemon/odysseus/pulls) — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks
    and unit tests are not enough.

How to Test

  1. Configure an account with multiple IMAP folders.
  2. Open a message from a folder other than the currently selected Library folder.
  3. Switch the selected folder while keeping the reader open.
  4. From the reader, test mark read/unread, flag, archive, move to spam,
    delete, and delete permanently.
  5. Confirm each action targets the folder/account from which the message
    was originally opened.
  6. Simulate or trigger a backend {success:false} response and confirm
    destructive actions leave the message visible and show an error toast.

Visual / UI changes — REQUIRED if you touched anything that renders

  • Screenshot or short clip of the change in the running app, attached below. Mobile screenshot too if the change
    • Reuse existing CSS variables (--red, --fg, --bg, --card, --border, etc.) — do not introduce new color values,
      font sizes, or spacing units.
    • Reuse existing button/input/card/border classes. Don't invent parallel styling.
    • No Unicode emoji in UI or code. Use inline SVG (matching the monochrome icon style already in static/index.html) or
      plain text.
    • Monospaced font (Fira Code) for primary UI text. Don't override.
    • Dark theme is the default; any light-mode work must be wired through the existing theme system, not hard-coded.
  • No new component patterns. If a similar widget already exists in the app, extend it instead of writing a parallel
    one.

Screenshots / clips

N/A: no visual rendering change. This only changes which folder/account reader actions send to the existing API endpoints and how failed responses are handled.

@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

individual email delete permanently fails with UID command error: BAD

1 participant