Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(inbox/tasks): make Important mean Important, open every chat from anywhere, and close the tasks a send completed

merged#2604CedarCopilot

CedarCopilot wants to merge 5 commits into staging from fix/skip-agent-runs-for-warmup-traffic

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 27, 2026, 9:24 AM
  2. Aug 27, 2026, 8:20 PM
  3. Merged
    Aug 27, 2026, 8:24 PM
  4. Live on prod
    Aug 27, 2026, 8:24 PM
  5. Observed 2 days
    Aug 27, 2026, 8:24 PM
  6. Pipelines steady after this deploy
    Aug 27, 2026, 8:24 PM
  7. Unobserved

    Live on prod, no production signal yet

    Aug 30, 2026, 1:19 PM

Behaviors Libra is checking

Background jobs behavior from runtime/worker-entry.ts keeps working in prod.Inconclusivelow confidence

OTEL fallback saw 160,224 prod spans for the repo/env since deploy, but 3,483 were errors and the intent has no concrete surface to attribute them to.

prod, checked Aug 30, 2026, 11:19 AM
Calendar sync behavior from calendar/calendarUtils.ts, components/CalendarView.tsx, components/DayColumn.tsx keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 19 prod failure log lines for [SCHEDULED] Failed to enrich unenriched calendar event (Failed query: insert into \), but this domain-wide failure family is not tied to this intent.

prod, checked Aug 30, 2026, 11:19 AM
Chat workflow behavior from conversation-inbox/ConversationInboxLayout.tsx, event-execution/conversation-action-management.ts keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 1 prod failure log lines for [SUBSCRIPTION] Error setting up Gmail watch (invalid_grant), but this domain-wide failure family is not tied to this intent.

prod, checked Aug 30, 2026, 12:19 PM
CRM integration behavior from crm/conversations.ts keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 6 recent prod failure log lines for [UpdateExternalCrmWorkflow] Driver update failed (fetch failed), but the same failure had 7 log lines in the comparable pre-deploy baseline. Libra is not blaming this PR intent without a post-deploy increase.

prod, checked Aug 30, 2026, 12:19 PM
Email workflow behavior from signature/page.tsx, tasks/layout.tsx, app/entry.client.tsx keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 1 prod failure log lines for [SUBSCRIPTION] Error setting up Gmail watch (invalid_grant), but this domain-wide failure family is not tied to this intent.

prod, checked Aug 30, 2026, 1:19 PM
Slack integration behavior from timeline/SlackBodyRenderer.tsx, composer/SlackMentionTextarea.tsx, components/SlackThreadPanel.tsx keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 3 recent prod failure log lines for [backfillSlackChannelHistory] Backfill failed (Failed query: insert into \), but the same failure had 8 log lines in the comparable pre-deploy baseline. Libra is not blaming this PR intent without a.

prod, checked Aug 30, 2026, 1:19 PM

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

Thirteen fixes across the unibox, the chat artifact surface, the drafting pipeline and the on-event agent. Grouped by what they actually change.

⚠️ Deploy order , read before merging

AXIOM_LOGS_DATASET joins SHARED_OBSERVABILITY_SECRET_FIELDS in aws/lib/runtime-contract.ts. Per that file's own rule, every key there becomes a REQUIRED Secrets Manager field, and ECS refuses to start any task whose task-def declares a secret missing from the JSON.

Add AXIOM_LOGS_DATASET to the Secrets Manager JSON (an empty string is fine) BEFORE this deploys, or api/chat/worker all fail to start. Empty is a valid value , the logger falls back to AXIOM_DATASET, which is today's behaviour.

Inbox scope

/inbox/important?channel=all showed 32 archived Rippling receipts. Two independent bugs, one on each axis of what is really an intersection , "all channels" ∩ "Important".

  • The email half fell back to in:important, which parses to a bare label:IMPORTANT: not "important mail in my inbox" but everything Gmail ever flagged, archive included. The fallback now derives from the same base-label map the segment net uses, so the two paths cannot disagree.
  • The channel half answered the record-lookup miss for the important/other stubs with "this tab has no rule at all", letting every chat source dump its unfiltered stream under a tab whose rule is a Gmail label query they cannot evaluate. They are mail-only by construction now.
  • And the feed was being asked before its scope was known. A disabled react-query reports isLoading: false, so the window before settings resolve read as "loaded" , scopeReady (built on isPending) holds the query instead of asking it wrong.

Artifacts , never a blank screen

Every host hides the whole page behind ActiveViewDisplay while an artifact flag is on, so a branch resolving to null is a blank screen, not a blank panel.

  • Branches take their id from the artifact, not from a second store field that can disagree with the flag , isThreadOpen && !selectedThreadId was exactly how a mention chip blanked it.
  • ArtifactDeadEnd is the floor under all of them.
  • LinkedIn and WhatsApp chats now open like Slack: one isChannelChatOpen flag, one channelChat surface, one ChannelThreadView. A LinkedIn chat set as the artifact used to leave every flag false, so clicking it did nothing at all.
  • New inbox.channelItem reads one container's feed row from anywhere, so a chat opened from a context chip stops rendering its own name over its own id. Authorized by the channel_container_users join.

Drafting

  • One HTML shape, settled once. Over a week of traces draft-email emitted <div> 1594/1594 times while chat save-draft emitted <p> on ~40% of drafts, plus a tail of whole <!DOCTYPE html> documents and self-escaped markup.
  • The second normalize pass no longer eats the blank line above the signature.
  • Signatures keep their geometry: FontSize/FontFamily on TextStyle, and the Notion two-column rule no longer claims a 1x2 signature table that carries its own inline widths.
  • Agent-drafted bodies get browser defaults back under .draft-body , prose is a dead class here and Preflight zeroes every <p> margin.

On-event tasks

next-steps is the only agent that may close a task. As prose the dispatch rule landed at 82%: 173 of 938 outbound sends on deals with an open task skipped it, and 60% of those had a task marked done by hand later. Biggest driver was [⚙ NOT SIGNIFICANT], read as a blanket bail-out (45% skip vs 10%) though it exists to collapse the timeline, not to decide whether work happened.

  • The rules now say what they govern: suppression/purpose-focus/significance govern what you create, never what you close.
  • Direction stops being guessed from the connection's primary address , that called every alias send inbound (104 of 104 on deals with an open task).
  • A deterministic backstop runs only when the
Show production surfaces and changed-file mapping

Production surfaces

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

Changed files → surfaces

  • .env.exampleno production surface mapped
  • apps/mail/app/(routes)/settings/signature/page.tsxno production surface mapped
  • apps/mail/app/(routes)/tasks/layout.tsxno production surface mapped
  • apps/mail/app/entry.client.tsxno production surface mapped
  • apps/mail/app/globals.cssno production surface mapped
  • apps/mail/components/ui/GlobalCanvas.tsxno production surface mapped
  • apps/mail/components/ui/active-view-display.tsxno production surface mapped
  • apps/mail/components/ui/day-divider.tsxno production surface mapped
  • apps/mail/docs/wiki/empty-chat-surface.mdno production surface mapped
  • apps/mail/lib/hotkeys/view-stack-manager.tsxno production surface mapped
  • apps/mail/lib/stale-deploy-reload.tsno production surface mapped
  • apps/mail/modules/calendar/calendarUtils.tsno production surface mapped
  • apps/mail/modules/calendar/components/CalendarView.tsxno production surface mapped
  • apps/mail/modules/calendar/components/DayColumn.tsxno production surface mapped
  • apps/mail/modules/calendar/components/DraggableCalendarEvent.tsxno production surface mapped
  • apps/mail/modules/cedar-os/__tests__/chatInput/ComposerActionButton.test.tsxno production surface mapped
  • apps/mail/modules/cedar-os/__tests__/emptyChatLayout.surfaces.test.tsno production surface mapped
  • apps/mail/modules/cedar-os/src/cedar-os-components/chatComponents/emptyChatLayout.tsno production surface mapped
  • apps/mail/modules/cedar-os/src/cedar-os-components/chatComponents/useOpenContextArtifact.tsno production surface mapped
  • apps/mail/modules/cedar-os/src/cedar-os-components/chatInput/ComposerActionButton.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/components/renderers/DraftBody.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/components/renderers/messageRenderers.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/store/messages/messagesSlice.tsno production surface mapped
  • apps/mail/modules/conversations/components/timeline/ReactionChip.tsxno production surface mapped
  • apps/mail/modules/conversations/components/timeline/SlackBodyRenderer.tsxno production surface mapped
  • apps/mail/modules/conversations/components/timeline/composer/SlackMentionTextarea.tsxno production surface mapped
  • apps/mail/modules/conversations/components/timeline/composer/mention-extension.tsno production surface mapped
  • apps/mail/modules/conversations/components/timeline/emoji-shortcodes.tsno production surface mapped
  • apps/mail/modules/drafting/components/__tests__/table-round-trip.test.tsno production surface mapped
  • apps/mail/modules/drafting/components/extensions.tsno production surface mapped
  • apps/mail/modules/home/components/DisplayArtifactPanel.tsxno production surface mapped
  • apps/mail/modules/inbox/components/ChannelMessageList.tsxno production surface mapped
  • apps/mail/modules/inbox/components/ChannelThreadView.tsxno production surface mapped
  • apps/mail/modules/inbox/components/InboxList.tsxno production surface mapped
  • apps/mail/modules/inbox/components/SlackThreadPanel.tsxno production surface mapped
  • apps/mail/modules/inbox/hooks/use-channel-artifact-item.tsno production surface mapped
  • apps/mail/modules/inbox/hooks/use-inbox-items.tsno production surface mapped
  • apps/mail/modules/inbox/hooks/use-open-channel-item.tsno production surface mapped
  • apps/mail/modules/threads/conversation-inbox/ConversationInboxLayout.tsxno production surface mapped
  • apps/mail/modules/threads/hooks/use-inboxes.tsno production surface mapped
  • apps/mail/modules/threads/mail.tsxno production surface mapped
  • apps/mail/modules/threads/rendering/use-optimistic-actions.tsno production surface mapped
  • apps/mail/modules/threads/thread/components/thread-display.tsxno production surface mapped
  • apps/mail/modules/threads/threadList/store/threadSlice.tsno production surface mapped
  • apps/mail/modules/userTasks/hooks/use-exit-task-execution-on-close.tsno production surface mapped
  • apps/mail/modules/ux/layout/LayoutUrlSync.tsxno production surface mapped
  • apps/mail/modules/ux/layout/layoutTypes.tsno production surface mapped
  • apps/mail/modules/ux/layout/resolveContext.tsno production surface mapped
  • apps/mail/modules/ux/layout/selectEmptyChatSurface.tsno production surface mapped
  • apps/mail/modules/ux/layout/useRouteChatThread.tsno production surface mapped
  • apps/mail/modules/ux/uxSlice.tsno production surface mapped
  • apps/mail/tests/modules/cedar-os/draft-body.test.tsno production surface mapped
  • apps/mail/tests/modules/conversations/emojiShortcodes.test.tsno production surface mapped
  • apps/mail/tests/modules/conversations/slackMentionAutocomplete.test.tsxno production surface mapped
  • apps/mail/tests/modules/home/DisplayArtifactPanel.test.tsxno production surface mapped
  • apps/mail/tests/modules/inbox/channelKeyCollision.test.tsno production surface mapped
  • apps/mail/tests/modules/inbox/feedScopeGate.test.tsxno production surface mapped
  • apps/mail/tests/modules/threads/delete-draft-flow.test.tsxno production surface mapped
  • apps/mail/tests/modules/threads/inboxScopeReady.test.tsxno production surface mapped
  • apps/mail/tests/modules/userTasks/openSlackChannelFromTask.test.tsno production surface mapped
  • apps/mail/tests/modules/ux/activeViewNeverBlank.test.tsxno production surface mapped
  • apps/mail/tests/modules/ux/artifactOpenFlags.test.tsno production surface mapped
  • apps/mail/tests/modules/ux/layout/resolveContext.test.tsno production surface mapped
  • apps/mail/tests/modules/ux/layout/selectEmptyChatSurface.test.tsno production surface mapped
  • apps/mail/tests/modules/ux/layout/useRouteChatThread.noFork.test.tsxno production surface mapped
  • apps/mail/tests/modules/ux/overlayArtifactCoverage.test.tsno production surface mapped
  • apps/server/docs/coaching-rollout-aspire.mdno production surface mapped
  • apps/server/docs/coaching-rollout-runbook.mdno production surface mapped
  • apps/server/docs/inbound-reply-agent.mdno production surface mapped
  • apps/server/src/env.tsno production surface mapped
  • apps/server/src/lib/logging/axiom-logger.tsno production surface mapped
  • apps/server/src/mastra/agents/on-event-orchestrator-agent.tsno production surface mapped
  • apps/server/src/mastra/routeHandlers/event-execution/handleExecuteSyncThread.tsno production surface mapped
  • apps/server/src/mastra/skills/event-execution/conversation-action-management.tsno production surface mapped
  • apps/server/src/mastra/skills/event-execution/event-summarization.tsno production surface mapped
  • apps/server/src/mastra/tools/draft-comms/__tests__/saveDraftTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/draft-comms/saveDraftTool.tsno production surface mapped
  • apps/server/src/mastra/tools/event-execution/onEventExecutionDraftEmailTool.tsno production surface mapped
  • apps/server/src/mastra/workflows/event-execution/__tests__/next-steps-backstop.test.tsno production surface mapped
  • apps/server/src/mastra/workflows/event-execution/on-event-agent-execution-workflow.tsno production surface mapped
  • apps/server/src/runtime/worker-entry.tsno production surface mapped
  • apps/server/src/scripts/publish-aspire-coaching.tsno production surface mapped
  • apps/server/src/services/crm/__tests__/conversations.slack-message-join.test.tsno production surface mapped
  • apps/server/src/services/crm/conversations.tsno production surface mapped
  • apps/server/src/services/drafting/__tests__/normalize-draft-body.test.tsno production surface mapped
  • apps/server/src/services/drafting/drafting.tsno production surface mapped
  • apps/server/src/services/drafting/gmail-format.tsno production surface mapped
  • apps/server/src/services/inbox/__test__/channel-item-db.test.tsno production surface mapped
  • apps/server/src/services/inbox/__tests__/feed-inbox-scope.test.tsno production surface mapped
  • apps/server/src/services/inbox/feed-containers.tsno production surface mapped
  • apps/server/src/services/inbox/feed.tsno production surface mapped
  • apps/server/src/services/mail/inboxes/__tests__/system-split-feed-scope.test.tsno production surface mapped
  • apps/server/src/services/mail/inboxes/inbox-definitions.tsno production surface mapped
  • apps/server/src/services/mail/sync/__tests__/mail-sync-queue.test.tsno production surface mapped
  • apps/server/src/services/mail/sync/operations.tsno production surface mapped
  • apps/server/src/services/mail/sync/queue.tsno production surface mapped
  • apps/server/src/services/monitoring/gmail-rate-limit-report.tsno production surface mapped
  • apps/server/src/trpc/routes/inbox.tsno production surface mapped
  • aws/lib/runtime-contract.tsno production surface mapped
  • aws/scripts/publish-frontend-assets.shno production surface mapped
  • docs/audits/aspire/coaching/aspire-coaching-playbook.mdno production surface mapped
  • docs/audits/aspire/coaching/aspire-demo-plays.mdno production surface mapped