feat(client): use the shared ProposalDiff in the activity undo card (#363 follow-up) #370

Merged
james merged 1 commit from 363-followup-activity-diff into main 2026-06-29 14:16:59 +00:00
Owner

Completes the "both places" intent of #363. That PR extracted a shared <ProposalDiff> and wired it into the chat confirmation card — but the activity undo card (#356/#357) wasn't merged on #363's base, so it still rendered its diff as raw pretty-printed JSON.

Now that both are in:

  • The activity undo card uses <ProposalDiff diff={pending.diff} action={pending.action} />.
  • Removed the now-redundant local renderDiff helper, the local DESTRUCTIVE_ACTIONS set, and the unused styles.diffDESTRUCTIVE_ACTIONS is imported from the shared module too.

So the undo confirmation now shows the same readable field-level diff (old → new rows, destructive tinting) as the chat card.

Verification (local)

  • typecheck ✓ · lint ✓ · test ✓ 172 · semgrep ✓ 0 findings

Net diff is small (one screen). Visual parity with the chat card is worth a glance, but the shared component is already tested.

🤖 Generated with Claude Code

Completes the "both places" intent of #363. That PR extracted a shared `<ProposalDiff>` and wired it into the **chat** confirmation card — but the **activity** undo card (#356/#357) wasn't merged on #363's base, so it still rendered its diff as raw pretty-printed JSON. Now that both are in: - The activity undo card uses `<ProposalDiff diff={pending.diff} action={pending.action} />`. - Removed the now-redundant local `renderDiff` helper, the local `DESTRUCTIVE_ACTIONS` set, and the unused `styles.diff` — `DESTRUCTIVE_ACTIONS` is imported from the shared module too. So the undo confirmation now shows the same readable field-level diff (old → new rows, destructive tinting) as the chat card. ## Verification (local) - `typecheck` ✓ · `lint` ✓ · `test` ✓ 172 · semgrep ✓ 0 findings Net diff is small (one screen). Visual parity with the chat card is worth a glance, but the shared component is already tested. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(client): use the shared ProposalDiff in the activity undo card (#363 follow-up)
Some checks failed
PR / Package age policy (soft) (pull_request) Successful in 57s
Secrets / gitleaks (pull_request) Successful in 57s
PR / Test (postgres) (pull_request) Successful in 3m3s
PR / pnpm audit (pull_request) Successful in 1m27s
PR / E2E (Playwright) (pull_request) Successful in 4m57s
PR / Coverage (soft) (pull_request) Successful in 1m54s
PR / Test (sqlite) (pull_request) Successful in 2m9s
Commits / Conventional Commits (pull_request) Successful in 18s
PR / OpenAPI (pull_request) Successful in 3m29s
PR / Static analysis (pull_request) Successful in 3m27s
PR / Lint (pull_request) Successful in 3m43s
PR / Client (web export smoke) (pull_request) Successful in 3m36s
PR / Typecheck (pull_request) Successful in 3m57s
PR / Build (pull_request) Successful in 3m48s
PR / OSV-Scanner (pull_request) Successful in 1m8s
PR / Trivy (image) (pull_request) Failing after 1m5s
e0f676df2d
#363 extracted a shared <ProposalDiff> and wired it into the chat
confirmation card, but the activity undo card (#356/#357) wasn't merged
on its base, so it still rendered its diff as raw JSON. Now that both are
in, swap the activity card's local renderDiff for <ProposalDiff>, and drop
the now-redundant renderDiff helper, local DESTRUCTIVE_ACTIONS set, and
styles.diff (both imported from the shared module). Completes the "both
places" intent of #363.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

📊 Test coverage

Patch coverage: no testable lines changed.

Overall (app/, lib/, db/, excluding UI per ADR-0019):

Metric Value Soft target
Lines 79.4% ≥ 50%
Branches 71.2% ⚠️ ≥ 75%
Functions 80.5% informational

Soft thresholds per ADR-0019. Coverage is informational and does not block merge.

<!-- coverage-comment --> ## 📊 Test coverage **Patch coverage:** no testable lines changed. **Overall** (`app/`, `lib/`, `db/`, excluding UI per ADR-0019): | Metric | Value | Soft target | |---|---|---| | Lines | 79.4% ✅ | ≥ 50% | | Branches | 71.2% ⚠️ | ≥ 75% | | Functions | 80.5% | informational | Soft thresholds per [ADR-0019](docs/adr/0019-coverage-soft-targets.md). Coverage is informational and does not block merge.
james merged commit 25376ff02c into main 2026-06-29 14:16:59 +00:00
james deleted branch 363-followup-activity-diff 2026-06-29 14:16:59 +00:00
Sign in to join this conversation.
No description provided.