Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(chat): render a pill for a table the agent just created

merged#2902CedarCopilot

CedarCopilot wants to merge 1 commit into staging from fix/table-tool-result-pill

Customer behavior verdict

Libra could not exercise the changed behavior yet: it ran a scenario for this change but could not get a result it trusts, and will regenerate the scenario on a coming run.

  • Incomplete table results remain non-openable: Libra could not tell on this PR.
Live on prod, watching, 1 day leftTimeline and evidence
  1. Opened
    Sep 23, 2026, 2:08 AM
  2. Merged
    Sep 23, 2026, 2:11 AM
  3. Live on staging
    Sep 23, 2026, 2:11 AM
  4. Live on prod
    Sep 23, 2026, 2:11 AM
  5. Observed 0 hours
    Sep 23, 2026, 2:11 AM
  6. Watching

    Live on prod, watching, 1 day left

    Sep 23, 2026, 2:11 AM
  7. Pipelines steady after this deploy
    Sep 23, 2026, 2:11 AM
  8. Pipelines steady after this deploy
    Sep 23, 2026, 2:11 AM
  9. Sep 23, 2026, 2:20 AM

Behaviors Libra is checking

When the agent successfully creates or imports a table, the chat renders a table context pill/card with the existing table-aware summary and an Open action.Inconclusivelow confidence

Verification reached its budget before a verdict.

staging, checked Sep 24, 2026, 5:12 PM
Failed table operations and table results missing a document identifier do not render an invalid or unusable table pill.Inconclusivelow confidence

Verification reached its budget before a verdict.

staging, checked Sep 24, 2026, 5:13 PM
Table mutations on an already-open table, including set, add_rows, and fill, do not add a redundant context pill to the chat.Inconclusivelow confidence

Verification reached its budget before a verdict.

staging, checked Sep 24, 2026, 6:13 PM
After a successful table create or import, the agent message displays an Open-capable table pill, while updates to existing tables do not create a redundant pill.Not checked
prod

Libra has verdicts on 0 of 1 tracked behaviors on prod; 1 is still being checked. Libra checks hourly for 3 days after each deploy.

Summary

  • toolResultMessageRenderer only rendered an inline pill for write-document and board's create_board , the table tool (id: 'table') had no branch and fell through to null, so a table created via the tool never got a clickable pill in the transcript (it showed as plain text / a raw link instead).
  • Adds a table branch, gated to create/import (the same actions attachTableToThread in tableTool.ts uses to file the context chip), adapting the tool's flat {success, documentId, path} result into write-document's shape and reusing WriteDocumentResultRenderer rather than duplicating its table-aware open/summary logic.

Test plan

  • pnpm --filter @zero/mail run types , no errors in the changed file or new symbols (remaining errors are pre-existing generated-artifact gaps , paraglide i18n / React Router +types , in a fresh checkout with no dev/build run yet, unrelated to this change).
  • Manually create a table via chat and confirm the transcript shows a clickable pill instead of plain text.

🤖 Generated with Claude Code

RetriggerConfidence Score: 4/5

The implementation appears safe to merge, with focused renderer regression coverage recommended as a non-blocking follow-up.

Findings

  1. P2 Table renderer lacks coverage ▶
Fix with agent prompt
### Issue 1
apps/mail/modules/cedar-os/src/components/renderers/messageRenderers.tsx:349
The new table-specific renderer has no focused client test, leaving its action filtering, result-shape adaptation, and dispatch from `toolResultMessageRenderer` unprotected. The existing table card test exercises `write-document`, not this new `table` tool-result path, so the same kind of missing dispatch that caused the original regression could recur unnoticed. Please add coverage for successful `create` and `import` results, plus failed or non-creating actions that should render nothing.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR adds transcript rendering for successful table creation and import results by adapting the table tool’s output to the existing document-result renderer.

  • Validates table action and result data at runtime with Zod.
  • Reuses the existing table-aware open and summary behavior.
  • Limits pills to successful create and import actions.

Reviews (1) · Last reviewed commit: "fix(chat): render a pill for a table the..."

Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • apps/mail/modules/cedar-os/src/components/renderers/messageRenderers.tsxno production surface mapped