Skip to content

feat(ui): add A2A error extension#1655

Merged
PetrBulanek merged 3 commits intomainfrom
ui/a2a-error-extension
Dec 4, 2025
Merged

feat(ui): add A2A error extension#1655
PetrBulanek merged 3 commits intomainfrom
ui/a2a-error-extension

Conversation

@PetrBulanek
Copy link
Contributor

@PetrBulanek PetrBulanek commented Nov 27, 2025

Summary

This PR adds UI support for displaying errors from the A2A error extension using our standard toast component. Each toast shows the required error message and title, and can optionally include context and a stacktrace, with code formatting for readability. The A2A error extension may return multiple errors (error group), and all errors in a group are displayed individually. This ensures clear, consistent visibility into A2A failures.

Linked Issues

Closes: #1618

Documentation

  • No Docs Needed:

If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.

@PetrBulanek PetrBulanek force-pushed the ui/a2a-error-extension branch from df19307 to aa8302a Compare November 28, 2025 12:35
@PetrBulanek PetrBulanek marked this pull request as ready for review November 28, 2025 15:17
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 28, 2025
@PetrBulanek PetrBulanek changed the title [DRAFT] feat(ui): add A2A error extension (work in progress) feat(ui): add A2A error extension (work in progress) Nov 28, 2025
@PetrBulanek
Copy link
Contributor Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces UI support for the A2A error extension, which is a great step towards providing more detailed and user-friendly error feedback. The changes are well-integrated, from defining the schema in the SDK to handling and displaying the errors in the UI. The introduction of the NotificationMarkdownContent component and the UX improvements to the Toast component are particularly noteworthy. My feedback includes a couple of minor suggestions to improve code clarity and formatting.

@tomkis
Copy link
Collaborator

tomkis commented Dec 1, 2025

@PetrBulanek can we rebase this on top of latest main ? We have error extensions ready https://github.com/i-am-bee/agentstack/blob/main/apps/agentstack-sdk-py/src/agentstack_sdk/a2a/extensions/ui/error.py.

Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
@PetrBulanek PetrBulanek force-pushed the ui/a2a-error-extension branch from 76e12a4 to 3708bae Compare December 1, 2025 08:49
@PetrBulanek
Copy link
Contributor Author

@PetrBulanek can we rebase this on top of latest main ? We have error extensions ready https://github.com/i-am-bee/agentstack/blob/main/apps/agentstack-sdk-py/src/agentstack_sdk/a2a/extensions/ui/error.py.

We already tested it on Friday against the Python part, so it had already been rebased. I just rebased it again to see if there were any updates. :-)

@tomkis
Copy link
Collaborator

tomkis commented Dec 1, 2025

@PetrBulanek can we rebase this on top of latest main ? We have error extensions ready https://github.com/i-am-bee/agentstack/blob/main/apps/agentstack-sdk-py/src/agentstack_sdk/a2a/extensions/ui/error.py.

We already tested it on Friday against the Python part, so it had already been rebased. I just rebased it again to see if there were any updates. :-)

You are faster than me. Amazing, i briefly checked and the schema seems to be consistent with Py counterpart. Lets just test the integration.

const [overflowDetected, setOverflowDetected] = useState(false);

const showButton = isExpanded || overflowDetected;
const showButton = (isExpanded || overflowDetected) && (initialOverflowRef.current ?? true);
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a bit hard to read what initialOverflowRef controls and how at first, I'd consider using descriptive states like: unset, overflowing, not-overflowing.
This condition could be then clearer - initialOverflowRef.current !== 'not-overflowing'. That doesn't seem right though, is it?:)

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 1, 2025
Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
@PetrBulanek PetrBulanek changed the title feat(ui): add A2A error extension (work in progress) feat(ui): add A2A error extension Dec 1, 2025
@PetrBulanek PetrBulanek merged commit 0307ce1 into main Dec 4, 2025
9 checks passed
@PetrBulanek PetrBulanek deleted the ui/a2a-error-extension branch December 4, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visualise Agent SDK errors

3 participants