Commit f220b67
committed
feat(email): daily-driver UI pass — pre-scan card, in-chat Connect, session prefs
Closes the four UI gaps that turn the shipped EmailTriageAgent (#965) into a
tool a user actually opens daily. "Run a pre-scan" now returns a typed
``email_pre_scan`` envelope that the chat surface mounts as a structured
triage card with three sections (urgent / actionable / suggested archives) and
inline Approve / Reply / Open / Dismiss buttons — no chat-turn required to act
on each item. When the agent surfaces an OAuth auth-required error, an inline
``Connect Google`` CTA renders in the same message bubble (no Settings nav).
Session-scoped triage preferences (``set_priority_sender``,
``set_low_priority_sender``, ``set_category_default``,
``clear_session_preferences``) are honored by ``triage_inbox`` and
``pre_scan_inbox`` for the lifetime of the agent — wiped on restart by design,
clean migration path to the persistent memory subsystem when that lands.
Adversarial review caught a showstopper before merge: ``email_pre_scan`` was
being stripped by ``stripBogusCodeFences`` in MessageBubble before the markdown
renderer saw it, so the card would never have mounted in production. Fixed in
the same pass with three other findings: id-only Approve/Reply dispatch
(closes a prompt-injection path through email subject text), phishing-aware
preference application (a phishing-flagged message bypasses both priority and
low-priority overrides), and a single-flight per-card guard against double-
click duplicate dispatches.
Drafted intentionally — depends on Kalin's memory + 5-agent split PR landing
on main first. The in-memory ``_session_preferences`` schema is designed to
migrate to that store cleanly without touching the agent or read-tool kwargs.
Tests: 132 email unit tests pass (130 baseline + 2 new — phishing-override
and a system-prompt canary asserting the ``email_pre_scan`` instruction is
still present). Lint clean, TypeScript clean, webui build clean. v0.17.6
installer smoke verified end-to-end on t-nx-strx-halo (Ubuntu 24.04, Strix
Halo) for both AppImage and deb paths.
Ref: #6451 parent 7ad2efc commit f220b67
12 files changed
Lines changed: 2085 additions & 17 deletions
File tree
- docs/guides
- src/gaia
- agents/email
- tools
- apps/webui/src/components
- email
- tests/unit/agents
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
92 | 123 | | |
93 | 124 | | |
94 | 125 | | |
95 | 126 | | |
96 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
97 | 132 | | |
98 | 133 | | |
99 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
91 | | - | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
103 | 130 | | |
104 | 131 | | |
105 | 132 | | |
106 | 133 | | |
107 | | - | |
| 134 | + | |
108 | 135 | | |
109 | 136 | | |
110 | 137 | | |
| |||
121 | 148 | | |
122 | 149 | | |
123 | 150 | | |
| 151 | + | |
124 | 152 | | |
125 | 153 | | |
126 | 154 | | |
| |||
141 | 169 | | |
142 | 170 | | |
143 | 171 | | |
| 172 | + | |
144 | 173 | | |
145 | 174 | | |
146 | 175 | | |
| |||
182 | 211 | | |
183 | 212 | | |
184 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
185 | 220 | | |
186 | 221 | | |
187 | 222 | | |
| |||
230 | 265 | | |
231 | 266 | | |
232 | 267 | | |
| 268 | + | |
233 | 269 | | |
234 | 270 | | |
235 | 271 | | |
| |||
0 commit comments