Skip to content

ADR 0004 follow-ups: contacts for approval rules; refresh ai-services docs [skip ci] - #128

Merged
ymote merged 1 commit into
mainfrom
adr0004/contacts-docs
Sep 29, 2026
Merged

ymote merged 1 commit into
mainfrom
adr0004/contacts-docs

Conversation

@ymote

@ymote ymote commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Two ADR 0004 follow-ups.

1. A contacts source for the approval rules

"Recipients in my contacts" never matched: the shell had no contacts source.

  • crates/shell/src/approvals/contacts.rs: ContactsSource (is_known(address) for email addresses and Matrix IDs), with ContactList / NoContacts as test doubles; MailContacts, which reads Mail's host service data; and ContactsGate, which is what the router asks. The gate is off by default. It turns on only when the person taps "Use my contacts in approval rules" in Settings → Assistant → Approvals (an ApprovalGesture, following the consent.rs pattern), and turning it off needs no gesture. The choice is stored owner-only in approvals/contacts.json. The old rules::Contacts trait is replaced.
  • apps/mail/host-service/src/contacts.rs: known_addresses(host_dir) returns the person's own account addresses plus the addresses they have sent mail to. Those come from the recipients this service sent for them (mail/sent-to.json, per account) and from the To/Cc of messages in each account's sent folder. It reads only accounts.json, folders-<id>.json, the sent-folder mailboxes and sent-to.json, never the vault. The decoder now keeps to and cc, and removing an account forgets its recipients.
  • The shell links MailContacts where Mail's host service is linked (App Hub or native mobile) and falls back to NoContacts otherwise.
  • Tests: a rule matches a known recipient (email address and Matrix ID) and rejects an unknown one; it never matches without consent, and turning consent off stops it matching again; the sheet offers no "always for people in my contacts" without consent; the choice persists per home, owner-only; the mail side builds the known set from the sent folder and recorded sends, ignores senders in the inbox and junk, and holds no password.

Follow-up: OS address books (macOS Contacts, Android contacts provider) as further ContactsSources.

2. docs/ai-services.md and .zh-CN.md refreshed

These pages were dated 2026-09-27; they now describe main as of 2026-09-28 (ad0d738, octos 5e7577f0, App Hub e8601b80). Changes:

Checks (local)

  • cargo test --locked -p octosense-shell --lib approvals: desktop and --features mobile-apps (38 passed each)
  • cargo test --locked -p octosense-mail-service (8 passed)
  • cargo check --locked -p octosense (with and without mobile-apps); from phone/: cargo check --locked -p octosense-home --features mobile-apps
  • tools/check-shell-graph.sh -p octosense and -p octosense-home
  • python3 tools/setup.py --check --cargo
  • Relative-link and anchor check on the four changed docs

🤖 Generated with Claude Code

… [skip ci]

- approvals/contacts.rs: ContactsSource (is_known for email addresses and
  Matrix IDs), ContactList/NoContacts test doubles, MailContacts reading
  Mail's host service data, and ContactsGate: off by default, on only by
  the person's Settings tap ("Use my contacts in approval rules"), kept
  owner-only in approvals/contacts.json. The router evaluates "recipients
  in contacts" through the gate.
- mail host service: contacts::known_addresses (own accounts, recorded
  send recipients, To/Cc of sent folders; never the secret store); the
  decoder keeps To/Cc; a removed account forgets its recipients.
- docs/ai-services(.zh-CN).md refreshed against main (#106, #113, #117,
  #118, #120, #124, #95, #86), linking architecture.md; architecture's
  contacts lines updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ymote
ymote merged commit 9229ba8 into main Sep 29, 2026
chrislearn pushed a commit to chrislearn/OctoSense that referenced this pull request Sep 29, 2026
OctoScript-App-Design-Flow folded OCTOS-AI.md into docs/AI-SERVICES.md
(OctoSense-org#128, extended in OctoSense-org#127), which is already on its main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote added a commit that referenced this pull request Oct 16, 2026
…xt sweep

Stacks OctoSense-org/makepad#128 on the pinned makepad (d653bc44):

- The Choreographer beat carries its expected presentation time (API 33+).
- EGL frame timestamps report each frame's display time.
- When two frames in a row reach the screen half a refresh late while a
  finger is down, one beat is left unpainted so the extra queued frame
  drains.

In the phone's All apps list, a drag stops trailing the finger by a frame
or two after one slow frame: drags at the shortest delay rose from 52% to
84% on a OnePlus 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote added a commit that referenced this pull request Oct 17, 2026
…kepad #128)

Restacks makepad-android-buffer-stuffing.patch on makepad #128's second
commit: a refresh without a new frame (an unpainted beat, or an idle app's
stopped beats) drains the queue, so frames painted before one never arm a
skip. Without it, a stuffed coast's last frames, read back at the next
gesture's first swap, could drop that gesture's second beat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant