Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(ui): email pre-scan triage card + dev server launch config#1039

Merged
itomek merged 1 commit into
mainfrom
tmi/hopeful-hermann-47f949
May 11, 2026
Merged

feat(ui): email pre-scan triage card + dev server launch config#1039
itomek merged 1 commit into
mainfrom
tmi/hopeful-hermann-47f949

Conversation

@itomek

@itomek itomek commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Before this PR, the email triage agent's structured inbox summary appeared as raw JSON text inside the chat bubble — unreadable and unactionable. Two bugs compounded: stripBogusCodeFences in MessageBubble stripped the email_pre_scan fence (treating it as an unknown language tag), and even when the fence survived, remark-gfm's email autolink heuristic (<email@domain> patterns in the JSON payload) corrupted ReactMarkdown's fence detection so the block fell through as a paragraph.

After this PR, the agent's inbox summary renders as a structured triage card with distinct sections (Urgent / Needs a Response / Suggested Archives), per-row Reply and Archive action buttons that dispatch back into the chat, and a Dismiss button for local dismissal.

Resolves #1038

What changed

  • EmailPreScanCard component — new card UI and scoped CSS; renders pre_scan_inbox payloads as a scannable triage view. Action buttons emit gaia:send-message with the message ID only (sender/subject are kept out of the command string to avoid prompt-injection via attacker-controlled email headers).
  • MessageBubblestripBogusCodeFences now preserves email_pre_scan fences; RenderedContent has a STRUCTURED_FENCE_RE short-circuit that bypasses ReactMarkdown entirely and mounts EmailPreScanCard directly. All other markdown paths (code blocks, tables, prose, inline code) are unaffected.
  • ChatViewgaia:send-message window event listener wired to sendMessageRef so card action buttons deliver messages into the active session.
  • ChatView.css — removed dead .session-hash-badge CSS block (no JSX reference existed).
  • .claude/launch.json — dev server launch configurations for the repo (backend, frontend, API server, docs, website, emr-dashboard).

Test plan

  • Open an existing "Triage inbox emails" session — inbox summary renders as EmailPreScanCard, not raw JSON
  • Reply / Archive buttons dispatch a message into the chat (visible in the input → response cycle)
  • Dismiss button removes the row locally without sending a message
  • Open a code-agent session — fenced Python/bash blocks still render with syntax highlighting and Copy button
  • Open a session with a markdown table — table renders correctly
  • Confirm no raw JSON visible in any message bubble (gaia:send-message clean sweep)

Before: the email triage agent's structured inbox summary rendered as
raw JSON text in the chat bubble. Two compounding bugs caused this:
`stripBogusCodeFences` stripped the `email_pre_scan` fence (unknown
lang), leaving bare JSON; and even when the fence survived, remark-gfm
email autolink heuristics (<email@domain> inside the payload) prevented
ReactMarkdown from recognising the code fence at all.

After: the card renders as a structured triage UI with Reply/Archive/
Dismiss actions per email row. All other markdown content (code blocks,
tables, prose) is unaffected.

Changes:
- Add EmailPreScanCard component (card UI + scoped CSS)
- MessageBubble: preserve email_pre_scan fences in stripBogusCodeFences;
  add STRUCTURED_FENCE_RE short-circuit in RenderedContent that bypasses
  ReactMarkdown entirely and mounts EmailPreScanCard directly
- ChatView: add gaia:send-message window event listener so card action
  buttons (Reply/Archive) dispatch messages into the active session
- ChatView.css: remove dead .session-hash-badge CSS block (no JSX used it)
- .claude/launch.json: add dev server configurations for the repo
@itomek itomek added this pull request to the merge queue May 11, 2026
Merged via the queue into main with commit e42c0b4 May 11, 2026
25 checks passed
@itomek itomek deleted the tmi/hopeful-hermann-47f949 branch May 11, 2026 15:58
@itomek itomek mentioned this pull request May 14, 2026
6 tasks
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request May 15, 2026
## Why this matters

v0.18.0 ships agent memory v2 (hybrid-search second brain with LLM
extraction and observability dashboard), ChatAgent split into three
composable agents (Chat/FileIO/DocumentQA), parallel tool calls, and a
Telegram adapter scaffold — plus fixes the RAG-on-PDF timeout with Gemma
4 that broke document Q&A since v0.17.6 and adds CI gates that enforce
RAG quality baselines on every future PR.

Full notes: `docs/releases/v0.18.0.mdx`.

## What's New

- **Agent memory v2** ([amd#606](amd#606)) —
Hybrid semantic + keyword search, LLM extraction, observability
dashboard via SSE streaming
([amd#1032](amd#1032)). Per-user isolation
enforced; extraction runs async so it doesn't add latency.
- **ChatAgent split** ([amd#979](amd#979)) —
`ChatAgent`, `FileIOAgent`, and `DocumentQAAgent` replace the monolithic
class; each composable via `tools=`. Backward-compatible shim preserved.
- **Parallel tool calls** ([amd#946](amd#946))
— Multiple `tool_calls` from a single LLM turn are executed
concurrently, cutting round-trips for multi-tool workflows.
- **Telegram adapter scaffold, Phase 0**
([amd#951](amd#951)) — `gaia telegram
start|stop|status`, per-user session isolation, `[telegram]` extras.
Phase 1 (message handling + allowed-users gate) tracked in
[amd#889](amd#889).
- **Connectors: per-MCP toggle + single-writer enforcement**
([amd#1018](amd#1018),
[amd#998](amd#998)) — Disable individual MCP
servers without removing them; concurrent writes serialised with
actionable errors on contention.
- **File navigation, web browsing, and write security**
([amd#495](amd#495)) — `FileSearchToolsMixin`,
web browsing tool, and scratchpad mixin in `KNOWN_TOOLS`; write tools
check `allowed_paths` before dispatch.
- **Email UI and policy alerts**
([amd#995](amd#995),
[amd#1039](amd#1039),
[amd#952](amd#952)) — Pre-scan triage card,
in-chat Connect, policy alert cards, and durable receipts for
confirmation-gated actions.

## Bug Fixes

- **RAG-on-PDF timeouts on Gemma 4**
([amd#1034](amd#1034), closes
[amd#1030](amd#1030)) — Prompt-size budget
check added at composition time; CI gates enforce it on every PR
([amd#1040](amd#1040)).
- **Envelope-level parse failure crashed SD recovery**
([amd#1047](amd#1047), closes
[amd#1023](amd#1023)) — Falls through to a
clean recovery path with step-1 context preserved.
- **Windows-path tool args corrupted**
([amd#1027](amd#1027)) — Backslash
normalisation now happens after argument parsing.
- **Blender `send_command` hung**
([amd#1026](amd#1026), closes
[amd#1022](amd#1022)) — Read timeout applied
to persistent-connection servers.
- **`gaia chat init` in post-install banner**
([amd#1029](amd#1029), closes
[amd#1024](amd#1024)) — Replaced with the
correct `gaia init`.
- **Keyring treated as required**
([amd#1028](amd#1028)) — Import guarded;
optional on systems without `keyring`.
- **electron-builder URLs stale**
([amd#953](amd#953)) — Three doc/installer
files updated to current download paths.

## Tooling & Docs

- **RAG eval CI gates** ([amd#1040](amd#1040),
closes [amd#1033](amd#1033)) — RAG quality
baselines + prompt-size budget enforced on every PR.
- **Fork-PR authors now receive Claude review**
([amd#932](amd#932)) —
`allowed_non_write_users: "*"` with prompt-injection mitigations
documented.
- **Eval runs mandated before merging**
([amd#1036](amd#1036)) — `CLAUDE.md` requires
`gaia eval agent` for LLM-affecting changes.
- **GAIA website** ([amd#369](amd#369)) —
[amd-gaia.ai](https://amd-gaia.ai) live.
- **Custom agent guide reorganised**
([amd#997](amd#997)), Lemonade PPA docs
([amd#801](amd#801)), broken Lemonade CLI URL
fixed ([amd#996](amd#996)), WhatsApp adapter
evaluation spec ([amd#950](amd#950)).

## Release checklist

- [x] `util/validate_release_notes.py docs/releases/v0.18.0.mdx --tag
v0.18.0` passes
- [x] `src/gaia/version.py` → `0.18.0`
- [x] `src/gaia/apps/webui/package.json` → `0.18.0`
- [x] Navbar label in `docs/docs.json` → `v0.18.0 · Lemonade 10.2.0`
- [x] All 28 commits in range (v0.17.6..HEAD) are represented in the
notes
- [ ] Review from @kovtcharov-amd addressed
antmikinka pushed a commit to antmikinka/gaia that referenced this pull request May 28, 2026
…ion (amd#1228)

## Summary

`.claude/launch.json` was a dangling symlink for every contributor
except the original author — the dev-server launch config added in amd#1039
only worked on one machine. Replaced with a real in-repo file.

## Why

The symlink target `../../../../.claude/launch.json` resolves to
`~/.claude/launch.json` on the original author's machine, but escapes
the repository root. On any other clone the relative path resolves four
directories above `.claude/` — a broken, nonexistent target. The five
GAIA dev-server configs (Agent UI, FastAPI backend, Vite hot-reload, API
server, MCP bridge) were silently non-functional for every other
contributor.

## Linked issue

Refs amd#1039 (no standalone issue; corrects a side-effect of that PR's
launch config addition)

## Changes

- Replaced `.claude/launch.json` symlink (mode 120000, target
`../../../../.claude/launch.json`) with a regular file (mode 100644)
containing the five GAIA dev-server configs inline — content identical
to what the symlink resolved to on the original machine.

## Test plan

- [ ] `git show HEAD:.claude/launch.json | head -3` outputs `{` —
confirms a regular file, not a symlink blob
- [ ] `preview_start "Agent UI backend only (FastAPI, no frontend)"`
starts uvicorn on port 4200 with no errors
- [ ] `curl http://127.0.0.1:4200/` returns HTTP 200
- [ ] On a fresh clone (or with no `~/.claude/launch.json`),
`.claude/launch.json` is readable without a dangling symlink

## Checklist

- [x] I have linked a GitHub issue above (`Refs amd#1039`).
- [x] I have described **why** this change is being made, not just what
changed.
- [x] I have run linting and tests locally — JSON-only typechange, no
code affected.
- [x] I have updated documentation if user-visible behavior changed — no
user-visible change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

electron Electron app changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): chat header action icons stack vertically when window is narrow

2 participants