feat(notifications): inspectable error toasts with details dialog#3247
Merged
Conversation
Error-level notifications no longer dump raw JSON into the toast. The toast shows a one-line summary with a "Details" action that opens a quill dialog: pretty-printed error payload, a downloadable error-plus-logs bundle (fed by a new renderer log ring buffer teed off the shell logger), and a dev-only shortcut that prefills a new task with the error and recent logs as context. Generated-By: PostHog Code Task-Id: 8fd812ea-6ddb-4811-bb8a-cf00dbad7ea1
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
…rror The click-to-inspect Details action only reached errors sent through NotificationBus, but the toasts that actually dump raw JSON are direct toast.error calls in hooks. Add a lightweight toastError helper (summary in the toast, full pretty-printed payload behind a Details action) and migrate every raw-error dump to it. serializeError now reflows the JSON embedded in API error strings so the dialog is readable. Generated-By: PostHog Code Task-Id: 8fd812ea-6ddb-4811-bb8a-cf00dbad7ea1
Contributor
|
Reviews (1): Last reviewed commit: "fix(notifications): route raw-error toas..." | Re-trigger Greptile |
…ialog footer Long unbroken JSON error strings overflowed the fixed 360px toast card (Quill's description class sets no overflow-wrap). Break anywhere and clamp to 3 lines. Move the dev-only create-task button to the left of the dialog footer and tag it with a "Dev" badge. Generated-By: PostHog Code Task-Id: 025dc6c9-832e-43f0-b7dd-ea06a7ee43c9
Compute the error summary once in notifyError, and drop the json fence on the create-task error block (serializeError may return a plain string). Generated-By: PostHog Code Task-Id: 025dc6c9-832e-43f0-b7dd-ea06a7ee43c9
charlesvien
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Error notifications routed through the notification bus dump the raw JSON error into the toast. The payload overflows the toast and there's no way to inspect it.
Changes
NotificationBus.notifyError(title, error, target?)producer and anerrorfield onNotificationDescriptor.Errorinstances expand with stack and enumerable extras, circular refs elided) in aCodeBlockwith copy support.shell/logCapture.ts) teed off the shell logger, so no host changes are needed.openTaskInputprefill path. It sits on the left of the dialog footer and carries a Dev badge to mark it dev-only..quill-toast-card__descriptionsets nooverflow-wrap. Now it breaks anywhere and clamps to 3 lines — the toast is just a summary; the full payload lives behind Details.How did you test this?
pnpm --filter @posthog/ui exec vitest run src/features/notifications src/shell— 103 tests pass, including new suites fornotifyErrorrouting and the error serialization/summarization helpers.pnpm --filter @posthog/ui typecheckand Biome check on touched files — clean.Automatic notifications
Created with PostHog Code