Skip to content

Qualify qs.Commons palette references for Qt 6.12 - #1

Merged
Pillumz merged 65 commits into
mainfrom
fix/qt6.12-color-qualify
Oct 8, 2026
Merged

Pillumz merged 65 commits into
mainfrom
fix/qt6.12-color-qualify

Conversation

@Pillumz

@Pillumz Pillumz commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

What

QtQuick 6.12 ships a built-in Color type that shadows the unqualified Color singleton from qs.Commons. Unqualified Color.<role> then resolves to the wrong type and reads as undefined, so the Omarchy plugin and the standalone host lose their theme palette.

Import qs.Commons as Commons and reference Commons.Color across ui/, app/, the vendored app/qml/imports/qs modules, and the QML tests, keeping Style/Border/Util unqualified. The one bare object reference (target: Color in app/qml/Main.qml) is qualified too, and tests/test_source.sh now expects the qualified accent reference.

This mirrors upstream Omarchy omacom/omarchy#14553 (b83d3df0) and behaves identically on Qt 6.11.

Verification (Qt 6.12.0, quickshell 0.3.2, offscreen)

  • make qml-check: passes.
  • make test-qml: unmodified main on Qt 6.12 gives 1154 passed / 4 failed, including NotificationOpen::test_new_notifications_follow_theme_without_bar_foreground failing on the undefined palette; with this change 1155 passed / 3 failed. The remaining 3 are pre-existing LabelOwnership failures that fail identically on unmodified main and do not touch Color.
  • make test-app-qml: 100% (29/29), including tst_standalone_composition, which exercises target: Commons.Color and the vendored qs modules.
  • make validate: test-rust, test-js and test-shell pass; it stops only at the pre-existing test-qml LabelOwnership failures above.

Provenance

Authored by DeepSeek V4.1 Flash (pi herd worker); not independently reviewed here.

Independent review

GPT-6.1 Sol reviewed exact head cc055b2: all 36 files are namespace/import-only changes, including the bare Binding target in standalone Main.qml and the existing source spelling assertion. Reversing the namespace/import changes reproduces original files byte-for-byte. Style/Border/Util, layout, palette values and operational logic are unchanged. Runtime/test verification is the author’s, not claimed by this reviewer. Existing LabelOwnership/checksum-portability failures are being addressed separately rather than ignored.

huacnlee and others added 30 commits September 14, 2026 21:16
The Omarchy plugin had no standalone desktop host, so users outside
Omarchy could not run the same mail UI or install native packages. This
adds a Qt 6 standalone app around the shared QML UI, persistent native
settings and secrets, desktop notifications, and production packages for
macOS arm64, Linux x86_64 (`tar.gz` with curl installer), and Windows
x64, while keeping tray, AI, and `mailto:` out of this version.

The standalone UI follows the active Omarchy `colors.toml` and
`shell.toml`, reloads theme changes, uses the platform system font for
text and a bundled Nerd Font for icons, uses themed scrollbars, and
replaces the native title bar with a draggable app header. Gmail OAuth
client credentials persist in a private 0600 file instead of
world-readable plugin settings. Outside Omarchy, the app follows system
appearance with Tokyo Night dark and a Lupine-derived light palette
(#FFFFFF background, #212121 foreground). It remembers window size,
provides themed delayed tooltips and controls, and uses matching
macOS/Windows icons generated from the complete Omamail SVG. README and
website document standalone installation; the macOS installer handles
the unsigned bundle after verification. The existing Omarchy plugin
remains supported through the same shared UI and pinned backend API
contract.

## Test plan

- `make test-js`
- `bash tests/test_source.sh`
- `python3 app/tests/test_qml_inventory.py`
- `python3 app/tests/test_package.py`
- `python3 app/tests/test_release_workflow.py`
- `python3 tests/test_backend_release.py`
- `cmake --build app/build --parallel`
- `ctest --test-dir app/build --output-on-failure`
- standalone host QML contract
- `make test-qml` (883 passed, 0 failed, 14 skipped)
- `make app-run`, visually verified frameless window, Nerd Font glyphs,
Omarchy palette, and themed scrollbars on macOS

Security verdict: **NOT VERIFIED** for final cross-platform release
readiness while native CI is pending. Focused credential, installer, and
resource boundary checks have passed; the current head must pass all
native CI jobs before release.

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Publish Omamail v0.10.2 from this branch. Release CI builds and verifies
the plugin backends and all three standalone desktop packages, creates
the tag and one release, then updates backend-version and the released
API contract in this PR after verifying every public download.

Merge this PR once the pin commit and required checks pass. Main
receives the version and runtime pin together in one merge.

## Release Notes

- Update the Omarchy backend and standalone desktop applications to
v0.10.2.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Omamail Release <41898282+github-actions[bot]@users.noreply.github.com>
## Summary
- Cmd+W (StandardKey.Close) closes the frameless window through the
host; a Dock click with no visible window emits `reopenRequested` and
the window is summoned again.
- macOS keeps the bundle's plated `omamail.icns` in the Dock instead of
the bare SVG; `make app-run` reads the plated icon out of the ICNS
chunks (no icns image plugin needed). The plate is redrawn on Apple's
824pt grid so it no longer looks larger than neighbouring apps; ICNS/ICO
regenerated with provenance and checksums updated.
- Window frame is one device pixel in `Color.border`; four corner
handles show diagonal cursors and start a system resize; default size
1024×768.
- Light fallback palette is Flexoki Light (matching the website and
gpui-omarchy); popups default to the window background.
- Settings gains an APPEARANCE row (System / Light / Dark), shown only
by the standalone host and only when no Omarchy theme is installed.
Values live in `ui/settings/Appearance.js`.
- Website Install section: Omarchy plugin first, then the standalone app
behind macOS / Linux tabs (Windows instructions removed).

## Test plan
- `ctest --test-dir app/build --output-on-failure` (7/7)
- `qmltestrunner -input app/tests/qml/tst_host_contract.qml …` (28
passed)
- `make test-qml` (885 passed, 14 skipped)
- `make test-js`
- `bash tests/test_source.sh`
- `python3 app/tests/test_identity.py`, `app/tests/test_package.py`,
`tests/test_website_install.py`
- Manually on macOS: Dock shows the plated icon for both bundle and
`make app-run`; Cmd+W hides the window and reopening the bundle brings
it back.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01V5knB3QJJ11XUBAYFZv8yd

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Publish Omamail v0.10.3 from this branch. Release CI builds and verifies
the plugin backends and all three standalone desktop packages, creates
the tag and one release, then updates backend-version and the released
API contract in this PR after verifying every public download.

Merge this PR once the pin commit and required checks pass. Main
receives the version and runtime pin together in one merge.

## Release Notes

- Update the Omarchy backend and standalone desktop applications to
v0.10.3.

---------

Co-authored-by: Omamail Release <41898282+github-actions[bot]@users.noreply.github.com>
Updated installation instructions for macOS and Linux, removed Linux and
Windows sections.
## Release Notes

- Cmd+W on macOS (Ctrl+W elsewhere) now hides the standalone window from
compose, search, calendar, and the other app key contexts, not only the
message list. The process stays running so the Dock can reopen it.

## Why

The frameless window has no native close button. Its platform close
chord was a `Shortcut` with Qt's default `WindowShortcut` context. That
binding is silent when `focusWindow` is not the parent window, and it
depended on KeyRouter's current Instantiator set — which never includes
Close. Calendar's bare `w` is week view, not Close.

Close stays a standalone-window chord, not a Keymap action. It now uses
`Qt.ApplicationShortcut`. KeyRouter shortcuts stay `Qt.WindowShortcut`
so mailbox keys cannot match or ambiguously consume it. `requestClose`
still hides through the host and does not quit.

This is keyboard routing, not a visual change, so there are no
before-and-after screenshots.

## Verification

- `keySequence(StandardKey.Close)` on the composed `Main` window in
list, focused compose, and calendar contexts: `opened === false`, host
hidden, process not quit; list path still reopens from the host.
- KeyRouter: calendar `w` is week view; Ctrl/Cmd+W is not.
- Offscreen `ctest --test-dir app/build -R tst_standalone_composition`
and `qmltestrunner -input ui/tests/qml/tst_keyrouter.qml`.
- An open `QQC.Popup` still owns the keyboard (`tst_popup_keys.qml`);
teaching popups to forward Close is out of scope.
## Release Notes

- Dragging the standalone window by the title bar now follows the
pointer instead of trailing it. Resizing from a corner uses the same
compositor path.
- Message list hover is no longer re-evaluated for every row while the
window is being moved.

## Why

The frameless window starts a system move from the title bar. That used
a `MouseArea`, which keeps the mouse grab and keeps delivering moves
into QML while AppKit is already dragging the window. The scene graph
then tries to keep up, so the window lags the cursor.

The handler now has no target, so it asks the window system to move and
does not move an item of its own. On macOS the native window also keeps
its backing store during live move/resize, so the window server does not
wait on a full Qt Quick frame for each pointer event. List rows already
had a `HoverHandler` for `hot`; the covering `MouseArea` no longer also
tracks hover.

This is motion, not a visual redesign. The title bar and corners look
the same.

## Verification

- `QT_QPA_PLATFORM=offscreen ctest --test-dir app/build -R
tst_standalone_composition` — drag area stays enabled and
`dragsTheWindow` is true (handler target is null).
- `qmltestrunner -input ui/tests/qml/tst_hover_under_scroll.qml`
- Built `omamail-app` with the macOS window helper.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fixes the standalone app sitting at 60%+ CPU with memory climbing past
900MB while idle.

Three layers fed one another:

- **Backend** re-asserted private modes on every read of `accounts.json`
and its directory, rewriting their ctime even when nothing changed, so
FSEvents reported the config directory on every registry read.
- **`FileStore`** re-armed every watch on every directory event. Qt's
FSEvents engine lists a directory without hidden entries when a watch is
added and with them when it checks, so with `.accounts.lock` beside the
registry each re-arm reported the directory changed again — a few
hundred events a second.
- **Calendar controllers** reloaded `calendars.json` on each report,
found it still absent, and published a fresh empty source list. The bar
calendar took that as a change and refreshed, which had the backend read
its registry, which touched the directory. Each lap also pushed the
1.1MB `calendar-bar.json` back through stdin.

Changes:

- `private_fs`: only `chmod` when the mode differs (`ensure_mode`).
- `FileStore::restoreWatches`: apply the difference instead of
remove-all/add-all.
- `FileView`: a view's own failed read reports `loadFailed` once.
- `CalendarController`: a still-missing sources file is not a change.
- Bar preview range starts at local midnight, so its cache key repeats
and the cache stops holding eight copies of the same month.
- A controller reloads its visible range when the set of enabled sources
changes (Google/Microsoft calendars arrive with sign-in, after the first
refresh), compared as a string so account polls that change nothing ask
nothing. The loop had been masking that the bar preview otherwise stayed
empty until its 10-minute timer.

Each fix has a test that reproduced the problem first. After the fix
idle CPU is 0–3% and RSS settles under 300MB.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fixes the occasional click on a message row that did nothing.

`MessageList` fed its `Repeater` the `service.messages` array itself.
That array is replaced whenever anything about any message changes —
most often half a second after opening a message, when its read marking
comes back through `Model.replaceById` — and a Repeater given a new
array destroys every row and builds it again. A press on a row at that
instant was left with no item to release on: no `clicked`, no
`openMessage`. Instrumenting the rows caught it directly: `pressed` →
40ms → row destroyed → nothing.

The model is now the row count, with each row reading `messages[index]`.
Rows survive a refresh, and every refresh also stops rebuilding ~40
items per row.

Test: `tst_message_list_press.qml` presses a row, replaces the array,
releases, and expects the activation. The full QML suite passes (891).


🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Restores the Windows standalone app jobs that have been commented out in
both workflows since huacnlee#206, so the Windows zip ships with the next
release.

- `ci.yml`: `standalone-app-windows` builds, packages and exercises the
archive on every pull request; `windows-latest` is back in the
standalone backend matrix.
- `release.yml`: `app-windows-x86_64` is back and `publish-and-pin`
depends on it.
- `publish-backend.sh` / `package-backend.py`:
`omamail-app-windows-x86_64.zip` is part of the release asset set again,
including both download-and-compare passes.
- The release workflow, backend release and publish contract tests
assert all of the above.

Note: these jobs have never run on this repository's CI before — this PR
is their first run, so any failure below is new information rather than
a regression.

Install instructions and the GitHub Pages installer URLs follow in a
separate PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…nlee#218)

The install commands pointed at a branch of the repository. The GitHub
Pages deploy now publishes `install.sh` and `install.ps1` next to the
page, so the commands become:

- macOS & Linux: `curl -fsSL
https://huacnlee.github.io/omamail/install.sh | sh`
- Windows (PowerShell): `irm
https://huacnlee.github.io/omamail/install.ps1 | iex`

Changes:

- `pages.yml`: stage both installers into `_site`; a change to either
redeploys the site.
- `docs/index.html`: new URLs; a Windows tab beside macOS and Linux,
opened first for Windows visitors.
- `README.md`: new URL plus the Windows command.
- `tests/test_website_install.py`: asserts the site publishes the
installers, both commands appear on the site and in the README, and no
raw-repository URL remains.

The Pages URLs only serve the installers once this is merged and the
site has deployed. The Windows command depends on huacnlee#217 shipping the zip
with the next release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Publish Omamail v0.10.4 from this branch. Release CI builds and verifies
the plugin backends and all three standalone desktop packages, creates
the tag and one release, then updates backend-version and the released
API contract in this PR after verifying every public download.

Merge this PR once the pin commit and required checks pass. Main
receives the version and runtime pin together in one merge.

## Release Notes

- Update the Omarchy backend and standalone desktop applications to
v0.10.4.

---------

Co-authored-by: Omamail Release <41898282+github-actions[bot]@users.noreply.github.com>
The macOS CI job spent 615 seconds in the lib test suite that takes 35
seconds locally. The job log shows the time in
`backend::mail::action_tests` and the other synthetic-peer tests, in
gaps of 12, 24, 36… seconds: one 10-second `connect_timeout` per new
connection.

The peers listen on `127.0.0.1` with a certificate for `localhost`, and
the tests connect by name. On the runner the IPv6 loopback address is
answered first and the connection attempt on it is left to time out
before IPv4 is tried.

A `#[cfg(test)]` helper pins `localhost` to `127.0.0.1` on every test
client (`resolve()`, so the certificate is still verified against the
name), applied in the JMAP and Gmail `client_builder()`s and the two
ad-hoc report clients. No production code path changes.

Expected effect: the macOS standalone app job drops from ~19 minutes to
under ten. Together with huacnlee#222 (dependency caching) the remaining time is
the release build and Qt.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every CI job compiled the whole dependency tree from scratch on every
run, and the standalone app jobs did it twice (test profile, then
release). The macOS job alone spent 15 minutes in "Build and test the
standalone host".

Adds `Swatinem/rust-cache` (pinned) after the toolchain step in every
job that runs cargo across `ci.yml` and `native-credentials.yml`. The
cache is keyed by job and `Cargo.lock`, so each job keeps its own
compiled dependencies and only this crate is rebuilt on later runs. The
first run after merge populates the caches; the gain shows from the
second.

The release workflow is untouched: a published binary is built clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The macOS CI job spends ~615 seconds in the lib test suite that takes 35
seconds locally, all of it in tests that start a Python
`http.server.HTTPServer` as their synthetic JMAP peer
(`backend::mail::action_tests`, the discovery tests).

`HTTPServer.server_bind` calls `socket.getfqdn(host)` on the bound
address: a reverse DNS lookup of `127.0.0.1` that the runner's resolver
leaves to time out, about ten seconds per server start. A test with five
scenarios starts five peers and pays it five times — the "has been
running for over 60 seconds" lines in the log.

The two peers now bind through a subclass that skips the lookup. huacnlee#223
pinned `localhost` in the Rust test clients on the theory that the IPv6
loopback attempt was timing out; its job still took 21 minutes, so that
change is reverted here rather than left in with a wrong explanation
attached.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
)

`tst_settings::fileStoreReadsWritesAndWatches` failed on the Windows job
of huacnlee#220 and passed on the same code in huacnlee#217: the second atomic write,
issued right after the first, hit a sharing violation while the
just-written file was still held by the virus scanner or the indexer.
That is not a test problem — a user saving settings on Windows would see
the same save silently fail.

`FileStore::write` now retries the atomic replace on Windows, eight
attempts over about half a second, before reporting the error. A new
Windows-only test holds the target open without sharing for 120ms from
another thread and expects the write to land.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Calendar settings can discover the individual calendars attached to
signed-in Microsoft and iCloud mailboxes, including names and read-only
state. Each calendar can be enabled, disabled or assigned an existing
theme color. Existing manual iCloud sources are adopted by URL, with
saved visibility and colors preserved. The palette opens only after its
color button is activated and closes after selection.

This PR includes the repaired bases huacnlee#181 (provider recovery guidance)
and huacnlee#182 (Microsoft connection check). Their changes remain in the
comparison against `main` until merged. huacnlee#180 is independently
compatible. See the squash integration note below before merging the
series.

The backend owns discovery and credentials. Microsoft pagination stays
on the Graph calendars resource; calendar IDs are encoded as one path
segment. iCloud discovery accepts only Apple's HTTPS CalDAV and numbered
partition hosts, with bounded redirects, response sizes, calendar counts
and an overall deadline. The interface receives bounded metadata, never
passwords or tokens.

Both new methods belong to the same unreleased API-5 step above
published API 4. Cargo, manifest and the backend pin retain upstream's
0.10.3 version; release numbering is left to the release workflow.
Discovery controls and requests for discovered calendars require API 5.
An older backend cannot silently interpret a selected Microsoft calendar
as the default calendar. Existing default-calendar access remains
supported: an empty `calendarId` retains the original default endpoint.
URL adoption preserves case-sensitive paths, and account-summary refresh
preserves the discovered default calendar's name.

The compact theme-color chooser adapts the interaction first submitted
in huacnlee#125 to the current provider-discovery rows; credit for that earlier
proposal remains with its author.

## Verification (2026-09-15)

- Head `ccfa75f` integrates upstream `3460ac8` (0.10.3/API 4) and
repaired huacnlee#181/huacnlee#182. Full `make validate` passes, including 915
main-suite QML cases, HTTP 6/6, sidebar 64/64, standalone composition,
lint and plugin validation.
- Standalone Rust tests pass with
`standalone,integration-test-credentials`; the production binary was
rebuilt without the test fixture feature. All seven Linux CTest targets
pass. An isolated real-host smoke test completes API-5 handshake and
shutdown against the actual standalone backend.
- Full local API-5 contract: 26 exercised/178 advertised methods;
standalone: 25/170. Published 0.10.3's actual SHA256-verified x86_64
API-4 backend passes the released view (23/176), and released-contract
equality passes.
- Discovery now uses upstream's platform `writeConfig` path and native
credential implementation. New persistence tests prove successful writes
replace the list only after completion; failures preserve the list and
clear busy state; neither branch writes credentials. Both tests fail
with the removed process-based writer and pass with the new callback
path. CalendarController:19/19.
- The standalone app initially could not instantiate CalendarSettings
because its ToggleSwitch adapter lacked the display-only/cursor
properties used by this PR. The adapter now supports those properties
and one mouse/Tab/Space input owner, with a semantic-color cursor ring.
The real standalone composition regression passes after failing before
repair.
- `make test-app-qml` now forwards the resolved Qt runner to CMake and
fails when CTest selects no tests; a dry-run regression covers this
validation fix.
- API-4 refuses all eight discovered-calendar read/write combinations
without RPC, while preserving legacy default-calendar access; API-5
enables supported operations. Existing default-ID, case-sensitive
adoption, calendar-name and safe-error regressions remain passing.
- All18 Rust calendar tests pass, including production-policy HTTPS
tests against a loopback TLS peer with synthetic credentials:
foreign/ambiguous iCloud redirects and Microsoft next links cause no
forbidden connection or request; valid same-resource/Apple partition
continuation works. No real mailbox or credentials were used.
- Fresh independent review found no actionable defects. Security: PASS
for the reviewed integration's credential-destination, metadata and
persistence boundaries. Native platform release certification remains
NOT VERIFIED until native credential/platform jobs execute for this
revision; local Linux results are not macOS/Windows evidence or
live-provider certification.

## UI evidence and readiness

The retained captures date from `81fcce8`; the plugin discovery
presentation is retained. The new standalone host required adapter
changes described above; these retained captures are not fresh
standalone screenshots. It corrects when existing discovery-recovery
text is selected, not the displayed wording or controls. Twenty-four
captures exercise the production CalendarSettings component with
installed Omarchy controls in Quickshell 0.3.1 on Wayland: Catppuccin
and Catppuccin Latte palettes, 1180×900 and 760×720 logical viewports at
1.6× display scale. Matching before/idle pairs use upstream `6f91932`;
additional after captures show discovery loading, results, failure and
the open color palette. Mouse events activate discovery and the color
button; synthetic service/controller data supplies accounts and results.
These are component captures, not a live-provider or full-shell session.

The visible differences are account-specific discovery/refresh controls,
the automatically available Microsoft calendar, per-source
visibility/color controls, account/read-only labels and bounded status
text. Existing manual calendar setup and the unified-view option remain.
Discovery result states have no before equivalent.

The current comparison images below are uploaded GitHub attachments. UI
evidence: retained plugin flow captures; BLOCK for the new standalone
host's on-screen before/after comparison, not established by offscreen
tests.

A separate on-screen check used the real Omarchy host shell and
registered envelope widget, the production App/settings/components and
CalendarController, and an isolated HOME with synthetic accounts and
backend/auth replies. The panel was opened from the envelope; Ctrl+, and
Escape navigation, mouse activation, Tab/Enter/Space activation,
connection results, calendar discovery/refresh, visibility and color
persistence were exercised. Catppuccin and Catppuccin Latte were checked
at 1180×900 and the smallest supported width (760×720). Only the
isolated shell theme changed. This verifies the affected UI in its real
host, not live OAuth/provider compatibility; fixture-only unrelated
account-summary/mock warnings remain outside this scoped UI verdict.

The host-shell check found that discovery, color and visibility controls
were mouse-only. The new controls now opt into the shared Button
keyboard behavior; the visibility button retains the shared ToggleSwitch
graphic and has checkbox accessibility semantics. Tab/Enter/Space
regressions fail against the old components and pass after repair. No
new shortcuts or production key handlers were added.

Ready for maintainer review; hosted checks still need upstream
fork-workflow authorization. No approval, upstream merge or backend
publication has been performed.

The following are the original submission's after screenshots, retained
for context; they are not a matching before/after pair.

**After — calendar list, palette closed, account addresses redacted**

<img width="1640" height="959" alt="OmaMail calendar settings with fully
redacted account addresses"
src="https://github.com/user-attachments/assets/0d8e27c0-33c4-4ae9-ab3e-7ad210ddc28f"
/>

**After — palette opened, account addresses redacted**

<img width="1700" height="925" alt="OmaMail calendar color picker with
fully redacted account addresses"
src="https://github.com/user-attachments/assets/a092214f-d7a0-49b6-8196-499bd2d8461c"
/>

## Current comparison captures

<details>
<summary>Dark — Catppuccin / wide — before, after, and result
states</summary>

**Before — upstream 6f91932**

<img width="760" alt="calendar-catppuccin-wide-before-final"
src="https://github.com/user-attachments/assets/fd868b7e-cfd7-47d2-9dc8-db03171f05f3"
/>

**After — 81fcce8, idle**

<img width="760" alt="calendar-catppuccin-wide-idle-final"
src="https://github.com/user-attachments/assets/bbaad786-875c-4a60-9e6e-e3b8fc718546"
/>

**After — busy**

<img width="760" alt="calendar-catppuccin-wide-busy-final"
src="https://github.com/user-attachments/assets/97f2c27d-b6e4-494e-8762-78da2c5e2ef6"
/>

**After — success**

<img width="760" alt="calendar-catppuccin-wide-success-final"
src="https://github.com/user-attachments/assets/dc1f1d73-4ba3-4650-a46f-9b7ab868baa4"
/>

**After — error**

<img width="760" alt="calendar-catppuccin-wide-error-final"
src="https://github.com/user-attachments/assets/9b91320b-5fe9-40f6-bb46-ed8da872cce3"
/>

**After — palette**

<img width="760" alt="calendar-catppuccin-wide-palette-final"
src="https://github.com/user-attachments/assets/4c0bb251-b4eb-42bf-818d-6d987c008666"
/>

</details>

<details>
<summary>Dark — Catppuccin / compact — before, after, and result
states</summary>

**Before — upstream 6f91932**

<img width="760" alt="calendar-catppuccin-compact-before-final"
src="https://github.com/user-attachments/assets/2f8cb645-a9f0-4f1e-9253-ba5e4036dbd5"
/>

**After — 81fcce8, idle**

<img width="760" alt="calendar-catppuccin-compact-idle-final"
src="https://github.com/user-attachments/assets/34836444-fccd-4d2d-b0f0-887da953f900"
/>

**After — busy**

<img width="760" alt="calendar-catppuccin-compact-busy-final"
src="https://github.com/user-attachments/assets/110facfe-2375-4059-aadd-528c0143f9e0"
/>

**After — success**

<img width="760" alt="calendar-catppuccin-compact-success-final"
src="https://github.com/user-attachments/assets/b5f1d828-e037-4796-91b6-e5c2fb090502"
/>

**After — error**

<img width="760" alt="calendar-catppuccin-compact-error-final"
src="https://github.com/user-attachments/assets/d3a5f192-c2b2-4937-9021-e4790243cea9"
/>

**After — palette**

<img width="760" alt="calendar-catppuccin-compact-palette-final"
src="https://github.com/user-attachments/assets/6f72a3cc-9431-48ce-b701-d291a0747690"
/>

</details>

<details>
<summary>Light — Catppuccin Latte / wide — before, after, and result
states</summary>

**Before — upstream 6f91932**

<img width="760" alt="calendar-catppuccin-latte-wide-before-final"
src="https://github.com/user-attachments/assets/28367bc8-05e9-4ed2-8fd6-1660547a95ca"
/>

**After — 81fcce8, idle**

<img width="760" alt="calendar-catppuccin-latte-wide-idle-final"
src="https://github.com/user-attachments/assets/0169825d-18b1-4234-bccd-05fb8ccbc630"
/>

**After — busy**

<img width="760" alt="calendar-catppuccin-latte-wide-busy-final"
src="https://github.com/user-attachments/assets/cf14f3c4-81bc-4af6-9a26-6da1d24fe433"
/>

**After — success**

<img width="760" alt="calendar-catppuccin-latte-wide-success-final"
src="https://github.com/user-attachments/assets/325e4b10-9696-4254-ad0a-849df121bae3"
/>

**After — error**

<img width="760" alt="calendar-catppuccin-latte-wide-error-final"
src="https://github.com/user-attachments/assets/2c80d3ba-d795-4d56-9cfb-9bc158c07b53"
/>

**After — palette**

<img width="760" alt="calendar-catppuccin-latte-wide-palette-final"
src="https://github.com/user-attachments/assets/e3a1730b-4ff8-4e6d-b026-57252c1e2a2a"
/>

</details>

<details>
<summary>Light — Catppuccin Latte / compact — before, after, and result
states</summary>

**Before — upstream 6f91932**

<img width="760" alt="calendar-catppuccin-latte-compact-before-final"
src="https://github.com/user-attachments/assets/f0de9689-da6c-451e-abbe-2a3dc0a48d86"
/>

**After — 81fcce8, idle**

<img width="760" alt="calendar-catppuccin-latte-compact-idle-final"
src="https://github.com/user-attachments/assets/4991da6b-e146-4bc5-94a8-17a9d1495169"
/>

**After — busy**

<img width="760" alt="calendar-catppuccin-latte-compact-busy-final"
src="https://github.com/user-attachments/assets/bc08d14b-1093-4b80-8b4f-f842e6df47fb"
/>

**After — success**

<img width="760" alt="calendar-catppuccin-latte-compact-success-final"
src="https://github.com/user-attachments/assets/8c59a4d0-2438-4b73-b9cb-16c31c662a54"
/>

**After — error**

<img width="760" alt="calendar-catppuccin-latte-compact-error-final"
src="https://github.com/user-attachments/assets/9e2e2125-e264-4419-8ba5-8c95147d24a4"
/>

**After — palette**

<img width="760" alt="calendar-catppuccin-latte-compact-palette-final"
src="https://github.com/user-attachments/assets/392ebb9b-b7cd-4220-9b00-5a659f71df93"
/>

</details>


## Squash integration note

Verified against upstream `3460ac8`: huacnlee#180 → huacnlee#181 → huacnlee#182 squash cleanly.
huacnlee#183 includes huacnlee#181/huacnlee#182 ancestry; after those bases are squash-merged,
four conflicts recur in `backend-api.json`, `ui/Service.qml`,
`ui/tests/qml/tst_calendar_controller.qml`, and
`ui/tests/qml/tst_service_backend_path.qml`.

The resolution is prepared and verified locally. Applying only huacnlee#183's
remaining changes to the simulated squashed base produces tree
`5b7e3ae2f7b19db0c915acdc49b66d8f4002784c`, exactly matching the clean
ancestry-preserving combination of all four PRs. The combined tree
passes JavaScript, QML (918 main cases plus HTTP6/sidebar64), both lint
targets, standalone composition, plugin validation and API5 contract
checks; Rust/Cargo and native host files are identical to the fully
validated huacnlee#183 source.

After the first three PRs' CI/reviews and squash merges, this branch
must still be synchronized with the actual resulting main before merging
huacnlee#183. A simulation cannot pre-approve unseen future main commits. No
upstream merge, force-push, release or check bypass has been performed.

## On-screen host-shell examples

These supplementary captures use synthetic accounts and replies, as
described above. Matching before/after component comparisons remain in
the four sections above.

<details>
<summary>shell dark compact</summary>

<img width="760" alt="shell-dark-compact"
src="https://github.com/user-attachments/assets/07b3366d-6226-41da-85f6-b587b27bc242"
/>

</details>

<details>
<summary>shell dark wide</summary>

<img width="760" alt="shell-dark-wide"
src="https://github.com/user-attachments/assets/d62fa1b4-7e82-473e-aad5-ac100e55dc23"
/>

</details>

<details>
<summary>shell light compact</summary>

<img width="760" alt="shell-light-compact"
src="https://github.com/user-attachments/assets/49463e2f-6aef-48d1-86e9-c65b42029101"
/>

</details>

<details>
<summary>shell light wide</summary>

<img width="760" alt="shell-light-wide"
src="https://github.com/user-attachments/assets/bd3c2fd8-4306-4df6-91c2-868f9b176c42"
/>

</details>

## Release Notes

- Microsoft and iCloud mailboxes can discover, select, color and read
individual calendars without manually entering provider addresses when
the backend supports account-calendar discovery.
- Default Microsoft calendar access and discovered calendar names are
preserved; iCloud URL matching keeps distinct case-sensitive calendar
paths separate.

---------

Co-authored-by: Christian Dandachi <dandiccf@gmail.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…acnlee#228)

## Summary

`Native credentials (macos-14)` and `Standalone app (macOS arm64)` have
failed on `main` since huacnlee#183 with two
`calendar::discovery::runtime_tests` failures: the Python peer dies
loading its certificate with `ssl.SSLError: [X509V3:
INVALID_CERTIFICATE]`.

Cause: `openssl req -x509` on macOS is LibreSSL, which adds its own
`basicConstraints` and keeps the `-addext
basicConstraints=critical,CA:FALSE` copy beside it; a certificate
carrying the extension twice is refused by the OpenSSL that Python loads
the chain with. The `CA:FALSE` is itself needed — webpki refuses a CA
certificate presented as an end entity — which is why OpenSSL hosts
(where `-addext` replaces the default) passed and dropping the extension
is not an option.

Fix: create a request and sign it with an explicit extension file
(`openssl x509 -req -extfile`), which yields exactly
`basicConstraints=critical,CA:FALSE` plus the SAN on either toolkit.

## Test plan

- [x] `cargo test --lib calendar::discovery::runtime_tests` — 2 passed
locally (OpenSSL 3)
- [ ] macOS jobs on this PR go green (the only place LibreSSL is
exercised)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
## Summary

Deleting several Gmail messages in a row failed with HTTP 403. Gmail
meters each user at 250 quota units per second and answers a burst past
that with `403 rateLimitExceeded` — not only 429 — and `messages.trash`
costs 5 units per message, so a screen of trashed conversations (one
call per message, all at once) tripped it. The transport mapped every
403 to `gmail_forbidden` ("check account permissions") and nothing paced
or retried.

Three layers, each tested on its own:

- **Transport** (`gmail_http.rs`): a 403 body with a `usageLimits`
reason of `rateLimitExceeded`/`userRateLimitExceeded` is
`gmail_rate_limited`; scope refusals and daily limits stay
`gmail_forbidden`. Rate-limited requests are resent after 1, 2 and 4 s
(plus jitter) inside the request deadline. A refused request never ran,
so this applies to mutations too; a timed-out mutation is still never
retried.
- **Pacing** (`gmail.rs`): every call is paced per account by a quota
bucket (200 units/s, burst 200) using Google's documented per-method
costs. A page load passes at once; 100 trashes stream out over ~2 s
instead of arriving as one burst.
- **Queue** (`gmail_queue.rs`, new): `gmail.modify`, `batchModify`,
`trash` and `untrash` answer at once with `{"queued":true,"ticket":"…"}`
and join an in-memory per-account queue that one task sends in order,
waiting a further 5/10/20/30 s while Gmail keeps refusing (~100 s in
all) before giving up. Each outcome is announced as a `gmail.settled`
notification `{accountId, ticket, method, ok, error}`, multiplexed
beside `outbox.changed`. `GmailApiClient.qml` keeps the request in
flight until then and hands the outcome to the original callback, so
`MailAccount`'s optimistic view, slot and rollback are untouched and
nothing is shown unless the queue finally fails. The CLI's `mail.act`
and the one-shot `call` wait on the ticket in process rather than exit
with it. Logout refuses what is not yet sent; a send already on the wire
settles on its real answer. Nothing in the queue survives the process.

Also: the three duplicated token-refresh closures are one
`refresh_grant`; `Wire.js` admits `gmail.settled`; `docs/BACKEND.md`
describes the pacing, retry and queue; `backend-api.json` adds two
contract cases under the existing unreleased API 5 step (no revision
bump needed — an older backend never answers `queued`, so the UI path is
naturally compatible).

## Test plan

- [x] `cargo test --lib` — 512 passed, including new tests for 403
classification, backoff within the deadline, the quota bucket under
paused time, queue ordering/backoff/give-up/invalidation, and a
Session-level end-to-end test (real credential reader, token refresh,
queued send, notification, in-process wait) against a loopback server
- [x] `python3 tests/test_backend_api.py --binary target/debug/omamail`
— API 5 contract passes with the two new cases
- [x] `make test-qml` — 931 passed, including new `tst_gmail_queue.qml`
(ticket parking, settlement to the sending callback, stopped backend,
aborted request)
- [x] `make test-js`, `tests/test_source.sh`, `tests/test_qml_names.py`,
`make qml-check`, `cargo clippy --all-targets` — clean (one pre-existing
`needless_return` in `src/mail/tests.rs`)
- [ ] `cargo test --test cli` — 7 pre-existing `auth_signed_out`
failures on this machine, identical on a clean `main`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
## Reproduction

Any provider; easiest on a JMAP mailbox on Stalwart:

1. Open Inbox. Scroll to the foot so the second page of fifty loads.
2. Press F5, or wait for the two-minute poll, or open any **unread**
message.
3. The list reloads and shows only the first fifty rows again.

On IMAP only F5 and the poll do it, since IMAP has no push. On Stalwart
opening an unread message is enough: the quiet mark-read is an
`Email/set`, the server pushes the new Email state a millisecond before
the HTTP reply carrying it has been read, and the backend judges the
push a change. That echo is a separate fix in the backend's stream; this
change ends the collapse for every trigger.

## What is happening

Every reload — poll, F5, push, the revalidation after an action — asked
for one page and replaced the whole list with it, so the rows the user
had scrolled down to vanished under them.

## The change

`MailAccount` keeps `loadedDepth`, the rows the view has been paged to,
and a reload asks `Model.reloadLimit` for that many again, bounded by
the IMAP window of a hundred. Navigation and sign-out reset it; the
cache does not raise it. The append path still asks for one page. Two
pages of fifty is the bound, so three pages deep a reload comes back at
a hundred and the foot-loader asks for the third page again.

## Verification

`TZ=UTC make validate` green on `b803abf` (Arch, Qt 6.11.2; `TZ=UTC`
because
`agent::events::tests::a_whole_day_runs_midnight_to_midnight_and_an_end_defaults_to_an_hour`
assumes a UTC machine and fails on an Australia/Brisbane one with or
without this change).

New tests, each run against the unfixed code and watched fail:
`tests/test_model.js` for `reloadLimit` — a reload after two pages asks
for both, rows removed locally do not round the depth down to a page,
the ceiling holds, malformed inputs fall back to a page — and
`tests/qml/tst_reload_depth.qml`, a real `MailAccount` on the real
`JmapClient` over the recording backend stub: two pages on screen, a
reload asks `jmap.list` for a hundred; a depth of 63 asks for 63;
switching mailbox resets the depth and asks for a page.

By hand: the Omarchy shell on Hyprland over a JMAP (Stalwart) mailbox,
second page loaded, then opening an unread message, Mark as read from
the menu, F5, and waiting past the poll — the list stays where it was
paged to.

A fresh agent reviewed the diff (two agents, one for the repository's
standards and one against this description). They found that sign-out
cleared the list without resetting the depth, that three comment
rewrites were churn, and that the depth reaching the request was proved
only in isolation. All three are fixed in the second commit; nothing
else was found.

## Release Notes

- A list you have scrolled past its first page keeps its rows when it
refreshes: the poll, F5, a push or reading a message no longer collapse
it to page one.
# Fix legacy charset decoding in message bodies and headers

Genuine Windows-1251 and GB2312 messages arrive with valid MIME charset
declarations but display garbled bodies, subjects, and sender names. For
example, `Добрый день!` becomes `Äîáðûé äåíü!` in Windows-1251 mail.
This reproduces in the published 0.10.1 backend, independently of the
mail server.

The native decoder previously treated all Windows-125* and ISO-8859*
bytes as Latin-1 unless they were valid UTF-8, and ran multibyte legacy
encodings through its UTF-8 fallback. MIME parsing retained the original
octets, so using mailparse did not correct the later display conversion.

Use `encoding_rs` to decode supported declared charsets and their
aliases. Preserve the existing strict UTF-8 repair for misleading
ASCII/ISO-8859/Windows-125x labels and the permissive fallback for
UTF-8/unknown labels. Other recognized encodings follow their
declaration; WHATWG compatibility aliases map GB2312 to GBK and
Latin-1/ASCII to Windows-1252. Malformed known legacy sequences use
replacement characters. Accept whitespace around `charset = ...` and
require a MIME parameter-name boundary.

Resource and attachment octets remain unchanged. Character conversion
stays before HTML sanitization. Cached resources are decoded again when
opened; pre-native body records do not override the fixed reader output.
Existing list summaries refresh on successful revalidation and may
remain stale offline. The separate QML calendar invitation decoder is
outside this change.

## Verification

- `make validate` passed locally, including Rust, JavaScript,
shell/security, QML, qmllint, and plugin validation. QML suites: 880
main tests, 6 Outlook adapter tests, and 64 sidebar text tests passed;
the native Qt resource-denial test also passed.
- `cargo test --locked --test message_charset`: seven tests pass. The
original six regressions were run with the production decoder restored
to upstream and all failed on their expected decoding assertions, then
passed with the fix restored.
- Covers Windows-1251/GB2312 plain and HTML bodies,
Base64/quoted-printable transfer encoding, B/Q encoded headers, sender
names, charset aliases/case/whitespace, other real encodings,
valid/mislabelled UTF-8, malformed sequences, nested multipart, encoded
attachment names, unchanged binary attachment bytes, and post-decode
HTML resource filtering.
- The cache regression uses isolated HOME/XDG directories and verifies
that cached resource bytes are decoded again, while old decoded body
text cannot supply a native reader cache hit.
- The separate real Quickshell backend-process test passed. All 22
native agent bridge tests passed against the release candidate.
- An independent offline 12-case charset matrix passes against the
optimized candidate; all eight legacy cases fail against published
0.10.1, while its four UTF-8 controls pass.
- Three privately held affected messages were replayed offline with
networking disabled. Their complete plain bodies, HTML bodies, and
subjects now match independent decoding, allowing only line-ending
normalization and the documented GB-family dash mapping. No private
message fixtures are included.
- Independent fresh-agent review (`astra`, separate herd worktree):
Functional PASS; SECURITY PASS for the affected decoding-to-display
boundary. No blockers. The reviewer independently passed
charset/message/reader/attachment tests and exercised Windows-1251,
GB2312, and UTF-16LE through decode → sanitize → Qt: twelve sanitized
documents produced zero additional loopback requests, while an
unsanitized positive control produced one. This is a scoped verdict, not
a whole-application audit. The documentation precision note was
corrected and re-reviewed.
- Deployed the same SHA-256-verified optimized binary to two
Arch/Omarchy desktops and verified their live backend processes use it.
Real reads of an affected shared-mailbox message through the installed
native app succeed with the correct Cyrillic text on both machines. The
user confirmed that the affected letter now renders correctly in the
work desktop's actual Omamail UI. No before/after application
screenshots are attached yet.

## Release Notes

- Correctly read message bodies, subjects, and sender names in
Windows-1251, GB2312, and other supported legacy character sets.
- Preserve binary attachments and the existing handling of UTF-8 mail,
including UTF-8 sent under misleading single-byte charset labels.
Publish Omamail v0.10.5 from this branch. Release CI builds and verifies
the plugin backends and all three standalone desktop packages, creates
the tag and one release, then updates backend-version and the released
API contract in this PR after verifying every public download.

Merge this PR once the pin commit and required checks pass. Main
receives the version and runtime pin together in one merge.

## Release Notes

- Update the Omarchy backend and standalone desktop applications to
v0.10.5.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Omamail Release <41898282+github-actions[bot]@users.noreply.github.com>
Calendar settings rendered five theme-color choices and the
corresponding saved-calendar indicators as gray. `CalendarPalette` has
required its caller to supply the host palette path since huacnlee#206, but the
settings instance added by huacnlee#183 omitted that binding. Pass
`service.calendarPalettePath` just as the other calendar views already
do; hosts without a palette retain the existing semantic fallbacks.

This is a separate fix based directly on upstream `main` at
`13f4f5cd54d7d3d766e80ec0cbcb166a2e1e1c02` (0.10.5). It contains no
earlier feature-branch commits, backend changes, release-pin changes, or
settings migrations.

## Verification

- `make validate` passes on Linux / Qt 6.11: Rust, JavaScript and shell
suites, 934 main QML cases, 6 HTTP cases, 64 sidebar cases, standalone
composition, both lint targets and plugin validation.
- The new composition regression fails against the unchanged palette
binding and passes with this fix. It reads through the host FileView
adapter and checks the actual seven swatch colors, a saved calendar's
blue indicator, live theme updates and the no-palette fallback.
- An isolated on-screen Quickshell harness instantiated the production
settings component and real Omarchy controls with synthetic accounts.
Opening the picker by mouse and choosing blue by keyboard succeeded in
Catppuccin and Catppuccin Latte at both 760×800 and 1180×800 logical
capture sizes. The matched images below were captured at the same
desktop scale (1.6).
- Security review: PASS for this scoped change. The palette path comes
from the existing host service; the change adds no provider requests,
credential access or settings writes. This is not a platform-wide
security audit.

## Visual comparison

Before: accent and red use fallback colors, while the other five choices
and the green/blue/magenta source indicators are gray. After: both the
picker and source indicators use the selected theme palette. Each pair
uses the same view, synthetic account state, size, theme and scale.

<details>
<summary>Catppuccin (dark), compact</summary>

| Before | After |
| --- | --- |
| ![Before: Catppuccin (dark),
compact](https://github.com/user-attachments/assets/3e2e6b0a-ce9e-4dc1-9e39-c21c5ab43a6f)
| ![After: Catppuccin (dark),
compact](https://github.com/user-attachments/assets/b84b62a2-d80c-4c24-b88e-b8d55eaf890d)
|

</details>

<details>
<summary>Catppuccin (dark), wide</summary>

| Before | After |
| --- | --- |
| ![Before: Catppuccin (dark),
wide](https://github.com/user-attachments/assets/624c7d7d-b93f-427c-83db-85e0daa2c015)
| ![After: Catppuccin (dark),
wide](https://github.com/user-attachments/assets/f3c1fe61-c7fc-486a-aefd-52b116af442b)
|

</details>

<details>
<summary>Catppuccin Latte (light), compact</summary>

| Before | After |
| --- | --- |
| ![Before: Catppuccin Latte (light),
compact](https://github.com/user-attachments/assets/912fc27a-04a1-49e9-a363-80eb4e308a1d)
| ![After: Catppuccin Latte (light),
compact](https://github.com/user-attachments/assets/ef6e9b88-ee97-4d38-bb42-285c373078ee)
|

</details>

<details>
<summary>Catppuccin Latte (light), wide</summary>

| Before | After |
| --- | --- |
| ![Before: Catppuccin Latte (light),
wide](https://github.com/user-attachments/assets/20367d33-3fc4-47e1-a28b-8be01a91aef2)
| ![After: Catppuccin Latte (light),
wide](https://github.com/user-attachments/assets/131db4b1-ead3-49e2-ba96-5842ed794a59)
|

</details>

## Release Notes

- Fix gray theme-color choices and calendar color indicators in calendar
settings when an Omarchy theme palette is available.

Co-authored-by: Christian Dandachi <dandiccf@gmail.com>
…lee#233)

Diagnose with AI writes a local report and launches the default Omarchy
agent through `omarchy-agent --prompt`. That command execs the terminal
and often stays in the foreground for the whole TUI session.
`diagnostics.py` then waited on it with `subprocess.run(...,
timeout=15)`, so Python killed the agent window about fifteen seconds
after it opened — Hermes included. The session had already started a
turn; the kill showed up as a sudden close, not as an Omamail error.

Launch the agent in a new session, wait two seconds only to catch an
immediate failure, and leave a still-running window alone.

## Verification

`tests/test_diagnostics.py` is 8 tests, OK in 2.8s. The new
`test_open_does_not_kill_a_running_agent_window` failed against the
unfixed `subprocess.run(..., timeout=15)` (`TimeoutExpired` after 8s on
the test harness) and passed after the change. `make
test-shell-portable` ran the diagnostics suite green; `make validate`
was not completed here because `cargo` is not installed. Live: Diagnose
with AI on Omarchy 4.0.3 with Hermes as the default agent opened a TUI,
began a turn, then died at ~15s before this change; after it, the same
button starts the agent without that kill. A pass over the diff found no
remaining wait that would reap the TUI.

## Release Notes

- Diagnose with AI no longer closes the coding-agent terminal after 15
seconds.

Co-authored-by: Per0 <175494353+Per0-1@users.noreply.github.com>
)

An IMAP or Outlook mailbox only learned about new mail when its watch
interval came round, two minutes by default, so a message could sit in
the INBOX that long before the badge, the notification or the open list
showed it. IMAP servers push mailbox changes to a client that asks with
IDLE (RFC 2177), and the backend already has the one place such a push
needs to reach: each account's check loop waits on a `Notify` that
`mail.check` also uses.

Each IMAP and Outlook watch now also runs one dedicated connection that
examines INBOX and idles on it. An untagged `EXISTS`, `EXPUNGE` or
`FETCH` wakes the account's check. Nothing on the IDLE connection
interprets the mailbox, so what the check reads, the preview, the
preload and the UI all stay on the existing path. Polling is unchanged
and remains the fallback whenever the IDLE connection is down.

Most of the change is about the ways a long-lived connection goes wrong:

- `EXAMINE`, not `SELECT`, so watching never clears `\Recent` for
another client.
- Changes within two seconds of the first wake the check once. Archiving
or marking a message in Omamail itself also comes back as a `FETCH` or
`EXPUNGE`, so without this a burst of actions became a burst of checks
and list reloads.
- The idle loop is biased toward its timers, so a server that never
stops sending cannot hold off the wake or the refresh.
- IDLE is ended and issued again every four minutes. The `DONE`
exchange, bounded like every other step, is what notices a connection
that died without a FIN; a wall-clock jump after the machine sleeps ends
the session at once, the same check the JMAP event stream makes.
- A server that ends IDLE unasked counts as a failed session instead of
being idled again at once, which would be a tight loop against a
misbehaving server or proxy.
- Reconnects back off from five seconds to five minutes with jitter, and
the backoff only resets once a session has completed a full refresh, so
a middlebox that cuts every connection after a minute cannot turn this
into a login every few seconds. A failed login or an unavailable
credential waits the full five minutes.
- Every session after the first asks for one check, since a change
during the gap raised nothing. That includes a first working session
after failed attempts, such as starting offline.
- Only a server that does not advertise IDLE ends the attempt, for the
life of the watch. Every other failure, including a `BAD` or `NO` to a
re-issued IDLE, is retried.
- Lines are read with a small cancel-safe reader: a timer firing
mid-line keeps the bytes already consumed, status atoms are matched
case-insensitively, and a literal's octets are skipped, so a message
fragment inside an unsolicited `FETCH` cannot pass for a tagged response
or a `BYE`.

In `sync`, a watch gains an optional provider push task beside its check
task. It is started with the watch and aborted wherever the check task
already was: replacement, `mail.unwatch`, shutdown and `Drop`.
`advertises_id` became `advertises(response, capability)` for the IDLE
check, and the literal-length parsing in `response()` moved into
`literal_length` so the new reader shares it. There is no API change and
nothing in QML changes.

Costs: one more long-lived connection per IMAP/Outlook account, which
counts against per-user connection limits such as Dovecot's
`mail_max_userip_connections`, and a check (one `STATUS`) after each
coalesced change. While the window is open, `MailAccount` reloads the
list on each `mail.updated`, so the user's own INBOX actions now also
cause one list reload about two seconds later.

## Verification

`make validate` green on this commit, run with `LC_ALL=C`: under
`en_US.UTF-8`, `tests/test_publish.sh` fails on an unmodified `main` as
well, because `sort` orders `app/CMakeLists.txt` before `Cargo.lock`.

New tests use loopback fake servers and synthetic credentials:

-
`sync::tests::a_provider_push_checks_again_without_waiting_for_the_interval`
and `unwatching_replacing_or_dropping_a_watch_stops_its_push` fail when
the push task is not started, and the second fails when `Drop` does not
abort it. `only_imap_and_outlook_accounts_idle` covers the provider
mapping.
- `providers::imap::idle::tests` cover a burst of changes waking the
check once; a flooding server on a two-worker runtime not holding off
the wake or the refresh; keepalives waking nothing across two refreshes;
a change during `DONE` being delivered from the next IDLE; a server
ending IDLE unasked; a refused re-issued IDLE being retried; a literal
forging `O1 OK` and `* BYE`; lines and literals split by a timeout; a
server without IDLE being asked once; the first session not announcing
itself while every later one, including one after failed attempts, does;
and the backoff, jitter, resume, tagged-status and change classification
rules.
- Each session and lifecycle behaviour was checked by reintroducing the
defect it guards against: re-issuing IDLE immediately, not skipping
literal octets, notifying per line, dropping a partial line on timeout,
announcing the first session, polling the socket before the timers,
announcing only after an established session, giving up on `BAD`,
matching `OK` case-sensitively, and not aborting the push task in
`Drop`. The matching test fails in each case.
- The full library suite passed three times in a row with sixteen busy
loops on eight cores.

Live, against a Migadu (Dovecot) mailbox, with a development backend on
isolated config and state directories and the watch interval at an hour
so only IDLE could wake it: adding and removing `\Flagged` on an INBOX
message from a second connection produced `mail.updated` 9–15 s later
(the server's own notification delay plus the two-second coalescing). No
update arrived during 290 s without changes, including the four-minute
refresh; a change after that refresh still woke the check; and
`mail.unwatch` closed the IDLE connection. Not exercised live:
XOAUTH2/Outlook (it uses the same `resolve_account` and `login` path as
every other Outlook request), an actual suspend and resume, and the list
reload by hand in the UI.

Two fresh agents reviewed the diff in turn. The first found a stale
source assertion in `tests/test_imap_ordering.sh`, the tight loop on a
server ending IDLE, transient errors treated as permanent, a refresh
period too long for NAT timeouts, no coalescing, a reader that was
neither cancel-safe nor literal-aware, and tests that did not prove
their names. The second found starvation under a flooding server, no
check after a first session that followed failed attempts, `BAD` to a
re-issued IDLE ending push for good, no suspend detection,
case-sensitive status matching, credential errors retried quickly, no
jitter, and inaccurate wording in the docs. All of these are fixed and
covered above. Both gave a security verdict of PASS: IDLE uses the
existing credential resolution, destination and TLS rules, sends only
constant commands, and uses server data only to decide whether to wake
the check.

## Release Notes

- New mail in IMAP and Outlook mailboxes now shows up within seconds
instead of at the next check, on servers that support IMAP IDLE.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
…nlee#242)

## Summary

- New `ui/components/TextMenu.qml`: a right-click menu for text. Cut /
Copy / Paste / Select all, with Cut and Copy disabled without a
selection; a link under the pointer adds **Open link...** and **Copy
URL**. Copy is a signal the owner routes through `service.copyText`, the
same way `AddressMenu` hands an address up.
- `MessageReader`: the body's cursor-shape `MouseArea` now takes the
right button and opens the menu, naming the link via `TextEdit.linkAt`.
Reader mode shows only Copy (plus the two link rows when applicable);
Open reuses `openLink`.
- `ComposeView`: To, Cc, Bcc, Reply-To, Subject and the body each carry
a `TextMenuTrigger`; the menu is `editable`. Paste focuses the clicked
field and calls `root.paste()`, so it goes the way Ctrl+V goes —
clipboard image first, text otherwise.
- `Makefile`: `TextMenu.qml` added to `QML_FILES`.

## Test plan

- [x] `tst_text_menu.qml` — rows per mode, cut/copy/paste/select-all
behaviour, link rows, cursor start
- [x] `tst_reader_text_menu.qml` — right-click opens the menu, keeps the
selection, detects the link, copies/opens it through the service
- [x] `tst_compose_text_menu.qml` — body and field menus, copy through
the host, paste lands in the clicked field
- [x] Full QML suite: 961 passed
- [x] `tests/test_qml_names.py`, `tests/test_source.sh`, `git diff
--check`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
## Release Notes

- Cmd+W on macOS now closes the window even while an input method
(pinyin and the like) has uncommitted text in a field.

## Why

huacnlee#214 fixed the shortcut context, and offscreen the close chord works
from every app context, with the app menu, a tooltip, a focused compose
field or the calendar up (new tests cover the first two). What remained
is a path below Qt: Cocoa delivers Cmd+W through `keyDown:`, and
`QNSView handleKeyEvent:` only tries the key as a shortcut when
`m_composingText` is empty. During an IME composition the chord is
handed to the input method and either dropped or delivered as plain
text, so the QML `Shortcut` never fires. A native app's Close is a menu
key equivalent and is handled before the input method.

## What changed

- `window_macos.mm`: a local `NSEvent` monitor takes Cmd+W (Command
only, watched window is key) off the stream and calls the host; other
platforms keep a no-op stub.
- `ApplicationHost` gains `requestClose()` / `closeRequested()`;
`Main.qml` relays it to `mailApp.requestClose()`, so the window still
hides through the host and the process stays alive for the Dock.
- Tests: `HostFixture` exposes `closeRequested`;
`tst_standalone_composition` covers the host relay plus the open-menu
and visible-tooltip cases.

No visual change, so no screenshots.

## Verification

- `QT_QPA_PLATFORM=offscreen ctest --test-dir app/build` 7/7, `python3
app/tests/test_qml_inventory.py`, `bash tests/test_source.sh`, `python3
tests/test_qml_names.py`.
- Not verified here: this was written on Linux, so `window_macos.mm` has
not been compiled. Please run `make app-run` on macOS, type a few
uncommitted pinyin letters in the search field, press Cmd+W, and confirm
the window hides.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…eration (huacnlee#243)

`src/credentials/secret_service.rs` built a tokio runtime, a D-Bus
connection and a DH-encrypted Secret Service session for every
credential get, put and delete, then tore all three down at once:
`connection.close()` under a 250 ms deadline, followed by
`runtime.shutdown_timeout(Duration::ZERO)`. The file's own comment
conceded the shape of it, "This is close, never graceful_shutdown…".

That teardown races the daemon's handshake. gnome-keyring 50.0 handles a
client that vanishes mid-negotiation by passing NULL into
`g_variant_new`, which GLib treats as programmer error, so the daemon
holding every credential on the machine aborts. It has done so 13 times
on my machine since 15 September, always with the same four lines in the
journal inside the same second:

```
gkd_secret_service_get_pkcs11_session: assertion 'client' failed
aes_negotiate: assertion 'session' failed
gkd_secret_service_publish_dispatch: assertion 'client' failed
GLib: g_variant_new: expected GVariant of type 'v' but received value has type '(null)'
```

systemd restarts the daemon, but the login keyring comes back locked, so
the visible result is mail that does not load. Omamail's own
`errors.json` recorded `credentials.get` failing 13 times over those
days, with `mail.check`, `imap.list`, `imap.trash`, `imap.modify` and
`reader.open` failing behind it; at the abort on 17 September at
19:48:19, Omamail's calls failed at 19:48:22 and 19:48:23.

The daemon is wrong to abort — a vanished client is a recoverable
condition, and the same crash is reported against several other projects
— but Omamail is the one provoking it, once per credential operation.

So the connection and the session are now opened once and kept. `Shared`
holds a process-lifetime runtime and the session behind a mutex;
`run_on` takes it, runs the operation, and leaves it alone. Measured
against the real daemon with `dbus-monitor`, ten credential reads inside
one backend process:

```
omamail 0.10.5:  OpenSession = 10, 10, 10, 10, 10   (five samples)
this branch:     OpenSession =  1,  1,  1,  1,  1
```

Five things were needed to make that safe rather than merely fewer
sessions.

**The runtime outlives the operation.** One worker thread, so credential
operations still run alongside each other as they did when each built
its own runtime; a current-thread runtime would serialise every one of
them behind whichever holds it, and a stuck prompt would then block them
all for the whole deadline. I checked the obvious worry and it is not
one: a session left idle for three seconds between operations is still
usable, because a call is always awaited inside `block_on`.

**A write is never repeated.** The session is dropped and the operation
retried when a call fails, because a session the daemon has forgotten
fails like an absent one, and that is what makes a daemon restart
invisible to a read. Only a read is repeated. A request already written
to the socket cannot be retracted, and the daemon may have committed it,
so repeating `CreateItem` — called with `replace = false` — would leave
two items carrying identical attributes, after which `find` answers
`Ambiguous` and Omamail can no longer read *or* delete that credential.
A sign-out would silently leave a live refresh token in the keyring.

**A locked keyring is an answer, not a broken connection.**
`Error::Unavailable` was doing double duty: a locked item, a locked
default collection and a failed `get_secret` all produced it alongside
genuine transport failures. Retrying on all of them would have
renegotiated a session on every read against a keyring that was merely
locked — the exact churn this change removes, in the one state where the
daemon is least able to survive it. A private `Fault` enum now separates
an answer the daemon gave from a call that did not complete, and only
the latter drops the session.

**An evicted session is not closed.** Operations run on their own
`spawn_blocking` threads and share one connection, so closing it on one
thread's failure would terminate another thread's in-flight call — and
that call would then look like a transport failure. Eviction now only
removes it from the slot; the last `Arc` to be released closes it, once
nobody is using it. This is also why `Session` no longer holds a
connection handle of its own: `SecretService` owns the connection it was
built on.

**One deadline covers the whole operation.** Opening the session and
running it now share a single budget computed once, rather than each
carrying its own `timeout(deadline, …)`. Without that, one credential
operation could wait two deadlines on the happy path and four with a
retry, which would have quietly eaten the headroom in
`calendar/mod.rs`'s 24 s CalDAV timeout.

A poisoned mutex is also no longer fatal. The slot is written only after
the connection is built, so it guards nothing a panic could break, and
refusing it would have disabled every credential read for the life of
the process. `shared()` likewise no longer remembers a failed runtime
build for ever.

The timeout path still drops the session, so
`credentials_native_linux_never_completing_prompt_releases_worker_and_connection`
keeps its guarantee that a stuck prompt leaves nothing registered on the
bus. That now happens when a session has already failed rather than
after every operation, so it no longer races the handshake of the
session that follows it. A timeout is not retried: the deadline is the
caller's bound and a second attempt would exceed it.

Both pre-existing tests are unchanged and still pass. `run_with` is kept
for them as a test-only one-shot that disposes its session immediately,
which is what they observe.

This is the Omamail half of huacnlee#239.

## Verification

`LC_ALL=C make validate` green on this commit (see the locale note
below). `cargo test --locked --features integration-test-credentials`
green: 533 unit, 32 cli and the smaller suites, 0 failed. The Linux
credential gate, `cargo test --lib -- --ignored
credentials_native_linux`, passes 8/8 against a real `dbus-daemon` and a
real keyring.

I watched every new test fail against the unfixed code rather than
assuming it would:

| Test | Against the fault |
|---|---|
| `…_reuses_one_session_across_operations` | fails `left: 3, right: 1`
with the session cache bypassed |
| `…_a_failed_write_reaches_the_daemon_once` | fails on 2 `CreateItem`
calls where 1 is correct, with the retry allowed on writes |
| `…_a_locked_item_keeps_the_session` | fails `left: 3, right: 1` with a
locked item classed as a transport failure |
| `…_a_stalled_connect_costs_one_deadline` | fails "waited 603.7ms for a
300ms deadline" with a per-stage timeout |

Driven by hand against the running daemon on Arch with gnome-keyring
1:50.0-1, using `dbus-monitor` to count `OpenSession` on the session bus
while a backend process served ten `credentials.get` calls for an
account that does not exist. Five samples each: 10/10/10/10/10 before,
1/1/1/1/1 after. Starting the backend and sending nothing produces 0 on
both, so every call counted came from the reads.

**One thing I could not explain, and would rather flag than bury.**
Under artificial full CPU saturation — a busy loop pinned to every core
—
`credentials_native_linux_never_completing_prompt_releases_worker_and_connection`
fails on this branch and passes on `main`, reproducibly: 0/5 against
5/5, and 5/5 on this branch once the load is removed. Instrumenting it
shows `connect` completing in 3.5 ms and the `OpenSession` negotiation
not completing inside the test's 150 ms budget. I tried a current-thread
runtime, a single `block_on` covering negotiation and operation rather
than two, and both combinations of those with and without the lock held
across the negotiation; none of them changed it, so my explanations for
it were wrong and I am not offering another. It does not reproduce at
any load I can create short of saturating every core, `make validate`
and the full gate are green, and production's budget is 5 s rather than
150 ms against a negotiation measured at roughly 50 ms. Still, it is a
real difference from `main` and somebody should look at it with fresher
eyes than mine.

A fresh agent with no context on the change reviewed the diff against
`AGENTS.md` and found five faults, all fixed here: the repeated write,
the misclassified locked keyring, the eviction that closed a connection
other threads were still using, the poisoned-mutex lockout, and the
doubled deadline. It demonstrated the first with its own `dbus-daemon`
fixture, showing two `CreateItem` calls for one `Put` and a subsequent
`get` and `delete` both answering `Ambiguous`, and the fourth and fifth
with runnable probes.

Its security verdict on the revision it read was **BLOCK**, on that
repeated write alone: no secret reaches argv, logs or a `Debug` impl,
and sharing one session across accounts crosses no boundary that was not
already crossed, but a credential that cannot be deleted cannot be
revoked. It named three conditions to reach PASS — scope the retry to
`Operation::Get`, stop classifying a locked item and a locked collection
as transport failures, and add a write regression test that fails if the
daemon sees a second `CreateItem` for one call. All three are met here.
It has not re-reviewed the result, so that is my claim rather than its
verdict.

It also noted that the change lengthens the window in which a DH session
key and an open authenticated session exist, from roughly one operation
to the process lifetime. That is inherent to sharing a session rather
than incidental, and it is written down here because it was written down
nowhere else.

Two notes on my environment rather than on this change, both of which
reproduce on unmodified `main`. `tests/test_publish.sh` fails under
`en_US.UTF-8`: it compares a `sort`ed file list against an ASCII-ordered
literal, and `app/CMakeLists.txt` collates before `Cargo.lock` in a
UTF-8 locale and after it under `LC_ALL=C`. And `make validate` needs
cmake for `test-app-qml`, which `CONTRIBUTING.md` lists as a
prerequisite for `make app-build` but not for `make validate`.

No interface change, so no screenshots.

## Release Notes

- The login keyring no longer crashes while Omamail reads or saves an
account's credentials, which could leave mailboxes empty until the
keyring was unlocked again.
…uacnlee#245)

"Draft recovery could not be saved. Keep this window open." never leaves
the composer. The failure path sets it through
`showRecoveryNotice(message)` with no second argument, so
`composeRecoveryUpdateNoticePending` stays false, and the success path
only clears a notice when that flag is true — it was written for the
"needs an updated backend" warning and answers only that one. Every
later save can land and the composer still tells the user their draft is
not on disk.

That is worse than a stale string. The warning is the only signal the
composer gives about durability, so once it is wrong in the reassuring
direction it stays wrong in the dangerous one: a user who learns to
ignore it has no warning left the next time recovery really is failing.

Reproduction: a machine running 0.10.5 whose composer had shown the
warning for days.

The slot holds one line, so the failure also hides whatever the window
was already saying, and simply clearing it on success would swap a stale
warning for a missing one. The failure now remembers the line it covered
and a landed write puts that line back. Ownership sits in
`showRecoveryNotice`: anyone else who writes the slot takes the memory
with it, so a warning raised after the failure — the common case,
because saves run whether or not the window is open and
`restoreComposeRecovery` only speaks when it is summoned — is current
and is not written over by what an older failure covered. A captured
"needs an updated backend" line is answered by the same write and is not
restored. Discarding the draft drops the covered line but keeps the
failure's own warning answerable, so closing the composer between a
refused save and the next successful one does not strand "Keep this
window open." on a window with no composer in it.

Two notices in this file are sticky for the same underlying reason and
are left alone here: "Checking whether the recovered message was sent.
Reconnect the mail backend." and "This draft belongs to an unavailable
account." Both survive the condition they describe, and the machinery
above can re-display the first one after a write has just reached the
backend. They want the same treatment and a pull request of their own.

## Verification

`make validate` green on this commit — Qt 6.11.2, Arch, Omarchy 4.0.4.
One note for anybody running it in a non-C locale:
`tests/test_publish.sh` compares a `sort`ed file list and fails under
`de_AT.UTF-8` on a pristine `main` as well, so this was run with
`LC_ALL=C`. That is unrelated to this change and is not fixed here.

Four new tests in `ui/tests/qml/tst_app_compose_pending.qml`; the whole
file is 81 passed, 0 failed.
`test_native_recovery_failure_notice_clears_once_a_save_lands` is the
plain case.
`test_native_recovery_save_gives_back_the_delivery_warning_it_covered`
drives the real path — `compose.recoveryRead` with a pending send,
`outbox.snapshot` answering `unknown`, `restoreComposeRecovery` — then
fails a save and lands the next one.
`test_native_recovery_save_answers_the_update_notice_it_covered` covers
the API 2 line.
`test_native_recovery_failure_notice_is_answered_after_the_draft_goes`
discards the draft between the failure and the write. All four fail
against the unfixed controller, each with the failure string showing
where the answer should be, and I ran them there and watched it.
`test_native_recovery_save_keeps_a_warning_raised_after_the_failure`
passes on `main` too: it guards the inverse ordering against a later
change rather than proving an upstream fault, and is listed here so it
is not read as more than it is.

A fresh agent reviewed the diff against `AGENTS.md` three times, with no
part in writing it. It caught two defects that earlier versions of this
change would have shipped: identifying the notice by comparing its text,
which erased a delivery warning on one ordering, and then — after the
flag replaced the comparison — the inverse ordering, where a warning
raised after the failure was overwritten by what the failure had
captured. Both are the reason ownership now sits in
`showRecoveryNotice`. Its third pass confirmed that is the only writer
of the slot in production code, that the branches are exercised rather
than merely reachable, and found the remaining hole this change closes:
`clearComposeRecovery` dropped the ownership flag along with the covered
line, so a composer closed between a refused save and the next write
left the warning up for the rest of the session. It notes one thing not
covered by a test: a second failure in a row keeping the first capture.

Not done: I did not drive the fixed build on screen, so there are no
before-and-after screenshots. The visible difference is a toast that
disappears where it used to persist, and a covered warning that comes
back; no control, colour or layout changes. The hand test the
contributing guide asks for is outstanding.

## Release Notes

- The "Draft recovery could not be saved" warning now disappears once
the draft has been written, instead of staying up for the rest of the
session.
- A delivery warning the composer was showing is no longer lost when a
recovery save fails and then succeeds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Christian Dandachi <dandiccf@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
en3r0 and others added 27 commits September 21, 2026 23:32
…ge (huacnlee#271)

## Problem

Settings' "Google OAuth client" section ("Shared by every mailbox
above") opens `SetupPage.qml` through `openClientSetup()`, which pushed
straight to the setup page without touching which account was active.
`SetupPage.qml` reads `root.service.auth`, and `Service.qml`'s `auth`
property is `current.auth` — whichever account the window happens to
be showing.

With a saved IMAP mailbox and no Gmail one yet, `current` stayed on the
IMAP row, so the Gmail-branded setup page rendered bound to that row's
`ImapAuth`. `ImapAuth` has no `saveCredentials`, so pressing the button
in the OAuth client form's Save step threw immediately: no browser
opened, no error shown, nothing happened.

Reproduced on a real machine via `journalctl`:

```
TypeError: Property 'saveCredentials' of object ImapAuth_QMLTYPE_517 is not a function
  at SetupPage.qml:72
```

Add mailbox and Edit already avoid this by switching the active account
before pushing a setup page (`chooseProvider`, `editAccount`). This
gives `openClientSetup` the same discipline.

## Solution

- `openClientSetup()` now finds a saved Gmail account and switches to
  it before pushing the setup page, or falls back to
  `chooseProvider("gmail")` to draft one the way Add mailbox would when
  none exists yet.
- The lookup itself (`Service.gmailAccountId()`) lives in `Service.qml`
  rather than inline in `App.qml`, which was already within 158 bytes
  of `tests/test_source.sh`'s 128 KiB per-file ceiling and had no room
  for an inline loop plus explanation.

## Verification

`make validate` green: `test-rust`, `test-js`, `test-shell` (`LC_ALL=C
make test-shell`), `test-qml` (`make test-qml` — 64/64 QML tests plus
the native html-output regression), `test-app-qml` (cmake build of the
standalone app + `tst_standalone_composition`), `qml-check` (`qmllint`
on both changed files — 348 warnings before and after this change,
none new), `omarchy plugin validate .`, `git diff --check`.

The new regression, `tst_app_client_setup_wrong_account.qml`, was
watched failing against the code without this fix — one saved IMAP
account, no Gmail one, `app.openClientSetup()` from Settings — with
`mailService.current` never leaving the IMAP host:

```
FAIL!  ... 'the active account moved off the IMAP row onto a Gmail one' returned FALSE.
```

With the fix, the same test passes: the active account switches to a
fresh Gmail row, `mailService.auth.saveCredentials` is a function (not
ImapAuth's missing one), the Gmail setup page is showing, and the IMAP
mailbox is confirmed untouched — still first in the account list, its
own auth's `loginBusy` still false.

Driven against the real backend and account/service objects (the same
`Omamail.Service` + `BackendFixture` pattern `tst_app_edit_connect.qml`
uses for an adjacent wrong-page bug), not a fully stubbed service, so
the fix is checked against the real per-provider Loader that builds
each account's auth object.

## Release Notes

- "Set up..." on the shared Google OAuth client section in Settings no
  longer silently does nothing when a non-Gmail mailbox is active; it
  switches to (or creates) a Gmail mailbox first, the way Add mailbox
  and Edit already do.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
## Problem

When Omamail is used with a replacement bar plugin (such as Clear Bar or
Bar Screens) on Omarchy Quattro, the envelope icon in the bar appears
crossed out as if disconnected, even though the mail client is fully
authenticated and functioning. Additionally, unread mail indicator dots
and calendar/mail previews do not display.

### Root Cause
Omarchy intentionally gives replacement bars a service-less entry facade
(`pluginShellForBarEntry`), so `bar.shell.serviceFor("omamail")` returns
`null` to third-party bars. Consequently, `BarWidget.qml` evaluates
`connected = false` and strikes through the icon (`crossed: true`).

## Solution
Rebases and brings forward the isolated JS bridge from huacnlee#204 against
current main (`v0.10.6`):
- When `bar.shell.serviceFor("omamail")` is null, `BarWidget.qml` falls
back to `ui/bar/Bridge.js` (`.pragma library`).
- The bridge safely exports detached, bounded preview snapshots and
action callbacks without exposing the `Service` QObject or credentials.
- Resolves the `Makefile` merge conflict with `test_theme.js` /
`test_shell_theme.js`.

## Verification
- `make test-js`: All node test suites pass.
- `make qml-check`: Passes without errors.
- `make test-qml`: 985 QML tests pass.
- Live verified on Omarchy 4.0.4 with `io.github.ayumad.clear-bar`
(Clear Bar) and Gmail provider: envelope displays connected with unread
status dot active.

## Release Notes

- Omamail status, unread dots, and mail and calendar previews now work
in replacement Omarchy bars.

Co-authored-by: Jon Kinney <jonkinney@gmail.com>

---------

Co-authored-by: Jon Kinney <jonkinney@gmail.com>
Fixes huacnlee#153.

Proton Bridge can assign the lowest UIDs to the newest imported
messages. Taking a descending-UID page therefore selects old mail before
the UI or unified inbox can sort it. Sort the matching messages by IMAP
INTERNALDATE before choosing a page, using descending UID only to break
date ties.

Listing retains the compact UID snapshot and reads dates in explicit
batches of at most 4096 snapshot UIDs. This keeps date replies below the
existing response limit without walking empty UID ranges. Unsolicited
UID/FLAGS updates cannot erase an already fetched date. A high-UID
search window is no longer published as a settled newest prefix: all
candidate windows must answer before the final page is chosen. This
trades early partial search results for correct chronology on imported
mailboxes; each page still uses the existing request deadline and
numeric offset semantics.

## Verification

A fresh independent agent re-reviewed the revised diff and found no
blocking defects. Its remaining documentation note was corrected: the
working agreement now describes the compact snapshot and bounded date
batches. Scoped security verdict: **PASS**. The first review's
date-overwrite and response-size findings are covered by regressions,
including a 4100-message TCP fixture spanning multiple batches and
pages.

The new multi-window runtime regression was transplanted onto unmodified
upstream `3024f026b71b9b5041d2da46a198670257a5aaac`, where it compiled
and failed: the first page was `[4100, 4099]` instead of the
date-ordered `[1, 4097]`. The same regression passes with this fix. The
test also rejects an unbounded date request and covers unsolicited flag
updates across date batches.

`make validate` passed in this isolated branch's worktree with its own
build directory: 606 Rust tests passed (11 ignored), all JavaScript and
shell/Python suites passed, and the QML suites reported 980 + 6 + 64
passing tests with zero failures. QML lint, plugin manifest validation,
`cargo fmt --check`, and `git diff --check` passed. The separate
STARTTLS fix is not included in this branch.

Live Proton Bridge: the combined local build returned 100 distinct inbox
messages across two 50-row pages, newest-first across the page boundary;
the two list commands completed in 0.23 seconds on this mailbox. This is
a functional check, not a large-mailbox benchmark.

## Release Notes

- Proton Bridge and other IMAP mailboxes now show the newest received
messages first, including across pages and in unified inboxes.
…lee#279)

## Summary

Fix typing immediately after opening the composer with `r`, `a`, `c`, or
`f`.

`ComposeView` binds its outer `DropArea`'s focus to `opened`. Opening a
composition therefore focuses the container before
`App.applyContextFocus()` runs. The existing `focusWithin(compose)`
guard sees focus inside the composer and skips `takeFocus()`, leaving
keystrokes with a non-editable item.

Remove that competing focus binding and its obsolete comment. The
existing context-based focus handling now selects the reply body or
recipient field as intended. This follows the documented single-owner
focus model without adding another guard, timer, or shortcut handler.
Existing focus inside a draft remains protected by `focusWithin`.

Remove the source-grep assertion that required the faulty binding; the
keyboard-driven runtime regressions replace it. Keep the prohibition
against unconditional composer focus.

## Verification

- The full `AppComposePending` QML suite passes with the fix.
- New keyboard-driven regression cases cover reply, reply-all, new
message, and forward: activate the actual shortcut, verify the initial
field/caret, then type `hi` and verify the text.
- All four new cases fail when the original `focus: root.opened` binding
is restored.
- All validation gates pass: Rust, JavaScript, shell/Python, QML (984
tests), standalone QML, `qmllint`, plugin validation, and `git diff
--check`. The final `make validate` run passed the suites and lint, then
rejected a temporary build-cache symlink; after removing that symlink,
plugin validation and the diff check passed separately.
- Two earlier full-suite runs hit the existing 4-second draft-toast
timing assertion; the full QML suite and the final validation run
subsequently passed without changing that test.

## Visual evidence

**Reply focus:** comparable before-and-after screenshots are attached
below.

Both captures use the real composer in the offscreen QML fixture,
synthetic `sender@example.com` mail, Solarized Light colors, an
identical 980 × 692 composer region, and the same input sequence: `r`,
then `hi`, without a click or Tab.

- **Before:** the reply opens, but its body remains empty after typing.

<img width="980" height="692" alt="reply-focus-before"
src="https://github.com/user-attachments/assets/36dbc648-436d-44e9-88d2-88050309204a"
/>

- **After:** `hi` appears at the start of the reply body and the caret
is in the editor.

<img width="980" height="692" alt="reply-focus-after"
src="https://github.com/user-attachments/assets/327a6b02-97e1-4241-b955-2df6f28df825"
/>

## Security review

**PASS (scoped):** the production change removes a QML focus binding and
its comment. It introduces no changes to mail parsing, rendering policy,
credentials, network requests, subprocesses, or sending. Regression
tests use synthetic data and perform no send.

## Release Notes

- Start typing immediately after opening a reply or reply-all. New
messages and forwards also focus their recipient field automatically.
Fixes huacnlee#225.

The native backend treated the Proton Bridge preset's loopback
`insecure` setting as a reason to skip encryption. Bridge sends its
greeting in the clear but requires STARTTLS before authentication; its
self-signed certificate needs a local trust exception, not a plaintext
session.

Separate transport selection from certificate verification. Loopback
IMAP/SMTP uses STARTTLS, including the default Bridge ports and custom
ports, except that 993/465 select implicit TLS. Remote services retain
the existing standard STARTTLS-port/otherwise-implicit-TLS convention.
`insecure` only relaxes certificate trust for the exact loopback
allowlist, and `localhost` is dialed as 127.0.0.1. TLS handshake
signatures are still verified, buffered plaintext is refused, and failed
upgrades never fall back to plaintext authentication.

Existing plaintext test peers explicitly opt into a fixture-only setting
compiled only in unit-test or integration-credential-test builds. Normal
builds have no plaintext transport variant.

## Verification

A fresh independent agent re-reviewed the revised diff and approved it
with scoped security verdict **PASS**. The initial review's three
findings were addressed: custom loopback ports no longer authenticate in
plaintext, remote nonstandard ports retain implicit TLS, and policy
tests exercise the production host/port/trust selection path with only
the socket destination substituted.

Controlled IMAP and SMTP peers cover default Bridge ports, custom ports,
standard STARTTLS ports, implicit TLS, strict verification, mixed local
IMAP/remote SMTP settings, refusal, malformed TLS, and buffered
plaintext. The reviewer ran 18 connection tests, all 57 IMAP tests, and
a normal-build `cargo check --locked --lib`; all passed.

The new `proton_custom_port_requires_starttls_before_credentials`
regression was transplanted onto unmodified upstream
`3024f026b71b9b5041d2da46a198670257a5aaac`, where it compiled and
failed: the peer received a non-STARTTLS first command and never
reported encrypted credentials. It passes with this fix and calls
production `connect()` directly. Only synthetic localhost credentials
were used for this regression.

`make validate` passed in this isolated branch's worktree with its own
build directory: 607 Rust tests passed (11 ignored), all JavaScript and
shell/Python suites passed, and the QML suites reported 980 + 6 + 64
passing tests with zero failures. QML lint, plugin manifest validation,
`cargo fmt --check`, and `git diff --check` passed. The separate
ordering fix is not included in this branch. No live SMTP message was
sent.

Live Proton IMAP listing succeeded using the combined local build. A
separate synthetic peer tested the installed normal release with
`testPlaintext: true`: it still received STARTTLS, and its refusal
received no credentials, confirming that the test-only plaintext
transport is unavailable in the shipped build configuration.

## Release Notes

- Proton Mail Bridge connections now negotiate TLS before signing in,
including Bridge installations using custom ports.
When “Always show images” changes while a message is open, the reader
now uses the current preference immediately. Turning it off removes the
approved document before a replacement render returns, discards queued
image requests, and ignores late image bytes. Turning it on rerenders
the open message; a cursor preview remains blocked, including in a
unified mailbox.

The account owns this transition because the service preference is bound
to every account. A native read that began under an older image policy
is rerendered from its opaque reader key before its document reaches the
UI.

The macOS standalone API contract fixture now creates its synthetic
private storage directories with `0700` permissions before launching the
backend. That prevents a background permission hardening step from being
mistaken for a disabled agent method's side effect in the storage
snapshot test.

## Verification

- Qt 6.11.2 offscreen: `tst_render_cache.qml` (17 passed),
`tst_unified_routing.qml` (28 passed), and `tst_prefetched_reader.qml`
(14 passed). The new regression cases failed against the earlier PR head
before the repair.
- `make test-js`, `bash tests/test_source.sh`, `make qml-check`, and
`git diff --check` passed on the image repair commit `02008a3`.
`qmllint` reported warnings while exiting successfully.
- On `960e1d0`, the API contract fixture passed Python syntax parsing
and `git diff --check`. The first macOS job stopped earlier in the
standalone host's `SettingsTest::watchSettlesAfterDirectoryMutation`,
whose changed signal count grew after its fixed settling wait. That job
is being rerun on the same commit; the packaged API contract test has
not yet run there.
- Full `make validate`, the packaged API contract test, and a live
visual check were not run locally in this review.

## UI evidence

Comparable before and after screenshots of the reader with remote images
blocked and allowed are still needed, using the same synthetic message,
theme, size, and scale. The visible difference is that changing the
preference updates the open reader, while a unified mailbox preview
stays blocked.

## Release Notes

- Changing the remote image preference now updates the open message and
stops queued image requests when images are disabled.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
huacnlee#285)

Diagnostic reports kept only a small set of error identifiers, turning
many Gmail, calendar, authentication, upload, and dispatcher failures
into `unknown_error`. The report now retains the backend’s fixed
identifiers for those paths, including `invalid_upload_encoding`, so
“Diagnose with AI...” can distinguish these failures without retaining
server text or user data.

`scripts/diagnostics.py` still uses an exact allowlist and replaces
every other message with `unknown_error`. The source drift test checks
the fixed provider codes plus the upload decoding error, whose name does
not begin with `upload_`. The QML recorder and private storage behavior
are unchanged. If the companion Gmail sign-in PR adds `gmail_signed_out`
first, whichever PR merges second must include that new code in the
allowlist.

## Verification

- On `0a45fda`, all 10 `tests/test_diagnostics.py` cases passed with
synthetic state held inside the review worktree. The new upload decoding
assertions failed on the earlier PR head before the repair.
- The macOS arm64 job on `0a45fda` exposed a test fixture issue: the
contract test created private storage directories as `0755`, while
backend startup correctly tightened them to `0700` before the
disabled-method snapshot. The fixture now seeds those directories as
`0700` on Unix in `0e9ca97`.
- Python syntax parsing and `git show --check` passed on `0e9ca97`. CI
is pending on that head.
- The author reported `make validate` passing on the original head
`d6d11df`. It has not been rerun on `0e9ca97`; the current review
environment prohibits `/tmp` task artifacts used by that suite.
- A fresh agent reviewed the original diff against `AGENTS.md`; its
findings about dispatcher messages and drift coverage were incorporated
before this review fix.

## Release Notes

- **Diagnose with AI...** reports now name Gmail, calendar, sign-in, and
upload failures instead of showing them as unknown errors.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
## Reproduction

All mailboxes view with a JMAP account whose Inbox has a thread of
several messages:

1. Open that thread.
2. The conversation rail appears, vanishes and appears again — about
three times — with the reader reflowing under it each time, before it
settles.

A single message does not do it. On one mailbox it is milder, but the
same mechanism.

## What is happening

The rail is drawn from `Service.conversationProjection`, asked of the
backend whenever `conversationSource` changes, and asking began by
blanking what was in hand — `showsRail: false`, no stops — until the
reply. The source is an object literal, so it is a new object, and its
change signal fires, whenever any input is reassigned, whether or not
anything in it differs. In a merged view that is constant:
`Unified.composeThread` and `composeMembers` build fresh objects on
every read, and `mailboxes` is a new array on every unified snapshot,
which every member account's list change produces. Opening a thread
brings several of those in a row — the selection, the member seed and
merge replies, the quiet mark-read's optimistic update — and each one
was rail gone, `account.conversation`, rail back.

## The change

- A source that reads the same as the one last asked for, compared as
text, asks nothing.
- When the source names the same rail as the projection in hand — the
same thread, in the same mailbox, of the same account — that projection
stays drawn until the new one lands. Only the ways along it are cleared
— its navigation, and the first and last stop that `n` and `p` fall back
to without one — so a stale next or previous cannot be followed in
between, and no end jumped to; a late reply is refused by the serial as
before.
- A different rail starts from a blank, as before, so its predecessor's
stops are never drawn for it. The account is part of the identity
because All mailboxes composes a message id with its account on the way
out but leaves `thread.id` as the provider gave it, so two accounts can
each hold a `t1` in their Inbox. Keyed on the thread and mailbox alone,
the reader moving from one to the other kept the first account's rail,
stops and caption up until the second's landed. `select` in a merged
view happens to clear the other mailbox first, but two paths do not:
switching mailboxes in the one-mailbox view while each has a thread open
(`switchTo` leaves every mailbox's selection where it was), and turning
All mailboxes back on while the mailbox that last answered the reader
still holds a thread. The key's parts are JSON-encoded so no id can run
into the next.
- A failed ask forgets that the source was asked, so the next change of
the same source asks again.

The key and the keep-or-blank rule are `Model.projectionKey` and
`Model.pendingProjection`, so node can prove them; `Service.qml` only
wires them, and names the reading account in the source it keys
(`accountId`, a field the backend's projection does not read).

## Before and after

Both frames: the reader open on a three-message conversation, at the
moment a second projection of that same conversation is in flight —
which is what a member merge, the quiet mark-read and a list refresh
each produce while a thread opens. Same view, same state, same 1400×900
window, same theme (this machine's Omarchy theme, Ristretto, dark),
scale 1, synthetic mail.

**Before** (main at `f2774a9`): the rail has collapsed and the body has
reflowed to the full width. This is the frame that flashes.

![Before: the rail collapsed while the projection is in
flight](https://github.com/Depodra/omamail/releases/download/pr-208-screenshots/before.png)

**After** (this branch): the rail, its stops and its caption stay up;
only the ways along it — navigation, first, last — are cleared
underneath, which draws nothing.

![After: the rail stays up while the projection is in
flight](https://github.com/Depodra/omamail/releases/download/pr-208-screenshots/after.png)

Once the projection lands the two are byte-identical ([the settled
frame](https://github.com/Depodra/omamail/releases/download/pr-208-screenshots/settled.png)):
the change alters when the rail is drawn, not how it looks.

How they were made: rendered offscreen by the QML engine from the
plugin's own `App.qml`, through the repository's QML test stubs of the
shell singletons with this machine's theme colours and font size laid
over them, with a real `Service` deciding the projection at each moment
through the same `BackendFixture` the QML tests use. One harness file
produced all four frames; only `ui/Service.qml` and
`ui/account/Model.js` differ between before and after. A recording of
the live shell cannot hold this frame still — it lasts one backend round
trip — and the live mailbox is real mail, so the frames are synthetic
and rendered. The images are release assets on my fork, the attachment
host having no way in from the command line.

## Verification

`TZ=UTC LC_ALL=C make validate` green on `8d42c80` (Arch, Qt 6.11.2,
cmake 4.4.3). `TZ=UTC` because
`agent::events::tests::a_whole_day_runs_midnight_to_midnight_and_an_end_defaults_to_an_hour`
assumes a UTC machine and fails on an Australia/Brisbane one with or
without this change; `LC_ALL=C` because `tests/test_publish.sh` compares
a `sort` of file names and en_AU collation orders `app/CMakeLists.txt`
before `Cargo.lock`, again with or without this change.

New tests this round, each run against the previous head of this branch
(`2b20961`, where the key was thread and mailbox alone) and watched
fail:

- `ui/tests/test_model.js`: `projectionKey` keys the same thread id in
two accounts differently, and no id can run into the part beside it.
- `ui/tests/qml/tst_unified_routing.qml`,
`test_a_thread_with_the_same_id_in_another_account_is_another_rail`: two
JMAP mailboxes in a merged view, each holding a thread `t1` in its
Inbox; the reading host moves from one to the other, the projection in
hand goes blank rather than keeping the first mailbox's stops, and what
lands is the second's. Without the account in the key it fails with
"Bob's t1 is not Ada's: nothing of Ada's rail stays up while Bob's is
fetched — Actual true, Expected false".
- `test_model.js` and `tst_native_account_projections.qml`
(`test_same_thread_keeps_the_rail_while_a_projection_is_in_flight`) now
also assert that a kept projection's `first` and `last` are cleared with
its navigation. Both fail on the first commit of this round (`afa06de`),
where they survived.

From the first round, still in place and still failing on `main`:
`ui/tests/qml/tst_native_account_projections.qml` — the same thread
keeps the rail, stops and caption while a projection is in flight and
loses only its navigation; an unchanged source does not ask again — and
`test_model.js` for `pendingProjection`.

By hand (first round): the Omarchy shell on Hyprland, All mailboxes over
a JMAP (Stalwart) mailbox and an IMAP one, opening multi-message threads
from the JMAP account — the rail appears once and stays, where before it
drew and vanished about three times per open. Driven at the three-column
size in one theme. This round's change does not alter that path — one
account's thread is keyed as before, with its account in front — and the
cross-account case it adds is the QML test above and the frames.

Two fresh agents reviewed this round's diff with empty context, one
against `AGENTS.md` and one against the findings above. What they found,
all fixed in the second commit: the in-flight window still let `n` and
`p` reach an end of the rail, because the kept projection carried the
backend's `first` and `last`, which `App.stepMember` falls back to when
the open message has no navigation entry (`main` never met this: its
blank projection took `showsRail` with it); `projectedThread` and
`sameThread` had outgrown what they held, now `projectedRail` and
`sameRail`; the Node assertion for the encoded key did not discriminate
a plain join, now it does; a blank projection shared its empty lists
with every other blank, now built afresh; and the QML test now pins the
mailbox it runs in and lets go of the service's host however it ends.
Both traced `account.conversation` in `src/account/conversation.rs`: it
indexes named fields of a `Value`, so the `accountId` the source now
carries is ignored there, and no contract fixture pins the params. One
asked whether the account should stay off the wire. It stays in the
source on purpose: the text comparison must see an account switch too,
or a source from another mailbox that happened to serialise identically
would be neither re-asked nor blanked.

## Release Notes

- In All mailboxes, opening a conversation no longer makes the rail
flash and the reader jump several times before it settles.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
When the shell process or creating thread exits while another process
still holds the backend's stdin open, `omamail serve` can remain alive
and retain account sessions and the outbox lock. On Linux, register
`PR_SET_PDEATHSIG` before starting the protocol runtime and fail startup
if registration fails or the parent exits during registration. The
signal is `SIGKILL`, so inherited signal dispositions cannot keep the
orphan alive.

The regression runs the backend with isolated XDG directories and empty
accounts. A separate supervisor holds stdin open, kills the launcher,
and verifies the backend exits; normal `system.quit` and EOF shutdown
remain covered. The old binary failed the parent-death case and the
updated binary passes. `cargo test --locked --target-dir
.worktrees/review-pr-284/target --test backend_lifetime -- --nocapture`,
`cargo fmt --all --check`, and `git diff --check` passed on top of main.

Addresses huacnlee#278. This protects the reported reparented-process path. It
does not identify a backend whose parent process/thread remains alive
after a shell component leak, nor one adopted before its first parent
observation. An interrupted send may remain in `unknown` recovery state
and is not automatically resent. Security review: PASS for the
parent-lifetime boundary; no real accounts or credentials were used.
…uacnlee#297)

If account readiness changes while a draft is open, `resetNavigation()`
previously replaced the navigation stack with the mailbox root while
`ComposeView.opened` stayed true. The composer remained visible over the
sidebar, list and reader, and mailbox shortcuts could become active
behind the draft. Rebuild the root together with any still-open mail or
event composer overlay, preserving the draft and its keyboard context.

A synthetic Qt 6.11.2 regression reproduced the split state before the
fix. After the fix, the composer, navigation stack, mailbox visibility
and keyboard context stay aligned across readiness changes. The keyboard
test has a positive control: `d/e` dispatch trash/archive in the mailbox
context; the same keys type into the restored draft and dispatch no
mailbox action. It also covers Settings return, queued-send closure and
the event composer.

Validation on current main (including merged huacnlee#208): compose QML 92/92,
navigation QML 28/28, event composer QML 6/6; source checks, QML lint,
and diff check passed. Security review: PASS for the readiness/keyboard
action boundary. UI/navigation logic review: PASS. Actual desktop visual
reproduction of the reporter's reboot sequence remains unverified; no
real account was used.

Addresses huacnlee#291. The reporter's exact trigger is still unknown, so keep
the issue open until the affected desktop session confirms the
overlapping layout is gone.
Publish Omamail v0.10.7 from this branch. Release CI builds and verifies
the plugin backends and all three standalone desktop packages, creates
the tag and one release, then updates backend-version and the released
API contract in this PR after verifying every public download.

Merge this PR once the pin commit and required checks pass. Main
receives the version and runtime pin together in one merge.

## Release Notes

- Update the Omarchy backend and standalone desktop applications to
v0.10.7.

---------

Co-authored-by: Omamail Release <41898282+github-actions[bot]@users.noreply.github.com>
## Summary

Find archived IMAP and Outlook messages through account-wide search, and
add a shared All mail destination for IMAP and combined Gmail/IMAP
views. Search includes aggregate-only archived messages and keeps
Junk/Trash excluded. Folder browsing remains available for every
destination.

## What changes

- **Compatible navigation:** IMAP keeps Archive on the pinned API 5
backend. All mail replaces it only when connected to API 6 or newer. The
archive action and native Archive folder mapping remain available.
- **Complete, newest-first search:** selectable physical folders and
special-use All Mail folders participate. Results are sorted by
INTERNALDATE after the scan finishes, with folder-qualified UIDs
throughout.
- **Safe overlap handling:** server-issued EMAILID or X-GM-MSGID
collapses cross-folder copies. A generic server that advertises `\All`
without either identity is searched through `\All` alone (RFC 6154
defines it as every message in the store), so Inbox/Archive copies do
not repeat as extra rows. Message-ID and RFC822.SIZE only nominate
possible All↔Trash/Junk overlaps; complete-content SHA-256 decides every
exclusion, and a candidate over 8 MiB is not read and stays visible. A
sender-written Message-ID, headers or size never suppress a result.
Servers with neither `\All` nor a server identity preserve folder/UID
rows, so overlapping folders there may still produce duplicates.
- **Bounded parallel work:** at most four search workers per account
advance at most four folders per call, with a streamed UID inventory and
SEARCH/metadata windows of at most 4096 existing UIDs. This keeps SEARCH
response lines below the transport limit without walking empty UID gaps.
Content verification reads at most 64 candidates and 8 MiB per step.
Workers have a 12-second deadline inside the existing 22-second request
deadline. Incomplete scans and page assembly return continuations
instead of a misleading partial newest-first page; `mail.list` follows
continuations for at most 120 seconds, and other IMAP listings keep
their single-continuation guard.
- **Portable pagination:** UI and CLI share self-contained,
account/query-bound cursors carrying the last result's date, folder, UID
and UIDVALIDITY. Cached results accelerate later pages; eviction,
expiration or a backend restart transparently triggers a rescan and
resumes strictly after the stored sort position. Deleting the boundary
message does not invalidate pagination. Cached pages verify candidate
UIDs, skip deleted messages and refill from later results. Credentials
never enter cursors, and token refresh preserves the account binding
while changed credentials authenticate through a fresh scan. No durable
search cache is written.
- **Accessible navigation:** narrow mailbox bars scroll instead of
dropping destinations, with a visible scrollbar and selected
destinations brought into view. Drafts appears before Sent for Gmail,
IMAP, Outlook and JMAP.

Pagination uses live results with short-lived cache reuse, not a frozen
historical snapshot. New mail before the boundary appears on refresh;
moves may reappear under a new folder/UID identity. Completed results
expire five minutes after scan completion, while unfinished work expires
after five idle minutes. Expired work continuations, account/query
mismatches and detected UIDVALIDITY changes require refresh; losing a
completed cache does not. Limits are explicit: 2048 folders, one million
inventoried UIDs and 250,000 matching folder/UID identities per scan, at
most 16 retained snapshots and two million retained inventory/result
entries in total. Inventory storage is released after scanning. API 6
search semantics, continuation handling and error behavior are
documented in `docs/BACKEND-RUNTIME.md` and covered by contract cases.

Replacing Archive with All mail on API 6 and the navigation scope still
await the maintainer's product decision.

## Screenshots

**Synthetic Qt component captures**, not live-mail screenshots. These
render the production sidebar and compact-bar components and actual
provider descriptors with synthetic account state and test-shell
styling; the capture-only Button stub renders selection with a
translucent fill and bold text. Before is the PR base `17838c6`; after
is this implementation on API 6. Each comparison uses identical
dimensions, palette, font and 1x scale. Sidebar views are 240×340;
compact views are 320×76. Image labels and margins are added outside the
captures.

### Individual IMAP and unified sidebars

The individual view compares the selected Archive destination with its
All mail replacement. The unified view holds Inbox selected and shows
the added shared All mail destination and Drafts/Sent ordering.

![Light-theme sidebars: labeled before and
after](https://github.com/user-attachments/assets/9ee85ff2-75e3-46fe-8284-c89499eaf569)

![Dark-theme sidebars: labeled before and
after](https://github.com/user-attachments/assets/f27e1640-ef43-4a3a-a52c-5bd0d470b566)

### Narrow mailbox bars

Each theme covers both Inbox selected and Trash selected. Before, Trash
disappears at this width; after, selection scrolls it into view and the
scrollbar indicates the viewport position.

![Light-theme compact bars: labeled before and
after](https://github.com/user-attachments/assets/c272e036-fe60-480d-bdd0-7ca1f6789c1f)

![Dark-theme compact bars: labeled before and
after](https://github.com/user-attachments/assets/c9ca2973-f9c2-4f17-a68a-dd4a307cbf6f)

## Verification

- Latest integrated-head `make validate`: Rust, JavaScript and
shell/source checks passed; the QML suite reported 996 passed and 8
failed, all in `KeyboardReaderNavigation` (`tst_preview_on_cursor.qml`).
The same eight failures reproduce in isolation using both current QML
and the previous PR head's QML (`aad738a`), with the same rebuilt
backend serving unchanged pure-model RPC methods. This is an outstanding
validation failure, not a green full-suite result.
- Checks after the QML failure were run separately and passed:
standalone QML, qmllint, Outlook HTTP and sidebar text tests, the native
HTML/Qt resource-request regression, plugin validation and `git diff
--check`.
- One earlier full run failed the existing compose-recovery notice test
(a stale `Draft saved` notice); the isolated compose suite then passed
all 90 checks and the complete validation rerun passed without a
compose-code change.
- API 5 released contract against the checksum-verified pinned 0.10.7
Linux binary, and the full API 6 contract against the rebuilt 0.10.7
development backend.
- A synthetic generic `\All` server driven through the real scan path:
Inbox/Archive copies appear once, INBOX and Archive are never selected,
aggregate-only mail survives, verified Trash/Junk copies are excluded,
and a message sharing only Message-ID and size with Trash survives. The
test fails on the previous implementation with `7:INBOX` and `7:Archive`
duplicated.
- Oversized candidates are not body-read and remain visible.
- Synthetic IMAP regressions for aggregate-only messages, excluded
aggregate membership, unrelated content with a reused Message-ID,
identical headers/size with different bodies, server-issued identities,
stable identity representatives across reordered folder discovery, and
unsolicited FETCH updates.
- A controlled TCP fixture with 120 eligible folders and 10,000 matches
verifies multiple concurrent workers, a maximum of four active workers,
bounded SELECT count per call, correct global ordering, and cached
paging without repeating inventory, SEARCH or metadata scans. Page
candidates receive a bounded UID-presence check. Its per-command delay
is 10 ms; this is synthetic evidence, not a live-server benchmark.
- A 15,000-message fixture with sparse ten-digit UIDs verifies that
SEARCH response lines stay below 64 KiB and sparse gaps do not create
empty-window walks.
- Cursor regressions cover cache loss/expiration, credential rotation,
deletion before/at/after the boundary, metadata-time expunges,
equal-date ordering, cached-page refill, multi-folder continuations,
malformed/mismatched cursors and UIDVALIDITY changes.
- Three independent `omamail list` processes paginate successfully after
deletion of the previous boundary message, without durable search-cache
writes.
- Literal-aware streamed inventory parsing keeps forged IMAP responses
inside message literals; malformed and mismatched cursor tests verify
refusal before any connection.
- A cancellation fixture verifies all four busy sockets close and
abandoned continuation state cannot resume.
- Actual provider-registry checks for APIs 1, 5, 6 and 7, plus QML
compatibility and narrow-navigation checks. Screenshots captured with Qt
6.11.2.

**Scoped security verdict: PASS for the repaired result-identity,
cursor/continuation and protocol-framing boundaries.** Tests verify that
sender headers and sizes cannot by themselves suppress unrelated
results, mismatched cursor owners/queries are refused, malformed cursor
fields and query controls are rejected before connection, forged
protocol records remain inside literals, and cancellation drops active
workers. Existing transport/security regressions are included in
validation. Fixtures use synthetic credentials and mail. This is not a
live-provider exploit demonstration or a full security audit; maintainer
re-review is pending.

## Release Notes

- Find archived IMAP and Outlook mail through account-wide search,
including messages found only in All Mail.
- Browse All mail in IMAP accounts and combined Gmail/IMAP views on
supported backends; older backends retain Archive.
- Keep distinct messages visible when senders reuse Message-ID headers,
and list each message once on IMAP servers that provide an All Mail
folder.
- Search large mailboxes with bounded parallel work and reuse results
when paging.
- Continue IMAP search pages across CLI invocations, backend restarts
and cache eviction, even after the previous page's last message is
deleted.
- Keep mailbox destinations reachable in narrow windows and show Drafts
before Sent.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…cnlee#301)

## Summary

Omarchy's `SUPER+SHIFT+E` opens HEY's web app directly (`{ webapp =
"https://app.hey.com" }` in `default/hypr/bindings/applications.lua`)
and reads no default, so claiming `mailto:` alone leaves the key opening
HEY. This follows omanta's approach for `SUPER+SHIFT+F`:

- `scripts/default-mail.sh on <plugin-dir>` registers `omamail.desktop`
as the `x-scheme-handler/mailto` default and appends a managed block to
`~/.config/hypr/bindings.lua` that unbinds and rebinds `SUPER+SHIFT+E`
(open Omamail) and `SUPER+SHIFT+ALT+E` (new message,
`{"compose":true}`), then reloads Hyprland. Omarchy's own files are
never touched.
- `off` removes the block and leaves the file byte-identical; `status`
prints `default` or `not-default`.
- Settings gains a **Default mail client** section with **Set as
default** / **Undo**. `Service.qml` runs the script from the plugin
directory, so the feature is QML plus a script and needs no backend
release — there is no Rust or `backend-api.json` change. The status is
read when the service starts, when the page's `service` binds and
whenever the page comes into view, so a change made outside the window
is reflected. The section is shown only where the platform declares
`mailto`.

## Screenshots

Pending: before/after of Settings → Default mail client.

## Release Notes

- Add Settings → Default mail client, which makes Omamail open `mailto:`
links, `SUPER+SHIFT+E` and `SUPER+SHIFT+ALT+E`, with an Undo that
restores Omarchy's own email binding.

## Verification

- `tests/test_default_mail.sh` (added to `make test-shell`): on,
idempotent second on, status, byte-identical off, unknown action refused
— in a throwaway config/data home.
- Tested by hand in the linked plugin: Set as default, `SUPER+SHIFT+E` /
`SUPER+SHIFT+ALT+E`, Undo.
- `make test-js test-shell`, `make qml-check`, `omarchy plugin validate
.`, `git diff --check` pass.
- `make test-qml`: 8 `KeyboardReaderNavigation` failures, identical on
clean `main`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
## A more complete calendar in Omamail

This PR redesigns the calendar: clearer views, easier navigation, better
event editing, and useful reminders. Google Calendar is the first
provider with the deeper native integration in this work, including
calendar discovery, attendance updates and event management.

The redesigned views and navigation apply to the calendar as a whole.
New drag/resize writes and desktop reminders are Google-only; other
providers retain their existing, more limited create/edit/delete
behavior. Google-specific features are called out below.

## 1. A clearer month view

Multi-day events now form one continuous bar, with continuation marks
when they cross a week boundary. Overlapping trips and all-day events
get separate rows. The month uses five or six weeks as needed, with
lighter grid lines, a clearer today marker and more room for events.

Narrow Month rows put the event title before the time, so a short cell
still tells you what is happening. Busy-day previews show the event
count and cap their height, with a visible scrollbar for longer lists.

<details>
<summary>Before/after: narrow Month titles and a long busy-day
preview</summary>

**Narrow Month — title first instead of a time taking most of the row.**

![Narrow Month before and
after](https://github.com/user-attachments/assets/83ebc1af-83af-44d3-b164-c88473ba1da5)

**Busy-day preview — bounded height, event count and scrolling.**

![Long overflow preview before and
after](https://github.com/user-attachments/assets/f1c25ca9-050e-408e-a5eb-3fe788739c18)

</details>

The same synthetic month is shown in both images. Look at **Lakeside
holiday**, **Design sprint** and **Design conference**: repeated daily
blocks become readable spans.

| Before | After |
| --- | --- |
| ![Month before: repeated daily blocks and fixed six-week
grid](https://github.com/user-attachments/assets/30802c1e-9a5b-405b-8d5c-6f5a661f5c69)
| ![Month after: continuous multi-day bars, separate overlap rows and
lighter
grid](https://github.com/user-attachments/assets/a7912d29-50c6-4eab-bd4e-21373c75b535)
|

### See everything on a busy day

Hover a day with **“+ more…”** to see its complete event list. The day
stays highlighted, entries can be opened directly, and longer lists
scroll. You can inspect a busy day while keeping the rest of the month
in view.

Here, Friday has eight events across three calendars. The after image
shows all eight, alongside the multi-day bars and redesigned month
layout.

| Before: hovering leaves the extra events hidden | After: a full-day
preview opens |
| --- | --- |
| ![Busy-day hover
before](https://github.com/user-attachments/assets/c13a877e-6aee-4aa6-a198-a379a56c97cd)
| ![Busy-day hover after: eight events with names and time
ranges](https://github.com/user-attachments/assets/342f0204-77e5-4210-bdf0-e61e72f1fb6d)
|

## 2. Better Day and Week views

- **A permanent all-day lane.** Click or drag in it to create an all-day
event, even when the lane is empty.
- **Continuous bars at the top.** Multi-day all-day events and timed
events lasting at least a full local day sit above the hourly grid.
Timed events keep their original start/end times; this is a display
change.
- **A clear distinction for timed spans.** Top-lane timed events say
“Timed”; the current-time line stays behind event cards so it cannot
strike through a meeting title.
- **Readable overlaps.** Simultaneous meetings use separate columns and
can be selected independently.
- **All 24 hours are reachable.** Day and Week open around the morning
and scroll from midnight to midnight.
- **Clearer interaction.** Drag to create a time range. On Google
calendars, move an event or resize either edge; a preview shows the
change and failed saves restore the previous position. Other providers
change event times through their existing editor.

This comparison combines a long timed conference, a two-day workshop, a
birthday, overlapping meetings and the current-time indicator.

| Before | After |
| --- | --- |
| ![Week before: the long conference fills the hourly grid and all-day
events repeat per
day](https://github.com/user-attachments/assets/84fd4e30-3522-484d-9ca3-7c4a87da9a60)
| ![Week after: continuous top-lane bars and separated overlapping
meetings](https://github.com/user-attachments/assets/e11a79f7-74a8-4b73-9f84-516388bb140b)
|

<details>
<summary>Before/after: an empty all-day lane is still useful</summary>

The same week with the top-lane events removed. The new lane remains
available for click/drag creation.

| Before | After |
| --- | --- |
| ![Empty all-day lane
before](https://github.com/user-attachments/assets/654e1af6-6925-4c5e-bcf9-13fbfd299417)
| ![Empty all-day lane
after](https://github.com/user-attachments/assets/402abc36-e72f-42b9-9535-42229c18d5c4)
|

</details>

### Navigation that takes less space

<details>
<summary>Before/after: timed-span labels and a readable current
meeting</summary>

![Week label and current-time
refinements](https://github.com/user-attachments/assets/0b49c412-6966-49c1-bd69-d36632b6c357)

</details>

Day, Week, Month and Agenda share one dropdown, with their keyboard
shortcuts shown beside them. Previous/next arrows surround the date,
clicking the date opens a picker, and Today sits alongside it. The
separate Create event button is replaced by direct calendar interaction
and the existing keyboard shortcut.

Agenda lists upcoming and ongoing events. Finished events drop out
automatically.

<details>
<summary>Screenshots: Day, Agenda and the date picker</summary>

These are new views/states; the Week comparison above shows the previous
calendar experience.

**Day**

![Day
view](https://github.com/user-attachments/assets/7d6de2bc-0df2-46dd-9803-101cd31231bb)

**Agenda**

![Agenda
view](https://github.com/user-attachments/assets/cf42c6e9-e8c0-4776-bf46-edea51d45168)

**Date picker**

![Date
picker](https://github.com/user-attachments/assets/daddc390-2df4-415e-9837-2867710e500b)

</details>

## 3. A more capable event editor

The editor brings the calendar, dates, times and event options together:

- Choose the destination calendar, grouped by account.
- Set separate start/end dates and switch between timed and all-day
events.
- Keep a clearly labelled Description directly below the title.
- Suggest guests by name or address from the same known email contacts
as the mail composer. Choose with a click or Up/Down and Enter;
already-added addresses are excluded.
- Edit the location, description, guests, time zone, availability,
privacy and reminders where supported.
- Add Google Meet and edit supported repeating-event rules. Advanced
recurrence rules are preserved.
- Press **Enter** to save and close. Invalid ranges show an error and
prevent saving; a failed save keeps the form open.
- Keep Save, Cancel and save errors in a fixed footer, even when the
form scrolls. Keyboard-focused fields and guest suggestions scroll into
view.
- See persistent field labels, an explicit local-time indicator and
reminder units. Time zone, availability and visibility live under **More
options**.

| Before | After |
| --- | --- |
| ![Event editor
before](https://github.com/user-attachments/assets/ab27092c-0b3e-4269-850d-03812d002ff3)
| ![Event editor
after](https://github.com/user-attachments/assets/8bc49395-cf94-443d-b42a-028d4516fb61)
|

### A compact form with visible feedback

Description sits directly below Title with a persistent label. Typing a
guest's name or email shows the same contact suggestions as composing
mail. Enter chooses a suggestion while the list is open; Escape
dismisses it without closing the event. Choosing a guest inserts only
the email address and never submits the event.

**Before/after: persistent labels, simpler default form and fixed action
footer.**

![Editor before and
after](https://github.com/user-attachments/assets/af9c6509-7a58-43f4-a599-a428b9d81644)

**Before/after: a failed save in the same 660 × 900 window.** The error
was below the scrolling viewport; it is now visible beside the save
actions without manual scrolling.

![Failed save before and
after](https://github.com/user-attachments/assets/6dda2870-60a2-496f-b7ac-8aae56941240)

<details>
<summary>More editor comparisons: guest suggestions, reminder units and
dark theme</summary>

![Guest suggestions before and
after](https://github.com/user-attachments/assets/c1a57a01-b1f2-41b0-856c-622d0650f80f)

![Custom reminder units before and
after](https://github.com/user-attachments/assets/69299e3f-23db-463c-aabb-cd6811682de5)

![Dark editor before and
after](https://github.com/user-attachments/assets/888f95ca-463e-4316-8423-173b56d5592a)

</details>

## 4. Google integration that updates the actual calendar

This goes beyond displaying Google events:

| Action | What Omamail now does |
| --- | --- |
| **Connect calendars** | Finds the account's calendars, including
shared and hidden entries. Lets you choose which to show and respects
read-only access. |
| **Answer an invitation in mail** | Yes / Maybe / No updates your own
attendance in Google Calendar, then reads the event back to confirm the
result. The native RSVP path does not send a second reply email. |
| **Reopen an invitation or event** | Refreshes attendance and guest
details, so the displayed answers can follow changes made elsewhere. |
| **Edit or move an event** | Saves changes to the selected Google
calendar. Supports moving eligible organizer-owned events between
calendars in the same account. |
| **Change an event with guests** | Offers a choice to notify guests or
save without sending an update. Deletion has the same notification
choice. |
| **Work with a repeating event** | Loads the parent when editing the
whole series and preserves existing recurrence exceptions. |
| **Undo a supported change** | Checks the event revision before
writing, to avoid overwriting a newer change. |
| **Open meeting details** | Shows guest response states and the meeting
link, with a copy action. |

If an invitation cannot be matched to Google Calendar, or the connected
backend is API 5, Omamail offers **Open Calendar** and clearly labelled
**email-only** responses. An email-only reply does not mark Calendar
attendance as confirmed. Gmail-generated travel events also explain
their editing restrictions instead of offering unsupported time changes.

<details>
<summary>Before/after: Gmail invitations on the pinned API-5
backend</summary>

The API-5 backend cannot execute native attendance updates. The
invitation now offers explicit email-only responses instead of native
choices that fail. These synthetic production-component captures use
identical 900 × 600 dimensions, Solarized Light and scale 1; baseline
`76c4e3a`.

| Before | After |
| --- | --- |
| ![Before: unavailable native attendance choices on API
5](https://github.com/user-attachments/assets/9568c8ce-6309-4995-80ef-145436d4dd52)
| ![After: clearly labelled email-only
replies](https://github.com/user-attachments/assets/4d2c8505-2ad5-460f-ad43-cc2ba4965b52)
|

</details>

The fallback shows one clear set of response choices. Event details put
**Join meeting** and **Edit** near the title, followed by the
description and guests. One **Delete...** control reveals the
notification/series choices before the existing confirmation dialog.

<details>
<summary>Before/after: meeting details, delete choices and email-only
invitation fallback</summary>

![Narrow meeting details before and
after](https://github.com/user-attachments/assets/3823c758-2acd-4320-9a7c-4d1302587578)

![Delete choices before and
after](https://github.com/user-attachments/assets/26bda0dd-4ed7-45bd-8082-30a41048e7c0)

![Invitation fallback before and
after](https://github.com/user-attachments/assets/75c70e93-e396-4955-b3a8-a38c22453d68)

</details>

<details>
<summary>Screenshot: guest responses and meeting details</summary>

![Guest response states and meeting
link](https://github.com/user-attachments/assets/fa909533-d264-4292-b069-0c26bec102f7)

This synthetic capture illustrates the UI. It is not evidence of a live
Google RSVP round trip; testing and remaining checks are listed below.

</details>

### Other providers keep their limited behavior

Microsoft/Outlook, iCloud and generic CalDAV keep the shared redesigned
views and their existing basic event operations, with read-only and
recurring-CalDAV restrictions preserved. Deep native attendance,
transfers and advanced Google options remain Google-specific. New
drag/resize writes and desktop reminders are explicitly restricted to
Google, including polling and candidate generation: previously saved
non-Google reminder settings cannot enable them. Microsoft creation
omits the unsupported Repeat control and ignores stale repeat state
after switching calendars.

This is a compatibility boundary, not an expansion of the other provider
adapters. Inherited limitations remain, including Outlook's
preview-based description editing and incomplete attendee-status
normalization; the new gestures no longer expose that editing path.

<details>
<summary>Before/after: limited Microsoft editor and calendar
settings</summary>

Synthetic production-component captures at identical 1000 × 1100
dimensions, Solarized Light, font base 14 and scale 1; baseline
`c50c3f1`. The Microsoft editor no longer offers repetition that saving
would reject. Settings remove non-Google reminder controls, including
the global reminder section when no Google calendar is connected.

| Microsoft editor — before | Microsoft editor — after |
| --- | --- |
| ![Microsoft editor
before](https://github.com/user-attachments/assets/03a99433-5a5d-496e-b2be-f1862c9f438d)
| ![Microsoft editor
after](https://github.com/user-attachments/assets/65bdc041-728c-4392-9ca7-aee4b37cbdaa)
|

| Microsoft settings — before | Microsoft settings — after |
| --- | --- |
| ![Microsoft settings
before](https://github.com/user-attachments/assets/b1a714a5-9c64-4345-a975-574d0fd4d5be)
| ![Microsoft settings
after](https://github.com/user-attachments/assets/5330d9da-3daa-44e6-ba6a-d268494f97e6)
|

</details>

## 5. Clearer setup and reminders

Settings now start with accounts and use **one calendar list** for
visibility and reminder preferences. Each account has a dropdown for its
default calendar for new events. Default-calendar and reminder settings
can be saved for any available account, even when another mailbox is
selected; event writes retain their mailbox scope. Google setup reuses
the Gmail account and shared OAuth client, with specific actions to
retry discovery, sign in again or enable the Calendar API.

Google desktop reminders have a global on/off switch, per-calendar
timing and a snooze duration. They run while Omamail is running, even
with its window closed. Hiding a Google calendar does not turn off its
reminders. Google event reminders respect events that explicitly have no
reminders.

Notifications request **Open, Snooze and Dismiss**, but some desktop
notification cards expose only the default action. Delivered reminders
therefore also appear in the calendar and matching event details, with
visible **Snooze** and **Dismiss** buttons. Opening a notification no
longer dismisses its reminder. Failed reminder actions leave the
controls available with an error; successful actions remove the notice.
Old notification callbacks cannot acknowledge a newer delivery in the
same running instance.

A private persistent ledger prevents duplicate claims across shell and
standalone instances. Each due event retains its own details and
independent actions: dismissing one cannot dismiss or cancel another
event's snooze, including records from an older grouped ledger. Reaching
the desktop notification-process limit does not remove events from the
in-app inbox. The in-app action list is session-local; restoring that
list across restarts and cross-instance action synchronization remain
runtime verification gaps.

<details>
<summary>Before/after: two reminders due in the same poll</summary>

The grouped response exposed only the first event and a count. Each
event now has its own title, Open, Snooze and Dismiss controls. These
synthetic production-component captures replay the old and new response
shapes for the same events at identical 900 × 600 dimensions, Solarized
Light and scale 1; baseline `76c4e3a`.

| Before | After |
| --- | --- |
| ![Before: second event hidden behind a
count](https://github.com/user-attachments/assets/dda748c0-3123-49ea-b160-9e021485aa04)
| ![After: both events independently
actionable](https://github.com/user-attachments/assets/fd6c7474-5d56-440b-b5fd-d5e185fbcc46)
|

</details>

**Before/after: reminder actions in narrow event details.**

![Reminder event actions before and
after](https://github.com/user-attachments/assets/4a61f5bf-311d-4564-b53d-5810be58a662)

<details>
<summary>Reminder actions in the calendar and a failed-action
state</summary>

![Calendar reminders before and
after](https://github.com/user-attachments/assets/fa73b844-a4e6-40ca-8207-0a8bb68becb9)

**After: failure keeps the reminder and its actions available.**

![Reminder action
error](https://github.com/user-attachments/assets/3f90d952-8e9f-430b-bd54-137e22720524)

</details>

| Before | After |
| --- | --- |
| ![Calendar settings
before](https://github.com/user-attachments/assets/a06afb96-12a7-4a27-8185-f21d020cd179)
| ![Calendar settings
after](https://github.com/user-attachments/assets/e6d795c1-5218-4e40-ae5e-28ef15969c11)
|

<details>
<summary>More setup screenshots: connected accounts, selection, recovery
and narrow layouts</summary>

These pairs show the final settings refinement compared with the earlier
version of this calendar implementation.

| State | Before refinement | After refinement |
| --- | --- | --- |
| One list for each account's calendars | ![Connected
before](https://github.com/user-attachments/assets/a255701d-4644-46c5-9273-deaaac4fdc54)
| ![Connected
after](https://github.com/user-attachments/assets/4c2e2bd9-3455-4f81-872c-542a61cfbf71)
|
| First-time setup | ![Initial
before](https://github.com/user-attachments/assets/c1cd9fd5-012a-41c2-bc8a-fe2e54c6d5c7)
| ![Initial
after](https://github.com/user-attachments/assets/734b16a6-18e1-472e-8db0-d3904bf73812)
|
| Choose calendars | ![Selection
before](https://github.com/user-attachments/assets/2d4e7f98-33b8-43a7-9d2c-1d29744680d5)
| ![Selection
after](https://github.com/user-attachments/assets/9561df5a-9cc6-4f66-b712-8bea261e8398)
|
| Recover from a connection error | ![Recovery
before](https://github.com/user-attachments/assets/8214eb6e-9cde-4ead-a760-ea0501c0b70e)
| ![Recovery
after](https://github.com/user-attachments/assets/de744b3b-4cbe-4686-b46f-18ca95780e53)
|
| Narrow settings | ![Narrow
before](https://github.com/user-attachments/assets/6a168898-4217-419f-a3a0-a26bb5ade876)
| ![Narrow
after](https://github.com/user-attachments/assets/23379946-da80-4a38-afbb-d417aa607e60)
|

**Reminder timing:** Off, Use Google event reminders, or Custom timing.

![Expanded reminder
options](https://github.com/user-attachments/assets/b9e796ad-4b98-4b80-ad51-73a5b08d820f)

</details>

## Testing and review status

**Latest diagnostics repair (`63b6716`):** added the backend’s
`calendar_organizer_mismatch` identifier to the exact diagnostics
allowlist, fixing the portable-test failure on `d393151`. The full
portable shell suite and full `make validate` pass locally on this head.
Fresh CI is pending; earlier green runs do not establish the status of
this commit.

**Validation:** Full `make validate` passes for `3704706`: Rust,
JavaScript, shell/source checks, QML suites, standalone UI tests, QML
lint and plugin validation. Both the development API-6 contract and
pinned 0.10.7/API-5 released contract pass. Regression tests first
failed against the original implementation, then passed for API-5
email-only replies, settings for another account, all-day drag moves
across spring/autumn DST, and independent simultaneous reminders. The
reminder tests also cover legacy grouped records and retaining inbox
entries when the desktop process limit is reached. Provider-limit,
editor interaction, reminder retry/stale-callback and event-identity
coverage remain included. All 85 synthetic audit after captures, four
provider-limit images and four review-repair images were inspected. This
follow-up has not been installed locally. Cross-platform CI for
`3704706` is pending.

Previous cross-platform CI passed all 14 checks, including both macOS
jobs, Linux/Windows standalone apps and backends, native credential
contracts, portable tests and published/unreleased backend gates.
Results for the newly pushed head must be checked separately.

The concurrency regression reproduced a first lock-file creation failure
on macOS with OS error `ENOENT`, matching the documented Darwin
`openat(O_CREAT)` create-or-open race ([upstream
report](golang/go#81246)). The fix uses
exclusive creation followed, only on `EEXIST`, by a non-creating open of
the existing lock file. Both calls remain descriptor-relative and
no-follow; ownership, link-count, private-mode and ACL validation still
precede locking. Concurrent initialization, reminder claims and
unsafe-existing-lock regressions now pass in macOS CI as well as
locally.

Focused tests cover multi-day layout, overlap selection, full-day
scrolling and 23:00 event creation, drag/resize rollback, Enter-to-save,
invalid dates, timed/all-day request conversion, discovery recovery,
attendance handling and reminder behavior. One user-requested calendar
transfer was also checked against Google with a follow-up read.

**Ready for review; remaining verification:** broader live Google checks
remain, especially attendance matching outside the primary calendar,
recurrence exceptions, all-day conversion and partial-transfer/Undo
behavior. Reminder restart, suspend, cross-instance actions and Do Not
Disturb behavior also need more runtime coverage. Desktop notification
delivery is currently Linux-specific. Synthetic invitation and reminder
interaction screenshots are included above; these do not establish live
provider or desktop lifecycle behavior.

<details>
<summary>Implementation and security notes for reviewers</summary>

- Calendar sources, caches and selections retain account/calendar
identity. Google discovery keeps access, time-zone, reminder and
conferencing metadata; older backend versions are gated from unsupported
features.
- Native attendance writes validate the responding attendee, use event
revision checks and confirm the result by reading it back. The current
lookup starts with the primary calendar copy.
- Reminder fetching is independent of the visible date range. A private,
locked, atomically written ledger records claims, snoozes and
dismissals.
- Concurrent first-time lock creation avoids Darwin's create-or-open
race. Regression coverage includes concurrent initialization and refusal
of symlinks, hard links, non-private files and macOS ACL grants without
modifying rejected entries.
- API-6 methods and contract cases are included. The published backend
pin and version/API handshake are preserved.
- Scoped tests cover origin/TLS/redirect restrictions, identity refusal,
unsafe reminder-storage paths and notification escaping/actions. The
macOS fixture resolves the trusted temporary parent and sets private
fixture permissions; production storage checks remain unchanged.

**Security verdict: NOT VERIFIED for release.** The scoped checks pass,
but the complete new Google integration and reminder lifecycle still
need the runtime evidence described above before approval.

</details>

<details>
<summary>About the screenshots</summary>

All images are synthetic Qt component captures using production calendar
components and standalone UI adapters, with synthetic accounts/events
and Solarized Light colours. They are not private live-mail screenshots.
PNGs are uploaded to GitHub attachments and are not committed.

Each before/after pair uses the same events, dates, window dimensions,
theme, font size and scale. Main Month/Week scenes are 1440 × 1000, font
base 14, scale 1. Editor/settings and additional view captures are 1200
× 1000. Settings-refinement pairs are 1000 × 1200, or 660 × 1200 for the
narrow view.

The main baseline is the pre-workspace calendar at `d583ab6`;
settings-refinement pairs use `976c97a`. Before/after hover captures
place the pointer over the same busy date. Week captures show each
version's initial presentation of the same date range; the redesign's
morning scroll position and long-event placement are intentional
differences.

The labelled side-by-side audit comparisons use `612a92a` as their
baseline. Each half retains the same dimensions, fixture state, theme
and scale: 1200 × 1100 for the editor, 660 × 900 for save failure and
narrow details, 660 × 1000 for narrow Month, 1440 × 1000 for Week, and
900 × 700 for the invitation fallback. Dark editor and reminder/overflow
comparisons use 1200 × 1000. The evidence includes 85 after-state
captures and matched baselines; images were reviewed at contact-sheet
and full resolution. No real event or RSVP mutation was made for this
audit.

</details>

## Release Notes

- Redesign the calendar with clearer Month and Week layouts, Day and
Agenda views, simpler navigation and full-day scrolling.
- Show continuous multi-day events, a permanent all-day lane and
complete busy-day hover previews.
- Improve event creation and editing with multi-date ranges, richer
options and Enter-to-save validation; enable drag/resize changes for
Google events.
- Suggest calendar guests from known email contacts and place a clearly
labelled description below the event title.
- Keep event save controls and errors visible, label reminder units, and
simplify meeting details and invitation fallback choices.
- Add deeper Google Calendar integration for calendar selection, event
management, attendance updates and guest response details.
- Simplify calendar settings and add Google desktop reminders with
snooze and dismiss actions.
- Preserve other calendar providers' existing limited event operations
without offering Google-only gestures or reminders.
- Make delivered reminders actionable inside the calendar even when the
desktop notification omits action buttons.
- Keep Gmail email-only invitation replies available on the pinned
backend, save calendar preferences across accounts, and preserve all-day
dates when dragging across daylight-saving changes.
- Keep simultaneous reminders independently visible and actionable,
including when the desktop notification-process limit is reached.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Fixes huacnlee#237.

The reader footer previously grew by one row for every genuine
attachment. With 40 files in a 380×360 reader, its body had a negative
height and the message could not be read. Removing embedded images in
huacnlee#272 does not address that case.

Attachments now start as a single count with a Show/Hide control.
Expanding them reveals an independently scrolling list, limited to 40%
of the room left below the header and at most 160 theme-scaled pixels. A
short list uses only its natural height. The disclosure and scroll
position reset when the selected message or service changes, and
messages without attachments reserve no attachment space.

The existing filename/open and save controls remain, including
per-mailbox/message routing and save-busy suppression. The attachment
list uses inherited theme colors, filenames remain PlainText, and no
classification, fetching, saving or backend behavior changes. This PR is
independent of huacnlee#312.

## Verification

- `ui/tests/qml/tst_attachment_footer.qml` was written before the fix.
The final tests were rerun against unchanged main (`af8a7ae`) with the
real standalone controls: six failures, including a −851px body height
with 40 genuine files. The patched suite passes all six cases plus
setup/cleanup on Qt 6.11.2, with no warnings from the production-control
run.
- The cases exercise zero/one/few/many attachments, a 300×280
short/narrow reader, resizing, repeated collapse/expand, message
switching, wheel scrolling to the final file, real pointer activation of
both actions, composed mailbox/message IDs, and busy-state duplicate
suppression.
- Native `make validate` ran with an isolated Rust build: **640 Rust
tests passed**, with 11 existing ignored tests; JavaScript and portable
shell/source checks passed. It then stopped at the pre-existing
host-libcurl-specific `tests/test_imap_ordering.sh` failure (`imap-id
must deliver a message body`). The Makefile documents why that check
depends on the Omarchy libcurl behavior. Aggregate validation is
therefore **not fully green**, and subsequent aggregate stages did not
run.
- The full main QML suite was run separately through
`tests/run_qml_native.py` using this checkout's newly compiled backend
and the official Qt 6.11.2 Quick Test runner: **1,083 passed, zero
failures**. An earlier run reused a sibling checkout's backend; the
final run does not. The focused attachment tests also pass against the
actual standalone `qs.Ui`/`qs.Commons` controls.
- Separate Outlook HTTP tests passed (6 checks); sidebar
resource-boundary tests passed (64 checks). `make qml-check` passed with
the Qt 6.11.2 linter (existing unresolved-import/unqualified-access
warnings); QML naming, PlainText source checks and `git diff --check`
passed.
- A fresh reviewer found no actionable code or security findings. It
also exercised 300×280 through 900×600 readers at spacing scales 1, 7/6
and 1.5, resizing while scrolled to the end and shrinking the model.
**Security: PASS for the changed UI boundary**; this is not a broader
application audit.
- The standalone host build/test suite and Omarchy plugin validation
were not completed here. A separate `make test-app-qml` attempt was
blocked by unavailable CMake in the direct execution environment. Live
Omarchy/standalone-host mouse-and-keyboard verification across platforms
remains outstanding.

## Visual evidence and draft status

Comparable before/after offscreen captures were produced and inspected
at 380×360 and 900×600, in light and dark themes at scale 1, using
synthetic mail and the actual MessageReader plus standalone
theme/control components. They cover the old overflowing footer, the
collapsed count, the expanded list and its final file. In the small
production-control fixture the patched body keeps 247px collapsed and
about 146px expanded, versus −851px before.

These captures are offscreen component renders, not a manual Omarchy
desktop session. GitHub-hosted before/after attachments are still
pending; the captures are retained locally and were not added to the
repository or a media branch. This stays a draft pending GitHub-hosted
before/after images and the required manual host verification; the
automated checks do not replace those gates.

## Release Notes

- Messages with many attachments keep their body readable. Show or hide
the attachment list, and scroll through every file without losing the
message actions.

Co-authored-by: Codex <codex@openai.com>
## Summary

Fixes huacnlee#240 and huacnlee#267.

Diagnostics now retain the backend's fixed IMAP, SMTP, JMAP, mail,
outbox, attachment, reader, account, cache, credential, and other shared
error identifiers instead of replacing them with `unknown_error`. This
extends the static-identifier coverage left after huacnlee#285's
Gmail/auth/calendar/upload update.

The recorder still accepts only exact, explicitly listed strings. It
does not accept error prefixes or arbitrary snake-case text, inspect
source at runtime, retain raw server messages, or change the recorded
fields. Existing reports are sanitized again when recorded or opened.
The QML 128-character bound, bounded private storage, and explicit-only
AI launch are unchanged.

The source-drift regression now checks static error expressions across
all Rust namespaces, including block-bodied mappings and stored outbox
failure states. The source scan is a heuristic tripwire for these known
forms. New matches require a manual review of the literal before adding
it to the runtime allowlist.

## Verification

- Reproduced the defect before the fix: the report round-trip and
expanded vocabulary regression failed because fixed error identifiers
became `unknown_error`.
- `python3 tests/test_diagnostics.py`: 13 passed on 5b381fc, including
persisted/report round trips, exact-value rejection, private-data-shaped
identifiers, CR/LF/CRLF/NUL, storage modes, symlink/hardlink refusal,
and explicit-only launch.
- `make test-js`: passed.
- Python syntax parsing and `git diff --check`: passed.
- Independent read-only diff review found no actionable blocker; the
reviewer separately reran all 13 diagnostics tests and the diff
whitespace check.
- [CI run
36712982070](https://github.com/huacnlee/omamail/actions/runs/36712982070):
all 11 jobs passed for 5b381fc, including Rust/JavaScript/portable shell
tests, published/unreleased API gates, and Linux/macOS/Windows
standalone backend and application jobs.
- [Native credential contracts run
36712982375](https://github.com/huacnlee/omamail/actions/runs/36712982375):
all 3 platform jobs passed for the same head.
- Full local `make test` / `make validate` was not run. The aggregate
results above are hosted CI results; local validation was the focused
diagnostics suite, JavaScript suite, syntax and whitespace checks.

## Security

PASS for the affected diagnostics sanitization boundary in the focused
tests: only the reviewed fixed vocabulary survives, while synthetic
account names, server text, URLs, message identifiers, filenames,
credential-shaped strings, and modified known identifiers are omitted
from newly recorded entries and generated reports. Runtime matching
remains exact. This is not a complete security audit.

No UI layout or interaction changes; screenshot evidence is not
applicable.

## Release Notes

- Diagnostic reports now identify IMAP, JMAP, sending, attachment, and
shared backend failures while continuing to omit private or unrecognized
error text.

Co-authored-by: Codex <codex@openai.com>
Fixes huacnlee#238.

The long-running backend cached Outlook access tokens against `Instant`
alone. On Linux that clock stops during suspend, so an hour-long token
could still appear fresh after a laptop had slept for several hours.
Mail and Graph then reused the expired token until the backend
restarted.

Each cached token now keeps both a wall-clock and a monotonic deadline.
Both must have more than the existing 60-second refresh margin
remaining. Wall time includes the suspended interval and handles forward
clock corrections conservatively; the monotonic deadline prevents a
backward wall-clock correction from extending the token's awake
lifetime. Mail and Graph retain their own actual `expires_in` lifetimes,
including tokens shorter than an hour.

An expired entry proceeds through the normal refresh path before the
requested operation. This patch adds no retry loop or replay of a
mail/calendar write, and leaves genuine invalid-grant handling
unchanged.

This is based directly on main (`af8a7ae`) and is separate from huacnlee#316.
Both touch the cache area in `credentials.rs`; when integrating them,
retain this expiry constructor and lookup inside huacnlee#316's
cancellation-safe account lane, and update its additional token-cache
fixture to the new expiry type. No unmerged huacnlee#316 changes are included
here.

## Verification

- Four deterministic clock regressions failed with the previous
monotonic-only decision and pass with the fix: long suspend for
mail/Graph, forward/backward wall changes, different resource lifetimes
and short suspend, and the exact 60-second boundary. Tests exercise the
production constructor and lookup with controlled clock samples,
including 0, 59, 60, 61, 3,600 and 86,400-second lifetimes.
- Rust 1.98.1: the final full run passes all 644 unit/integration checks
(570 unit tests and 74 integration tests; 11 explicit native/environment
tests remain ignored by the standard command). The focused credential
suite passes all 8 checks.
- Qt 6.11.2: 1,075 main QML checks, 6 Outlook HTTP checks, 64 sidebar
checks and the native HTML resource-isolation test pass.
JavaScript/portable suites, full QML lint and whitespace checks pass.
All-target Clippy passes with the two documented pre-existing lint
classes (`collapsible_if`, `needless_return`) allowed.
- `make validate` stops at the unchanged libcurl IMAP body-channel
fixture on this Debian host's libcurl 8.14.1; pristine main fails the
same fixture. The remaining standalone host target cannot start because
CMake is absent.
- A fresh independent review found no blocking issue. Security: **PASS**
for the affected cache boundary. No credential destination, validation,
serialization or public API change; no UI files changed.

Clock behavior was simulated deterministically. A physical laptop
suspend and live Microsoft mailbox were not exercised. The backend pin
remains 0.10.7; installed users receive the fix through a subsequent
backend release.

## Release Notes

- Refresh expired Outlook mail and calendar tokens after a long suspend
without restarting the backend.

Co-authored-by: Codex <codex@openai.com>
## Summary

Fixes huacnlee#236. The attachment classifier no longer mistakes an XML
declaration in a supported embedded invoice stream for a standalone XML
attachment.

This is deliberately narrower than accepting every file with a `%PDF-`
prefix. A PDF-named attachment must have recognizable PDF object/stream
framing, exact direct stream lengths and a complete classic
cross-reference/footer sequence. Only the five declaration-marker bytes
at the beginning of an uncompressed embedded XML or metadata stream are
exempted. Every other active-content marker remains checked across the
entire container.

## Security boundary

- The recognizer skips strings, comments, arrays, dictionaries and
length-bounded streams without rendering, decompressing or resolving
external resources. Names are decoded before structural checks;
duplicate keys, malformed lengths/declarations, truncation and
unsupported framing retain the ordinary refusal.
- Full-file decoded-name checks also cover bytes inside skipped spans.
Regression fixtures cover an action reached through a cross-reference
into another stream and a tolerant-reader compressed-object case.
- Native action/form names, encrypted and object-stream content, xref
streams, hybrid references and incremental-update references cannot use
this exception. Dangerous filename and executable-magic checks remain
before it.
- The original attachment bytes are never rewritten. Refused
`attachment.store` calls return no launch path and create no file.
Saving is unchanged.

Security: **PASS for the bounded exception and exercised refusal
boundary**, following independent source review and final-build
regressions. This is not an antivirus, a PDF conformance validator or a
general guarantee that a PDF is safe.

## Compatibility limits

The fix covers direct-length, uncompressed XML embedded-file streams
(`text/xml` and `application/xml`) and XML metadata in a classic-xref
PDF. Unsupported layouts, including indirect stream lengths, xref/object
streams, encryption and incremental updates (including some signed
PDFs), remain refused when they contain the blocked XML marker. The
conservative raw-name guard can also retain false positives. Saving
remains available.

Current QML opens attachments through Rust `attachment.store`; the
unused legacy Python opener retains its existing conservative behavior.
The backend pin and API contract do not change.

## Verification

- The independently readable synthetic PDF fixture failed on the
original classifier and passes with the fix. It exercises invoice XML
embedding, not PDF/A or Factur-X conformance.
- Rust 1.98.1: `cargo test --locked --features
integration-test-credentials` passed 656 tests, with 11 existing ignored
tests. This includes all 16 PDF regressions covering valid LF/CRLF/BOM
data, XML MIME names, disguised HTML/SVG/scripts, native PDF actions,
malformed declarations/lengths, truncation, content beyond 64 KiB and
refusal before writes.
- PDF fixtures are marked binary; a Windows-style `core.autocrlf=true`
checkout was reproduced changing their bytes before the attribute and
verified byte-for-byte identical afterward.
- Independent compiled classifier probes accept the valid fixture and
refuse all 12 additional encrypted/action/malformed cases. Adversarial
bytes are only inspected/classified, never rendered or executed.
- JavaScript and portable shell/source checks passed as part of both
aggregate runs.
- `make test` and `make validate` stop at the existing
host-libcurl-specific `test_imap_ordering.sh` failure (`imap-id must
deliver a message body`). The Makefile documents that this check
requires the Omarchy libcurl behavior and excludes it from portable CI.
Therefore the aggregate validation is **not fully green**; subsequent
aggregate stages did not run.
- Main QML suite through `tests/run_qml_native.py` and the official Qt
Quick Test runner (PySide6/Qt 6.11.2): **1,075 passed, zero failures**.
This was run separately after the aggregate stopped. Hosted CI and
native credential contracts passed on `3c17e9d`:
[CI](https://github.com/huacnlee/omamail/actions/runs/36709664783),
[native
credentials](https://github.com/huacnlee/omamail/actions/runs/36709664791).
This includes desktop packaging on Linux, macOS and Windows.

## Release Notes

- Open supported PDF invoices containing embedded XML without treating
their invoice data as a standalone XML attachment.
- Continue refusing disguised active attachments and malformed or
unsupported PDF exceptions; saving remains available.

---------

Co-authored-by: Codex <codex@openai.com>
Opening several watched mailboxes could reject otherwise valid work in
two places: the UI failed the 65th pending RPC immediately, and internal
MIME/cache/large-JSON transfers all began at once despite the backend's
eight-upload, 128 MiB reservation limits. This fixes huacnlee#304 and fixes huacnlee#250
together without increasing either backend limit.

Accepted RPCs now wait in a FIFO behind the existing 64-frame window.
Their deadline starts when sent, and a callback that submits more work
joins the tail. Queued requests can be cancelled without dispatching
them; an already-sent request keeps its slot until its reply or
connection failure.

One upload queue belongs to each backend connection and accounts for
both declared bytes and slots. Parse, body-cache and large-request
uploads share it. A failed or cancelled transfer holds its reservation
until discard answers, including when ordinary traffic has filled the
RPC window. Unconfirmed discard stops the connection rather than
assuming its bytes were released. Disconnect and shutdown settle waiting
transfers, and replies from a stopped connection cannot revive them.
Cancellation can also withdraw the final domain operation while it is
still queued, so staged bytes do not turn into a cancelled write.

The existing byte-string encoding, chunk limits, per-operation size
limits and Rust API remain unchanged. No provider HTTP retry policy or
unrelated account behavior is changed.

## Verification

- All 14 GitHub CI jobs passed on final head `6e3c367`, including
standalone backend/app gates and production packaging on Linux, macOS
and Windows, native credential contracts, and released/unreleased
backend compatibility.
- Native Rust suite passed: 566 unit tests (11 explicitly ignored), 33
CLI tests, and all remaining integration/doc-test targets. No Rust
source or API contract changes.
- Full JavaScript suite passed. The new production-bridge tests cover
225-request bursts, FIFO/reentrant admission, immutable payload
snapshots, queued and active cancellation, the final uploaded-operation
cancellation race, byte reservations, delayed discard, failed cleanup,
disconnect/reconnect and callback exceptions during shutdown.
- Final Qt 6.11.2 run passed 1,082 main QML tests, plus 6 Outlook HTTP
and 64 sidebar tests. The focused backend suite passed 24/24. QML lint
and `git diff --check` passed.
- A real isolated Rust subprocess handled 225 RPCs plus 24 mixed large
MIME/body-cache/JSON transfers through the production `Backend.qml`
functions and `Upload.js`; readback matched the uploaded content and
every queue/reservation drained. This is now available through `make
test-backend-process` before its existing Quickshell fixtures. The
optional subprocess fixture is Unix-only and refuses Windows before
creating storage or starting a backend, because its native known folders
cannot be isolated through HOME/XDG overrides.
- Pristine-main regressions failed on the pending-request cap, excess
upload reservations and shutdown drain. Tests for both review findings
were also observed failing before their fixes.
- A fresh independent reviewer found mutable queued parameters and
exception-sensitive failure fanout. Both were fixed and rechecked; no
remaining blocking findings in the reviewed scope.

`make validate` is **not fully green locally**: its legacy libcurl
`tests/test_imap_ordering.sh` fixture fails identically on pristine
`af8a7ae` (the host curl returns the FETCH prefix without its literal
body). Rust, JS and portable shell stages passed; the remaining QML/lint
stages were run separately. Standalone composition requires missing
CMake, and plugin/real-Quickshell validation requires missing
Omarchy/Quickshell tools. The new native subprocess test does not
substitute for a real Quickshell Process host or a live nine-account
mailbox reproduction. This PR remains a draft with those local
verification gaps disclosed.

## Security

PASS for the affected framing, capacity, cancellation and payload-free
diagnostic boundaries, based on independent review and the regression
tests above. The affected boundary is bounded local RPC/upload
scheduling over the existing private stdio connection. No new network,
credential, filesystem or executable destination is introduced.

## Release Notes

- Large mailbox refreshes wait for available backend capacity instead of
intermittently failing with pending-request or upload-capacity errors.
- Cancelled internal uploads release their staged data without running a
queued mail operation.

---------

Co-authored-by: huacnlee <5518+huacnlee@users.noreply.github.com>
## Summary

Fix Reply and Reply All when following up on a message you sent.
Previously Reply addressed the author (yourself); Reply All did the same
and put the original To recipients in Cc, while dropping the original Cc
list.

- For messages from the draft-owning account or its known aliases, Reply
keeps the original non-self To recipients; Reply All also keeps the
original Cc recipients.
- Incoming replies still honor Reply-To. Incoming Reply All now includes
the original Cc list as well as the other To recipients.
- Exclude the owning account's identities and deduplicate addresses
case-insensitively across To/Cc. Another connected mailbox remains a
legitimate recipient. Never copy Bcc.
- Prefer the original sender identity for a sent-message follow-up.

Recipient selection lives in the shared compose recipient rules, using
existing account and send-as data. Based on current upstream `main`
(`af8a7ae`); no backend API change.

## Verification

- Four synthetic Qt regression cases fail on upstream and pass with the
fix: sent Reply, sent Reply All, known alias in a merged-account
context, and incoming Cc retention/deduplication.
- All `make validate` stages pass: 566 Rust unit tests, 33 CLI tests,
remaining Rust integration tests, JavaScript and shell/source checks,
1,079 main QML tests plus Outlook/sidebar suites, standalone
composition, QML lint, plugin validation, and whitespace checks. A
workstation server restart interrupted the standalone link after `make
test` passed; `make -o test validate` completed the remaining stages
successfully.
- Socket fixtures ran in an isolated network/mount namespace to prevent
unrelated workstation probes reaching synthetic servers. Screenshot
captures passed for all four states before and after. No live mail was
sent.

## Security

**PASS — scoped draft-recipient boundary.** Sender/recipient headers
pass through existing contact normalization before entering editable
draft fields; tests exercise CR/LF removal, Bcc omission, account
ownership and cross-field deduplication. The change adds no automatic
send or new credential/network path. This verdict covers recipient
selection, not a broader transport audit.

## Before / after

Synthetic production Qt `ComposeView` captures with production
standalone controls, Solarized Light, Qt 6.11.2 software rendering,
scale 1, and identical 900 × 600 composer dimensions. `agent-browser`
captured the labeled evidence pages at 940 × 700 and uploaded these PNGs
through this PR's attachment input. These are component fixtures, not
live-mail desktop screenshots; all addresses and messages are synthetic.
The only surrounding page content is the evidence label.

### Reply to a sent message

The original recipient replaces your own address in To.

| Before | After |
| --- | --- |
| ![Before: Reply addresses Bob
himself](https://github.com/user-attachments/assets/193513ab-29aa-4b9b-9da2-cf2c3a581ecb)
| ![After: Reply addresses the original
recipient](https://github.com/user-attachments/assets/98e6b6dd-8052-48b0-874b-36ed2d4b7371)
|

### Reply All to a sent message

The original To recipient stays in To, the original Cc recipient is
retained, and your own address is excluded.

| Before | After |
| --- | --- |
| ![Before: self in To and original recipient in
Cc](https://github.com/user-attachments/assets/5352f968-ef99-44dc-b793-12ee4041dd7d)
| ![After: original To and Cc recipients
restored](https://github.com/user-attachments/assets/2ee0cdd8-d699-4073-8db0-5996113eacda)
|

### Follow-up from a known alias

The alias is recognized as yours and used as the preferred From
identity; the original recipient goes in To.

| Before | After |
| --- | --- |
| ![Before: reply goes to the alias from the default
identity](https://github.com/user-attachments/assets/6fd5a257-65ed-47a1-907d-c8d817cd66c1)
| ![After: reply goes to the recipient from the original
alias](https://github.com/user-attachments/assets/de9b799b-d657-4706-b204-5c7ccb496a24)
|

### Incoming Reply All

The original Cc recipient is now included alongside the other To
recipient. Another connected mailbox remains a recipient.

| Before | After |
| --- | --- |
| ![Before: original Cc
omitted](https://github.com/user-attachments/assets/43ad4f03-953c-44e5-8c61-85f6379d6e57)
| ![After: original Cc
included](https://github.com/user-attachments/assets/57f8e867-4b27-4154-8051-19eba23432b5)
|

## Release Notes

- Reply to your own sent messages addresses the original recipients
instead of yourself.
- Reply All retains original Cc recipients and excludes your account's
known aliases without duplicate recipients.
## Summary

Expose email link destinations and newsletter unsubscribe metadata
through the existing `omamail read` / `mail.read` result. This addresses
the remaining newsletter-workflow gap discussed in huacnlee#154: the CLI already
lists, reads, sends and trashes mail, but previously discarded HTML
anchor destinations and unsubscribe headers.

- `message.links`: `{text, url}` entries from anchors in the sanitized
document, including links missing from a message's plain-text
alternative.
- `message.unsubscribe`: deduplicated `urls` from `List-Unsubscribe`,
plus the sender's `oneClick` declaration when an HTTPS destination is
available.
- Empty arrays and `oneClick: false` when this metadata is absent.
Plain-text URLs stay in the body text. Provider metadata availability
still applies.

This is an additive, provider-neutral read projection. No new command or
flag is needed, no QML dependency is introduced, and the plugin's
backend pin/API requirements do not change. Cross-account search is
tracked separately in huacnlee#308.

## Boundaries

Link extraction reuses the existing bounded sanitized-document traversal
and validates the exported destination after HTML-entity decoding.
HTTP(S) destinations use the existing public-host spelling policy;
mailto destinations are returned as data. Raw HTML, image/resource URLs,
unrelated headers and document attributes remain excluded. Reading still
leaves read state unchanged and does not visit links or perform
unsubscribe actions.

`oneClick` reports the sender's declaration, not verified DKIM coverage
or permission to POST. The caller remains responsible for any subsequent
network request, including DNS/address validation. Header URL bytes are
not HTML-decoded.

## Verification

- All `make validate` stages passed across the initial run and the
resumed remaining-stage run after a local harness restart: 570 Rust unit
tests, 33 CLI tests, remaining Rust integrations, JavaScript/shell
checks, 1,075 main QML tests, 6 Outlook and 64 sidebar checks, the
native Qt resource-isolation test, standalone composition, QML lint and
plugin validation.
- Final focused verification after link-decoding/bounding refinements:
all 13 read/projection tests and the real CLI IMAP/MIME fixture passed.
The fixture verifies HTML-only anchors, entity decoding, folded
unsubscribe headers, unchanged plain text, BODY.PEEK and exclusion of
tracking-image URLs and unsafe schemes.
- Provider-neutral recording fixtures exercise all five provider
identities and verify no extra operation beyond the read; this is not
live-vendor interoperability evidence.
- Changed-file formatting and whitespace checks passed. Strict Clippy
exposed five pre-existing `collapsible_if` / `needless_return`
diagnostics in untouched calendar, credentials, IMAP and mail-test code;
all-target Clippy passed with only those two lint classes allowed.

## Security

**PASS — scoped to the new read projection.** Sender-controlled anchor
attributes are decoded once before destination validation; header
targets retain their original non-HTML interpretation. Tests cover
unsafe schemes, private/loopback and numeric-host spellings, ambiguous
HTTP syntax, credentials, CR/LF/NUL, backslashes, Unicode, encoded
quotes, HTML entities, missing metadata and nested-anchor label
amplification. The projection contains no DNS, network, browser,
process-launch or mail-mutation operation. Existing raw-content/resource
exclusions and document bounds remain in force. This is not an audit of
arbitrary downstream clients or live-provider behavior.

## Release Notes

- Show HTML link destinations and newsletter unsubscribe metadata in CLI
mail reads, enabling automation to find unsubscribe targets without
exporting raw HTML.
Personal Outlook/Hotmail accounts can sign in successfully but fail to
load folders or sync mail because setup stores an empty tenant. The
backend accepted a missing tenant as `consumers` but passed an empty
tenant to URL validation, which rejected subsequent token requests.

Normalize both missing and empty stored tenants to `consumers`, matching
the existing personal-account behavior in `MicrosoftOAuth.js`. Use the
same normalized value for the token URL and the shared token-rotation
lock used by refresh and credential changes. Explicit tenant values
remain unchanged.

## Verification

On `cd3e45b`, reviewer runs of `cargo test --locked --offline --lib
auth::credentials::tests:: -- --test-threads=1` and the same command
with `auth::tests::` passed all 10 tests. These cover normalization, the
exact token URL, credential rotation, destination validation, timeout,
response bounds, and refusal to follow redirects. Transport tests used
controlled loopback servers and synthetic credentials. Five independent
review scopes found no code blocker; required CI results are currently
absent.

The author reports `cargo test --locked --lib`: 536 passed, 0 failed, 11
ignored, and `cargo fmt -- --check` passing. The author also reports the
new tests failing against the old implementation; that negative run was
not independently repeated. The new tests cover the helper and URL
construction, rather than exercising the complete persisted-account
refresh path.

On a live installation, the author reproduced token failures with
`"tenant":""` and restored syncing by manually changing the field to
`"consumers"` and reloading the plugin. This verifies the configuration
workaround; live testing of the patched binary is not documented. Full
`make validate` was not rerun in this review because its harnesses
create `/tmp` task artifacts prohibited by the review session.

This Rust fix takes effect when a backend containing it is installed;
the plugin pin remains `0.10.6`.

## Release Notes

- Personal Outlook/Hotmail accounts no longer fail to sync mail because
their saved tenant is empty.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
)

## Problem

At startup, `reconcileComposeReceipts()` asks the outbox whether
recovered drafts with a `pendingSendId` were delivered. When every one
of them was `sent`, `finish()` wrote `Recovery.empty()` to
`compose.recoverySave`. That object is presentation state and has no
`version`. The backend (`src/compose/mod.rs`) refuses records without
`version: 1` with `recovery_invalid`.

Because `-32000` is in `unsentRefusals`, the retry ladder resent the
same payload six times (1, 2, 4, 8, 16, 32 s). The stale record never
left disk, so the same failure and the "Draft recovery could not be
saved" warning returned on every launch. Receipt acks, which wait for a
durable save, were never released.

A local diagnostics report showed this as repeated
`compose.recoverySave` → `recovery_invalid` bursts, spaced exactly by
the retry ladder.

## Fix

When nothing is left to restore, write `{"version":1,"active":false}`,
the same record `clearComposeRecovery()` already writes.
`Recovery.empty()` stays as UI state. The backend is unchanged: refusing
unversioned records is correct.

## Verification

- Added `version === 1` and `active === false` assertions to the
existing
`test_sent_receipt_is_not_restored_and_is_acknowledged_only_after_durable_save`.
Before the fix it failed with `Actual: undefined, Expected: 1`. After
the fix the file passes 99/99.
- `make test` and `make validate` pass locally.

## Release Notes

Draft recovery no longer keeps failing to save, or warns on every
launch, after a recovered message turns out to have been sent already.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…uacnlee#320)

## What changes

- **`/history` opens at once:** choosing `/history` from the
slash-command suggestions with Up/Down and Return/Enter now opens the
history list directly. Before, the first Enter only completed the text
to `/history ` and a second Enter was needed. `/history` takes no
argument, so the completion step added nothing. Partial `/clear` and
`/diagnose` completion is unchanged.
- **Back to chat from History:** the history view shows a `← Chat`
control in the AI header, using the same `BackBar` as the reader and
calendar detail pages, and the header reads `AI · History`. Before,
Escape was the only way back. The button and Escape both go through
`AgentPrompt.leaveHistory()`, which returns focus to the prompt field.
- The history list now sits below the measured header instead of a fixed
28px offset, so the taller back button cannot overlap the first row.

`docs/KEYS.md` records the `/history` behavior.

## Before / after

Synthetic offscreen captures of the production `AgentPrompt` in the
`tst_agent_interaction` harness, using the same 520×600 size, harness
colors, software renderer and scale 1 for both. Baseline: `main` at
`31a5bb1`. The only visible differences are the `← Chat` button and the
`AI · History` title; the list moves down to clear the button.

_Screenshot to be attached._

## Verification

- New `test_history_back_returns_to_chat`: the back button is hidden in
chat, shown in History, sits above the list, and clicking it leaves
History and focuses the prompt field.
- `test_exact_commands_execute_and_partial_commands_complete` now
asserts that choosing `/history` enters History with an empty field and
no agent call.
- `make test-qml` on this branch: 1158 + 6 + 64 passed, 0 failed. `make
qml-check` exits 0.

**Security: PASS.** This change is presentation only. It adds no backend
request, network request or agent dispatch; the existing test asserts
that `/history` makes no agent call.

## Release Notes

- Choosing `/history` in the AI panel opens conversation history
immediately.
- AI conversation history has a back button to return to the chat.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Publish Omamail v0.10.8 from this branch. Release CI builds and verifies
the plugin backends and all three standalone desktop packages, creates
the tag and one release, then updates backend-version and the released
API contract in this PR after verifying every public download.

Merge this PR once the pin commit and required checks pass. Main
receives the version and runtime pin together in one merge.

## Release Notes

- Update the Omarchy backend and standalone desktop applications to
v0.10.8.

---------

Co-authored-by: Omamail Release <41898282+github-actions[bot]@users.noreply.github.com>
QtQuick 6.12 introduces a built-in Color type that shadows the unqualified
Color singleton from qs.Commons. Unqualified references such as
`Color.foreground` then resolve to the wrong type and read as undefined, so
the plugin and the standalone host lose their theme palette.

Import qs.Commons under the Commons alias and reference Commons.Color across
the ui/ plugin, the app/ standalone host, their vendored qs modules, and the
QML tests; keep Style/Border/Util unqualified. The one bare object reference
(`target: Color` in app/qml/Main.qml) is qualified too. Update the
source-pattern test to expect the qualified accent reference.

This mirrors the upstream Omarchy fix (omacom/omarchy#14553, b83d3df0) and
behaves identically on Qt 6.11.

Provenance: authored by DeepSeek V4.1 Flash (pi herd worker).
@Pillumz
Pillumz merged commit 6bbbb44 into main Oct 8, 2026
11 of 14 checks passed
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

CI failed at cc055b2 (run). What each failed gate needs:

Released backend gate failed

The backend the plugin pins (backend-version) does not speak what backend-api.json calls its released API, or the released fixtures do not pass against it. Backends ship in batches, so an API change does not wait for a release — it is declared as the one unreleased step:

  • raise apiVersion to exactly releasedApiVersion + 1;
  • list every new method under unreleased.methods and every new or changed contract case under unreleased.cases;
  • leave the released cases as they are — the pinned binary has to keep passing them;
  • a feature that needs the step checks the connected backend against its fixed minimum API revision and waits until that requirement is met.
    If apiVersion is already a step ahead, the released view still changed: compare backend-api.json with the pinned release's copy (gh release download v$(cat backend-version) --pattern backend-api.json). See "Released and unreleased" in docs/BACKEND-RUNTIME.md.

Released backend gate failed

The backend the plugin pins (backend-version) does not speak what backend-api.json calls its released API, or the released fixtures do not pass against it. Backends ship in batches, so an API change does not wait for a release — it is declared as the one unreleased step:

  • raise apiVersion to exactly releasedApiVersion + 1;
  • list every new method under unreleased.methods and every new or changed contract case under unreleased.cases;
  • leave the released cases as they are — the pinned binary has to keep passing them;
  • a feature that needs the step checks the connected backend against its fixed minimum API revision and waits until that requirement is met.
    If apiVersion is already a step ahead, the released view still changed: compare backend-api.json with the pinned release's copy (gh release download v$(cat backend-version) --pattern backend-api.json). See "Released and unreleased" in docs/BACKEND-RUNTIME.md.

Fix, push, and the gates run again; this comment updates itself.

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.