Skip to content

Update to upstream main with spellcheck, Add to dictionary and Save as .eml - #12

Merged
latentoperator merged 95 commits into
mainfrom
sync/upstream-main-2026-11
Nov 1, 2026
Merged

latentoperator merged 95 commits into
mainfrom
sync/upstream-main-2026-11

Conversation

@latentoperator

Copy link
Copy Markdown
Owner

Summary

Update this development copy from its v0.10.8-based main to upstream main 3205906, with the current composer spellcheck proposal (huacnlee/omamail#324 at 63634f1), Add to dictionary, Save as .eml and IMAP mock-cache isolation on top.

The reviewed tree is e1cbba4. Upstream main and #324 had moved too far from this copy's older feature implementations to merge them in place, so the update was assembled from upstream main and then joined to this repository's history with a merge that keeps the reviewed tree unchanged (e69e7ff, tree daecccb, identical to e1cbba4). History is preserved and nothing was force-pushed.

Contents

Behaviour changes from the current main

  • Spellcheck is off until turned on in Settings, and the language follows the system locale unless a dictionary code is set. The previous main had spellcheck on with en_US. This follows the opt-in default requested upstream.
  • The README no longer carries the development-copy banner; it will be restored in a separate documentation change.
  • Two redundant spelling probe tests were removed upstream in 8699f1c.

Verification

  • Independent exact-head reviews: 0bb4af6 changes required, 33eac44 changes required, e1cbba4 PASS with no remaining findings. Security: PASS for the dictionary write paths on both hosts and the unchanged .eml export path.
  • Full make -k validate on Linux at e1cbba4 in an isolated account with temporary HOME and XDG directories: Rust library 790 passed, 0 failed, 14 ignored; QML 1,708 passed, 1 failed, 1 skipped; standalone composition 1/1; Outlook HTTP, sidebar text, tooltip text, native HTML, omarchy plugin validate and git diff --check all exited 0.
  • The one QML failure, CalendarSignalCrossings::test_an_event_opened_from_the_agenda_names_its_guests, also fails on unmodified upstream main in November because its fixture is dated 2026-10-14. The skip is the en_GB language-switch test on a machine without that dictionary.
  • No personal configuration, real mail, installer or shell restart was used.

Release Notes

  • Update to current upstream Omamail main.
  • Spellcheck follows the current upstream proposal: off by default, system language by default, with Add to dictionary kept for this copy.
  • Save as .eml remains available in this copy.

latentoperator and others added 30 commits October 7, 2026 13:40
…r .eml

- A card above the status bar names the saved file and its folder, with
  Open folder... and a dismiss button. It hides after eight seconds and stays
  while hovered. The status-bar notice is unchanged.
- The reader toolbar has a Save as .eml button, and a right-click on the
  message text offers Save as .eml and Save as .eml to folder...
- The message menu offers Save as .eml to folder... beside Save as .eml.
- mail.exportEml takes an optional directory: an absolute path in normal
  form. A chosen folder must already exist and pass the same ownership
  checks as Downloads, and it is never created. Downloads is unchanged.
- attachment.sh folder asks omarchy-file-select --directory (the desktop
  portal) or zenity for one folder, out of process like the file picker.
  The standalone app does not offer folder rows.
`SettingsTest::watchSettlesAfterDirectoryMutation` sampled the change
count 500 ms after the first event and required no further change in the
next second. FSEvents may split the test's own three mutations (a
sibling write, a directory mode change and a file mode change) into
batches spaced further apart on a busy runner, so the [v0.10.8 Release
run](https://github.com/huacnlee/omamail/actions/runs/36874896519)
failed on macOS with 5 changes against a sampled 2; rerunning the job
passed. Five is exactly two directory events over two watched paths plus
one file event, which means late delivery of expected events rather than
a watch loop.

The test now waits until a full second passes without a change, bounded
at 10 seconds, then keeps the same assertions. A watch that never goes
quiet still fails.

## Verification

- Built `tst_settings` on Linux and ran it three times through ctest; it
passed every time.
- Temporarily made `FileStore`'s directory handler create a new file in
the watched directory, an endless loop. The test failed after the 10
second bound (1,383,671 changes against 1,243,847). With the change
reverted, the full suite passed again (12 passed, 1 skipped).
- macOS behavior is exercised by this PR's CI.

**Security: PASS** — only a native test's waiting changes; no runtime
code or security boundary is touched.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This adds an `omastore.toml` at the root so Omamail's standalone desktop
app shows up in
[OmaStore](https://github.com/KitsuneForgering/OmaStore), an app store
for Omarchy. OmaStore only lists repositories that have this file, so
the file is your opt-in. It doesn't change the plugin, the build or the
release.

Most of the file is there because the release carries two kinds of Linux
tarball. Without a manifest, the store's heuristic would see
`omamail-linux-x86_64.tar.gz` (the plugin backend) and
`omamail-app-linux-x86_64.tar.gz` side by side and could pick the
backend, then launch `bin/omamail` as if it were the app. So the file
names the standalone tarball and its Qt host,
`omamail.app/bin/omamail-app`, the same executable `install.sh` links.

The aarch64 entry names `omamail-app-linux-aarch64.tar.gz`, which no
release has yet. That's on purpose. Until a release has it, OmaStore
treats the app as not installable on ARM instead of installing
`omamail-linux-aarch64.tar.gz` (the plugin backend) in its place. If an
ARM build of the standalone app is ever published under that name, it
starts working with no further change. (Refusing a declared asset that
is missing is new in OmaStore; this release prompted it, and the release
that has it is still on its way.)

The rest is display data: the icon the standalone package installs
(`app/resources/icons/omamail.svg`), four screenshots from
`docs/images/` and the categories from the bundled `omamail.desktop`
(`Network`, `Email`, `Office`). OmaStore checks the file against
`SHA256SUMS`, extracts it into the user's `$HOME` without running
anything from it and writes its own menu entry. Every field is optional
and documented
[here](https://github.com/KitsuneForgering/OmaStore/blob/master/docs/authors.md).
Change or drop any of them as you like.

## Verification

`make validate` green on this commit: Rust tests, node tests,
`tests/test_source.sh`, the QML suites (0 failures) and qmllint, then
`omarchy plugin validate .` and `git diff --check`. The new file is not
code, so no test was added. There is no behavior in this repository for
one to fail against.

The OmaStore side was checked with its own tools in a throwaway `$HOME`.
`omastore lint-manifest .` is clean. `omastore check --manifest` reports
the icon, the 4 screenshots and the `SHA256SUMS` checksum, and v0.10.8
as installable on x86_64. A real `omastore install` of v0.10.8 picked
`omamail-app-linux-x86_64.tar.gz`, verified it, linked `omamail-app` and
wrote a menu entry, and `omastore uninstall` then removed everything it
had created.

A fresh agent with no context from writing the change reviewed the diff.
It checked that every path exists, that the x86_64 asset is the
standalone bundle and not the plugin backend, that `exec` matches what
`install.sh` links, and that the categories match the bundled
`.desktop`. It also checked that the new root file trips nothing in
`tests/test_source.sh` or `omarchy plugin validate`. It found nothing
wrong.
## What broke

On a machine that logs in without a typed password (SDDM autologin, so
PAM never hands gnome-keyring the login password), Gmail sign-in
finishes Google's side and then fails with *"Could not save the Google
session to the keyring. Please try again"*.
`~/.local/state/omamail/diagnostics/errors.json` records `auth.poll` →
`auth_keyring_failed`.

### Reproduction

1. Log in through SDDM autologin so the default Secret Service
collection starts locked each session. It may have a blank password, in
which case unlocking needs no prompt.
2. Add a Gmail mailbox and complete the Google consent screen.
3. The browser page says "Sign-in received", and the token exchange plus
`users/me/profile` succeed, but the app then reports the keyring error.

Root cause: `Operation::Put` checked `collection.is_locked()` and
returned `Error::Unavailable` instead of unlocking the collection. The
refresh token is stored during sign-in, before the UI starts any mailbox
request, so the whole sign-in reports failure after Google has already
returned a token — with no way for the user to act on it.

## Fix

Unlock the default collection when it is locked, then continue to
`create_item`:

```rust
if collection.is_locked().await.map_err(|_| Fault::Transport)? {
    collection.unlock().await.map_err(|_| Fault::Transport)?;
}
```

A blank-password collection unlocks immediately with no prompt; a
password-protected one prompts inside the operation's single deadline
(the same way `find` already unlocks a locked item). Refusing was the
only path that could not succeed.

## Test

Adds a `with_locked_collection()` native D-Bus fixture (item missing,
default collection locked) and
`credentials_native_linux_a_locked_collection_is_unlocked_before_a_write`,
asserting the write reaches `Unlock` and then `CreateItem`. Before the
fix the collection was refused, so neither was reached.

All native credential tests pass:

```
cargo test --locked --lib credentials_native_linux -- --ignored
test result: ok. 10 passed; 0 failed
```
…303)

IMAP Junk messages now offer **Move to Inbox**, so mistakenly classified
mail can return to the Inbox even when the provider has no report-spam
action or its folder picker excludes system folders. This restores the
existing `unarchive` operation; no backend method or new user setting is
added.

The menu checks the selected message’s owning account through
`hostForId`, including qualified IDs in the unified view. The unified
service’s aggregate capability cannot decide a single message’s spam
semantics: Gmail Spam keeps its existing actions when another mailbox
lacks spam reporting. Missing owners do not enable the recovery action.
The component is shared by the plugin and standalone hosts.

## Verification

On `144ccfa`, Linux/Qt 6.11.2: `make validate` passed, including Rust,
JavaScript, shell, QML, standalone composition, lint, plugin validation
and whitespace. The menu suite passed 20 tests; an independent
mixed-account fixture passed 18. The mixed Gmail regression failed on
the earlier PR and passes with the owner-capability correction.
Synthetic inputs only; no live mailbox or keyring was used. Security:
PASS for the affected menu and existing account-routing scope.

## Release Notes

- Restore Move to Inbox for IMAP Junk messages, including the unified
mailbox view, while preserving Gmail Spam behavior.

## Maintainer UI evidence

Production MessageMenu component captures with synthetic mail, Qt
6.11.2, 640×480, scale 1, fixed reproducible light/dark semantic
palettes. These are focused component renders using production
standalone UI compatibility imports, not the installed desktop or live
accounts. Each BEFORE/AFTER pair uses the same dimensions, palette,
popup position and selected row. IMAP Junk now offers Move to Inbox
instead of Archive; Gmail Spam retains its existing actions.
Unified-mailbox captures resolve the selected message owner: IMAP gets
Move to Inbox, while Gmail retains Archive. Current reviewed component
at `144ccfa` has the same SHA256 as the captured source.

**AFTER DARK GMAIL**


![after-dark-gmail](https://github.com/user-attachments/assets/e973c88c-a54a-4e72-aedc-ecfffc62ee9d)

**AFTER DARK IMAP**


![after-dark-imap](https://github.com/user-attachments/assets/82687088-8d10-4076-bb8d-c48cbd05f000)

**AFTER DARK UNIFIED GMAIL**


![after-dark-unified-gmail](https://github.com/user-attachments/assets/7c9adfee-77a3-447a-a7ca-36d41cd23301)

**AFTER DARK UNIFIED IMAP**


![after-dark-unified-imap](https://github.com/user-attachments/assets/f5b65b2b-983c-4cac-81b8-df938ac658bc)

**AFTER LIGHT GMAIL**


![after-light-gmail](https://github.com/user-attachments/assets/9daab0cc-561f-439f-ab94-a1ee08001fa5)

**AFTER LIGHT IMAP**


![after-light-imap](https://github.com/user-attachments/assets/07c2fd6f-b8d4-4082-8a7c-f0da8fe7394e)

**AFTER LIGHT UNIFIED GMAIL**


![after-light-unified-gmail](https://github.com/user-attachments/assets/e61151ef-3347-4598-9666-504eb9864242)

**AFTER LIGHT UNIFIED IMAP**


![after-light-unified-imap](https://github.com/user-attachments/assets/88a58396-1720-40ed-b27b-c606be4f9ea7)

**BEFORE DARK GMAIL**


![before-dark-gmail](https://github.com/user-attachments/assets/93adce08-8ee4-4a41-b4b1-78cfc7352796)

**BEFORE DARK IMAP**


![before-dark-imap](https://github.com/user-attachments/assets/5d562841-d9e8-4059-8ac9-da50d417d7c3)

**BEFORE DARK UNIFIED GMAIL**


![before-dark-unified-gmail](https://github.com/user-attachments/assets/d96d71c3-c525-4559-a850-02b2265da1e5)

**BEFORE DARK UNIFIED IMAP**


![before-dark-unified-imap](https://github.com/user-attachments/assets/bc380543-8b3e-4c87-ae8b-a9d225c9f49f)

**BEFORE LIGHT GMAIL**


![before-light-gmail](https://github.com/user-attachments/assets/006bd49b-1baa-4ba0-9239-11f54962b33d)

**BEFORE LIGHT IMAP**


![before-light-imap](https://github.com/user-attachments/assets/4b4d46f0-4e64-408e-9bb2-328aadc8c0de)

**BEFORE LIGHT UNIFIED GMAIL**


![before-light-unified-gmail](https://github.com/user-attachments/assets/d225dec3-dd7f-4563-9b04-9be48254b669)

**BEFORE LIGHT UNIFIED IMAP**


![before-light-unified-imap](https://github.com/user-attachments/assets/8701b163-840f-4f8a-a08b-9f15e389e203)

---------

Co-authored-by: art-request <art-request@users.noreply.github.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
## Problem

Qt 6.12 adds a `Color` type to the `QtQuick` module. It shadows the
`Color` palette singleton from `qs.Commons`. Every unqualified `Color.*`
read now returns `undefined`, so the plugin and the standalone app
render with no theme colours.

The shell log shows the fault on Qt 6.12.0:

```
omamail/ui/BarWidget.qml[116:11]: Unable to assign [undefined] to QColor
omamail/ui/BarWidget.qml[179:-1]: TypeError: Cannot read property 'text' of undefined
omamail/ui/components/GmailIcon.qml[105:-1]: TypeError: Cannot read property 'background' of undefined
```

## Fix

Each file that reads the palette now imports `qs.Commons as Commons` and
uses `Commons.Color`, including `target: Commons.Color` in
`app/qml/Main.qml`. This is the rule Omarchy applies to its own shell in
omacom/omarchy#14553. The unqualified `qs.Commons` import stays for
`Style`, `Border`, and `Util`.

The change covers `ui/`, the standalone `app/qml/` host and its
`qs.Commons`/`qs.Ui` modules, and the QML tests. `tests/test_source.sh`
now looks for `markColor: Commons.Color.accent`.

The alias import works on every Qt 6 version, so Qt 6.11 keeps working.

The palette fix exposed one older bug, fixed in `3baf5f7`. In
`app/qml/styles/Omamail/ComboBox.qml`, `parent` in the chevron's
`Connections` handler resolves to the ComboBox, not the `Canvas`. Each
palette change raised `requestPaint is not a function` and left the
chevron in its old colour. The handler now calls the Canvas by id.

## Qt 6.12 theme evidence

Standalone app (`make app-build`) on Arch, Qt 6.12.0, Omarchy theme,
empty profile (setup page). Before: `main` at `a528507`; the app log has
1155 `undefined`/`TypeError` lines. After: PR head `3baf5f7`; the log
has none.

<!-- before-and-after:start -->
| Before (Standalone app, setup page) | After (Standalone app, setup
page) |
|:---:|:---:|
|
![Before](https://raw.githubusercontent.com/eliasfaltin/omamail-upstream/0e7595e99738936831c0372680f6766bd34236a4/qt612-before.png)
|
![After](https://raw.githubusercontent.com/eliasfaltin/omamail-upstream/0e7595e99738936831c0372680f6766bd34236a4/qt612-after.png)
|

<!-- before-and-after:end -->

## Verification

On Arch with Qt 6.12.0:

- Synced with `main` at `a528507` (merge commit `e5c17bd`); head is
`3baf5f7`. On that head: `make test-qml` 1155 passed, 3 failed (the same
`LabelOwnership` failures as `main`); `make test-app-qml` passes; `bash
tests/test_source.sh` passes.
- `grep` finds no unqualified `Color` reference left in `ui/` or `app/`
QML. The remaining matches are a string literal and a comment.
- `make test-qml`: 1154 passed, 4 failed before; 1155 passed, 3 failed
after.
`NotificationOpen::test_new_notifications_follow_theme_without_bar_foreground`
fails before and passes after. The 3 `LabelOwnership` failures
(`reloadLabels is not a function`) fail the same way on `main` and are
unrelated.
- `make test-app-qml`: `tst_standalone_composition` failed 2 of 30
before (palette compares returned `undefined`) and passes after.
- `bash tests/test_source.sh` passes.


## Release Notes

- Restore theme colors in the plugin and standalone app on Qt 6.12.


## Maintainer supplemental screenshot evidence

Matching before/after captures cover shared plugin components (bar icon,
unread badge, action icons, default and selected buttons; text, number
and toggle controls; dropdown closed and open) and the standalone
provider picker, using the active Omarchy palette at scale 1 on Qt
6.11.2. Appearance is intentionally identical on this runtime: these
captures demonstrate preservation of Qt 6.11 appearance, not the Qt 6.12
broken/restored state. Independent Qt 6.12 runtime screenshots remain
unavailable; the author reports that regression separately. Synthetic
data and production component source are used. After captures include
the author’s `3baf5f7` Canvas repaint fix and match the affected widget
and theme code in final head `dacd864`; the final integration also
includes unrelated MessageMenu updates, so equivalence of the whole UI
tree is not claimed. The open-dropdown screenshots are matching 313×56
crops of the actual expanded popup content; the plugin and standalone
screenshots show matching full-window views. A separate native SignalSpy
regression covers chevron repaint when the theme changes; these
screenshots do not substitute for that assertion.

**AFTER CONTROLS POPUP**


![after-controls-popup](https://github.com/user-attachments/assets/cf4ae09e-d4df-4540-b33d-ecf5eaf8baa9)

**AFTER CONTROLS**


![after-controls](https://github.com/user-attachments/assets/21b83dee-0b08-4f62-9642-759c1da2cfba)

**AFTER PLUGIN**


![after-plugin](https://github.com/user-attachments/assets/2fd0f190-d727-4b42-9a80-1bb9ecb025c3)

**AFTER STANDALONE**


![after-standalone](https://github.com/user-attachments/assets/6949823f-4733-441a-9b90-d5259d5fef4d)

**BEFORE CONTROLS POPUP**


![before-controls-popup](https://github.com/user-attachments/assets/9ec4cc2d-9b80-41d0-ac8e-99f735450415)

**BEFORE CONTROLS**


![before-controls](https://github.com/user-attachments/assets/490e2975-6825-4ef8-9d1e-2c371a7ddbc2)

**BEFORE PLUGIN**


![before-plugin](https://github.com/user-attachments/assets/841782bc-3f01-4c65-b570-2065db621b44)

**BEFORE STANDALONE**


![before-standalone](https://github.com/user-attachments/assets/c479ebf0-0ec2-4f84-8183-87b286977278)

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
iCloud sends a zone's whole history in every VTIMEZONE: retired `RRULE`s
that end in an `UNTIL`, and one-off transitions gathered into `RDATE`
lists. `transitionIn` ignored both. A rule kept recurring after its
`UNTIL`, so Europe/Vienna's 1981–1995 late-September fall-back won every
autumn: an event created on an iPhone at 15:30 on 7 October showed at
16:30, and every iCloud event in that zone was an hour late from late
September to the last Sunday of October. `RDATE`s were not read at all,
so a zone that has given up summer time (Mexico City, Moscow, Istanbul,
…) fell back to whichever entry headed the list, often local mean time
from the 1800s.

A VTIMEZONE is now read once into a plan kept on the parsed zone.
Recurring rules keep their parsed `RRULE`; bare-date rules keep every
`DTSTART`/`RDATE`, grouped by year, so a rule that takes effect twice in
one year (Casablanca's Ramadan in January and December 2029) counts
both. A rule stops at its `UNTIL`. `UNTIL` is UTC while the transition
is a wall-clock reading, so the transition is moved to UTC by the rule's
`TZOFFSETFROM` before comparing; compared naively, the last transition a
zone east of UTC made under a rule falls after its own `UNTIL`. A zone
that carries a history (an `UNTIL`, an `RDATE` list, or more than one
standard/daylight pair) is also asked about each rule's final year, so
it stays where its last change left it. A lone pair of bare dates is
still the Exchange case the existing `STANDARD`-first fallback is
written for, and keeps it.

The candidates a reading chooses between depend only on its year, so
they are cached per year on the plan. Of the transitions from earlier
years only the latest is kept, so an invitation carrying tens of
thousands of `RDATE`s stays bounded: reading every `RDATE` on every
call, as an earlier draft of this change did, let a ~460 KB invitation
freeze the UI for close to a minute.

## Verification

`make validate` green on this commit (on Arch, `shasum` lives in
`/usr/bin/core_perl`, which had to be added to `PATH` for
`tests/test_source.sh`).

New cases in `ui/tests/test_calendar.js`: Europe/Vienna with its retired
autumn rules, America/Mexico_City after summer time was abolished,
Europe/Moscow with its 2014 change only as an `RDATE`, and
Africa/Casablanca with two transitions of one rule in 2029. Against the
unfixed code the Vienna case fails (`early October is still summer
time`); the Mexico City, Moscow, 1995 east-of-UTC `UNTIL` and Casablanca
cases each fail against the intermediate versions that lacked the
respective part.

A sweep over 418 ICU zones, 2018–2030 on the 5th and 20th of each month,
against VTIMEZONEs generated in iCloud's shape (`RRULE` with `UNTIL` for
recurring rules, `RDATE` lists for the rest) and compared with `Intl`: 0
zones worse, 288 better, mismatching readings 40,390 → 382 (the
remainder is mostly the generator approximating Apple's grouping).

Hostile input: a ~480 KB zone with 15,000 `RDATE`s per rule, queried for
every day over 300 years, takes 1.0 s / 16 MB heap (original 7.0 s / 12
MB); with the `RDATE`s in the queried year itself 0.4 s (original 0.8
s); 3,200 `RRULE` sub-components over 28 years 1.4 s (original did not
finish in 200 s). A single offset lookup on iCloud's Europe/Vienna
block: 7 µs (original 302 µs).

Live: an iCloud calendar on Europe/Vienna in the Omarchy bar, where
events created on an iPhone between late September and late October
showed an hour late before and at their time after.

A fresh agent reviewed the diff in four rounds. It found the naive
`UTC`/wall-clock `UNTIL` comparison, a regression for zones that
abolished summer time, unread `RDATE` lists, a second same-year
transition being lost, the per-call `RDATE` re-read (UI freeze on a
crafted invitation) and unbounded per-year cache growth; those
iterations addressed the cases tested above. Review of the current head
still found a gap for sparse past/future RDATE histories, and the
per-year candidate cache has no eviction. Its last round also noted that
the "before every transition" fallback in `zoneOffsetMinutes` is
unreachable, as it was before this change; it is left as it was.

## Release Notes

- Calendar events from iCloud no longer show an hour late from late
September to the end of October in zones such as Europe/Vienna and
Europe/Berlin.
- Events in zones that have abolished summer time, such as Mexico City
or Moscow, show at the right time all year.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
mise ~/.config/mise/config.toml tools: gh@2.102.0
mise ~/.config/mise/config.toml tools: gh@2.102.0
Fixes #306.

A consumer Outlook grant can still refresh mail while Microsoft refuses
its first Graph exchange with AADSTS70000. Treat that specific Graph
refusal as a candidate for missing consent, then probe the exact same
refresh token for the mail resource under the existing per-account
rotation lock. Only a successful, scoped mail response becomes
`auth_consent_required`; genuinely invalid grants, temporary failures
and malformed responses retain their distinct outcomes. Keep a
refresh-token rotation returned by the probe. Both exchanges share a
20-second network budget. Accept Microsoft’s exact short Graph scope
names after consent, without allowing mail/Graph scope aliases to cross
resources.

Decode Outlook RPC errors using their `{code, message}` envelope. This
small adapter correction overlaps the Outlook portion of #284; the
unrelated Gmail changes and open review findings in that PR are not
included.

Calendar discovery and native calendar requests now report missing Graph
consent to the original mailbox's auth object. The callback is bound to
its account, client, session, tenant and Graph grant generation, so an
old response cannot change a replacement session or undo a completed
consent flow. The setup page can then offer the existing **Allow
Microsoft Graph...** button. Its existing second, Graph-only device-code
flow retains the returned refresh token; no combined mail/Graph request
is introduced. Outlook grant replacement and logout use the existing
account-bound `auth.store`/`auth.clear` methods, which serialize with
native refresh rotation. Once a credential operation owns that lane, it
keeps the lock until any in-progress native write finishes, even if an
outer calendar deadline cancels its caller. No mailbox operation is
detached.

## Verification

- Rust 1.98.1: all 650 unit/integration checks pass (576 unit tests and
74 integration tests; 11 explicit native/environment tests remain
ignored by the standard command). The 14 focused credential checks pass,
including same-refresh-token mail proof, genuine revocation,
transient/malformed responses, token rotation, Graph-only short scopes,
the shared network deadline, concurrent Graph-grant replacement, and
outer cancellation during a blocked native write. The 70000
classification, RPC/calendar routing, serialized-store routing,
short-scope, network-deadline and outer-cancellation reproductions were
observed failing before their respective fixes.
- Qt 6.11.2: all 1,092 main QML checks pass. The new 17-check suite
exercises real OutlookAuth/CalendarController/setup components through
synthetic RPC responses: calendar listing/discovery, consent-button
visibility, the second Graph code, refresh-token storage, other errors
and stale account/client/tenant/grant responses.
- The additional native Qt checks pass: 6 Outlook HTTP, 64 sidebar, and
the HTML resource-isolation test. `make test-js test-shell-portable`,
full `make qml-check` (with environment import warnings), and whitespace
checks pass.
- `make validate` reaches the unchanged `tests/test_imap_ordering.sh`
mismatch on this Debian host’s libcurl 8.14.1; pristine main fails the
same fixture. The remaining standalone host gate cannot start because
CMake is absent. Full manual Omarchy/standalone-host QA is not claimed.
- Strict all-target Clippy reports five pre-existing `collapsible_if` /
`needless_return` findings in untouched calendar, credential-store, IMAP
and mail-test code. All-target Clippy passes with only those two
pre-existing lint classes allowed.
- Fresh independent review found the short-scope, store-interleaving and
cancellation issues; the final delta has no remaining actionable
findings. Security: **PASS**, scoped to the affected auth and
credential-persistence boundaries.

Provider and credential-store fixtures are synthetic. No real Microsoft
account or native user keyring was accessed. Fixed credential
destinations, TLS/redirect policy and separate resource scopes remain
unchanged. This is not a live-provider interoperability test or a
broader authentication audit.

**Backend delivery:** public methods, response shapes and the existing
`auth_consent_required` meaning are unchanged, so no new API gate is
required. The installed backend pin remains 0.10.7. The native
70000/rotation fixes require a subsequent backend release; this PR does
not publish or replace release assets.

## UI evidence

Comparable synthetic production-component captures with GitHub-hosted
attachments are included below, at 640×740 per side and scale 1 on Qt
6.11.2. Before, the signed-in mailbox has no Graph consent action.
After, **Allow Microsoft Graph...** appears and starts the separate
Graph code while mail remains signed in. The code and failure states are
also covered. Dark uses the active Osaka Jade palette; light is a
labeled fixed test palette. Full manual native-host and live
Microsoft-account QA are not claimed.

## Release Notes

- Offer Microsoft Graph consent for personal Outlook accounts whose mail
sign-in still works, and keep the refresh token returned by the separate
Graph sign-in.


## Maintainer validation on current head

Merged current main `b0504b9` into this branch as `36cd1bf`, preserving
the accepted Outlook repair. The merge required no new conflict
resolutions or behavior changes. On Rust 1.98.1 / Qt 6.11.2, 20
credential regressions and 17 real Outlook-component QML checks pass;
these include the empty-tenant/default-consumers rotation lane,
dual-clock token cache expiry, revoked/malformed grants, and
cancellation during native credential persistence. JavaScript and QML
lint pass after integration; existing environment import warnings remain
non-fatal. Synthetic fixtures were used throughout. Security: PASS for
the affected Outlook auth and credential-persistence boundaries. Full
local `make validate` remains unperformed on this integrated head
because existing test scripts create temporary files under `/tmp`, which
the current task instructions prohibit; no `TMPDIR` override was used.
Required remote checks for this newly pushed SHA are pending and must
pass before merge.

## Maintainer supplemental screenshot evidence

Each comparison shows BEFORE on the left and AFTER on the right, 640×740
each side, scale 1, Qt 6.11.2. Production OutlookAuth/OutlookSetupPage
use unmodified standalone controls; only transport responses, address,
client, tokens and device code are synthetic. Dark uses the active Osaka
Jade palette; light is an explicitly fixed test palette rather than the
active desktop. Ordinary signed-in mailbox UI remains unchanged. After a
Graph consent refusal, the account remains signed in and now offers
Allow Microsoft Graph...; the separate Graph-only device-code flow shows
a browser link and Cancel. A device-flow error preserves mail sign-in,
explains the refusal and permits retry. All four states are covered in
both palettes. Source is reviewed head `36cd1bf` versus main `b0504b9`.

**DARK CONSENT BUTTON**


![dark-consent-button](https://github.com/user-attachments/assets/6d03caf8-1df4-4cab-a62b-459e92887faf)

**DARK DEVICE CODE**


![dark-device-code](https://github.com/user-attachments/assets/6a57ea59-095d-4154-b8ca-9da802670d5d)

**DARK DEVICE ERROR**


![dark-device-error](https://github.com/user-attachments/assets/77058458-58c2-45d7-9f43-7ec20124d962)

**DARK SIGNED IN**


![dark-signed-in](https://github.com/user-attachments/assets/d962f58e-c0f3-4608-b3d5-06fee5df6055)

**LIGHT CONSENT BUTTON**


![light-consent-button](https://github.com/user-attachments/assets/fceb87b4-dbcf-4d82-bb72-354139958c60)

**LIGHT DEVICE CODE**


![light-device-code](https://github.com/user-attachments/assets/011e51dd-248d-4c45-88b5-6f8495c3199a)

**LIGHT DEVICE ERROR**


![light-device-error](https://github.com/user-attachments/assets/984fc42e-d74c-41b9-81b4-c4bbff72f552)

**LIGHT SIGNED IN**


![light-signed-in](https://github.com/user-attachments/assets/d1a36180-6e19-4173-a714-5206b1866803)

Co-authored-by: Codex <codex@openai.com>
Daily user of Omamail and would love to help:

The calendar used a hard-coded 24-hour clock for all displayed times.
With `LANG=en_US.UTF-8` (Qt's short time format `h:mm AP`), a 3 PM
meeting appeared as `15:00` in month cells, week blocks, the hour rail,
agenda, event details, reminder lists and reminder notifications, while
the rest of the desktop showed `3:00 PM`.

Calendar labels now use three small helpers in `Calendar.js`
(`timeLabel`, `timeRangeLabel`, `dateTimeLabel`) that format times with
`Qt.locale().timeFormat(Locale.ShortFormat)`. This preserves the
locale's hour cycle, separator (`15.05` in Finnish), and AM/PM text and
spacing. The surrounding date formats (`ddd, MMM d ·`, `d MMM`) and
all-day lane are unchanged.

The longer 12-hour labels also need a little more room. Week blocks
measure the localized range and show only the start time when the range
does not fit. The hour rail sizes itself using the locale's labels for
0:59 and 12:59, and month-overflow ranges wrap instead of overflowing.

Time entry in the event composer stays `HH:mm`. The mail reader, agent
and bar-preview clocks are unchanged and would need separate changes. A
rule in `tests/test_source.sh` prevents hard-coded `hh:mm`/`HH:mm`
display formats from returning to the calendar files, with the
composer's validation message as the only exception.

## Verification

Author validation on the original `15270ba` head: `make validate` passed
on Omarchy with Qt 6.11.2: the QML suites passed 1158, 6 and 64 tests,
with 0 failures; `qml-check` passes, and `omarchy plugin validate` and
`git diff --check` are clean. The JS, shell, QML and lint targets also
pass on v0.10.8.

`ui/tests/test_calendar_time.js` covers 12- and 24-hour clocks,
midnight, noon, a non-colon separator, ranges and multi-day labels. It
fails against the unfixed code with `'15:00' !== '3:00 PM'` and passes
with this change. The new `test_source.sh` rule fails on v0.10.8 at
`calendar/CalendarReminders.qml:52` and passes here. Running the actual
`Calendar.js` in a QML runtime produces `3:00 PM–4:30 PM` for `en_US`
and `15:00–16:30` for `C`, `en_GB` and `de_DE`.

Manual checks used synthetic events in a separate Quickshell window,
with Catppuccin (dark) and Catppuccin Latte (light), full screen and at
716×768. These covered day, week, month, agenda, event details and the
reminder notification. The before/after screenshots below use matching
size, theme and scale.

At 716×768, week blocks show only the start time where the range no
longer fits. A narrow month cell that already placed the time after the
title now elides it sooner (`Lunch · 11:3…`), using the existing title
elision behavior. The notification displays `3:00 PM` while the panel
displays `3:00PM`, even though both use the same string: the locale
inserts a narrow no-break space (U+202F), which the two fonts render at
different widths.

A fresh agent reviewed the diff and found no blocking or important
issues. It noted three things: bare `Qt.` calls in a `.pragma library`
file, source-rule globs that cover only the current calendar files, and
an hour-rail width based on two probe labels. `qmllint` reports nothing
for `Calendar.js`, and the runtime check exercised the `Qt.` calls.
Scrolled to the top of the week view, `12:00AM` through `9:00AM` fit in
the rail with room to spare; the remaining hour labels are no wider and
fit as well.

### Screenshots

Each image is before (v0.10.8) on the left and after on the right, at
the same size, theme and scale, with synthetic events.

#### Catppuccin (dark), full screen

**Week**

![Week before and
after](https://github.com/user-attachments/assets/c3dd60c5-da55-4022-87be-01408bd92899)

**Day**

![Day before and
after](https://github.com/user-attachments/assets/f3a51d4b-592a-4538-8c30-4d7e9a2f5147)

**Month**

![Month before and
after](https://github.com/user-attachments/assets/bb5214c5-ca00-46ee-8d0d-bea0c3382338)

**Agenda**

![Agenda before and
after](https://github.com/user-attachments/assets/abc3ca47-8aa3-4511-9d38-21ffec95e119)

**Event detail**

![Event detail before and
after](https://github.com/user-attachments/assets/26883c43-8c4c-43e0-ae07-ca372602903d)

**Reminder notification**

![Reminder notification before and
after](https://github.com/user-attachments/assets/75543925-cf6c-43fb-b1ff-2b436064204d)

#### Catppuccin (dark), 716×768

**Week**

![Week before and
after](https://github.com/user-attachments/assets/15f9f2ca-985d-42f5-a797-2a496773f4bf)

**Day**

![Day before and
after](https://github.com/user-attachments/assets/7734227e-4d1c-4095-9835-0b83c4da7821)

**Month**

![Month before and
after](https://github.com/user-attachments/assets/29382a95-6f13-4ca3-8f2b-7c444f0d1866)

**Agenda**

![Agenda before and
after](https://github.com/user-attachments/assets/be3633c1-b1bb-4782-a1b6-4b56b30a3c8b)

**Event detail**

![Event detail before and
after](https://github.com/user-attachments/assets/a9a67446-039b-4800-b20e-86611133b3e6)

#### Catppuccin Latte (light)

**Week, full screen**

![Week, full screen before and
after](https://github.com/user-attachments/assets/db1a0ba0-cbf6-47a7-8fdc-ee74a0959c7b)

**Month, 716×768**

![Month, 716×768 before and
after](https://github.com/user-attachments/assets/57013e84-cb6c-4fac-a0a0-58e4a393f6a4)

#### Top of the day

**Week scrolled to midnight, 980×720**

![Week scrolled to midnight, 980×720 before and
after](https://github.com/user-attachments/assets/e55ff1e1-9beb-4049-8b50-343590cd1a0c)

## Release Notes

- Calendar times and reminders now follow your system's 12-hour or
24-hour clock format.

## Maintainer review validation

Final reviewed head `ca23d43a28f57d041499f107c957026fb42d5f78` includes
current main `b0504b9` through a normal merge without conflicts. On
Omarchy with Qt 6.11.2 and Node 26, `make validate` passed on this exact
head: Rust unit/integration tests, the complete JavaScript and shell
suites, actual libcurl behavior, QML (1163 shared, 6 Outlook, 64 sidebar
tests; no failures or skips), the native resource-request regression,
standalone composition, qmllint, plugin validation and whitespace
checks. The focused calendar time/feed tests and source display-format
guard also passed.

Security: PASS for the affected display-only boundaries;
sender-controlled labels remain plain text, and no credential, routing
or remote-resource policy changes are introduced. UI evidence: PASS for
the affected views after the supplementary comparisons below. Product
scope is accepted. Required GitHub checks for the new head must still
finish before approval or merge.

## Maintainer supplementary UI evidence

The comparisons below cover reminder inbox, month overflow popup,
timed-event tooltip, and create/move/resize drag previews. BEFORE is
left and AFTER is right; each half is 716×768 at scale 1 using Qt
6.11.2, identical synthetic events and fixed dark/light semantic
palettes. These are production-component renders using test
compatibility imports, not complete installed-desktop or live-account
screenshots. `12` uses en_US: labels change from 24-hour times to AM/PM.
`24` uses locale C: labels retain 24-hour formatting. Date formatting
and reminder actions remain unchanged; drag and tooltip labels follow
the locale helpers. The supplemental production-component captures were
rerendered against current-main base `b0504b9` and final head `ca23d43`.
All 48 single-side images are pixel-identical to the attached originals
below the revision-caption strip, so the original attachment URLs remain
accurate. Existing author screenshots above are retained.

**12 DARK CREATE PREVIEW**


![12-dark-create-preview](https://github.com/user-attachments/assets/0724c388-7efe-4052-8935-43b8985f9048)

**12 DARK MOVE PREVIEW**


![12-dark-move-preview](https://github.com/user-attachments/assets/a999657f-041a-45d8-94a6-8a8252f3de25)

**12 DARK OVERFLOW**


![12-dark-overflow](https://github.com/user-attachments/assets/92126de6-5428-49e8-902f-38ffc6cf22ad)

**12 DARK REMINDERS**


![12-dark-reminders](https://github.com/user-attachments/assets/dcf7c08e-37c3-424b-924c-6a68a1eb18d1)

**12 DARK RESIZE PREVIEW**


![12-dark-resize-preview](https://github.com/user-attachments/assets/58339f38-90ca-40b2-96ac-b8fdf82d91c4)

**12 DARK TOOLTIP**


![12-dark-tooltip](https://github.com/user-attachments/assets/ebb15e69-becf-4806-bec9-0bb4a680c94b)

**12 LIGHT CREATE PREVIEW**


![12-light-create-preview](https://github.com/user-attachments/assets/6e0e546e-4809-47b0-97cc-ac21ee779c72)

**12 LIGHT MOVE PREVIEW**


![12-light-move-preview](https://github.com/user-attachments/assets/50c98f0d-8272-4e7c-8eba-7bf617001aaf)

**12 LIGHT OVERFLOW**


![12-light-overflow](https://github.com/user-attachments/assets/fc45fdf2-c7e3-4692-99db-39bbfde5fd19)

**12 LIGHT REMINDERS**


![12-light-reminders](https://github.com/user-attachments/assets/dd7af6c3-8bbe-4255-902b-2a355bba43bc)

**12 LIGHT RESIZE PREVIEW**


![12-light-resize-preview](https://github.com/user-attachments/assets/546d42fb-10dc-45e0-8b62-d606d0f97b00)

**12 LIGHT TOOLTIP**


![12-light-tooltip](https://github.com/user-attachments/assets/786efffa-a8c8-469d-bfe2-6083c04b1869)

**24 DARK CREATE PREVIEW**


![24-dark-create-preview](https://github.com/user-attachments/assets/7d4d178c-a0b5-4c05-9672-7e49f5634daa)

**24 DARK MOVE PREVIEW**


![24-dark-move-preview](https://github.com/user-attachments/assets/886ab2a3-a554-466c-80c6-40179b74f686)

**24 DARK OVERFLOW**


![24-dark-overflow](https://github.com/user-attachments/assets/141ea02d-c6a0-4eb2-aee1-b947bb874c95)

**24 DARK REMINDERS**


![24-dark-reminders](https://github.com/user-attachments/assets/6f8dfdf5-17d3-4757-9ee6-05dae64d490c)

**24 DARK RESIZE PREVIEW**


![24-dark-resize-preview](https://github.com/user-attachments/assets/1f10ba00-0150-4f4e-a037-b565788fcbf6)

**24 DARK TOOLTIP**


![24-dark-tooltip](https://github.com/user-attachments/assets/4e58b183-05c6-498a-a1eb-71409d03b160)

**24 LIGHT CREATE PREVIEW**


![24-light-create-preview](https://github.com/user-attachments/assets/1b59b7f4-ec2d-4966-b332-6fb39039238d)

**24 LIGHT MOVE PREVIEW**


![24-light-move-preview](https://github.com/user-attachments/assets/0740129d-bc38-48e6-93a8-08b80828531e)

**24 LIGHT OVERFLOW**


![24-light-overflow](https://github.com/user-attachments/assets/cecd773c-06bc-4ecb-ade3-809ee8f9ef6b)

**24 LIGHT REMINDERS**


![24-light-reminders](https://github.com/user-attachments/assets/444ff44a-4bcf-4b39-9e91-86f6ca3a9ef8)

**24 LIGHT RESIZE PREVIEW**


![24-light-resize-preview](https://github.com/user-attachments/assets/080b3d96-fc4d-4789-bf10-2148ffb96534)

**24 LIGHT TOOLTIP**


![24-light-tooltip](https://github.com/user-attachments/assets/b228932b-0954-454e-9fff-3d0a1e591f7e)

Co-authored-by: Chris Gray <216301595+latentoperator@users.noreply.github.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
Fixes #331.

## Summary

An `imap.*` call is wrapped in a fixed 22-second budget, and
`ui/backend/Backend.qml` gives every frame 30 seconds before it stops
the backend process. Both numbers assume a server that answers a command
in well under a second, on a mailbox small enough that a listing is a
handful of commands.

Neither holds for Yahoo. From a Chinese connection it answers in roughly
half a second per command, and a 10 000-message INBOX costs nine of
them: `SELECT`, a `UID FETCH 1:* (UID)` snapshot, then one `UID FETCH <4
096 UIDs> (UID INTERNALDATE)` window per 4 096 messages. Measured on the
reported account: `imap.list` alone took 13.6–15.7 s, and the panel's
`mail.list` (that plus `imap.messages`) took 22.02 s — the budget
exactly — and answered `request_timed_out`. The Inbox then showed no
mail at all, on every refresh, while the same plugin listed a 163
mailbox of 7 844 messages normally in 1.7 s.

The budget is the wrong shape for the job: a call is a conversation
whose length is the mailbox's, so a fixed per-call allowance measures
the mailbox's patience rather than detecting a hang.

## What changes

- `src/providers/imap/mod.rs`: the three whole-call budgets become one
named `CALL_BUDGET` (120 s), and every reply read gets `COMMAND_BUDGET`
(30 s) of its own. A server that accepts a command and then goes quiet
still fails quickly — it no longer has to consume the whole
conversation's allowance to be recognised as hung.
- `src/providers/imap/idle.rs`: the IDLE session's `STEP` is that same
per-reply budget, spelled as the one constant instead of a second copy
of the number.
- `ui/backend/Backend.qml`: an `imap.*` frame gets 180 s, more than the
backend's own call budget, so the process is not killed while the
backend is still waiting on a server that is still answering. Every
other frame keeps the 30 s it had.

## Verification

Reproduced against the reported account (Yahoo, 10 000-message INBOX,
~0.5 s per command), swapping only the pinned backend binary:

| Backend | `omamail list --account imap:<address>` |
| --- | --- |
| v0.10.8 | 22.02 s, `request_timed_out`; a second run returned the page
in 19.1 s |
| this change | 14.2 s, 16.7 s, 35.4 s, 42.3 s — every run returned the
newest 25 messages, including same-day mail |

Rust 1.98.1: `cargo test --locked --features
integration-test-credentials` passes — 599 lib tests (11 ignored), 33
CLI tests, and every integration target (accounts 1, attachment_pdf 16,
backend_lifetime 1, gmail 5, hey 4, message 1, message_charset 7,
platform_native 11, protocol 4, stdio 3, upload 4). The
`providers::imap` module alone is 75 tests.

The regression test fails without the change: with
`src/providers/imap/mod.rs` restored to main,
`a_slow_server_that_answers_every_command_still_pages` fails at 22.00 s
— the old budget, exactly — and passes with it.
`a_command_that_is_never_answered_ends_the_call` passes on both
revisions, because what it pins is the hang guard the per-reply budget
keeps, not the size of a budget.

Both new Rust tests spend their seconds for real, about 27 s and 30 s,
running in parallel with the rest of the suite. The budget they have to
outlast is a wall-clock 22 s, and a paused clock cannot carry the
loopback fixture: with `start_paused` the runtime advances to the
client's own timer before the fixture's replies arrive, which the first
version of this test did. If the cost is unwelcome, they are the two
tests to make opt-in, not the fix.

JavaScript: `make test-js` passes, including the new block in
`ui/tests/test_backend_queue.js`, which drives the production
`Backend.qml` functions and reports `ERR_ASSERTION` against the
unmodified file. `make qml-check`, `omarchy plugin validate .` and `git
diff --check` pass.

Not verified here: a running Quickshell panel, and a mailbox other than
the reported account — the measurements above come from `omamail` CLI
calls against that mailbox, which reproduce the failure at the provider
boundary where both tests sit. `make validate` includes stages needing
CMake and the Omarchy/Quickshell tooling this host lacks; its Rust, JS
and portable-shell stages are what ran above.

## What this does not change

- The interactive search keeps its own tighter 12 s step budget in
`read/search.rs`. A streamed search is supposed to answer quickly or
degrade; a listing that must produce a page is a different promise.
- `src/backend/reader.rs` (25 s) and the frame timeout in
`src/backend/protocol.rs` (25 s, Gmail's IPC deadline against its own
rate limiting) are untouched. An IMAP body read is one command exchange
plus parsing, and widening Gmail's documented deadline is not this fix.
- No protocol, validation, credential or provider-selection behavior
changes.

## Security

PASS for the affected boundary. The change adds and widens
`tokio::time::timeout` guards around exchanges that already ran inside
one; it reads no new input, logs nothing, holds no credential and opens
no connection the previous budgets did not. The longer allowance extends
how long a hostile or broken server can hold a backend task, bounded per
reply by `COMMAND_BUDGET` and per call by `CALL_BUDGET`, with the
frontend's frame deadline above both.

## Release Notes

- Fix Inbox listings timing out, and showing no mail, on IMAP servers
that answer slowly or hold a large mailbox.

Co-authored-by: Hermes <hermes@nousresearch.com>

Co-authored-by: Hermes <hermes@nousresearch.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
IMAP and Outlook mailboxes sent mail with an empty From display name, so
recipients saw only the bare address (or their client's guess from its
local part). Gmail, JMAP and HEY report their own identities with names;
IMAP and Outlook have no server that does, and Omamail had nowhere to
keep one. This adds that place: a "Your name" for IMAP and Outlook
mailboxes, asked for when the mailbox is added and editable afterwards
in Settings → Mailboxes.

The name is stored as a top-level `senderName` on the account entry in
`accounts.json`, not inside `imap`, because Outlook's IMAP settings are
rebuilt from the address on every save and would drop anything extra.
Both send paths read it: the composer names the primary row of the
send-as list with it (`Aliases.withSenderName`, so a rename shows in the
composer at once), and the backend's `configured_identities()` names the
primary identity for `mail.send`, so agent sends and composer sends
agree. Aliases keep their own names. The UI and the backend clean the
value the same way (control characters become a space, runs of spaces
collapse, trimmed), so a hand-edited entry cannot become a second header
line, and no stray character makes agent sends fail where composer sends
succeed. Outgoing quoting and RFC 2047 encoding are unchanged.

Because `mail.send` only names the sender from this revision on, this is
backend API 7. Every UI surface — the Settings field, the setup-page
field and the composer's naming — is gated on `apiVersion >= 7`; on an
older backend the fields are hidden and the stored value is left unused
rather than having the composer and agent sends disagree. The standalone
app's `bundledApiVersion` moves from 5 to the released 6 so it accepts
this checkout's API 7 backend (one step past the pin); left at 5, `make
app-run` — and a standalone build of the next release — refused its own
backend as incompatible.

While here, the two names on these pages are told apart: the account
label is now "Mailbox name" (it never leaves Omamail) and the new field
is "Your name", with the hint "shown to recipients as the sender". These
follow what other mail clients call the same fields (Thunderbird and
Outlook ask for "Your name"). The label field's behaviour is unchanged.

`ui/Service.qml` sits at the 128 KiB source cap, so making room was part
of the change: the six account setters now share a `commitAccounts()`
helper, `configureAccount` copies its fields through one key list, and
the setup page's `accountName` / `accountAddress` / new
`accountSenderName` share an `editingEntry()` lookup. No behaviour
changes in those refactors; `tst_setup_name_field` and the existing
account tests cover them.

## Verification

`make validate` green on this commit (Rust unit and integration suites,
JS, 1170 QML tests, source regressions, qmllint). `python3
tests/test_backend_api.py` passes the API 7 contract, including the new
unreleased case "mail send dry run names the IMAP sender"; the released
view was checked against an upstream-main build at API 6. The
released-view gate against the actual published 0.10.8 binary was not
run locally; CI runs it.

New tests. The Rust test, the API contract case and the composer test
were each watched failing with the fix removed; the rest assert fields
and storage that do not exist without the change:
- `src/backend/mail.rs`
`configured_identities_name_the_primary_address_with_the_sender_name`:
the primary identity carries the trimmed, single-line name; aliases keep
theirs.
- `ui/tests/qml/tst_composer_sender_name.qml`: IMAP and Outlook name the
composer's primary row from API 7 (not on 6, kept on 8, dropped when
disconnected); Gmail keeps its server's name. Fails with the API gate
removed.
- `ui/tests/qml/tst_service_backend_path.qml`: `backendCanNameSender` is
fixed at API 7 across releases.
- `ui/tests/qml/tst_settings_name.qml` and `tst_setup_name_field.qml`:
the Settings and setup fields show the stored name, save on
blur/Enter/save/sign-in, are absent for server-named mailboxes and on
older backends, and leave the stored name alone when hidden.
- `ui/tests/test_accounts.js`, `test_aliases.js`: storage, cleaning and
alias naming.

By hand, in the Omarchy plugin on a real IMAP mailbox: set the name in
Settings → Mailboxes, sent a message, and the recipient saw the name
beside the address; then checked the setup-page field and the renamed
labels. Screenshots below are the standalone app (`make app-run` from
`main` and from this branch) on a throwaway home with synthetic
accounts, 1376×850 at scale 1, in tokyo-night (dark) and flexoki-light
(light).

A fresh agent reviewed the diff against `AGENTS.md`. Security: PASS for
the From header / outgoing MIME, persisted settings and the backend API
boundary. Its findings, all addressed in this commit: the composer named
the sender on an API 6 backend while the field was hidden (now gated on
API 7, and the doc says so); no QML test exercised the API gate or the
composer path (added above); the backend only trimmed a hand-edited
name, so a control character made agent sends fail where composer sends
succeeded (now cleaned like the UI). It also noted, unverified, that
Exchange may replace the display name with the directory name for work
accounts sending through Graph.

### Screenshots

| | Before | After |
| --- | --- | --- |
| IMAP setup, dark |<img width="1376" height="850"
alt="imap-tokyo-night-before"
src="https://github.com/user-attachments/assets/334b65d4-6850-4c18-b5bc-bae42b4b77fb"
/> | <img width="1376" height="850" alt="imap-tokyo-night-after"
src="https://github.com/user-attachments/assets/8b7a974f-3e23-467d-a459-722e45aaabf3"
/> |
| IMAP setup, light | <img width="1376" height="850"
alt="imap-flexoki-light-before"
src="https://github.com/user-attachments/assets/459b88b3-463b-4a3d-bb36-57060e3b85ca"
/> | <img width="1376" height="850" alt="imap-flexoki-light-after"
src="https://github.com/user-attachments/assets/076d5f63-9c8b-4746-aff3-8a8cb7c352c5"
/> |
| Outlook setup, dark | <img width="1376" height="850"
alt="outlook-tokyo-night-before"
src="https://github.com/user-attachments/assets/55a5c5dd-4d9d-4ce5-93ae-f338ae24e538"
/> | <img width="1376" height="850" alt="outlook-tokyo-night-after"
src="https://github.com/user-attachments/assets/06c83375-6fd8-4a92-b2f1-7bde1005af1f"
/> |
| Outlook setup, light | <img width="1376" height="850"
alt="outlook-flexoki-light-before"
src="https://github.com/user-attachments/assets/237c109c-bc57-4260-9332-b4cbdb8f6697"
/> | <img width="1376" height="850" alt="outlook-flexoki-light-after"
src="https://github.com/user-attachments/assets/299b7c1a-a1ff-45cf-b52b-749b05a4664e"
/> |
| Settings → Mailboxes, dark | <img width="1376" height="850"
alt="settings-tokyo-night-before"
src="https://github.com/user-attachments/assets/a65b1c4d-f888-40e1-b3c4-f41842933d31"
/> | <img width="1376" height="850" alt="settings-tokyo-night-after"
src="https://github.com/user-attachments/assets/dbaea298-39ad-4aeb-bf38-20c4d25a1296"
/> |
| Settings → Mailboxes, light | <img width="1376" height="850"
alt="settings-flexoki-light-before"
src="https://github.com/user-attachments/assets/d115b353-e9d1-4ad3-abd3-3901feb778bc"
/> | <img width="1376" height="850" alt="settings-flexoki-light-after"
src="https://github.com/user-attachments/assets/138a12e6-d30c-4bfc-886a-a9ea0231cddb"
/> |

Visible differences: the setup pages gain "Your name (optional) — shown
to recipients as the sender" (IMAP: between the mailbox name and the
address; Outlook: above the address), and the IMAP mailbox name
placeholder reads "Mailbox name (optional) — how it is listed in
Omamail". In Settings → Mailboxes, "Name" becomes "Mailbox name", and an
IMAP or Outlook mailbox gets a "Your name" field with its explanation.

## Release Notes

- IMAP and Outlook mailboxes can now send with your name beside the
address: set "Your name" when adding the mailbox or in Settings →
Mailboxes.
- The mailbox's own label is now called "Mailbox name", to tell it apart
from the name recipients see.

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

https://claude.ai/code/session_016Fmayb5WTWTWzhCw7TRUKx

## Maintainer review validation

Reviewed `e05d96b` on macOS/Qt 6.11.2. API 7 contract and released API 6
view against the checksum-verified actual v0.10.8 macOS standalone
backend pass. JS/lint/native resource checks pass; shared QML: 1156
passed, 0 failed, 14 skipped. A 22-case synthetic IMAP/Outlook API/MIME
probe found no extra headers, unintended recipients or file writes.
`make test-app-qml` fails at
app/tests/qml/tst_standalone_composition.qml:302: it still expects
baseline API 5 after this PR changes it to 6 (29 passed, 1 failed).
Update the assertion. Composer From-row and shared Gmail/JMAP
setup-label screenshots are needed. Product acceptance is pending. Full
local validation remains incomplete: selecting Python 3.14 fixes the
unchanged runtime fixture failures from the worktree shell using Python
3.9, but Linux-only public_http tests cannot run on macOS without
os.pidfd_open. No required remote CI checks are reported.


## Maintainer supplemental screenshot evidence

Six matching production-component captures cover Gmail setup, JMAP setup
and the composer From popup at 1376×850, scale 1, with the same Tokyo
Night palette and synthetic data. Shared setup copy distinguishes
Mailbox name from sender name; the composer primary identity subtitle
changes from the mailbox label Work to Ada Lovelace, while alias labels
and addresses remain unchanged. Production components use standalone UI
compatibility adapters; these are controlled component renders rather
than installed-desktop or real-account screenshots. Captured UI
corresponds to reviewed head `aa3ecb7`.

**COMPOSEVIEW AFTER**


![ComposeView-after](https://github.com/user-attachments/assets/ff630a98-3006-47b8-875f-f1df5b2fd4ff)

**COMPOSEVIEW BEFORE**


![ComposeView-before](https://github.com/user-attachments/assets/5887499d-9cb1-4470-8537-0cbb4ac26210)

**JMAPSETUPPAGE AFTER**


![JmapSetupPage-after](https://github.com/user-attachments/assets/1e4e63ad-7975-4a24-8927-cd558bee5e0e)

**JMAPSETUPPAGE BEFORE**


![JmapSetupPage-before](https://github.com/user-attachments/assets/cf6f87b4-dc19-4bdb-a3b5-930fa40b7177)

**SETUPPAGE AFTER**


![SetupPage-after](https://github.com/user-attachments/assets/e71f25a2-767a-4043-bbad-c22a3212ab27)

**SETUPPAGE BEFORE**


![SetupPage-before](https://github.com/user-attachments/assets/e17ccd40-ba8f-4e29-b711-397ea6e01221)

---------

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

On a JMAP mailbox, opening or saving an attachment failed with "That
attachment could not be opened". The diagnostics log showed
`attachment_data_invalid` from `attachment.store`.

The cause is in `JmapClient.getAttachment`. It gave the callback of
`nativeRequest` straight to the caller. `nativeRequest` calls back with
`result.data`. For `jmap.attachment`, that value is the object `{data,
size}`, not the base64 string. `MailAccount.loadAttachments` then wrote
`String(data)`, which is `"[object Object]"`. The backend refused that
text.

The IMAP, Gmail and HEY clients already give their callers the base64
string. The fix makes the JMAP client do the same. All callers of
`api.getAttachment` use the same function: opening, saving, and the
calendar invitation reader. The fix in the client covers all of them.

## Verification

- New test:
`test_attachment_callback_receives_the_base64_string_not_the_wire_object`
in `ui/tests/qml/tst_jmap_request_queue.qml`. It failed before the fix
(`Actual: [object Object]`, `Expected: aGk`). It passes after the fix. I
watched both results.
- The full QML suite passed: 1159 passed, 0 failed
(`tests/run_qml_native.py` with `-input ui/tests/qml`).
- `make test-js` passed. `qmllint` on `ui/providers/JmapClient.qml` gave
no output.
- I did not run the full `make validate`. I did not run the macOS and
Windows native gates.
- I did not test this against a live Fastmail account.
- No fresh-agent review was done. No screenshot is included, because no
visible layout changed.

## Release Notes

- Attachments on JMAP mailboxes, such as Fastmail, now open and save.
Before, they failed with "That attachment could not be opened".

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

1. Add two accounts (reproduced with two IMAP accounts on the same Zoho
server) and turn on unified mailboxes.
2. In the merged inbox, tick two or more messages.
3. Press `d`, mark read, star or archive.

Nothing happens to the messages. A notice briefly reads "Acting on
several messages needs one mailbox on screen", which is easy to miss, so
it looks like batch actions are broken. The same action on one message
works.

## Cause

`Service.actMany` refuses every batch when `unified` is true, on the
grounds that a batch is one mailbox's request. But a merged row's id
already names its account (`Unified.accountOf`), which is exactly how
`Service.act` routes a single-row action to the right host.

## Fix

In the unified view, `actMany` splits the ticked ids by owning account
(`Unified.groupByAccount`, which translates each one back to the id its
mailbox issued) and calls each host's own `actMany`. Each mailbox still
gets one batch request. The non-unified path is unchanged.

A selection spanning two accounts shows one confirmation note per
account. I left that as is rather than merging the notes.

## Tests

- `ui/tests/test_unified.js` covers `groupByAccount`: a selection across
two mailboxes, IMAP ids whose folder contains a space, and an id that
names no account. It fails without the fix.
- `node ui/tests/test_unified.js` passes, and so does `make test-qml`
(1228 passed, 0 failed).

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

---------

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

Replying to or forwarding a message from the list produces a draft whose
quote is empty: the "On …, … wrote:" line followed by a bare `>` for a
reply, and no original text for a forward.

`MailAccount.select()` sets `selectedMessage` from the listed row at
once and clears `selectedBody` until the detail read lands.
`startCompose` in `ui/App.qml` held a reply only while `selectedMessage`
was missing, so for any listed row the hold never applied and
`compose.begin` ran with an empty body. The comment above
`pendingComposeMode` already describes the intended behavior ("Held
until the fetch lands instead"); the row summary added for fast reader
paint is what defeated it.

The draft is now held until the detail read has painted
(`selectedMessage` present, `detailLoading` false, `detailPainted`
true), the same condition `resumeHeldDraft` and `editDraft` already use.
The existing `onSelectedBodyChanged` and `onSelectedMessageChanged`
handlers resume it.

## Reproduction

1. Open a mailbox with at least two messages and leave the reader on one
of them, or on none.
2. Put the cursor on a different row and press the reply or forward key,
or use the row's context menu Reply / Forward. Replying on a row that is
only previewed does the same.
3. Before: the draft opens immediately with an empty quote.
4. After: the draft opens once the message body has loaded, with the
body quoted.

Replying from a message that is already open and loaded was not
affected.

## Validation

- `make validate` passed on integrated head
`9258358b1c9c71792e03c9f2ce0367ba2f3bac20`: Rust, JavaScript,
shell/source, native QML, no-remote-resource Qt regression, standalone
app QML composition, qmllint, plugin validation and diff check.
- The AppNavigation regression verifies that a listed summary alone does
not open the composer and that the draft opens when detail arrives.
Existing compose/navigation cancellation checks pass.
- Real-backend component capture assertions confirm that reply,
reply-all and forward drafts lack the original body before the fix and
contain it afterward. Both matching capture suites pass, with the
loading state and resulting draft shown below.
- Synchronized with main `b0504b97fb610204b64d2fe13c46926660c24321` by a
normal merge. No conflicts or expanded product scope.
- Security: PASS for the affected held-compose and quote-input boundary.
Validation uses synthetic mail and an isolated real backend; it does not
send messages.
- Not repeated: hands-on validation in the installed plugin or a live
mailbox. Screenshots are controlled component captures with local Qt
compatibility imports, as described below.

## Release Notes

- Fix replies, replies to all recipients and forwards started from the
message list opening with an empty quote.

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

## Maintainer supplemental screenshot evidence

Matching before/after captures cover reply, reply-all and forward during
detail loading and after draft creation. Dimensions are 1200×800, scale
1, Qt 6.11.2, with the active Osaka Jade palette, identical synthetic
data and fonts. Before opens a draft before detail arrives and omits the
original body; after retains the reader loading skeleton until
completion and then opens a draft with the original body quoted.
Captures exercise production App/ComposeView and an isolated real
backend message.composeText using synthetic mail; local Qt compatibility
imports supply normal input controls. These are controlled component
captures, not installed-plugin screenshots. The current synchronized
head is `9258358b1c9c71792e03c9f2ce0367ba2f3bac20`; the captures were
repeated against that head and current main after the theme-qualifier
merge.

**AFTER FORWARD DRAFT**


![after-forward-draft](https://github.com/user-attachments/assets/9d6eabd8-b970-4a24-bf30-45c4df0eeded)

**AFTER FORWARD LOADING**


![after-forward-loading](https://github.com/user-attachments/assets/a9e93b44-9cc5-4fcc-b52d-24ef5a4c6e70)

**AFTER REPLY DRAFT**


![after-reply-draft](https://github.com/user-attachments/assets/4fa92f7d-0b69-4b49-9175-e40ca4bf4fc1)

**AFTER REPLY LOADING**


![after-reply-loading](https://github.com/user-attachments/assets/01aa406e-0c50-48a4-a61b-1d29cdbcadea)

**AFTER REPLYALL DRAFT**


![after-replyAll-draft](https://github.com/user-attachments/assets/c38e2415-19c9-46e2-92b3-0f48fb414208)

**AFTER REPLYALL LOADING**


![after-replyAll-loading](https://github.com/user-attachments/assets/94f35b05-ac70-45ea-9dd3-8b31cfc8dfb4)

**BEFORE FORWARD DRAFT**


![before-forward-draft](https://github.com/user-attachments/assets/669ecf85-5e77-459a-a5d3-ac3901fd35eb)

**BEFORE FORWARD LOADING**


![before-forward-loading](https://github.com/user-attachments/assets/d4d817cf-9eb2-4af1-95b5-4d69708e7722)

**BEFORE REPLY DRAFT**


![before-reply-draft](https://github.com/user-attachments/assets/6350b4a7-e8c9-43a5-aab5-15b0e2de7779)

**BEFORE REPLY LOADING**


![before-reply-loading](https://github.com/user-attachments/assets/5705e203-1e47-49d5-8426-2a380c2115c8)

**BEFORE REPLYALL DRAFT**


![before-replyAll-draft](https://github.com/user-attachments/assets/d9012775-5de0-47ac-9ce8-0b1088367788)

**BEFORE REPLYALL LOADING**


![before-replyAll-loading](https://github.com/user-attachments/assets/3f087fd1-072a-4719-a11b-aabb782e4725)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
A message that draws correctly in Original (or Reader) view drops to
plain text a moment later, once its remote pictures have loaded, with
the "too heavy" notice. The markup did not change; only the pictures
arrived.

`sanitize` and the reader's `render` decide `tooHeavy` from the length
of the serialised document. With remote pictures approved, each one is
carried in that document as a data URI, so the 120,000-character bound,
which exists for markup Qt lays out on the GUI thread, is spent on
picture bytes. One large picture is enough: the first render (no picture
data yet) is under the bound, the second (after `public.image` returns)
is far over it.

The decision now leaves out the characters of `img` sources that are
data URIs. The reported `complexity` is unchanged, so the JavaScript
parity corpus still matches; tags, tables and table depth are bounded as
before, and each raster is subject to the existing size check (8 MiB).
`maxImages` limits fetched remote pictures; inline data images are not
counted by that option. Review identified that excluding all data-image
source bytes also weakens the existing aggregate rendering guard; that
boundary still needs repair and validation.

## Reproduction

Seen on a PayPal marketing mail with "always show images" on:

1. Open a message whose sanitised markup is small (here 47,908
characters, 241 tags, no tables) and that has one large remote picture
(here a PNG of 2,347,290 characters as a data URI).
2. Before: the Original view draws, then is replaced by the plain-text
view as soon as the pictures load. Measured length after embedding:
2,429,678.
3. After: the Original view stays, with its pictures.

## Validation

- New `approved_image_bytes_do_not_make_a_small_message_too_heavy` in
`src/message/html/tests.rs` fails without the change (`length` 400,056
for a three-tag message, `tooHeavy` true) and passes with it. It also
asserts that 130,000 characters of markup are still refused.
- A first attempt that changed `complexity.length` itself broke
`actual_javascript_sanitizer_and_reader_corpus_matches`, which is why
only the decision changed.
- `cargo test --locked --features integration-test-credentials`: 688
passed, 0 failed, 11 ignored.
- The real message, run through `sanitize` with all nine fetched
pictures: `tooHeavy` true before, false after, for both the sanitised
document and the reader document.
- A backend built with this change is installed in my plugin (0.10.8
checkout).
- Not run: `make test-js`, `make test-shell`, `make test-qml`. No QML or
JavaScript is changed.

## Screenshots

None attached. No view or layout changes.

## Release Notes

- Fix messages with a large picture falling back to plain text once
their pictures load.

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


## Maintainer supplemental screenshot evidence

Matching Original and Reader captures use production MessageReader and
native backend outputs, identical synthetic mail, 900×600, scale 1, Qt
6.11.2 and the active Osaka Jade palette. Before, an embedded picture
reaching the old URI-length threshold triggers the heavy-rendering
refusal and falls back to plain body. After, the heading, embedded
picture and paragraph remain rich while the selected Original/Reader
mode is preserved. No real mail or remote image resources are used.
After source is reviewed head `f1e6a7d`.

**AFTER ORIGINAL**


![after-original](https://github.com/user-attachments/assets/091db44e-b38f-4ef0-8889-0b9946895266)

**AFTER READER**


![after-reader](https://github.com/user-attachments/assets/34a27bba-bbb2-49ec-84b9-81582311e764)

**BEFORE ORIGINAL**


![before-original](https://github.com/user-attachments/assets/7f88602f-be51-4f8e-9109-21f2fc5a28c5)

**BEFORE READER**


![before-reader](https://github.com/user-attachments/assets/6d930b63-a805-4636-84c4-8223c3a75604)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
Some senders put the markup itself in the `text/plain` alternative of a
`multipart/alternative` message. `prepare_content` takes the plain part
whenever it is not empty, so the plain-text view of such a message, and
anything else built on its text, is a page of tags and style rules.

A plain part is now treated as markup, and the HTML part read instead,
only when all of these hold: there is an HTML part; the trimmed text
opens with a comment, a doctype or a whole opening tag (`html`, `head`,
`body`, `div`, `table`, `style`, `center`, `span`, `p`); it ends with
`>`; and it contains a closing tag. Text outside this heuristic, such as
a quoted address, stays the sender's text, and a message with no HTML
part is unchanged. Review found that a legitimate sentence beginning
with an opening tag and ending with its closing tag also matches the
heuristic and loses its plain alternative; that false-positive case
still needs to be addressed.

## Reproduction

Seen on a PayPal marketing mail whose `text/plain` part (92,470 bytes)
begins `<!--[if gte mso 9]><style …` and ends `</table></div>…`, beside
an ordinary `text/html` part.

1. Open such a message and choose the plain view, or let a message fall
back to it.
2. Before: the view shows the raw markup; `body.source` is `plain`.
3. After: the view shows the text read from the HTML part (2,538
characters for this message); `body.source` is `html`.

## Validation

- New `markup_in_the_plain_alternative_is_read_from_the_html_part` in
`src/message/tests.rs` fails without the change (`source` is `plain`)
and passes with it. It covers three markup openings, three plain texts
that start with `<` or mention tags, and a markup plain part with no
HTML alternative.
- `cargo test --locked --features integration-test-credentials`: 688
passed, 0 failed, 11 ignored, including the JavaScript parity tests.
- `omamail read` on the real message with a backend built from this
change returns the readable text.
- Not run: `make test-js`, `make test-shell`, `make test-qml`. No QML or
JavaScript is changed.

## Screenshots

None attached. No view or layout changes.

## Release Notes

- Fix the plain-text view showing raw HTML for messages whose plain part
contains markup.

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


## Maintainer supplemental screenshot evidence

Matching plain-view captures use production MessageReader and native
backend outputs, the same synthetic multipart message, 900×600, scale 1,
Qt 6.11.2 and active Osaka Jade colors. Before displays raw div/p markup
from the malformed plain part; after displays two readable lines
extracted from the HTML alternative. These are controlled component
renders, with no real mailbox or remote resources. After source is
reviewed head `5e864e1`.

**AFTER PLAIN**


![after-plain](https://github.com/user-attachments/assets/5b0c41db-9bce-442a-863f-090202450408)

**BEFORE PLAIN**


![before-plain](https://github.com/user-attachments/assets/c8ccab99-9fd5-468f-881e-08db73b6982a)

---------

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

Pasting an IMAP app password with a trailing line break no longer fails
with a generic mail error. Sign-in removes only a final CR/LF suffix,
preserves valid password characters exactly, and reports an inline error
when an unsupported control character remains.

The resulting secret is used for both verification and keyring storage.
Embedded CR/LF, tab, NUL, other C0 controls and DEL are refused before
either operation. Spaces, quotes, backslashes and Unicode remain
unchanged. This prevents silent cleanup from verifying and saving a
different password. Existing saved-secret reads retain their
byte-preserving behavior.

## Verification

- Full `make validate` passed locally on the repaired head `d6544c8`,
including Rust unit/integration suites, JavaScript, shell regressions,
the full QML suite, controlled resource/HTTP tests, standalone
composition, qmllint and plugin validation.
- Current head `5e89fc2` normally integrates `main` at `b0504b9`. The
IMAP implementation and credential regressions are unchanged by that
integration; focused auth (76), credential RPC (8) and setup-form QML
checks (5), standalone composition and qmllint all passed on the
resulting head.
- Password cases cover final CR/LF/CRLF suffixes, every embedded C0
control and DEL, trailing nonnewline controls, empty-after-cleanup
input, and exact preservation of valid secrets. Refused input emits no
verification request and causes no credential-store write.
- That repaired regression produces 65 failures against the original
blanket-cleanup implementation, demonstrating that it silently changed
and accepted unsupported secrets.
- The author reported a live-mailbox sign-in on the original version
under Omarchy 4.0.4-1. Maintainer verification uses synthetic
credentials and controlled fixtures.

## Release Notes

- Accept pasted IMAP passwords with a trailing line break while
preserving the entered secret.
- Explain unsupported password control characters before attempting
sign-in.

## Maintainer supplemental screenshot evidence

Matching synthetic IMAP setup screenshots use the active Omarchy palette
at 900×820, scale 1, Qt 6.11.2. Before shows a generic controlled
backend refusal; after reports a specific unsupported control-character
error immediately. The fixture invokes production ImapAuth and
ImapSetupPage with synthetic settings and a controlled verification
refusal, using no real credentials or mailbox. The captured IMAP
auth/setup behavior remains unchanged in final reviewed head `5e89fc2`;
the base integration adds namespace-qualified theme references from
#346.

**AFTER**


![after](https://github.com/user-attachments/assets/276c8e62-cdfb-4375-9bad-0d8165b303cd)

**BEFORE**


![before](https://github.com/user-attachments/assets/ad725472-ed8c-41cc-bbf8-179c61dc1c44)

---------

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

A right-click on the reader-header subject line opens a one-row menu,
**Copy subject**, and copies the subject as written to the clipboard —
use cases like ticket IDs, order numbers and other verbatim strings want
the subject whole, and today it had to be selected by hand or retyped.

The menu is `ui/components/SubjectMenu.qml`, in the AddressMenu shape: a
`QQC.Popup`, one `MenuActionRow`, keyboard navigation through the same
`Menu.js` helpers (J/K/arrows, Enter/O), `closePolicy`
outside-click/Escape. Copy is a signal the host routes — `MessageReader`
hands it to `service.copyText`, the path the body's `TextMenu` already
uses, so the text reaches `wl-copy` as a single argv entry with no shell
in between.

The reader owns the menu rather than App, the reason the body's menu was
moved into the reader: it is tested with the summary it reads. The
subject `Text` gains a `RightButton` `TapHandler` beside the ones the
From and To lines already carry. The menu anchors to the line's own
lower edge rather than the click point, and an empty or whitespace-only
subject refuses to open, the way `AddressMenu.openAt` refuses a line
that held no addresses.

## Verification

`make validate` green on the commit sent, run against **v0.10.7**
(`a3b7616`) as the base: QML `1166 passed, 0 failed`, the Rust suite
`597 passed, 0 failed` plus the standalone composition test, and
`qmllint`, `omarchy plugin validate .` and `git diff --check` are clean.
The QML count is up from `997` at the previous base because 0.10.7 adds
its own cases.

The branch was rebased onto 0.10.7 after the original review. The rebase
applied the four-file payload without a conflict, so the diff is
byte-identical to what was reviewed — same `Makefile` line, the same 27
added lines in `MessageReader.qml`, and both new files. What changed
underneath it is `MessageReader.qml` itself, which 0.10.7 rewrites
(+84/-25 across `afcd736`, `af8a7ae`); the `SubjectMenu` block sits at
the end of the file and the `subjectLine` `TapHandler` in the reader
header, and the 6 cases below pass against that rewritten reader.

`ui/tests/qml/tst_reader_subject_menu.qml` (6 cases) covers the
right-click opening the menu, the single row named for what it copies,
that copy routes the exact subject through the service and closes, that
an empty or whitespace-only subject opens nothing and copies nothing,
and that the menu lands at the line's edge rather than under the
pointer. The two cases added after review were each watched failing with
their fix reverted (`6 passed, 2 failed`) and pass with it (`8 passed, 0
failed`).

A fresh, context-free agent reviewed the diff against `AGENTS.md`. It
found no blocker — security verdict **PASS**: the subject reaches
`wl-copy` through the same no-shell `service.copyText` channel the
body's Copy already uses — and three findings, all answered:

- The popup anchored to the click point; it now anchors to the trigger
line's own lower edge (`MessageReader.qml`), per the Popups rule.
- The empty-subject guard was exact-match, so a whitespace-only subject
still opened the menu; it now refuses when the subject trims to empty,
while still copying the text verbatim.
- The subject line holds no selected style while its menu is open. Left
as it is: the neighbouring From, To and body triggers have the same
omission, and aligning all four is a change of its own.

Driven live on the running shell: right-click a subject → **Copy
subject** → paste elsewhere.

## Release Notes

- Right-click a message's subject to copy it.

---------

Co-authored-by: taisau <taisau@taisau.net>
Co-authored-by: Jason Lee <huacnlee@gmail.com>
Two existing issues prevent a fully verified release: `App.qml` exceeds
the 128 KiB source-size ceiling, and the Windows release job omits the
complete standalone Rust suite.

Extract reply/forward startup and deferred resume into
`compose/PendingCompose.qml`, bringing `App.qml` from 131,279 to 130,345
bytes. App retains ownership of pending state, and the controller
receives the composer and assistant surfaces explicitly. Replies still
wait for painted message detail and retain the existing assistant
conversation handoff. The module is included in lint inputs.

Run the complete standalone Rust suite in the Windows release job before
building the backend. PowerShell checks its exit code and stops on
failure, so packaging cannot continue after failed tests. Add a workflow
regression requiring this complete suite on each native release platform
and the Windows failure guard. This matches the native release
requirements in `docs/BACKEND-RUNTIME.md`.

Verification:

- Full `make validate` passed for the source extraction (`92d553d`) with
Qt 6.11.2, including 1,283 QML cases, standalone composition,
source-size checks, lint, plugin validation, and whitespace checks; the
focused compose suite passed all 99 cases.
- After incorporating current main and #262, the combined QML suite
passed all 1,298 cases, with Outlook HTTP, sidebar, native HTML
resource-denial, and lint checks passing. Source-size and real clipboard
transport regressions passed.
- All 13 release workflow contract cases, 26 backend release cases,
release-source checks, and publish-script tests passed. The workflow
regression fails with the Windows test invocation removed.
- The local standalone backend API 7 contract passed. Windows native
release results will be established by the authoritative release job;
this PR does not claim those results in advance.

Security: PASS for the affected compose state and release failure guard.
The extraction preserves existing app-owned account/message inputs; the
workflow adds test coverage without changing publication permissions,
secrets, or build destinations.
Publish Omamail v0.11.0 from current main, including the merged
subject-copying and release-validation repairs. This release advances
the published backend to API 7, enabling sender names for IMAP and
Outlook accounts while retaining the fixed API gates in QML.

Stop the Windows persistent backend promptly when its response pipe
closes, including while stdin remains open. Give the Windows backend
entry thread an 8 MiB stack to avoid command and persistent-dispatch
stack overflows. Restore Windows OAuth admission and default MIME
boundary generation by using the same operating-system cryptographic
random provider already used by IMAP cursors. Correct the native test
fixtures for Windows filenames, absolute paths, UTF-8 Python transport,
and connection-refusal latency. Isolate Windows CLI integration children
from native user directories with a debug-only test feature; production
builds ignore that hint. Give synthetic storage its required owner-only
protected ACL and compare owner/DACL and timestamps in no-write
assertions. Hostile attachment display names and the assertions against
unwanted writes, sends, and credential-bearing requests remain covered.

Release CI builds the two static Linux backends and all three standalone
desktop packages from one source commit. It verifies native security
contracts, backend APIs, package installation and rollback, and smoke
tests before publishing the complete immutable asset set. It downloads
and verifies the public assets before committing `backend-version` and
the folded API metadata on this branch. Merge only after that pin commit
and the checks for its exact revision pass.

## Validation

Release source `70c295b` passed both static Linux backend jobs and the
complete macOS, Linux and Windows standalone jobs in
https://github.com/huacnlee/omamail/actions/runs/38136130747 (attempt
2). Native credential, private-file/IPC, process, network, QML, API,
installation/rollback and smoke checks completed before publication.
Windows passed 497 library tests, all 33 CLI tests and all three stdio
regressions.

The authoritative workflow published all ten immutable assets, verified
their public downloads, then committed only `backend-version` and the
folded API metadata as `88bdf6a`. The pin is now 0.11.0 and released API
7, with no unreleased API entries. Exact-pin PR checks are running
before merge. Local Linux CLI integration tests (33) and MIME parity
tests (9) passed; full local `make validate` is still running.

Security: PASS for the affected release boundaries on all three native
platform runners. Standalone archives retain the documented
unsigned/unnotarized distribution limitations.

## Release Notes

- Add a sender name for IMAP and Outlook mailboxes and support
selections across accounts in the unified view.
- Right-click a message's subject to copy it in full, including text
beginning with a dash.
- Fix Windows backend stack overflows, OAuth sign-in, and outgoing MIME
generation.
- Update the Omarchy backend and standalone desktop applications to
v0.11.0.

---------

Co-authored-by: Omamail Release <41898282+github-actions[bot]@users.noreply.github.com>
# Conflicts:
#	Makefile
taisau and others added 27 commits October 31, 2026 20:02
## What changes

`public.image` now shrinks oversized PNG and JPEG bodies before they are
sent to the reader. This is the follow-up klaudworks invited in #414
("backend downsizing in a separate follow-up PR").

## Problem and who benefits

Qt decodes every embedded image at full size on the GUI thread, and the
reader re-renders the document with every image so far on each repaint
(#414 batches those repaints; it does not shrink what is decoded).
Newsletters ship camera originals: a recent XDA newsletter has three
4032×2688 JPEGs and others over 2000 px, for ten megabytes of data URIs.
Anyone with "Always show images" on and image-heavy mail benefits.

## Design

- Rule (`src/public_http/downscale.rs`): a PNG or JPEG wider than 2400
px or larger than 6 MP is resized to at most 1600 px wide and about 4
MP, keeping aspect ratio. 1600 px is twice a typical reader column, so a
high-density display stays sharp; the 4 MP bound stops tall images from
keeping all their pixels. Images at or under the 2400 px / 6 MP trigger
are left byte for byte, because re-encoding one that is only slightly
too big costs sharpness for nothing (in a trial, 2048 px JPEGs came out
larger after re-encoding).
- Sharpness: Catmull-Rom resize, JPEG re-encoded at quality 90, PNG
re-encoded losslessly. PNG transparency and the camera's EXIF rotation
are kept (the resize happens before the rotation, so the rotation never
holds a second full-size buffer). ICC profiles and APNG animation are
not kept.
- Memory limits: decoding is one image at a time (an async semaphore, so
queued images hold no blocking thread) on a blocking thread. An image is
refused, from its header and before anything is allocated, when it
declares more than 100 MP or when its decode and resize is priced above
512 MiB. The price is the decoded size, plus the larger of the resize
intermediate (the source width by the target height, 16 bytes a pixel:
the resize holds it as four `f32` channels) and the decoder's extra
buffers (a second full-size buffer for an interlaced PNG, 2 bytes a
component and pixel for a progressive JPEG), plus 64 MiB. It is fitted
to peak heap measured with a counting allocator on the locked `image`
0.25.10 and `zune-jpeg` 0.5.15 (baseline and progressive JPEG, 8-bit and
16-bit PNG, interlaced and not, 24 to 67 MP, square, tall and wide).
Wide images are cheap and tall narrow ones are not (a 16-bit RGBA PNG
1600 px wide is accepted at 18,000 rows and refused at 26,500). A
decoder panic is caught and treated as a failed decode.
- Reuse: the outcome for each body is cached by SHA-256 of the original
bytes (32 MiB of shrunk bodies, at most 512 entries, least recently used
evicted first), including failed and refused decodes, so reopening a
message, or an image whose decode fails late, does not repeat the work.
The request still fetches the image; only the decode and resize are
skipped.
- Anything that is not PNG or JPEG, anything small enough, and anything
that fails to decode is returned exactly as before.

## Two things that go beyond "make big images smaller"

1. **New dependency, decoding untrusted files in the backend.** The
backend now decodes sender-supplied PNG and JPEG with the `image` crate
(0.25, `default-features = false`, features `png` and `jpeg`; pure Rust,
no dynamic libraries). Before, it only sniffed the signature and Qt did
all the decoding. The release binary grows from 11,836,760 to 12,286,648
bytes (+450 KB, +3.8%). I would value a security look at this.
2. **New refusal rule.** An image that declares more than 100 MP, or is
priced above 512 MiB to decode and resize (depends on shape and type;
see above), is now refused (`public_image_refused`) and never shown.
Before it was passed through (Qt's own allocation limit would likely
have refused such images anyway). This is the memory limit you asked
for; if you would rather pass such images through unchanged, it is one
match arm.

## What this does not fix

- GIF, WebP and BMP are not shrunk (the `image` features for them are
not enabled). The first image in the XDA sample, a 5.7 MB avatar PNG, is
above `MAX_IMAGE` (5 MiB) and is refused as before.
- Decode cost moves to the backend: about 0.4 to 0.9 s per large photo
(3 to 12 MP) on the Framework, off the GUI thread, once per distinct
image. For the sample below that is roughly 3.5 s of serial work spread
over the load.

## Verification

- Twelve new tests in `src/public_http/tests.rs`: PNG and JPEG shrink to
the expected size and keep their type; transparency survives; tall
images stop at the area bound; camera rotation is applied (size and
pixel direction); images inside the keep limits are byte for byte; a
shrunk image is cached and reused; a decode that fails is passed through
and remembered; over-budget headers (81 MP 16-bit, 80 MP 8-bit) are
refused before anything is allocated, checked with a per-thread counting
allocator; real decodes of JPEG, PNG, RGBA, 16-bit RGBA, a tall 16-bit
PNG, an interlaced PNG and a progressive JPEG stay inside 512 MiB; a
tall 16-bit PNG (1600 x 26500) and a large progressive JPEG, both found
over budget by the curator, are refused before decoding; cache eviction
is least-recently-used. With `prepare` stubbed to return the original,
every test that depends on the new behaviour fails (the shrink,
transparency, JPEG, tall, rotation and both refusal tests, measured on
an earlier revision of the branch); the byte-for-byte and
cache-structure tests pass either way.
- `cargo test --locked --features integration-test-credentials`: 735
passed, 0 failed, 14 ignored (the ignored ones need a native dbus).
`cargo check --no-default-features --features standalone` passes.
`rustfmt --check` is clean for the touched files (the repository's other
files are not formatted).
- Not run: `make validate` and `make test-app-qml`, since no QML, JS or
app code changed; CI's clippy step fails on an unrelated test in
`src/calendar/diagnostics/tests.rs` on this toolchain (Rust 1.99.1),
also on unmodified main.
- A fresh agent with an empty context reviewed the diff and `AGENTS.md`.
It found the real faults fixed here: the memory bound did not cover the
rotation copy or wide sample sizes, the decode lock blocked threads,
failures were not cached, and a decoder panic would have dropped the
image. Its remaining notes (ICC/APNG, GIF/WebP) are stated above. The
curator later showed that the first memory price (1.5× the decoded size)
was too low on `image` 0.25.9; the price above replaces it and is
checked against the locked 0.25.10.
- Measurements, on top of #414's 100 ms to 3 s backoff: offscreen
harness on the Framework (production `MailAccount` and `MessageReader`,
mocked backend), 20 images from the XDA sample above (6.5 MB as data
URIs, 4.1 MB after shrinking), one arriving every 400 ms, run twice
each:

| | Longest GUI stall | Peak RSS | CPU time | First image |
|---|---|---|---|---|
| Original images | 308 / 465 ms | 1327 / 1286 MB | 2.5 / 2.4 s | 212 /
213 ms |
| Shrunk images | 173 / 181 ms | 1076 / 1039 MB | 1.8 / 1.6 s | 213 /
213 ms |

So on top of batching it roughly halves the longest stall, and cuts CPU
time by about a third and peak memory by about a fifth. Those are modest
numbers for this sample; the gain grows with the number of very large
photos. The harness arrival times do not include the 0.4 to 0.9 s the
backend now spends per large photo. I have not measured the real shell
end to end.

## Release Notes

- Large remote images in newsletters are now scaled down before they are
shown, which makes image-heavy messages easier on the desktop.

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

https://claude.ai/code/session_01SyZ3VVEVaVpNwzSEcXW5vo

---------

Co-authored-by: taisau <13009459+taisau@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Nico Duldhardt <36307788+klaudworks@users.noreply.github.com>
Co-authored-by: Nico Duldhardt <nico@duldhardt.com>
…436)

The test suite should catch meaningful failures rather than grow
automatically with every change. This adds researched testing standards
in `docs/TESTING.md`, makes them required reading for test work, and
updates contribution guidance to prefer extending useful regressions
over inventing tests for documentation or mechanical changes.

The guidelines were informed by a repository-wide review of Rust,
JavaScript, QML, scripts, native-host tests and their runners. Only
lasting guidelines are added to the repository; the dated audit document
has been removed.

The patch also repairs demonstrated weaknesses: PowerShell
expected-failure helpers swallowed their own unexpected-success
assertions; Windows CI could lose an inventory command's failure;
attachment preservation checked existence rather than bytes; and the
make-output test rejected harmless checkout names. It removes two
ineffective awk guards and two checks that merely searched for Rust test
names. Removing the ineffective JMAP guard loses no working detection,
but a direct QML assertion that member summaries request `withBlocks:
false` remains a coverage gap.

## Verification

`make validate` passed on the current head (`9bb8b78`) on Linux, using
synthetic HOME/XDG directories, isolated network/mount namespaces and
offscreen Qt: Rust unit and integration tests, JavaScript/shell checks,
main and auxiliary QML suites, standalone composition, qmllint, plugin
validation and whitespace. This full rerun followed removal of the dated
audit document. The preceding run on `40543f2` also passed, including
723 Rust unit tests and 1,599 main QML cases. The ordinary Rust run
reported 14 ignored tests; the Qt resource-request security test was
then run explicitly by the QML target and passed.

Controlled before/after probes showed that attachment corruption passed
the old assertion and failed the revised one, and an `installed`
checkout path failed the old make test and passed the revised test. Both
original awk guards accepted their forbidden snippets. Extracted
PowerShell helpers accepted unexpected success before the fix and
rejected it afterward, while preserving intended-error and
unrelated-error behavior. A failed inventory child followed by a
successful child continued under the old CI sequence and stopped under
the new one.

Both complete synthetic package/installer suites passed on Linux-hosted
PowerShell 7.6.9. `python3 app/tests/test_release_workflow.py` passed
all 14 tests. Bash syntax, local Markdown links, changed-document size
limits and `git diff --check` passed. These results do not claim native
Windows installation or notification delivery.

A fresh independent agent reviewed the patch and fault-probe evidence
and found no blocking issues.

**Security: PASS** for the changed test assertions, tooling and CI
failure propagation; this scoped result is not a certification of every
production boundary.
Some tests were exercising retired JavaScript implementations while the
application used Rust. Others could pass without observing the failure
they claimed to prevent. This follows #436 with the implementation
cleanup from the full test-suite scan.

Remove the disconnected cache suites and framework-only
focus/popup/hover demos. Keep the historical oracles that current Rust
comparisons still consume, move useful conversation and draft-recovery
examples into native tests, and point sender presentation tests at the
production module. Provider query fixtures now state today's
account-wide search expectations directly.

Strengthen existing checks for installer launches and escaped writes,
native credential access, MCP frame limits, attachment byte
preservation, HEY retry behavior, UTF-8 process transport and automatic
window-size persistence. Golden comparisons now reject empty method
families. Plain-text lint requires an actual `Text.PlainText` binding.
Remove redundant source-order checks where production tests already
exercise the behavior.

## Verification

`make validate` passed on Linux with Rust 1.98.1, Node 26.12.1 and Qt
6.12.0. The run used isolated HOME/XDG directories and a network
namespace with loopback only. Expected unresolved shell-import lint
warnings remain; all gate exit codes passed.

`cargo test --locked --no-default-features --features
standalone,integration-test-credentials`, the Unix package and installer
suites, release-workflow checks, and standalone host-contract QML tests
passed. The six remaining native CTest targets passed; standalone
composition passed through `make validate`. `app/tests/Test-Install.ps1`
passed under PowerShell 7.6.9 on Linux.

Focused scratch-copy fault probes confirmed that the old installer test
accepted an attempted host launch and the old sender test missed a
broken production filter; the replacements reject both. Plain-text lint
rejects RichText/comment-only substitutes, golden comparisons reject
empty captures, and the production list test rejects hover-triggered
selection. These probes use synthetic data and controlled local
processes.

A fresh agent reviewed the complete diff and found one coverage loss:
the injected redirect handler does not exercise production
automatic-redirect configuration. Restored that narrow policy assertion
and reran the PowerShell suite. The reviewer confirmed the fix and
reported no remaining findings. **Security: PASS** for the affected test
boundaries; this is not a broader security audit.

Native Windows/macOS execution is left to the existing hosted jobs. No
visual behavior changes are included.
Spelling is now opt-in, as the maintainers asked in #338. A missing,
malformed or non-boolean stored value leaves it off; only an explicit
true turns it on, so the Sonnet probe stays unloaded until the user
enables it in Settings.
With spelling off by default, Settings read "Checking spelling in en_US"
beside an Off switch. Phrase the language line as conditional until the
user turns spelling on.
## Summary

Some calendar events last no time at all: their end equals their start
(a pill to take, a deadline). `calendar.reminders` rejects such a
candidate as invalid params, so the whole reminder pass fails, and it
fails again every 30 seconds while the event is in range. No reminder is
shown for any event in that window.

`ui/calendar/Reminders.js` now sends these events with a one-minute end.
The event itself is unchanged.

## Test

- `ui/tests/test_calendar_reminders.js`: a zero-length event becomes a
candidate whose end is one minute after its start.
- `make test-js`

https://claude.ai/code/session_01EvfvzTcjvYEqeSarMCtWFi
Closes #422.

The day and week views give each hour at least 60 units, so a laptop
with a larger text scale shows about 7 hours and seeing a full day takes
a lot of scrolling.

Hours now size themselves to the window, with nothing to configure:

- **Height:** an hour takes the height that shows 16 hours. It never
grows past today's 60, and never shrinks past what a 30-minute title can
be read at. It scales with the font, and ignores all-day rows so it
doesn't change from week to week. Windows tall enough for 16 hours at 60
look as they do today.
- **Opening hour:** the view opens at the first event of the visible
days, or 07:00 if there are none. With 16 hours on screen it can't open
later than about 08:00, because the day ends at midnight.
- **Zoom keys:** `Ctrl++` and `Ctrl+-` set a height by hand, from 10 to
120, and zooming out stops where the whole day fits. `Ctrl+0` returns to
automatic. There is no new control in settings.

This is option 3 from the discussion above, with option 2's keys as the
override. I work night shifts, so I need close to 24 hours on screen,
which is why zooming out goes below the automatic height. If you'd
rather not have the keys, they can come out without touching the rest.

Three things needed changing to make short hours work:

- **Short cards:** resize edges, grips and card margins are fixed sizes,
so they now shrink with the hour. Otherwise moving a 30-minute card
could change its start time. Hour labels switch to every other hour when
an hour is shorter than the text.
- **Scroll position:** the timeline keeps its position in pixels, so
changing the height would land on a different time. It now keeps the
hour at the top.
- **Following events:** events can arrive after the view opens, so the
view follows the first event until they have loaded, or until you scroll
or drag. Later edits and refreshes don't move it. A calendar arriving
with an account's sign-in is followed again if you haven't moved the
view. Switching mailbox opens at the new first event, after any drag or
save in progress has finished.

**A separate fix included here:** the zoom height wasn't saved in the
standalone app. `persistSetting` writes every setting, and
`app/src/file_store.cpp` refuses the whole write if one key isn't on its
allowlist. `appearance`, `calendarRemindersEnabled`,
`calendarSnoozeMinutes`, `invitationCalendars`, `aiAgent`, `aiModel` and
`aiChatResetAt` were all missing, so I added them with
`calendarHourHeight`. None of them are credentials. `ui/bar/Bridge.js`
also keeps the height through replacement bars. I can move the allowlist
fix to its own PR if you prefer.

**Known limits:**

- `invitationCalendars` and `aiChatResetAt` look like they are lost
under replacement bars too, from reading the code. I left that alone.
- A wheel notch in the same instant as a zoom or resize is dropped.
- A plain click on an empty slot counts as moving the view, so a
calendar arriving after that isn't followed until the week changes.
- A calendar arriving while you edit an event can still move the view if
you haven't scrolled or dragged, until that load ends.
- 60-minute cards at short heights show only the title, not the time.
- Zoomed out past the automatic height, 30-minute cards can cut their
titles. The tooltip still has the full text.

## Verification

Tested on Linux only, on commit 08b327e.

I ran the steps of `make validate` with `make -k`, so there is no clean
single `make validate` run. Rust, JavaScript, shell, the standalone
build, `make test-app-qml` and `qmllint` all passed. QML: 1610 passed, 1
failed. `omarchy plugin validate .`, `git diff --check` and `ctest -R
tst_settings` (which `make validate` doesn't run) passed separately on
the same commit.

**The one failure isn't from this change, and `make validate` may fail
for everyone:** `test_an_event_opened_from_the_agenda_names_its_guests`
in `tst_calendar_signal_crossings.qml` also fails on `main` without
these changes. It started failing when the date moved to November. Its
event is on 14 October 2026 while the calendar opens at the current
month, so the fixed date looks like the cause. I couldn't confirm that
by running it under another clock, and I left it out of this PR.

New tests: for the scroll and following behaviour in
`WeekCalendarView.qml`, and for the fixes in the last commit, I reverted
each one in turn and a matching test in `tst_calendar_gestures.qml`
failed each time. `acceptsTheSettingsServiceSends` in `tst_settings`
failed before the allowlist fix with `Setting is not allowed: aiAgent`.
The saved height has a test through the service and the bar bridge, but
I didn't restart a real shell.

I also tried an earlier commit of this branch in the standalone app with
my own calendars: the automatic height and zooming out to the whole day
both look right. That was before the last commit, and it wasn't in the
Omarchy bar.

A fresh agent reviewed the diff and then re-checked the fixes three
times. It found real bugs that are now fixed, including a growing window
losing the hour at the top, the view jumping after an edit, late
calendars not being followed, zooming out stopping just short of the
whole day, and a mailbox switch being dropped during a save. Its
security result was PASS. Its last findings are fixed in 08b327e with
tests, and that commit wasn't re-reviewed.

Visual evidence: automated captures from a component test harness using
the production `WeekCalendarView`. The events are synthetic, no backend
or provider ran, and nothing here was captured in the Omarchy shell.
Linux, Qt 6.12, scale 1, offscreen software rendering, one synthetic
dark palette, using the test suite's `qs.Ui` and `qs.Commons` stubs.
"Before" is `main` at ac95789; "after" is 08b327e. The captures in the
earlier comment show the old settings version and no longer apply.

| Window, view | Before | After |
| --- | --- | --- |
| 1280×800, week | 12.3 hours | 16 hours |
| 1280×560, week | 8.3 hours | 16 hours |
| 1280×560, week, zoomed to 40 | n/a | 12.5 hours |
| 1280×560, day | 8.3 hours | 16 hours |
| 1280×800, week, zoomed out fully | n/a | 24 hours |
| 1280×560, week, zoomed out fully | n/a | 24 hours |

## Release Notes

- Calendar day and week views now fit about 16 hours to the window and
open at the first event. `Ctrl++`, `Ctrl+-` and `Ctrl+0` adjust the hour
height, down to the whole day.
- Fix settings not being saved in the standalone app.

## Attribution

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Adding a `@yahoo.de` mailbox currently falls through to guessed
`imap.yahoo.de` / `smtp.yahoo.de` servers, even though Yahoo Germany
uses the existing Yahoo preset's `.com` servers. Recognize `yahoo.de` as
an exact alias of that preset so new accounts get the correct TLS
endpoints and the app-password guidance automatically. Yahoo documents
these settings in its [German IMAP
help](https://de.hilfe.yahoo.com/kb/SLN4075.html).

A hostname that cannot be resolved currently surfaces as “Mail request
failed,” although the backend reports `mail_dns_failed`. Present that
existing error as “Could not find the mail server. Check the server
address and your internet connection.” This helps users correct a
mistyped server without treating it as a password rejection. The mapping
uses fixed text and never exposes backend error details.

Reproduction before this change: open IMAP setup, type `jane@yahoo.de`,
and expand Server settings to see the guessed `.de` hosts. Separately, a
DNS lookup failure during Connect the mailbox produces only “Mail
request failed.” After the change the address selects
`imap.mail.yahoo.com:993` / `smtp.mail.yahoo.com:465`, and DNS failures
explain the next checks. Existing saved or manually edited servers
retain their current behavior.

## Verification

`make validate` passed its complete `test` target (Rust, JavaScript,
shell regressions, and QML, including 1,537 shared UI checks). It then
stopped because CMake was absent. After installing CMake/Ninja in a
temporary build-tools environment, `make -o test validate` passed the
remaining standalone composition test, QML lint, plugin validation, and
whitespace check. The source and commit were unchanged between these two
runs; all validation gates completed successfully. Verification used
Rust 1.99.1; existing compiler/QML warnings remain.

Both regressions were observed failing against the original production
code, then passing with the patch: `node ui/tests/test_imap.js` and
`node tests/test_imap_backend.js`. Coverage includes all existing Yahoo
aliases, mixed-case `yahoo.de`, full-address usernames, secure ports,
exact-domain lookalikes, the verification callback, request cleanup,
safe fallback text and unchanged authentication/timeout messages.

On Linux with Qt 6.12.0, exercised the actual `ImapSetupPage` and
`ImapClient` on screen with standalone UI adapters and synthetic data:
typed the address and password through Qt key events, submitted with
Return, and inspected the server fields, app-password note and DNS
error. The backend in this component fixture deliberately returns
`mail_dns_failed`; screenshots do not represent Yahoo refusing a real
connection. Captures use the same 1.25 display scale and matching
980×720 / 760×520 logical sizes, in light and dark themes. This is
component evidence, not a full plugin installation or cross-platform
live mailbox test.

A fresh agent reviewed the diff, repository agreements,
provider/security guidance and focused tests; it found no actionable
issues and recommended the focused correction. Security: PASS for
exact-domain preset selection and static error presentation. No backend
API or version-pin change is needed: `mail_dns_failed` already exists in
the pinned backend.

<details>
<summary>Dark · 980x720: before (left), after (right)</summary>

The preset now uses Yahoo’s `.com` servers and shows its app-password
note. The injected DNS failure now gives recovery guidance.

![Yahoo Germany server suggestions, dark, 980x720, before left and after
right](https://github.com/user-attachments/assets/93791f43-a64e-4fcd-8f2c-f392586cec74)

![DNS failure during sign-in, dark, 980x720, before left and after
right](https://github.com/user-attachments/assets/b476406b-a8e3-4fde-8ede-d45bd959fa18)

</details>

<details>
<summary>Dark · 760x520: before (left), after (right)</summary>

The preset now uses Yahoo’s `.com` servers and shows its app-password
note. The injected DNS failure now gives recovery guidance.

![Yahoo Germany server suggestions, dark, 760x520, before left and after
right](https://github.com/user-attachments/assets/b9a23f93-be33-40b1-90f1-e28723fc8ada)

![DNS failure during sign-in, dark, 760x520, before left and after
right](https://github.com/user-attachments/assets/b1b90e01-2a42-466b-954f-16d4c3ff301c)

</details>

<details>
<summary>Light · 980x720: before (left), after (right)</summary>

The preset now uses Yahoo’s `.com` servers and shows its app-password
note. The injected DNS failure now gives recovery guidance.

![Yahoo Germany server suggestions, light, 980x720, before left and
after
right](https://github.com/user-attachments/assets/3f67b400-407c-453b-9575-614dfb81f4dc)

![DNS failure during sign-in, light, 980x720, before left and after
right](https://github.com/user-attachments/assets/33eab93a-fa03-43c3-bb0f-a435573d544e)

</details>

<details>
<summary>Light · 760x520: before (left), after (right)</summary>

The preset now uses Yahoo’s `.com` servers and shows its app-password
note. The injected DNS failure now gives recovery guidance.

![Yahoo Germany server suggestions, light, 760x520, before left and
after
right](https://github.com/user-attachments/assets/fb7047a5-1228-4ab8-ab5d-4afc4c80ce83)

![DNS failure during sign-in, light, 760x520, before left and after
right](https://github.com/user-attachments/assets/3ade2b4e-600b-47ff-8998-16b13b1ec81c)

</details>

## Release Notes

- Yahoo Germany (`@yahoo.de`) mailboxes now automatically use the
correct Yahoo servers and show app-password guidance.
- IMAP server lookup failures now suggest checking the server address
and internet connection.

Co-authored-by: Nico Duldhardt <36307788+klaudworks@users.noreply.github.com>
## Summary

On a network that can only reach GitHub through an outbound proxy,
installing the backend always failed: `scripts/backend-runtime.py` built
its download opener with an explicit empty `ProxyHandler({})`, which
disables urllib's proxy discovery entirely, so the request dialed
`github.com` directly and died at the 20-second timeout even with
`HTTPS_PROXY` set exactly as git and curl expect. Maintaining an
Omamail-specific proxy option was declined in #337, so this changes the
download path to follow the standard variables: the opener is now built
from urllib's default proxy discovery (`HTTPS_PROXY`/`NO_PROXY`, either
case; an HTTP-style proxy URL is tunneled with CONNECT). With no proxy
variables set, connections are direct, byte-for-byte as before.

The proxy only carries the encrypted transport. HTTPS still terminates
on the allowlisted release hosts, and every existing safeguard is
untouched: `release_url_allowed()` host allowlist, `ReleaseRedirect`
re-validation of every redirect target, archive and binary size limits,
and the 20-second timeout.

## Verification

`make validate` could not complete on this machine, and no part of the
claim rests on it. What ran on commit `46b3b1b`:

- `python3 tests/test_backend_runtime.py` — 40 tests, OK. `python3
tests/test_backend_release.py` — 26 tests, OK. `python3
tests/test_runtime_release_contract.py` — 1 test, OK. (`make test-js`
and `make test-shell-portable` also green.)
- `make test-rust`: 712 passed, 32 failed — the same 32 fail on
unmodified upstream `main` with the same counts (`cache_unsafe_path`
environment panics), so they predate this change. `make
test-shell-libcurl` likewise fails identically on unmodified `main`
(host libcurl channel behavior, documented in the Makefile as
version-dependent). `make test-qml` stops because this machine's
`qmltestrunner` wrapper cannot exec `/usr/lib/qt5/bin/qmltestrunner`;
`make test-app-qml` stops at `ModuleNotFoundError: No module named
'cmake'`; `qml-check` needs `/usr/lib/qt6/bin/qmllint` and the Omarchy
shell imports; `omarchy plugin validate` needs the omarchy CLI — none
installed here. `git diff --check` is clean.
- New regression
`test_download_honors_standard_proxy_environment_variables` drives a
local recording HTTP proxy with `HTTPS_PROXY` set and asserts the
download travels through it as `CONNECT github.com:443`; a guarded
socket refuses any non-loopback dial, so nothing real is contacted.
Observed failing on the unfixed code: `AssertionError: unexpected direct
connection to 20.205.243.166`, `FAILED (failures=1)`. The companion
`test_download_without_proxy_variables_keeps_direct_connections` asserts
that with no proxy variables the URL's own host is resolved and
contacted directly; it is a contract guard for unchanged no-proxy
behavior, not regression evidence.
- Real release download,
`https://github.com/huacnlee/omamail/releases/download/v0.11.3/omamail-linux-x86_64.tar.gz`,
through the actual `download()` of each version,
`HTTPS_PROXY=http://127.0.0.1:8118`, `timeout 120` outer bound:
- Before (upstream `main`): `FAIL type=TimeoutError seconds=20.46
error=The read operation timed out`, exit 1.
- After (this change): `OK bytes=5720107 seconds=1.43`, exit 0 —
including the 302 to `release-assets.githubusercontent.com` passing
`ReleaseRedirect` unchanged.
- No proxy variables: before `FAIL type=URLError seconds=20.03
error=<urlopen error timed out>`, after the identical `FAIL
type=URLError seconds=20.03 error=<urlopen error timed out>` — users
without proxy settings get the same direct connection and the same
outcome.
- A fresh agent with an empty context reviewed the diff against
`AGENTS.md` and `docs/SECURITY-BOUNDARIES.md`. It confirmed the
regression fails on unfixed code, found no flakiness (verified the suite
green three times, including with adversarial ambient proxy variables
set), and verified the allowlist, redirect validation, TLS termination
on the allowlisted host, size/time bounds and error hygiene intact. It
reported **Security: PASS** and two wording findings, both applied: the
docs now say `HTTPS_PROXY`/`NO_PROXY` only (the download URLs are always
HTTPS) and state that SOCKS-style proxy values are not supported.

## Visual evidence

Not applicable: this change touches the backend release downloader and
its tests; no interface or rendering changed.

## Release Notes

- Installing the backend now works on networks that require an outbound
proxy: set the standard `HTTPS_PROXY` and the release download uses it.
Some HTML mail (Instagram's digest is the one I hit) puts a stray `<tr>`
inside a `<td>`, or closes a table part that is not open. The reader's
tree builder then closed the wrong element: the rest of the message
spilled into the outer table's columns. This follows the browser's
"table scope" rule on both sides, in `src/message/html/tree.rs` and
`ui/message/Html.js`:

- A `<tr>`, `<td>` or `<th>` that opens while a cell of the innermost
table is open closes that cell first, with anything still open inside
it.
- An end tag for a table part (`tr`, `td`, `th`, `thead`, `tbody`,
`tfoot`, `caption`) looks no further than the nearest `<table>`; with no
match before it, the tag is dropped.

Node, depth, input and output limits are unchanged, and the sanitizer
still runs on the result.

Standalone app on Linux (Omarchy, light theme), 1100×764 at scale 1, on
my own Gmail inbox in an isolated `XDG_*` profile. Mail, labels,
addresses and the sender line and usernames in the message are
pixelated. Before is `origin/main` (01de616), after is be9fc29, both in
the Original view of an Instagram "suggested accounts" mail. Before, a
stray `<tr>` inside a cell squeezes the heading into one narrow column
of the outer table; after, the heading and intro run full width. A
narrow column further down remains in both: that one is the mail's own
nested layout, which this PR does not touch.

| Before (`origin/main`) | After |
| --- | --- |
| <img width="1100" height="764" alt="Before: heading squeezed into a
narrow column"
src="https://github.com/user-attachments/assets/205d3329-a618-43f2-9803-7a2be358de37"
/> | <img width="1100" height="764" alt="After: heading full width"
src="https://github.com/user-attachments/assets/5fb17d81-bdb8-4ab4-91da-329605c18a41"
/> |

## Verification

`make validate` green on be9fc29.

- `table_parts_stay_in_their_own_table` (Rust) and
`ui/tests/test_html_tables.js` fail on `origin/main`: the first
assertion pins the end-tag scoping, the second the cell closing.
- `actual_javascript_sanitizer_and_reader_corpus_matches` passes, so the
Rust and JS parity corpus is unchanged.
- A fresh-agent review also compared the two parsers on 43,000 random
table-heavy inputs (stray end tags, caption, colgroup, nesting up to the
depth cap): no difference, at this commit or at `origin/main`.

Two behaviour changes worth knowing, both what a browser does:

- A nested table missing its `</table>` now stays open: a stray `</td>`
after it is dropped instead of closing the outer cell.
- A `<tbody>`, `<thead>` or `<caption>` opened inside a cell still nests
there until the next `<tr>` or `<td>`, as before.

## Release Notes

- Messages with sloppy table markup, such as Instagram's digest, no
longer spill into the columns of the table around them.
Pressing `v` on my iCloud mailbox gave me one destination. A folder
called Notes. That was the whole list.

The picker drops every label the provider marks `system`. That rule was
written for Gmail, where the system labels are INBOX, SENT, SPAM and so
on, the mailboxes the rail already draws. On a folder mailbox the same
flag marks the special-use folders, so it marks nearly everything. My
account reports seven labels and six of them are flagged, which left the
one folder that isn't special-use.

The Inbox is the destination there that no key reaches. `e` files a
message into Archive from every folder but Archive, so sitting in Junk
there was no one-key way back. #303 added Move to Inbox to the message
menu. The picker was never told.

What changed: `movableLabels` takes a `folders` flag, and `labelTree`,
which it shares with the rail, takes an optional predicate saying which
system labels may pass. The picker passes that predicate when the
provider reports `!labels && move`. That is IMAP, and Outlook, which
runs on the same IMAP stack, so both now offer the Inbox. Archive and
Trash keep their own keys, and the predicate lets the Inbox through and
nothing else. Gmail keeps its behaviour because `labels` is true there,
and HEY never turns the flag on either, since it has `labels` true as
well as `move` false. The rail passes no predicate and still drops every
system label. `docs/KEYS.md` gains a sentence about the picker on a
folder mailbox.

Junk stays out of this on purpose. It is a menu action rather than a
key, so by the picker's own rule it would qualify, and I did not want to
settle that inside a bug fix. If it should be a destination, say so and
I will do it as its own change.

Both the tree path and the typed path have new assertions in
`ui/tests/test_model.js`, including one saying the other system folders
stay out. They fail on current main with the exact one-row list my
mailbox produced, and pass with the change.

## Evidence

Production `LabelPicker`, synthetic labels in the shape my account
reports, rendered at scale 2 and cropped to the popup so the header
count and the rows are legible. Both halves of a pair are the same size,
same palette, same anchor, same current folder. Before, the header reads
Move to (1) with a single row. After, it reads Move to (2) and the Inbox
sits above Notes. Nothing else on screen changes.

Before, light:

<img width="736" height="336" alt="before-light-crop"
src="https://github.com/user-attachments/assets/9f066519-b5f9-471f-8cfa-cc6e53ba6b54"
/>

After, light:

<img width="736" height="336" alt="after-light-crop"
src="https://github.com/user-attachments/assets/7c18e686-b114-4409-8a31-5507d8640138"
/>

Before, dark:

<img width="736" height="336" alt="before-dark-crop"
src="https://github.com/user-attachments/assets/3ac99f00-84d3-4ed2-b942-9ccea94ddd33"
/>

After, dark:

<img width="736" height="336" alt="after-dark-crop"
src="https://github.com/user-attachments/assets/f4c3e0cf-54d1-4f17-9ebe-44e7a2c11fc0"
/>



## Verification

`make test-js` passes, the model tests included. `qmllint` is clean on
the two changed QML files, `App.qml` and `LabelPicker.qml`. `make
test-qml` and `make validate` I could not run here, because
`qmltestrunner` on this machine is linked against Qt 5.15 and exits
silently even on a one-line test file. The PR's own CI run then passed
all fourteen checks, portable tests and the three standalone app builds
among them, so both gates have now run.

## Release Notes

- The move picker (`v`) now offers the Inbox on IMAP and Outlook
mailboxes, where no key reaches it from a folder.
- Gmail and HEY pickers are unchanged.

Co-authored-by: art-request <art-request@users.noreply.github.com>
# Conflicts:
#	app/src/file_store.cpp
#	docs/KEYS.md
#	ui/tests/qml/tst_service_settings.qml
Brings eml-ux-fold up to upstream 3205906 (v0.11.3 plus later merges).

Conflict resolutions:
- backend-api.json: keep upstream apiVersion 10 / released 9; list
  mail.exportEml and its contract cases under unreleased next to
  upstream's two calendar cases.
- Export gate moves from API 7 to API 10 (MessageActions.backendCanExportEml
  and its JS/QML tests). The standalone smoke check now follows the
  contract constant upstream introduced, so no hand-kept number remains.
- imap/mod.rs: keep upstream's records()/response_each split and thread
  the export literal_cap through both.
- Service.qml: keep upstream's unified batch actions (UnifiedBatchAction,
  completion callbacks) and route the .eml entry points through
  MessageActions. The old unified-refusing actMany helper is dropped.
  A comment in saveAccounts is shortened so the file stays under the
  128 KiB tracked-file ceiling.
- MailAccount.qml: the export body moves to MessageActions.accountExport
  for the same size ceiling; behavior is unchanged.
- MessageMenu.qml: upstream's multi-row reach model plus the two export rows.
Qt 6.12 adds a QtQuick Color singleton that shadows qs.Commons Color.
The cherry-picked upstream fix (b0504b9) qualifies every palette read it
knew about; EmlSavedToast arrived in this repository via PR #10 and kept
two unqualified fallbacks, which would read undefined whenever the card
is constructed without its app.

(cherry picked from commit 31adf97)
Private-only; not part of upstream #324, which keeps session-only Ignore.

Reverts 3848414 on top of the #324 head and reconciles it with the later
opt-in and system-language changes:

- PersonalWords keeps spelling.json ({"words": [...]}, owner-only via
  config-store.sh), the format already on Chris's machines, and loads it
  whether or not checking is on, so turning spelling off never drops words.
- The adapter applies personal words after each language switch and on
  every list change; the composer passes them through on load.
- Right-click and Ctrl+. offer Add to dictionary next to Ignore for this
  session; Settings reports a refused save.
- Tests restored for parsing/merging, queued writes, failed-write retry,
  restart round trip, late-load merge, the menu row and the composer path.
TextMenu.qml is the one overlap: the spelling rows (suggestions, Ignore,
Add to dictionary) and the reader's Save as .eml rows are both kept in
menuRows, with all aliases and signals from each side.
Carried from private PR #9 (df0b64c): upstream main still has both flaky
tests. Mock servers get a per-test synthetic session so independent mock
lifetimes on one reused port never share cached mailboxes, and the agent
history index notices turns created within one root timestamp tick.

(cherry picked from commit df0b64c)
Re-applies this derivative's AGENTS.md section, release-workflow caveats,
branch-protection note, CI released-backend repository and .gitignore
entries onto upstream's current text, without reverting upstream's own
documentation changes.
- tst_message_menu_export looked its rows up by fixed index; upstream
  added menu rows ahead of them. Look them up by objectName instead.
- SpellingState declared PersonalWords before the probe Loader, but
  upstream's settings test expects the probe as its first child. Declare
  the word store last.
- MessageMenu called service.canExportEmlFor unguarded, so upstream's
  inbox-menu fixture (which has no export hook) threw on every open.
The backpressure regression carried with 20f39bd built its child through
Sandbox::command, which upstream replaced with Sandbox::spawn (same
environment, plus the macOS spawn lock). Git merged the test cleanly, so
only the build caught it.
- src/agent/{jobs,storage}.rs return to upstream. The PR #9 index fix keys
  on the root directory's link count, which btrfs (the Omarchy default)
  keeps at 1, so its new test failed on BEE and the fix does nothing
  there. The IMAP mock-cache isolation from the same commit stays.
- ui/providers/NativeDomain.js gains m365 emlExport: false. Upstream added
  the m365 provider after the .eml branch generated this file, so the
  Rust parity test caught the missing capability.
Review finding R3: every FileView load failure was treated as an empty
successful load, so after a permission or I/O error the next Add replaced
the unread spelling.json with this session's words alone. Only
FileViewError.FileNotFound (or the shims' bare failure) now starts an
empty list. Any other failure keeps the store unloaded, so new words work
in memory but are only queued, and Settings shows why they are not saved.
Regression test covers both paths.
Review finding N1 (inherited from the .eml branch): a folder whose name
contains a line break was truncated to its first line, which can be a
different existing folder. Two lines are now refused with a plain message;
a single folder, trailing-slash trimming, relative and cancelled answers
behave as before.
The first half left a queued write in flight, so the missing-file half's
write was queued behind it. Release it with a realistic later load and
check that both the saved and the session words are written.
…et export check

Re-review P2 (R3 residual): the standalone shim emitted a bare loadFailed()
for every failed read, so an existing spelling.json it could not read
(permission denied, over 16 MiB) looked like a missing file and the next
Add replaced it. The shim now passes FileViewError like Quickshell does:
FileNotFound (2) when the path does not exist, Unknown (1) otherwise.
PersonalWords already treats only 2 as "start empty". Host-contract
regressions cover the shim's classification and the standalone word store
end to end (no write while unreadable, creation when missing).

Re-review P3: MessageActions.hiddenBindings gets the same typeof guard as
MessageMenu, so fixtures without the export hook stop throwing.
@latentoperator

Copy link
Copy Markdown
Owner Author

The Standalone app (Windows x86_64) check failed twice in the same place (jobs 124976163975 and 124981334155): the build and all 7 app tests pass, then the backend API contract check cannot read outbox.lock (EBUSY) while it compares storage before and after a call. The test file matches upstream main, where this job passes, so something in this build holds that lock longer on Windows. This copy is installed only on Linux, and every Linux and macOS check passes, so the failure is accepted for this merge. The cause will be followed up separately.

@latentoperator
latentoperator merged commit aa8aff9 into main Nov 1, 2026
23 of 25 checks passed
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.