Repository navigation
fix(history): keep the lineage link on failed rows with an ops hint - #1394
Conversation
renderActionCell returned the ops-hint badge alone for a failed row
that carries ops_hint, so the row lost its retry-chain links ("Retried
as #..." / "Retry #N"). Since LeanerCloud#967 a failed execution the backend will
never re-drive (redrive_unsafe) also carries a permanent hint, so a
legacy row that was retried before the re-drive gate existed now shows
the hint and no link to its successor.
The lineage links move into a renderLineageLinks helper, and the
ops-hint branch renders the badge followed by those links. Retry stays
hidden for these rows.
Refs LeanerCloud#1040
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50. Or wait 59 minutes for your next included review. View limit details
Comment |
Conflicts (frontend/src/history.ts): - renderActionCell decision-tree comment: main's pending line (LeanerCloud#183, "Review in approval queue" link) plus this branch's ops-hint line that notes the lineage links (LeanerCloud#1040). - Lineage links: kept this branch's renderLineageLinks() call and moved main's change to that code (LeanerCloud#1318: coerce retry_attempt_n with Number() before it goes into the title attribute and badge text) into the helper, so the ops-hint path gets it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): APPROVE Blocking:
|
|
Local verification at
|
|
Marked ready and merged by IAmJSD's agent, at IAmJSD's request (IAmJSD reviewed the before/after screenshots; cristim is traveling), after the independent review and local verification above, all at |
Conflicts: - frontend/src/history.ts: imports kept both (this branch's iconSvg and main's history-paging helpers from LeanerCloud#1358). Main (LeanerCloud#1394) moved the retry lineage links into renderLineageLinks() and appends them to the ops-hint badge; took main's structure and applied this branch's icons inside it: the ops hint uses iconSvg('alert-triangle') and both lineage links use iconSvg('rotate-cw') instead of the restored glyphs. - frontend/src/ladder.ts: imports kept both (iconSvg and main's openModal/closeModal from LeanerCloud#1372). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the Purchase History table, a failed row carrying an
ops_hintreturned early with only the hint badge, so it lost its retry-chain links ("↻ Retried as #..." / "↻ Retry #N"). Since #967, executions the backend will never re-drive also carry a permanent hint, so a legacy row retried before the re-drive gate no longer linked to its successor. This PR renders the hint and the lineage links together; Retry stays hidden.Closes #1040
What changed
frontend/src/history.ts: the lineage-link markup moves out ofrenderActionCellinto arenderLineageLinks(p)helper (which keeps main'sNumber()coercion ofretry_attempt_nfrom fix(frontend): escape the remaining raw values in innerHTML templates #1318, so the ops-hint path gets it too), and the ops-hint branch returns the badge followed by those links (space-joined, like the existing lineage plus action composition). The decision-tree comment is updated.frontend/src/__tests__/history-retry-button.test.ts: two cases. Aredrive_unsaferow withops_hint,retry_execution_idandretry_attempt_nrenders the hint, the "Retried as" link with the righthref, the "Retry sec(iac): rename-proof OIDC deploy trust + branch-restricted environments for the split platform repo #2" badge and no Retry button; a hint-only row renders no lineage.Why this approach
It is the issue's suggested fix. Extracting the helper avoids duplicating the link markup in two branches. Only the ops-hint branch changes. The plain Retry-button branch also returns early without lineage, but a retried row normally isn't retryable again, and that branch is outside the issue, so it is left alone.
Screenshots
Screenshots were taken before this branch was merged with main; before = main at a14dc8f. The failed-row rendering shown is unchanged on current main. After is this branch. Both are headless Chromium at 1440x900 against the repo's mocked e2e API. The row is a failed Azure savings-plan execution with the permanent re-drive hint and a successor execution.
Verification
Run on this branch's head
91f426b8, fromfrontend/:frontend/src/history.tsresolved, see the merge commit.npm run lint: 0 errors. Typecheck and build pass.history.tsand passes on this branch.history-retry-button.test.tsnow has 23 tests; before the merge it passed with--randomize.e2e-local.sh): 208 passed. No new spec; this rendering-only change is covered by jest.scripts/test-git-secrets-allowlist.sh: 137 PASS, 0 FAIL.Notes for review
The link renders inline right after the hint text and wraps in the narrow Plan column. Putting it on its own line would be a small markup/CSS change.
Overlaps
history.ts.history.tsis also touched by Sweep toISOString().split('T')[0] -> toLocalDateInputValue across frontend date inputs #51, fix(frontend): impossible/placeholder values surfaced for scheduled and pending purchases #181, feat(frontend): Load more on the History view, Approval Queue from all loaded pages #676, fix(frontend): low-severity copy, toast, confirm and stale-state fixes #728, fix(frontend): status badges use four shapes and conflicting colors per status #737 and fix(frontend): three money formatters, mixed placeholders, left-aligned money columns #739;history-retry-button.test.tsalso by fix(frontend): low-severity copy, toast, confirm and stale-state fixes #728 and fix(frontend): three money formatters, mixed placeholders, left-aligned money columns #739. These merge cleanly with this branch.Note for the UI owner
This changes UI code that @cristim owns. IAmJSD reviewed the before/after screenshots and asked for it to be merged; any design point you disagree with can be a follow-up.
🤖 Generated with Claude Code