Skip to content

feat(email): mailbox picker in the chat composer, and mailbox switches marked in the transcript - #318

Merged
vjvarada merged 1 commit into
mainfrom
claude/email-salutation-missing-pm3hne
Aug 1, 2026
Merged

feat(email): mailbox picker in the chat composer, and mailbox switches marked in the transcript#318
vjvarada merged 1 commit into
mainfrom
claude/email-salutation-missing-pm3hne

Conversation

@vjvarada

@vjvarada vjvarada commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

A chat thread is keyed by agent, not by account, so one conversation can span mailboxes. The active account was inherited silently from whatever the inbox happened to be showing — switching it swapped the assistant's per-account instructions mid-thread with nothing in the transcript to say so. And in the chat app, which has no inbox sidebar, the account resolved only when the user had exactly one, so a multi-account user got an unconfigured assistant that had to ask.

  • AgentChat gains an optional mailbox picker next to the model selector (mailboxes / activeMailboxId / onMailboxChange). It renders only when mailboxes are supplied, so it's the email assistant's control and no other agent sees it. Which inbox the assistant works on is now a visible, per-conversation choice.
  • Switching mid-thread drops a marker in the transcript — "Now working on <mailbox>" — anchored to the message it followed, so the boundary is readable when scrolling back. A switch before the first message needs no marker and gets none.
  • Email app: the picker points the assistant at a different mailbox without making the user leave the thread or change what they're reading. The override is held against the inbox selection it was made against, so moving the inbox drops it derivationally rather than via a reset effect. Settings, persona, and tool context all follow the chat's mailbox.
  • Chat app: the picker replaces the one-account-only resolution and defaults to the first account, so a multi-account user starts somewhere concrete.

Builds on #316, which made the assistant's behaviour per-account in the first place — this gives the user direct control over which account that is.

Testing

  • Backend: 952 email tests passed.
  • Frontend: tsc --noEmit clean, next build clean, vitest 141/141. Lint counts identical to baseline on all three touched files (AgentChat 13, chat/page 2, EmailAssistantChat clean) — no new issues.

🤖 Generated with Claude Code

https://claude.ai/code/session_0122zNo8kiZooLu49jsaSrQ6


Generated by Claude Code

…s marked in the transcript

A chat thread is keyed by agent, not by account, so one conversation can
span mailboxes. The active account was inherited silently from whatever
the inbox happened to be showing: switching it swapped the assistant's
per-account instructions mid-thread with nothing in the transcript to
say so, and in the chat app — which has no inbox sidebar — the account
resolved only when the user had exactly ONE, so a multi-account user got
an unconfigured assistant that had to ask.

- AgentChat gains an optional mailbox picker next to the model selector
  (mailboxes / activeMailboxId / onMailboxChange). It renders only when
  mailboxes are supplied, so it is the email assistant's control and no
  other agent sees it. Which inbox the assistant is working on is now a
  visible, per-conversation choice.
- Switching mid-thread drops a marker in the transcript ("Now working on
  <mailbox>") anchored to the message it followed, so the boundary is
  readable when scrolling back. A switch before the first message needs
  no marker and gets none.
- Email app: the picker points the assistant at a different mailbox
  WITHOUT making the user leave the thread or change what they're
  reading. The override is held against the inbox selection it was made
  against, so moving the inbox drops it derivationally rather than via a
  reset effect. Settings, persona and tool context all follow the chat's
  mailbox, not the inbox's.
- Chat app: the picker replaces the one-account-only resolution, and now
  defaults to the first account so a multi-account user starts somewhere
  concrete instead of nowhere.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122zNo8kiZooLu49jsaSrQ6
@vjvarada
vjvarada merged commit bc1e7d9 into main Aug 1, 2026
2 of 3 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.

2 participants