feat(web-ui): UI polish + MCP OAuth handling#643
Merged
Conversation
- Layout: gray canvas + floating rounded main panel; sidebar transparent on canvas (login page framed); lighter gray backdrop; no shadows. - Account block moved to the sidebar footer (out of the navbar top-right). - Hide the actions/timestamp row while a turn is thinking/streaming; show a fallback note when a finalized turn has no visible content. - Login: reserve the hint line so an invalid username no longer shifts the input. - Session list items get spacing between rows. - Default agent selection prefers a servable conversational agent (web_search_agent / web_demo) instead of a non-loadable numbered example. - MCP / tool OAuth: parse the `adk_request_credential` event into an auth card, open the authorize URL, capture the callback, and resume the run via a function response (blocks.ts + Blocks.tsx AuthCard + client runSSE resume + App). - examples/web_search_agent: a servable non-a2ui agent with the web_search tool.
- collapse the authorization card to a compact "已授权 · <toolset>" row the moment the callback returns, instead of holding "等待授权…" until the whole reply finishes streaming - amber shield while pending, green once authorized; card names the toolset and the identity provider it will redirect to; wider layout - auto-capture the OAuth popup callback at the app entry (postMessage to the opener + close) so the user never pastes the callback URL - hide a turn's actions/timestamp row while it is awaiting authorization - add examples/mcp_oauth_agent: an MCP tool guarded by ADK-native OIDC OAuth (OpenIdConnectWithConfig + client credentials on McpToolset), fully env-driven, with a README
…d origin Default OIDC_REDIRECT_URI to http://localhost:8000/ (where `veadk frontend` serves the UI) instead of the Vite dev port; note the :5173 dev alternative in the agent docstring and README.
warm-wm
approved these changes
Jul 7, 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.
Frontend polish on top of the web-ui studio, plus MCP/tool OAuth support.
UI polish
web_search_agent/web_demo) instead of a non-loadable numbered example.MCP / tool OAuth
Full handling of ADK's
adk_request_credentialflow:blocks.ts: parse the credential-requestfunctionCallinto a dedicatedauthblock (callId, authUri, authConfig); resolve it on the credential response; skip empty function-response user turns on replay.Blocks.tsx: an OAuth card ("该工具需要授权" + 去授权 button, with authorizing/done/error states).client.ts:runSSEacceptsfunctionResponsesto resume a long-running call.App.tsx:onAuthopens the authorize URL in a popup, captures the callback (same-origin poll + postMessage, with a paste-URL fallback), setsoauth2.authResponseUri, and posts the credential back — the resumed run streams into the same turn.Example
examples/web_search_agent/: a servable non-a2ui agent with the built-inweb_searchtool.Notes: the committed
veadk/webuibundle is rebuilt from this source. Excludes theweb_fetchtool (that's in #586). MCP-OAuth was validated for event parsing/rendering/build; a live token exchange still needs a real MCP-OAuth tool to test against.🤖 Generated with Claude Code