Skip to content

fix: integrate Explain and fix button into ErrorPage CTA area#9302

Merged
ericokuma merged 5 commits intomainfrom
eokuma/fix-error-page-duplicate-banner
Apr 27, 2026
Merged

fix: integrate Explain and fix button into ErrorPage CTA area#9302
ericokuma merged 5 commits intomainfrom
eokuma/fix-error-page-duplicate-banner

Conversation

@ericokuma
Copy link
Copy Markdown
Contributor

@ericokuma ericokuma commented Apr 24, 2026

The ExplainAndFixErrorButton was rendered below the ErrorPage component in a separate flex container on dashboard preview 404s (canvas and explore), making it look like a floating, orphaned element. Add a cta slot to ErrorPage and render the button inside it so it visually belongs to the error page.

Follow-up to #9221. Intended to be cherry-picked into release-0.86.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

@ericokuma ericokuma requested a review from a team as a code owner April 24, 2026 22:04
@ericokuma ericokuma requested a review from royendo April 24, 2026 22:09
@ericokuma ericokuma closed this Apr 24, 2026
@ericokuma ericokuma force-pushed the eokuma/fix-error-page-duplicate-banner branch from 2c83f18 to 3375f73 Compare April 24, 2026 23:07
The `ExplainAndFixErrorButton` was rendered below the `ErrorPage` component in a separate flex container, making it look like a floating, orphaned element on 404 pages. Add a `cta` slot to `ErrorPage` and render the button inside it so it visually belongs to the error page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ericokuma ericokuma reopened this Apr 24, 2026
@ericokuma ericokuma changed the title fix: suppress duplicate error banner and orphaned Explain and fix button on dashboard preview error pages fix: integrate Explain and fix button into ErrorPage CTA area Apr 24, 2026
@royendo
Copy link
Copy Markdown
Contributor

royendo commented Apr 25, 2026

fixed web code qual but it looks liek this, not sure if thats what you're looking for

Screenshot 2026-04-25 at 10 35 50

@ericokuma ericokuma requested a review from AdityaHegde April 27, 2026 06:15
ericokuma and others added 2 commits April 26, 2026 23:41
Promote "Explain and fix" to the primary action and demote "Back to home" to a ghost button. The AI recovery action is now the more prominent option since it directly addresses the error, while the navigation escape is visually de-emphasized.

- `ExplainAndFixErrorButton` gains a `variant` prop (`"compact"` default, `"cta"` for page-level use). The `cta` variant renders via Rill's `Button` component with `type="primary"` for design-system consistency
- `ErrorPage` swaps `CtaButton variant="secondary"` (purple-bordered) for `Button type="ghost"` (no border, neutral text) on "Back to home"
- Slot order in `ErrorPage` flipped so the `cta` slot renders above "Back to home"

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…banner

- Switch the page-context `Explain and fix` button from `primary` (filled) to `secondary` (purple outline). The button is an offer of help, not the page's main action — secondary reads as helpful without competing with the error message itself
- AND the `showError` prop with the existing `remoteContent` check in `WorkspaceEditorContainer` so callers can opt out even when the file has content
- Pass `showError={selectedView === "code"}` from `CanvasWorkspace` and `ExploreWorkspace` so the bottom red banner is suppressed when the viz pane already shows a full error page (no more duplicate `Explain and fix` buttons on the same screen)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ericokuma ericokuma requested a review from AdityaHegde April 27, 2026 06:59
Canvas widgets render generic placeholders (e.g. "Metrics view not found") when their dependencies are missing. Without the bottom error banner, the user can't see the underlying root cause. Show the banner whenever the canvas itself renders (`ready`), and continue to suppress it only when the full-page `ErrorPage` is shown (broken canvas spec) so we never duplicate the same message.

Explore is unchanged: its viz error already shows the full root-cause text on the 404 page, so the banner stays suppressed there.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ericokuma ericokuma merged commit bb2945c into main Apr 27, 2026
10 of 11 checks passed
@ericokuma ericokuma deleted the eokuma/fix-error-page-duplicate-banner branch April 27, 2026 08:24
ericokuma added a commit that referenced this pull request Apr 27, 2026
)

* fix: integrate `Explain and fix` button into `ErrorPage` CTA area

The `ExplainAndFixErrorButton` was rendered below the `ErrorPage` component in a separate flex container, making it look like a floating, orphaned element on 404 pages. Add a `cta` slot to `ErrorPage` and render the button inside it so it visually belongs to the error page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Update CanvasLoadingState.svelte

* fix: rework error page CTAs to use Rill `Button` component

Promote "Explain and fix" to the primary action and demote "Back to home" to a ghost button. The AI recovery action is now the more prominent option since it directly addresses the error, while the navigation escape is visually de-emphasized.

- `ExplainAndFixErrorButton` gains a `variant` prop (`"compact"` default, `"cta"` for page-level use). The `cta` variant renders via Rill's `Button` component with `type="primary"` for design-system consistency
- `ErrorPage` swaps `CtaButton variant="secondary"` (purple-bordered) for `Button type="ghost"` (no border, neutral text) on "Back to home"
- Slot order in `ErrorPage` flipped so the `cta` slot renders above "Back to home"

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: tone down `Explain and fix` to secondary and suppress duplicate banner

- Switch the page-context `Explain and fix` button from `primary` (filled) to `secondary` (purple outline). The button is an offer of help, not the page's main action — secondary reads as helpful without competing with the error message itself
- AND the `showError` prop with the existing `remoteContent` check in `WorkspaceEditorContainer` so callers can opt out even when the file has content
- Pass `showError={selectedView === "code"}` from `CanvasWorkspace` and `ExploreWorkspace` so the bottom red banner is suppressed when the viz pane already shows a full error page (no more duplicate `Explain and fix` buttons on the same screen)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: keep banner visible in canvas viz when widgets show shallow errors

Canvas widgets render generic placeholders (e.g. "Metrics view not found") when their dependencies are missing. Without the bottom error banner, the user can't see the underlying root cause. Show the banner whenever the canvas itself renders (`ready`), and continue to suppress it only when the full-page `ErrorPage` is shown (broken canvas spec) so we never duplicate the same message.

Explore is unchanged: its viz error already shows the full root-cause text on the 404 page, so the banner stays suppressed there.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: royendo <67675319+royendo@users.noreply.github.com>
(cherry picked from commit bb2945c)
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.

3 participants