feat(history): show before/after content in change history (PMS-204) #112

Merged
longjacksonle merged 1 commit from feat/mapps-204-history-content into main 2026-06-11 04:28:50 +02:00

What

SPA half of PMS-204: the Change History now shows the actual before to after content of each edit, not just the field names.

Depends on mokosh-server PR #156 (the changes array on history entries + the asset diff).

Changes

  • Under each history entry on the ticket, project/task, and asset detail pages, render the per-field old → new values from the new changes array.
  • Values are formatted for readability: "(empty)" for null/blank, long strings truncated to 160 chars, and reference-id fields (UUID-valued, e.g. status_id) collapse to the summary line instead of printing a raw UUID.
  • Assets store their diff in the asset_audit_log.changes column; the SPA parses it as an array of {field, old, new} for edits while preserving the existing {event} object shape used by credential/config reveal rows.

Result

A description edit now reads, e.g.:

Updated: Description by Long - Jun 10, 2026 15:04
Description: Paper stuck in tray 2 → Paper stuck in tray 2 and toner low

Acceptance criteria

  • A change-history entry shows the old and new value for each changed field (not just the field name).
  • Long values are truncated and empty/null values are rendered clearly.
  • Tickets, tasks/projects, and assets all show field-level content in their history.

🤖 Generated with Claude Code

## What SPA half of PMS-204: the Change History now shows the actual before to after content of each edit, not just the field names. Depends on mokosh-server PR #156 (the `changes` array on history entries + the asset diff). ## Changes - Under each history entry on the **ticket**, **project/task**, and **asset** detail pages, render the per-field `old → new` values from the new `changes` array. - Values are formatted for readability: **"(empty)"** for null/blank, long strings truncated to 160 chars, and **reference-id fields** (UUID-valued, e.g. `status_id`) collapse to the summary line instead of printing a raw UUID. - Assets store their diff in the `asset_audit_log.changes` column; the SPA parses it as an array of `{field, old, new}` for edits while preserving the existing `{event}` object shape used by credential/config reveal rows. ## Result A description edit now reads, e.g.: > **Updated: Description** by Long - Jun 10, 2026 15:04 > Description: ~~Paper stuck in tray 2~~ → Paper stuck in tray 2 and toner low ## Acceptance criteria - [x] A change-history entry shows the old and new value for each changed field (not just the field name). - [x] Long values are truncated and empty/null values are rendered clearly. - [x] Tickets, tasks/projects, and assets all show field-level content in their history. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(history): show the before/after content of each change, not just who/when (PMS-204)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 50s
Create release / Create release from merged PR (pull_request) Has been skipped
17ccfe721b
The Change History feeds listed the action, changed field names, actor, and timestamp but not the actual content of the edit. Render the per-field "old -> new" values returned in the new `changes` array under each entry on the ticket, project/task, and asset detail pages. Values are formatted readably: "(empty)" for null/blank, long text truncated, and reference-id fields (UUIDs) collapse to the summary line rather than printing a raw UUID. For assets the audit row's `changes` column is parsed (array of {field, old, new} for edits; the existing {event} object shape for reveal ops is preserved). Depends on mokosh-server #156.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/mapps-204-history-content 2026-06-11 04:28:50 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!112
No description provided.