Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(mail): hide background (sub-event taxonomy) fields from conversation field UI

merged#2379CedarCopilot

CedarCopilot wants to merge 0 commits into staging from fix/hide-background-fields-frontend

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 2, 2026, 1:41 PM
  2. Merged
    Aug 2, 2026, 2:18 PM
  3. Live on prod
    Aug 2, 2026, 2:18 PM
  4. Observed 2 days
    Aug 2, 2026, 2:18 PM
  5. Pipelines steady after this deploy
    Aug 2, 2026, 2:18 PM
  6. Unobserved

    Live on prod, no production signal yet

    Aug 5, 2026, 3:31 AM

Behaviors Libra is checking

Shared conversation field renderers ignore background custom fields so configured field lookups cannot surface sub-event taxonomy fields.Inconclusivelow confidence

OTEL fallback found no prod spans matching useConversationFieldRenderers since deploy.

prod, checked Aug 4, 2026, 9:33 PM
Conversation overview cards no longer render or resolve configured fields whose custom field definition has background set to true.Inconclusivelow confidence

Verification reached its 130s outer budget before the verifier returned. Libra is keeping this intent verifying until the next check.

prod, checked Aug 4, 2026, 10:33 PM
Strategic overview sections exclude background custom fields while still applying fallback strategic field definitions for normal fields.Inconclusivelow confidence

OTEL fallback found no prod spans matching StrategicOverviewTab since deploy.

prod, checked Aug 4, 2026, 10:35 PM
The working-memory card excludes background custom fields from editable rows whenever the conversation AOP schema is available.Inconclusivelow confidence

OTEL fallback found no prod spans matching WorkingMemoryCard since deploy.

prod, checked Aug 4, 2026, 11:32 PM
The working-memory card still hides known background field values when the conversation AOP schema is unavailable by using background field IDs collected across known AOPs.Inconclusivelow confidence

OTEL fallback found no prod spans matching WorkingMemoryCard since deploy.

prod, checked Aug 4, 2026, 11:33 PM
Sidebar column and filter configuration excludes background custom fields from the available working-memory columns.Inconclusivelow confidence

OTEL fallback found no prod spans matching useSidebarAllColumns since deploy.

prod, checked Aug 5, 2026, 12:33 AM

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

Problem

Org custom fields flagged background === true are internal sub-event taxonomy "moments" (discovery questions, objections, MEDDPICC signals) extracted purely for analysis. They are supposed to be hidden from users, but no frontend path filtered them out, so they leaked into every user-facing field surface.

An audit of apps/mail found the flag is background (not isBackground , that's an unrelated aop_agents concept), and that zero normal display paths excluded it. The only place touching the flag was IntelligenceFieldsEditor, which does the inverse (keeps only background fields , it's the taxonomy editor).

Leak sites fixed:

  • CRM table columns (use-crm-configuration)
  • Canvas columns + sort/filter defs (use-canvas-configuration)
  • Sidebar columns + merged defs (use-sidebar-all-columns)
  • Virtualized row cells (VirtualizedTableRow)
  • Group-by picker (SidebarGroupByPicker)
  • CRM field-mapping options (extractCustomFieldsFromAOPs)
  • Conversation overview grid / showAllFields + configured lookups (ConversationOverviewCard, conversationFieldRenderers)
  • Strategic overview sections (StrategicOverviewTab)
  • Working-memory editable rows (workingMemoryCard)

Fix

Centralized in a single shared helper , getVisibleFieldDefinitions (in apps/mail/modules/crm/utils/background-fields.ts), mirroring the server's pickBackgroundFields. Every display consumer of aop.customFieldDefinitions now routes through it.

  • The filter is applied at the display consumers, not at the aopSlice/useAOPs origin, because the taxonomy editor (IntelligenceFieldsEditor) and admin/field editors legitimately need to see background fields.
  • Also declares background?: boolean on the frontend CustomFieldDefinition type, which previously omitted the flag even though it exists at runtime (via RouterOutputs).

Scope

Intentionally not touched: IntelligenceFieldsEditor (the dedicated taxonomy editor) and admin/field-config editors , power-user surfaces that should still see background fields.

Verification

  • apps/mail typecheck: zero net-new errors vs. staging baseline (compared full sorted error sets; the only diffs in touched files are pre-existing errors whose line numbers shifted by the lines added).
  • Thermo-review: APPROVED WITH NITS (one negligible double-getVisibleFieldDefinitions call in two memoized column hooks; consistency of the single helper preferred over an inline guard).

šŸ¤– Generated with Claude Code

Greptile Summary

This PR centralizes filtering of background taxonomy fields and applies it across conversation, CRM, canvas, sidebar, mapping, and strategic-overview surfaces.

  • Adds getVisibleFieldDefinitions and the frontend background field type
  • Routes user-facing field-definition enumeration through the shared visibility helper
  • Leaves the working-memory fallback path unfiltered while AOP metadata is unavailable

Confidence Score: 4/5

The working-memory visibility gap should be fixed before merging because internal background values remain reachable whenever AOP metadata is unavailable.

Most display consumers consistently filter field definitions, but WorkingMemoryCard deliberately falls back to the complete custom-field array during AOP loading or lookup failure and renders those entries as editable inputs.

Files Needing Attention: apps/mail/modules/conversations/components/workingMemoryCard.tsx

Important Files Changed

FilenameOverview
apps/mail/modules/crm/utils/background-fields.tsIntroduces a straightforward strict-boolean filter that preserves visible field definitions.
apps/mail/modules/conversations/components/workingMemoryCard.tsxFilters background fields only after AOP metadata resolves, leaving loading and failed-lookup states exposed.
apps/mail/modules/conversations/components/
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/conversations/components/ConversationOverviewCard.tsxno production surface mapped
  • apps/mail/modules/conversations/components/conversationFieldRenderers.tsxno production surface mapped
  • apps/mail/modules/conversations/components/strategicOverview/StrategicOverviewTab.tsxno production surface mapped
  • apps/mail/modules/conversations/components/workingMemoryCard.tsxno production surface mapped
  • apps/mail/modules/conversationsPage/components/SidebarGroupByPicker.tsxno production surface mapped
  • apps/mail/modules/conversationsPage/hooks/use-sidebar-all-columns.tsno production surface mapped
  • apps/mail/modules/crm/components/VirtualizedTableRow.tsxno production surface mapped
  • apps/mail/modules/crm/hooks/use-canvas-configuration.tsno production surface mapped
  • apps/mail/modules/crm/hooks/use-crm-configuration.tsno production surface mapped
  • apps/mail/modules/crm/types/index.tsno production surface mapped
  • apps/mail/modules/crm/utils/background-fields.tsno production surface mapped
  • apps/mail/modules/crm/utils/index.tsno production surface mapped