Task: Show history as a unified diff in ores.shell
This page documents a task in the Consolidate history dialogs onto HistoryDialogBase story. It captures the goal, current status, acceptance, and any notes or results.
Goal
The shell's history output gains a unified-diff view: consecutive
versions rendered in the familiar +/- format (or via an option such as
--diff), consuming the same fields/changes history response as the
Qt dialogs — demonstrating that frontends need no comparison logic.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Consolidate history dialogs onto HistoryDialogBase |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-06-05 |
Acceptance
- Shell history shows (or can show) a unified diff between consecutive versions.
- No field-comparison logic in ores.shell.
- Shell recipe updated; verified against the running system.
Plan
- Extend the shell history command with a unified-diff rendering of
the
changesrows (andfieldscontext), defaulting per UX discussion — either the default view or behind a--diffflag. - Reuse ores.diff types; no comparison logic in the shell.
- For the unified-diff rendering itself, prefer an established vcpkg library over hand-rolling the format (survey candidates: e.g. diff-match-patch, dtl — pick whichever is maintained and fits the std+rfl dependency posture). Hand-roll only if nothing suitable exists in the registry.
- Update the shell recipes documenting the history command.
- Depends on the pilot task for the extended response (currency first; per-entity availability follows the rollout).
Notes
- Library survey outcome (Marco's decision: drop the library): dtl is available in vcpkg (v1.21) and diff-match-patch candidates exist, but both are diff computation libraries. After the currency pilot the server already supplies the computed changes rows, and the acceptance forbids comparison logic in the shell — so the unified-diff view is pure formatting of server rows (context lines from fields, +/- pairs from changes). No new dependency.
- UX: a separate
currencies history-diff <iso>command beside the table view, as the cli menu library favours commands over flags.
PRs
| PR | Title |
|---|---|
| #1105 | [shell] Show currency history as a unified diff |
Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | No review comments | - | - | Review bot exhausted its daily quota on PR 1105; round closed on CI alone. |