Skip to content

fix: show full pre-built image build errors#503

Merged
ColeMurray merged 2 commits into
mainfrom
fix/prebuilt-image-error-tooltip
Apr 19, 2026
Merged

fix: show full pre-built image build errors#503
ColeMurray merged 2 commits into
mainfrom
fix/prebuilt-image-error-tooltip

Conversation

@ColeMurray
Copy link
Copy Markdown
Owner

@ColeMurray ColeMurray commented Apr 19, 2026

Summary

  • keep the pre-built images settings row compact while preserving access to the full failed build error
  • show the complete error_message in a tooltip and native title instead of only a hard-truncated preview
  • preserve the existing backend behavior since the full error is already stored and returned by the API

Testing

  • npm run typecheck -w @open-inspect/web

Created with Open-Inspect

Summary by CodeRabbit

  • New Features

    • Added tooltip support in Images settings to let users view full error details on hover.
  • Bug Fixes

    • Replaced truncated inline error text with an interactive tooltip that preserves formatting and shows the complete message.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

📝 Walkthrough

Walkthrough

Replaces inline truncated error text for failed repository images with a tooltip-based display, adding tooltip components and wrapping the component in a tooltip provider while preserving visual truncation in the layout.

Changes

Cohort / File(s) Summary
Error Message Tooltip Enhancement
packages/web/src/components/settings/images-settings.tsx
Imported tooltip components, wrapped the component in a TooltipProvider, replaced inline truncated error_message span with a TooltipTrigger (keeps truncation) and TooltipContent (shows full message with whitespace-pre-wrap and word-breaking).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 With twitching nose and nimble paws,

I swapped the text for helpful gauze.
Hover gently, see the whole—
Errors shown to warm the soul. 🎈

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: show full pre-built image build errors' directly and clearly describes the main change: enabling visibility of complete error messages for pre-built image builds through the added tooltip functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/prebuilt-image-error-tooltip

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown

Terraform Validation Results

Step Status
Format
Init
Validate

Note: Terraform plan was skipped because secrets are not configured. This is expected for external contributors. See docs/GETTING_STARTED.md for setup instructions.

Pushed by: @ColeMurray, Action: pull_request

Copy link
Copy Markdown
Contributor

@open-inspect open-inspect Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR updates the failed pre-built image status UI to preserve a compact row layout while exposing the full build error through a tooltip and native title. I reviewed the single-file diff and did not find any blocking correctness, security, performance, or maintainability issues.

  • PR Title and number: fix: show full pre-built image build errors (#503)
  • Author: @ColeMurray
  • Files changed count, additions/deletions: 1 file, +16/-3

Critical Issues

None.

Suggestions

  • [Testing] packages/web/src/components/settings/images-settings.tsx - No automated UI coverage was added for the failed-state tooltip/title behavior. This is reasonable for a small UI tweak, but a component-level test would reduce regression risk if this area changes again.

Nitpicks

None.

Positive Feedback

  • The change stays narrowly scoped to the presentation layer and preserves the existing API contract.
  • Keeping the truncated inline preview while exposing the full message on demand is a good balance between density and debuggability.
  • Adding the native title alongside the tooltip gives a useful fallback path.

Questions

None.

Verdict

Approve

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/web/src/components/settings/images-settings.tsx (1)

242-256: Hoist TooltipProvider to the component root.

TooltipProvider is instantiated per failed image inside the repos.map() loop (via the ImageStatus component). Radix UI recommends a single provider at the app/component root so its delayDuration and skipDelayDuration are shared across all tooltips, enabling smooth transitions without reapplying delays when moving between triggers. Wrap the outer return (<div>...) with one TooltipProvider instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/web/src/components/settings/images-settings.tsx` around lines 242 -
256, Move the TooltipProvider out of the per-item rendering so it is
instantiated once at the component root: remove TooltipProvider from inside the
ImageStatus/repo.map loop and wrap the top-level return of the ImagesSettings
(or parent component that renders repos.map) with a single TooltipProvider so
all TooltipTrigger/TooltipContent instances share the same provider and delay
settings; update files referencing TooltipProvider, ImageStatus, and the
repos.map rendering to reflect the provider now lives at the component root.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/web/src/components/settings/images-settings.tsx`:
- Around line 242-256: The span inside the TooltipTrigger in images-settings.tsx
currently has a native title attribute which causes the browser's native tooltip
to appear in addition to Radix's TooltipContent; remove the title prop from the
span (the element wrapped by TooltipTrigger) so only Radix's Tooltip handles the
hover tooltip, and if you need a no-JS/accessibility fallback move the title
text to a non-interactive wrapper outside TooltipTrigger or provide an
appropriate aria-label/aria-describedby instead.

---

Nitpick comments:
In `@packages/web/src/components/settings/images-settings.tsx`:
- Around line 242-256: Move the TooltipProvider out of the per-item rendering so
it is instantiated once at the component root: remove TooltipProvider from
inside the ImageStatus/repo.map loop and wrap the top-level return of the
ImagesSettings (or parent component that renders repos.map) with a single
TooltipProvider so all TooltipTrigger/TooltipContent instances share the same
provider and delay settings; update files referencing TooltipProvider,
ImageStatus, and the repos.map rendering to reflect the provider now lives at
the component root.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bcd64d74-8460-41f1-853c-2107940f69d6

📥 Commits

Reviewing files that changed from the base of the PR and between 88906fc and 538b885.

📒 Files selected for processing (1)
  • packages/web/src/components/settings/images-settings.tsx

Comment thread packages/web/src/components/settings/images-settings.tsx Outdated
@github-actions
Copy link
Copy Markdown

Terraform Validation Results

Step Status
Format
Init
Validate

Note: Terraform plan was skipped because secrets are not configured. This is expected for external contributors. See docs/GETTING_STARTED.md for setup instructions.

Pushed by: @open-inspect[bot], Action: pull_request

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/web/src/components/settings/images-settings.tsx`:
- Around line 244-253: Replace the non-focusable span used as the TooltipTrigger
with a focusable element (e.g., a button) so keyboard users can open the
tooltip: update the TooltipTrigger usage around the element rendering
image.error_message (the code using Tooltip, TooltipTrigger asChild and the
span). Also constrain the TooltipContent to prevent viewport overflow by adding
a max-height and enabling scrolling (use overflow-auto and a sensible max-height
such as max-h-[60vh] or similar) and ensure the trigger has an accessible name
(aria-label or visible text) so screen readers can interact with the button.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8a6e0901-e116-447a-893f-cd9b4950185a

📥 Commits

Reviewing files that changed from the base of the PR and between 538b885 and 51fbc10.

📒 Files selected for processing (1)
  • packages/web/src/components/settings/images-settings.tsx

Comment thread packages/web/src/components/settings/images-settings.tsx
@ColeMurray ColeMurray merged commit c6f0ea4 into main Apr 19, 2026
18 checks passed
@ColeMurray ColeMurray deleted the fix/prebuilt-image-error-tooltip branch April 19, 2026 07:08
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