Skip to content

feat: link the error banner to each issue, one per click - #478

Merged
odgrim merged 1 commit into
mainfrom
feat/error-banner-jump
Nov 20, 2026
Merged

odgrim merged 1 commit into
mainfrom
feat/error-banner-jump

Conversation

@odgrim

@odgrim odgrim commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

What

The error/warning banner's "Scroll down to see details." is now a link.

  • Show details scrolls to the first place on the page that shows an error or warning.
  • After that, the link reads Next issue with an "n of m" count. Each click goes to the next place in page order and wraps back to the first after the last. With a single issue it stays "Show details", and each click goes back to that issue.
  • It continues from the place it went to last, so fixing an issue earlier on the page doesn't send you back to the top.
  • A problem in a hidden chapter opens that chapter first, through the same reveal BlockLink uses (useRevealElement, now shared with useRevealBlock).
  • The place it lands on gets a brief outline: red for an error, amber for a warning.

How

Each block marks the element that shows a reported error with data-runbook-issue="<componentId>", using issueAnchor() from ErrorReportingContext.types.ts. DuplicateIdError marks itself, and ErrorDisplay takes an issueId. The banner visits only the marked elements whose errors it currently counts, in DOM order.

I went through every reportError() call site so each reported error has a marker:

  • Duplicate ids
  • Admonition, Chapter and Iframe config errors
  • ScriptBlock: file, env and missing-inputs errors
  • Template and Inputs errors
  • Prerequisites and GitAuth config errors
  • AwsAuth and GoogleAuth invalid config
  • DirPicker missing root
  • The inputs form's missing-block and x-show-when errors

Fixed along the way

GitClone, GitPullRequest and DirPicker rendered null for a duplicate id, so the banner counted an error that appeared nowhere on the page. They now render DuplicateIdError, like the other blocks.

Known gaps

  • AzureAuth has no inline message for invalid detectCredentials/requiredRoles, and a form has none for its x-show-when problems. For those, the link goes to the AzureAuth block or the form.
  • A duplicate id is one reported error shown in two places, and the link visits both. The count can then read "of 5" while the banner says 3 errors and 1 warning.

Testing

  • New ErrorSummaryBanner.test.tsx covers:
    • page order and wrapping back to the first
    • a single issue
    • skipping an issue that is no longer reported
    • continuing after an earlier issue is fixed
    • hidden chapters
    • real Admonition and DuplicateIdError markers
  • The DirPicker duplicate test now asserts the duplicate error shows.
  • Checked in the built Electron app: a runbook with five problems down the page cycled 1→5→1, and each one was outlined in its severity color.

🤖 Generated with Claude Code

"Scroll down to see details" is now a "Show details" link that scrolls
to where an error or warning shows on the page, and then, as "Next
issue" with an "n of m" count, to the next one on each click, back to
the first after the last. It shows a hidden chapter first, and outlines
the place it lands on for a moment.

Each block marks the element that shows a reported error with
data-runbook-issue (issueAnchor), and the banner visits the marked
elements of the errors it counts, in page order.

GitClone, GitPullRequest and DirPicker rendered nothing for a duplicate
id the banner counted. They now show the duplicate id error, as the
other blocks do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@odgrim
odgrim requested a review from yhakbar as a code owner November 20, 2026 17:26
@vercel

vercel Bot commented Nov 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
runbooks Ready Ready Preview Nov 20, 2026 5:26pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 23 billable files and costs up to $5.75.

Or wait 20 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cea24ec0-69a8-43a5-b44a-67d3dd202294
Commits

Reviewing files that changed from the base of the PR and between dd54501 and 680761f.

Files selected for processing: 23

  • web/src/components/layout/ErrorSummaryBanner.tsx
  • web/src/components/layout/__tests__/ErrorSummaryBanner.test.tsx
  • web/src/components/mdx/Admonition/Admonition.tsx
  • web/src/components/mdx/AwsAuth/AwsAuth.tsx
  • web/src/components/mdx/AzureAuth/AzureAuth.tsx
  • web/src/components/mdx/Chapter/Chapter.tsx
  • web/src/components/mdx/DirPicker/DirPicker.tsx
  • web/src/components/mdx/DirPicker/__tests__/DirPicker.test.tsx
  • web/src/components/mdx/GitAuth/GitAuth.tsx
  • web/src/components/mdx/GitClone/GitClone.tsx
  • web/src/components/mdx/GitPullRequest/GitPullRequest.tsx
  • web/src/components/mdx/GoogleAuth/GoogleAuth.tsx
  • web/src/components/mdx/Iframe/Iframe.tsx
  • web/src/components/mdx/Inputs/Inputs.tsx
  • web/src/components/mdx/Prerequisites/Prerequisites.tsx
  • web/src/components/mdx/Template/Template.tsx
  • web/src/components/mdx/_shared/components/BoilerplateInputsForm.tsx
  • web/src/components/mdx/_shared/components/DuplicateIdError.tsx
  • web/src/components/mdx/_shared/components/ErrorDisplay.tsx
  • web/src/components/mdx/_shared/components/ScriptBlock.tsx
  • web/src/contexts/ComponentIdRegistry.tsx
  • web/src/contexts/ErrorReportingContext.types.ts
  • web/src/contexts/useRunbookChapters.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@odgrim
odgrim merged commit d4151b0 into main Nov 20, 2026
12 checks passed

This branch was successfully deployed

1 active deployment
Preview — 680761ff Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant