Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(crm): json cell editor must not coerce a null key to "" on blur

merged#2559CedarCopilot

CedarCopilot wants to merge 1 commit into staging from fix/json-cell-null-coerce

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 23, 2026, 10:07 PM
  2. Aug 23, 2026, 10:09 PM
  3. Merged
    Aug 23, 2026, 10:16 PM
  4. Live on prod
    Aug 23, 2026, 10:16 PM
  5. Observed 40 hours
    Aug 23, 2026, 10:16 PM
  6. Pipelines steady after this deploy
    Aug 23, 2026, 10:16 PM
  7. Unobserved

    Live on prod, no production signal yet

    Aug 25, 2026, 1:55 PM

Behaviors Libra is checking

CRM integration behavior from components/crm-cell.tsx keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 87 prod failure log lines for [UpdateExternalCrmWorkflow] Driver update failed (Step updateOpportunityField failed: HTTP 400: [{\), but this domain-wide failure family is not tied to this intent.

prod, checked Aug 25, 2026, 1:55 PM

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.

What

Follow-up to #2550. The json custom-field cell editor coerced a top-level null key to "" on a plain blur (no edit).

Fix

apps/mail/modules/crm/components/crm-cell.tsx , in commitKey, skip the write when the input value matches the original's display (with null/undefined shown as '', matching the Input's defaultValue). A blur with no edit is now a no-op, so a null key stays null instead of becoming "", and unchanged values are no longer re-committed redundantly.

Server-side this was already safe (the deep-merge preserves omitted keys), but the editor should not manufacture a semantic change from focus alone. @zero/mail types clean.

🤖 Generated with Claude Code

Greptile Summary

The PR prevents the JSON custom-field editor from committing unchanged primitive values on blur, preserving null instead of coercing it to an empty string.

  • Compares the raw input against the original value’s displayed representation before committing.
  • Continues to leave nested objects and arrays unchanged.

Confidence Score: 5/5

The PR appears safe to merge, with the unchanged-blur guard matching the input’s display normalization.

The changed comparison preserves null values on plain blur while still committing actual primitive edits and retaining the existing protection for nested objects and arrays.

Important Files Changed

FilenameOverview
apps/mail/modules/crm/components/crm-cell.tsxAdds a consistent no-op check to JsonFieldCell.commitKey; no actionable defect was identified.

Reviews (1): Last reviewed commit: "fix(crm): json cell editor must not coer..." | Re-trigger Greptile

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/crm/components/crm-cell.tsxno production surface mapped