Add Apple Mail links to daily report

The prompts used to arrive at this change since the previous commit

User asked whether daily report emails could include links, then chose Apple Mail links as the first implementation.

Any special observations that may be relevant for version management for this version. Be brief.

Apple Mail links use Message-ID-based message:// URLs and depend on macOS Mail having the messages synced/indexed locally. verplaats_log.json and plan.md were left unstaged.
This commit is contained in:
2026-07-05 11:22:03 +02:00
parent ae0813d519
commit 99cd891b1e
3 changed files with 82 additions and 14 deletions
+12 -7
View File
@@ -16,7 +16,7 @@ Do not run mailbox-affecting scripts yourself unless the user explicitly authori
- Work on branch `codex` unless the user says otherwise.
- Before every commit, rewrite this file from scratch as the current reconstruction prompt.
- Commit after each user-prompted code change using the required three-section commit message format.
- The user asked: first provide a plan and wait for approval before doing future work.
- The user asked: first provide a plan and wait for approval before future broad work. For narrow requested edits, implement directly when the request is explicit.
- Do not stage local runtime output such as `verplaats_log.json` unless the user explicitly asks.
## Local Data And Secrets
@@ -110,6 +110,9 @@ Daily report:
- It supports `--account` and `--mail-to`.
- The NAS daily report target is `hans@australius.nl`.
- It sends a report even when there are zero messages.
- Report rows fetch `Message-ID` and render the subject as an Apple Mail `message://` link when a `Message-ID` is present.
- Apple Mail links are macOS-oriented. They depend on Apple Mail having the message synced/indexed locally; iOS Mail should not be treated as reliable for these links.
- Report HTML escapes folder labels, senders, subjects, and link attributes.
## Web Route Management
@@ -145,6 +148,8 @@ Security note:
## NAS Deployment
The files have already been deployed to the NAS and the webserver is running.
`deploy_vps.sh` is host-neutral despite its historical filename.
For the QNAP-like NAS, use:
@@ -224,9 +229,10 @@ Treat that as a successful backup historical-sorter run with no immediate recove
## Verification Commands
Latest local verification should include:
Latest local verification included:
```sh
python3 -m unittest tests.test_dagelijks_overzicht
python3 -m py_compile *.py tests/*.py
bash -n deploy_vps.sh
python3 -m unittest discover -s tests
@@ -249,8 +255,7 @@ PY
Likely next steps:
1. Deploy the updated code to the NAS in `SERVICE_MANAGER=plain` mode.
2. Create remote `web_config.json`.
3. Start the web UI with `/share/homes/mailcat/mailcat/bin/start_web.sh`.
4. Open `http://<nas-host-or-ip>:4321/` from the internal network and verify Basic Auth.
5. Make a harmless route edit, verify `domain_routes.json` and `domain_routes.json.bak`, then restart the sorter if the live daemon is running.
1. Deploy the Apple Mail link update to the NAS if the user wants it live there.
2. Run `/share/homes/mailcat/mailcat/bin/run_daily_report.sh` manually on the NAS to send a test digest.
3. Open the digest on macOS Mail and verify subject links open local Apple Mail messages.
4. If iOS/web reliability is needed later, add Roundcube links using mailbox plus IMAP UID, or add a read-only Mailcat message viewer.