Skip to content

fix(history): keep the lineage link on failed rows with an ops hint - #1394

Merged
IAmJSD merged 2 commits into
LeanerCloud:mainfrom
IAmJSD:ui/issue-1040
Oct 24, 2026
Merged

IAmJSD merged 2 commits into
LeanerCloud:mainfrom
IAmJSD:ui/issue-1040

Conversation

@IAmJSD

@IAmJSD IAmJSD commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

In the Purchase History table, a failed row carrying an ops_hint returned 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

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.

Before After
ops-hint-lineage before ops-hint-lineage after
The failed row shows only the permanent hint, with no link to its retry. The hint plus a "↻ Retried as #bbbbbbbb" link to the successor row (no Retry button).

Verification

Run on this branch's head 91f426b8, from frontend/:

  • Merged with main at 51aa5b1; conflicts in frontend/src/history.ts resolved, see the merge commit.
  • npm run lint: 0 errors. Typecheck and build pass.
  • Jest: 3916 of 3917 passed, 1 skipped. The new test fails against main's history.ts and passes on this branch. history-retry-button.test.ts now has 23 tests; before the merge it passed with --randomize.
  • Playwright (e2e-local.sh): 208 passed. No new spec; this rendering-only change is covered by jest.
  • Secrets scan clean (planted key flagged); 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

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

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>
@IAmJSD IAmJSD added priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/eventually No deadline impact/few Limited audience effort/s Hours type/bug Defect labels Oct 24, 2026
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

Or wait 59 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 51aa5b1 and 91f426b.

Files selected for processing: 2
  • frontend/src/__tests__/history-retry-button.test.ts
  • frontend/src/history.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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>
@IAmJSD

IAmJSD commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): APPROVE 91f426b82fe4e3ccda0ec0b3b9f27a9a27c5f3c1

Blocking:

@IAmJSD

IAmJSD commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

Local verification at 91f426b8 merged onto current main (6bd08509; merge-tree d3ae6c83; Linux, Node, headless Chromium):

  • This branch's own checks passed at this head: lint, typecheck, build, the full jest suite, the full Playwright e2e suite, and the git-secrets checks (see Verification in the PR body).
  • The combined tree of every UI PR in this merge wave (tree dc090cc2, main plus 17 PRs) passes npm ci, lint, typecheck, build, jest (1 skipped, 4097 passed, 4098 total), and the full Playwright suite (232 passed).
  • CI is green on 91f426b8 (CI Success, Run pre-commit hooks).
  • The independent review above approves this exact head.
  • Nothing was applied to any cloud.

@IAmJSD
IAmJSD marked this pull request as ready for review October 24, 2026 19:27
@IAmJSD
IAmJSD merged commit 8fda7e5 into LeanerCloud:main Oct 24, 2026
29 checks passed
@IAmJSD

IAmJSD commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

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 91f426b8.

IAmJSD added a commit to IAmJSD/cloud-commitments-platform that referenced this pull request Oct 24, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/s Hours impact/few Limited audience priority/p3 Polish / idea / may never ship severity/low Minor harm type/bug Defect urgency/eventually No deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(history): keep the lineage link on failed rows that show an ops hint

1 participant