Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

The LinkedIn counterpart card, a chat that knows where you are, and Zero's mark retired

merged#2748CedarCopilot

CedarCopilot wants to merge 3 commits into staging from feat/inbox-client-composed-feed

Live on prod since Thu, 2 of 4 behaviors workingTimeline and evidence
  1. Opened
    Sep 9, 2026, 11:33 PM
  2. Merged
    Sep 10, 2026, 7:33 AM
  3. Live on prod
    Sep 10, 2026, 7:33 AM
  4. Observed 2 days
    Sep 10, 2026, 7:33 AM
  5. Pipelines steady after this deploy
    Sep 10, 2026, 7:33 AM
  6. Sep 10, 2026, 4:29 PM
  7. Verified

    Live on prod since Thu, 2 of 4 behaviors working

    Sep 12, 2026, 2:52 PM

Behaviors Libra is checking

The mail list's search filter is synchronized from the URL at the mail-page level, so navigating away or removing `?search` clears stale search state even when the search input is unmounted.Workingmedium confidence

Since the deploy, 32 prod OTEL spans matching /mail via use-search-query-sync and mail.listThreads ran with 0 error spans. In the 55h before the deploy the same surface ran 16 OTEL spans with 0 error spans. Confidence is medium because the surface was already clean before the.

prod, checked Sep 12, 2026, 1:50 PM
The mail list continues loading when a page has zero items but includes a next-page cursor, instead of showing the inbox-zero state and stopping before later matching threads are fetched.Workingmedium confidence

Since the deploy, 52 prod OTEL spans matching MailList / mail.listThreads ran with 0 error spans across at least 4 identified users. In the 55h before the deploy the same surface ran 32 OTEL spans with 0 error spans. Confidence is medium because the surface was already clean.

prod, checked Sep 12, 2026, 1:50 PM
The inherited `zero` sign-in provider displays Cedar's green frond logo in both light and dark themes instead of Zero's black or white mark.Inconclusivelow confidence

Verification reached its budget before a verdict.

prod, checked Sep 12, 2026, 12:52 PM
DatePickerWithNaturalInput can be mounted with a caller-controlled open state and reports open or close changes while preserving uncontrolled trigger behavior for existing callers.Inconclusivemedium confidence

Since deployment, telemetry shows 5 successful `crm.updateConversation` calls and 0 explicitly tied failures; `crm.upsertWorkingMemory` had 0 observed calls. However, these shared mutation calls cannot establish that the table-cell date-picker popover mounted open, stayed.

prod, checked Sep 12, 2026, 2:52 PM

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

Summary

The bulk of this branch is a LinkedIn counterpart profile , knowing who you are talking to before you write to them , built up over several phases, plus a set of surrounding fixes.

LinkedIn counterpart profile

  • A place to store a profile we already paid for, so the same person is never bought twice.
  • Ask how much credit is left without spending one to find out.
  • The free view for everyone, and one paid view when it is affordable.
  • The card itself: current role, past history, recent posts, company marks.
  • A LinkedIn mark on the profile link (blue at rest), and a refresh you control.
  • Posts refresh daily rather than weekly.

Chat

  • The agent you are in, and the file you are reading, are now context.
  • The channel-chat panel leads with who you are talking to.
  • Every channel chat gets an artifact and an address.
  • The ticket store is gone; three restore paths collapse into one.

Elsewhere

  • Files gets a Deleted section, reachable from the search row.
  • Tables get a bound cell you can edit, and a link that lives on the column.
  • formatRelativeDate says "3h ago" rather than "Today" for everyone west of UTC.
  • A search that leaves the screen stops filtering the list.
  • Sidebar chat rows say they are clickable before you click them.
  • Zero's pixel-block mark is deleted, with pnpm check:brand in precommit to keep it out. It matches the path data, not just filenames, so recolouring or renaming the glyph does not get it past.

Test plan

pnpm run autofix:local , brand check, oxlint --deny-warnings, deps:check, paraglide compile, Jest, the timezone suite, and server Vitest.

  • Jest: 4,229 passed (443 suites)
  • Timezone suite: 5 passed
  • Server Vitest: 11,664 passed, 149 skipped
  • oxlint / deps:check / brand check: clean

One known flake, not from this branch: token-refresh.test.ts > coalesces N concurrent resolves of one entry into a single grant fails intermittently under full-suite parallel load (it lost its coalescing window and saw 2 grants instead of 1). It passes in isolation, and the file is untouched by this branch , it belongs to staging via 34b7d0807 / b3575de16.

🤖 Generated with Claude Code

Greptile Summary

This PR adds a cache-backed LinkedIn counterpart profile, expands live chat context and deferred approvals, introduces editable CRM-bound table cells, adds file collections and restore UI, fixes mail search/paging and relative dates, and retires legacy brand assets.

  • The LinkedIn profile implementation currently has cross-tenant cache-key and seat-selection defects, plus a budget skip that cannot recover automatically after the daily window resets.
  • Bound-table bulk edits can issue conflicting concurrent writes against one conversation.
  • The new Shared files query exposes private peer-owned document previews, while some Deleted rows cannot actually be restored.
  • Search lifetime, empty-page pagination, timezone coverage, channel artifacts, and brand enforcement receive focused regression tests.

Confidence Score: 0/5

This PR is not safe to merge until the LinkedIn tenant and seat boundaries, private file listing, and conflicting bound-cell write behavior are corrected.

The current implementation can mix LinkedIn cache state across organizations, spend another user’s LinkedIn quota, disclose previews of private peer-owned documents, permanently strand budget-blocked profiles, and partially apply multi-cell CRM edits.

Files Needing Attention: apps/server/src/db/migrations/linkedin_person_profiles.sql, apps/server/src/services/integrations/linkedin/person-profile.ts, apps/server/src/services/integrations/linkedin/person-profile-refresh.ts, apps/mail/modules/linkedin/hooks/use-counterpart-profile.ts, apps/mail/modules/documents/table/use-grid-commands.ts, apps/server/src/trpc/routes/documents.ts

Security Review

Three secu

Show production surfaces and changed-file mapping

Production surfaces

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

Changed files → surfaces

  • .github/workflows/ci.ymlno production surface mapped
  • CLAUDE.mdno production surface mapped
  • apps/mail/app/(auth)/login/login-client.tsxno production surface mapped
  • apps/mail/components/ui/date-picker-with-natural-input.tsxno production surface mapped
  • apps/mail/components/ui/search-input.tsxno production surface mapped
  • apps/mail/docs/bug-email-tab-shows-few-threads.mdno production surface mapped
  • apps/mail/docs/graph-documents.mdno production surface mapped
  • apps/mail/docs/linkedin-counterpart-profile.mdno production surface mapped
  • apps/mail/docs/optimistic-files.mdno production surface mapped
  • apps/mail/docs/table-documents.mdno production surface mapped
  • apps/mail/docs/wiki/table-grid.mdno production surface mapped
  • apps/mail/jest.config.cjsno production surface mapped
  • apps/mail/jest.tz.config.cjsno production surface mapped
  • apps/mail/modules/agents/__tests__/AgentFileBrowserSelection.test.tsxno production surface mapped
  • apps/mail/modules/agents/components/AgentView.tsxno production surface mapped
  • apps/mail/modules/agents/hooks/use-open-agent-context.tsno production surface mapped
  • apps/mail/modules/cedar-os/__tests__/chatComponents/ProposedMutationRenderer.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/EmbeddedCedarChat.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/cedar-os-components/chatComponents/EmptyStateSuggestions.tsxno 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/chatInput/ContextBadgeRow.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/store/agentContext/agentContextSlice.tsno production surface mapped
  • apps/mail/modules/cedar-os/src/store/messages/renderers/ProposedCalendarEventRenderer.tsxno production surface mapped
  • apps/mail/modules/cedar-os/src/store/messages/renderers/ProposedMutationRenderer.tsxno production surface mapped
  • apps/mail/modules/company/components/CompanyExplorer.tsxno production surface mapped
  • apps/mail/modules/conversations/components/LeftSidebarContent.tsxno production surface mapped
  • apps/mail/modules/conversations/components/OverviewDocTab.tsxno production surface mapped
  • apps/mail/modules/conversations/components/ThreadContextCards.tsxno production surface mapped
  • apps/mail/modules/conversations/components/files/optimistic-files.tsno production surface mapped
  • apps/mail/modules/conversations/hooks/use-conversation-body.tsno production surface mapped
  • apps/mail/modules/crm/utils/time.tsno production surface mapped
  • apps/mail/modules/documents/full-bleed-doc-types.tsno production surface mapped
  • apps/mail/modules/documents/table/BoundCellEditors.tsxno production surface mapped
  • apps/mail/modules/documents/table/CellDisplay.tsxno production surface mapped
  • apps/mail/modules/documents/table/TableColumnMenu.tsxno production surface mapped
  • apps/mail/modules/documents/table/TableGrid.tsxno production surface mapped
  • apps/mail/modules/documents/table/TableRow.tsxno production surface mapped
  • apps/mail/modules/documents/table/bound-writes.tsno production surface mapped
  • apps/mail/modules/documents/table/use-bound-cell-write.tsno production surface mapped
  • apps/mail/modules/documents/table/use-grid-commands.tsno production surface mapped
  • apps/mail/modules/documents/use-active-doc-context.tsno production surface mapped
  • apps/mail/modules/files/components/FileBrowser.tsxno production surface mapped
  • apps/mail/modules/files/components/FileExplorerTabs.tsxno production surface mapped
  • apps/mail/modules/files/components/FileViewList.tsxno production surface mapped
  • apps/mail/modules/files/components/FileViewMenu.tsxno production surface mapped
  • apps/mail/modules/files/components/list/FileList.tsxno production surface mapped
  • apps/mail/modules/files/fileViews.tsno production surface mapped
  • apps/mail/modules/home/components/FileArtifactPanel.tsxno production surface mapped
  • apps/mail/modules/inbox/hooks/use-open-channel-item.tsno production surface mapped
  • apps/mail/modules/linkedin/components/LinkedInCounterpartCard.tsxno production surface mapped
  • apps/mail/modules/linkedin/hooks/use-counterpart-profile.tsno production surface mapped
  • apps/mail/modules/linkedin/index.tsno production surface mapped
  • apps/mail/modules/reports/components/ReportsView.tsxno production surface mapped
  • apps/mail/modules/threads/hooks/use-search-query-sync.tsno production surface mapped
  • apps/mail/modules/threads/mail.tsxno production surface mapped
  • apps/mail/modules/threads/threadList/components/mail-list.tsxno production surface mapped
  • apps/mail/modules/ux/layout/LayoutUrlSync.tsxno production surface mapped
  • apps/mail/modules/ux/layout/selectChannelChat.tsno production surface mapped
  • apps/mail/package.jsonno production surface mapped
  • apps/mail/public/ai.svgno production surface mapped
  • apps/mail/public/black-icon.svgno production surface mapped
  • apps/mail/public/white-icon.svgno production surface mapped
  • apps/mail/tests/modules/chat-store/ambientTrim.test.tsxno production surface mapped
  • apps/mail/tests/modules/chat-store/channelContext.test.tsxno production surface mapped
  • apps/mail/tests/modules/chat-store/openAgentAndFileContext.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/conversationBackFromFile.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabAttached.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabDeepLink.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabDrive.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabHarness.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabOptimistic.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabSelection.test.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/filesTabTree.test.tsxno production surface mapped
  • apps/mail/tests/modules/crm/utils/format-relative-date.test.tsno production surface mapped
  • apps/mail/tests/modules/documents/table/BoundColumns.test.tsxno production surface mapped
  • apps/mail/tests/modules/documents/table/LinkedColumns.test.tsxno production surface mapped
  • apps/mail/tests/modules/documents/table/bound-writes.test.tsno production surface mapped
  • apps/mail/tests/modules/documents/table/trpc-stub.tsno production surface mapped
  • apps/mail/tests/modules/files/FileViewList.test.tsxno production surface mapped
  • apps/mail/tests/modules/inbox/openChannelItem.test.tsxno production surface mapped
  • apps/mail/tests/modules/linkedin/LinkedInCounterpartCard.test.tsxno production surface mapped
  • apps/mail/tests/modules/threads/emptyPageKeepsPaging.test.tsxno production surface mapped
  • apps/mail/tests/modules/threads/searchFilterLifetime.test.tsxno production surface mapped
  • apps/mail/tests/modules/ux/layout/selectChannelChat.test.tsno production surface mapped
  • apps/mail/tests/timezone/format-relative-date.test.tsno production surface mapped
  • apps/server/docs/design/reversible-writes-and-approval.mdno production surface mapped
  • apps/server/docs/relationship-graph-and-warm-intros.mdno production surface mapped
  • apps/server/docs/warp-agent-build-plan.mdno production surface mapped
  • apps/server/docs/warp-thiago-crm-automation-asks.mdno production surface mapped
  • apps/server/docs/weekly-product-intelligence-agent.mdno production surface mapped
  • apps/server/docs/wiki/approval-and-reversibility.mdno production surface mapped
  • apps/server/docs/wiki/linkedin-counterpart-profile.mdno production surface mapped
  • apps/server/docs/wiki/linkedin-rate-window-bucketing.mdno production surface mapped
  • apps/server/package.jsonno production surface mapped
  • apps/server/src/crm-admin/cli.tsno production surface mapped
  • apps/server/src/db/migrations/linkedin_person_profiles.sqlno production surface mapped
  • apps/server/src/db/outbound-schema.tsno production surface mapped
  • apps/server/src/mastra/context/values.tsno production surface mapped
  • apps/server/src/mastra/routeHandlers/chat/handleChat.tsno production surface mapped
  • apps/server/src/mastra/tools/config/__tests__/config-propagate-tool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/conversation/__tests__/createConversationEvent-paste.test.tsno production surface mapped
  • apps/server/src/mastra/tools/conversation/__tests__/updateConversationFieldsTool.test.tsno production surface mapped
  • apps/server/src/mastra/tools/document/__tests__/documentTool.delete.integration.test.tsno production surface mapped
  • apps/server/src/mastra/tools/document/tableTool.tsno production surface mapped
  • apps/server/src/mastra/types/chat-context.tsno production surface mapped
  • apps/server/src/mastra/utils/__tests__/approval.test.tsno production surface mapped
  • apps/server/src/mastra/utils/approval.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/__tests__/apply-pending-mutation-agentid.test.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/chat-workflow.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/harness/__tests__/request-context.test.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/harness/mcp-server.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/harness/request-context.tsno production surface mapped
  • apps/server/src/mastra/workflows/chat/run-chat-agent-sdk.tsno production surface mapped
  • apps/server/src/outbound/cli.tsno production surface mapped
  • apps/server/src/services/chat/pending-mutations.tsno production surface mapped
  • apps/server/src/services/documents/table/__tests__/table-bindings.test.tsno production surface mapped
  • apps/server/src/services/documents/table/__tests__/table-list-bindings.test.tsno production surface mapped
  • apps/server/src/services/documents/table/table-binding-paths.tsno production surface mapped
  • apps/server/src/services/documents/table/table-bindings.tsno production surface mapped
  • apps/server/src/services/documents/table/table-fill.tsno production surface mapped
  • apps/server/src/services/documents/table/table-source-queries.tsno production surface mapped
  • apps/server/src/services/file-system/index.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/__test__/person-profile.read.test.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/__test__/person-profile.refresh.test.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/__test__/person-profile.rules.test.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/__test__/send-governor.test.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/governor.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/messaging.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/person-profile-refresh.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/person-profile.tsno production surface mapped
  • apps/server/src/services/integrations/linkedin/unipile-client.tsno production surface mapped
  • apps/server/src/trpc/routes/__tests__/files-restore-node.test.tsno production surface mapped
  • apps/server/src/trpc/routes/__tests__/files-router-permission-request.test.tsno production surface mapped
  • apps/server/src/trpc/routes/admin-documents.tsno production surface mapped
  • apps/server/src/trpc/routes/chat.tsno production surface mapped
  • apps/server/src/trpc/routes/documents.tsno production surface mapped
  • apps/server/src/trpc/routes/files.tsno production surface mapped
  • apps/server/src/trpc/routes/linkedin.tsno production surface mapped
  • package.jsonno production surface mapped
  • scripts/check-brand-assets.mjsno production surface mapped