Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .aoci/baseline.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"created_at": "2026-11-19T05:53:26Z",
"updated_at": "2026-11-20T13:38:12Z",
"updated_at": "2026-11-20T13:38:55Z",
"files": {
".agents/skills/changelog-card-publish/SKILL.md": {
"role": "index",
Expand Down Expand Up @@ -773,9 +773,9 @@
},
"aoci.code.txt": {
"role": "index",
"sha256": "d3b40b8fc163405aa92f3e6f7d1abccca3e8efd7f93c282c5129282d9ac21283",
"size": 638875,
"normalized_sha256": "d3b40b8fc163405aa92f3e6f7d1abccca3e8efd7f93c282c5129282d9ac21283"
"sha256": "490837ea440b1661fd7cb6b706c0e1158a4812ce96b0c97bf1bb7f984883d666",
"size": 639503,
"normalized_sha256": "490837ea440b1661fd7cb6b706c0e1158a4812ce96b0c97bf1bb7f984883d666"
},
"aoci.meta.txt": {
"role": "index",
Expand Down Expand Up @@ -22776,9 +22776,9 @@
},
"packages/webui/docs/adr/0020-webui-miniapp-view-and-runtime-seams.md": {
"role": "index",
"sha256": "093af098f08ab1b753765ab02fb31fd824c2326671c989e735f976fb0c174c39",
"size": 33062,
"normalized_sha256": "093af098f08ab1b753765ab02fb31fd824c2326671c989e735f976fb0c174c39"
"sha256": "409c416b5be1718e641d0e74d9fd5aad809487af903f31422afa9cdea9976ab4",
"size": 33570,
"normalized_sha256": "409c416b5be1718e641d0e74d9fd5aad809487af903f31422afa9cdea9976ab4"
},
"packages/webui/docs/adr/0021-webui-model-picker-is-one-popup-with-two-states.md": {
"role": "index",
Expand Down Expand Up @@ -24676,9 +24676,9 @@
},
"packages/webui/src/client/features/miniapp/application/miniapp-workflows.ts": {
"role": "index",
"sha256": "b8919e0a18fb5117afd0e4e6c57d26990219c3ce0d5d45484723ed30812cdeba",
"size": 54643,
"normalized_sha256": "b8919e0a18fb5117afd0e4e6c57d26990219c3ce0d5d45484723ed30812cdeba"
"sha256": "a10f4aba499ea4b0a04224fa66c5df936a60c25aafbbb4cbc5a5083f314dfa08",
"size": 54881,
"normalized_sha256": "a10f4aba499ea4b0a04224fa66c5df936a60c25aafbbb4cbc5a5083f314dfa08"
},
"packages/webui/src/client/features/miniapp/bindings/use-miniapp-catalogue.public.ts": {
"role": "index",
Expand Down Expand Up @@ -24730,9 +24730,9 @@
},
"packages/webui/src/client/features/miniapp/ui/MiniAppView.public.tsx": {
"role": "index",
"sha256": "10676230ea9092b22d32182402847b42964e129f6ebc8a0a689df1bafc6030d1",
"size": 32714,
"normalized_sha256": "10676230ea9092b22d32182402847b42964e129f6ebc8a0a689df1bafc6030d1"
"sha256": "308de7796f998b2e817e0696127cfd913baf69b8779431d9ae4b5d57b10d27a5",
"size": 33586,
"normalized_sha256": "308de7796f998b2e817e0696127cfd913baf69b8779431d9ae4b5d57b10d27a5"
},
"packages/webui/src/client/features/models/application/models-workflows.ts": {
"role": "index",
Expand Down Expand Up @@ -28514,9 +28514,9 @@
},
"packages/webui/test/browser/fixture.mjs": {
"role": "index",
"sha256": "1651e894fe6cb84888fae9f57dd88aa7a9295d2cd15f62365dd10710fdcc198e",
"size": 53680,
"normalized_sha256": "1651e894fe6cb84888fae9f57dd88aa7a9295d2cd15f62365dd10710fdcc198e"
"sha256": "1586e6f5a983eebf111eedd5cf3dbec5378e1396c04d48cd5ded9d3d96423cce",
"size": 53704,
"normalized_sha256": "1586e6f5a983eebf111eedd5cf3dbec5378e1396c04d48cd5ded9d3d96423cce"
},
"packages/webui/test/browser/fonts/LICENSE.noto-fonts": {
"role": "observe",
Expand Down Expand Up @@ -28554,9 +28554,9 @@
},
"packages/webui/test/browser/miniapp-standalone-tab.spec.mjs": {
"role": "index",
"sha256": "44b91da6c1676f6f2d8ffd626107b0f1a7a7fb83fcbb93eb483ef39d4a73c2a1",
"size": 8332,
"normalized_sha256": "44b91da6c1676f6f2d8ffd626107b0f1a7a7fb83fcbb93eb483ef39d4a73c2a1"
"sha256": "8140b9faa509494c1c8d7a8d095b44be24c3a0b2bbd5e5e012a1cd463f1f3251",
"size": 11052,
"normalized_sha256": "8140b9faa509494c1c8d7a8d095b44be24c3a0b2bbd5e5e012a1cd463f1f3251"
},
"packages/webui/test/browser/model-picker-interactions.spec.mjs": {
"role": "index",
Expand Down Expand Up @@ -30104,9 +30104,9 @@
},
"packages/webui/test/unit/miniapp-client-state.test.ts": {
"role": "observe",
"sha256": "8424fe8d741cef4115011c1cbb88a6b607621b4058f99696d7336d61a0590f5a",
"size": 22008,
"normalized_sha256": "8424fe8d741cef4115011c1cbb88a6b607621b4058f99696d7336d61a0590f5a"
"sha256": "502777dedaca3f81aaf417795345a70275691673e1ada0a57df66569b277fc26",
"size": 22029,
"normalized_sha256": "502777dedaca3f81aaf417795345a70275691673e1ada0a57df66569b277fc26"
},
"packages/webui/test/unit/miniapp-operations.test.ts": {
"role": "observe",
Expand Down Expand Up @@ -30146,9 +30146,9 @@
},
"packages/webui/test/unit/miniapp-surfaces.test.tsx": {
"role": "observe",
"sha256": "bc8ea9a79cfed05ec6d2dded05d60c6e2a513e9151e76d252459896864b2dc56",
"size": 44761,
"normalized_sha256": "bc8ea9a79cfed05ec6d2dded05d60c6e2a513e9151e76d252459896864b2dc56"
"sha256": "e7e3254a7a8a5d2d512c5f9e15954b2452884f22692c70ab290457ea809d6cd9",
"size": 46943,
"normalized_sha256": "e7e3254a7a8a5d2d512c5f9e15954b2452884f22692c70ab290457ea809d6cd9"
},
"packages/webui/test/unit/miniapp-tool-approvals.test.tsx": {
"role": "observe",
Expand Down Expand Up @@ -31640,9 +31640,9 @@
},
"scripts/lib/webui-presentation-inventory.json": {
"role": "index",
"sha256": "a5d9d9cd5417f0c33c361343c1e06c7ef199882e716158a48e10af418f9ebe25",
"sha256": "b030576cd28af7ccb7605cd462d763f45a063929381d0e728620722fe933f634",
"size": 56142,
"normalized_sha256": "a5d9d9cd5417f0c33c361343c1e06c7ef199882e716158a48e10af418f9ebe25"
"normalized_sha256": "b030576cd28af7ccb7605cd462d763f45a063929381d0e728620722fe933f634"
},
"scripts/lib/webui-publication.d.mts": {
"role": "index",
Expand Down
12 changes: 6 additions & 6 deletions aoci.code.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4541,7 +4541,7 @@ releasing.md[SE4T]: F:Documents publication of the WebUI npm package. | R:- | A:
0017-webui-fences-resource-results-and-separates-delivery-from-execution.md[SE4T]: F:Defines resource result fences and separates delivery from execution settlement. | R:- | A:- | S:-
0018-webui-business-cohesion-owners-and-measured-observation.md[SE4T]: F:Defines single business ownership and submission paths and evidence requirements for observation. | R:- | A:- | S:-
0019-webui-browser-use-surfaces-and-external-browser-bridge.md[SE4L]: F:Documents Browser Use surfaces, extension distribution, and external browser bridging. | R:- | A:- | S:-
0020-webui-miniapp-view-and-runtime-seams.md[SE4L]: F:Defines WebUI Mini App browser hosting and presentation boundaries. | R:- | A:- | S:-
0020-webui-miniapp-view-and-runtime-seams.md[SE4L]: F:Defines WebUI Mini App runtime, hosting and presentation boundaries. | R:code:packages/webui/src/client/features/miniapp/application/miniapp-workflows.ts | A:- | S:An explicit retry uses ordinary open. Polling does not restart failed presentations.
0021-webui-model-picker-is-one-popup-with-two-states.md[SE4T]: F:Combines provider and model selection into two states in one popup. | R:- | A:- | S:-
0022-webui-workspace-panel-is-a-browser-tab-strip.md[SE4M]: F:Models the WebUI workspace panel as a browser-style tab strip. | R:- | A:- | S:-
0023-webui-test-coverage-follows-user-workflows-and-evidence-levels.md[SE4S]: F:Defines WebUI workflow test coverage and evidence levels. | R:- | A:- | S:-
Expand Down Expand Up @@ -4873,7 +4873,7 @@ miniapp-agent-bridge.ts[SE4L]: F:Bridges Mini App requests to agent operations.
miniapp-bridge.ts[SE4S]: F:Constructs Mini App bridge requests. | R:- | A:- | S:-
miniapp-tool-bridge.ts[SE4T]: F:Bridges Mini App tool calls through the client tool port. | R:- | A:- | S:-
miniapp-window-bridge.ts[SE4T]: F:Defines Mini App window request messages and bridges window operations. | R:- | A:- | S:-
miniapp-workflows.ts[SE4L]: F:Coordinates Mini App workflows and maps preparation refusal details to client state. | R:code:packages/webui/src/shared/envelope.ts | A:- | S:Only a preparation failure with OWNED_ELSEWHERE is promoted to the takeover refusal code.
miniapp-workflows.ts[SE4L]: F:Coordinates Mini App workflows and retains preparation refusals for explicit recovery. | R:code:packages/webui/src/shared/envelope.ts | A:- | S:Retain failed presentation independently of the toast. Polling must not retry failed starts.

===/<repository>/packages/webui/src/client/features/miniapp/bindings/===
use-miniapp-catalogue.public.ts[SE4T]: F:Exposes Mini App catalogue summaries to React consumers. | R:- | A:- | S:-
Expand All @@ -4890,7 +4890,7 @@ MiniAppAppsList.public.tsx[SE4M]: F:Lists installed plugins that expose Mini App
MiniAppPicker.public.tsx[SE4M]: F:Renders the Mini App launcher for a session. | R:- | A:- | S:-
MiniAppStandalone.public.tsx[SE4S]: F:Hosts standalone Mini App presentation. | R:- | A:- | S:-
MiniAppToolApprovals.public.tsx[SE4T]: F:Renders approval controls for Mini App tool calls. | R:- | A:- | S:-
MiniAppView.public.tsx[SE4L]: F:Renders Mini Apps inline or as standalone surfaces. | R:- | A:- | S:-
MiniAppView.public.tsx[SE4L]: F:Renders inline and standalone Mini App views and persistent start recovery. | R:code:packages/webui/src/client/features/miniapp/application/miniapp-workflows.ts | A:MiniAppView | S:Only OWNED_ELSEWHERE asks the user to close another client.

===/<repository>/packages/webui/src/client/features/models/application/===
models-workflows.ts[SE4L]: F:Coordinates WebUI model workflows through a client port slice. | R:- | A:- | S:-
Expand Down Expand Up @@ -5680,11 +5680,11 @@ context-usage-ring.spec.mjs[SE4M]: F:Tests context usage ring rendering from run
dropdown-dismissal.spec.mjs[SE4T]: F:Tests dismissal of WebUI dropdowns through their triggers. | R:- | A:- | S:-
feedback.spec.mjs[SE4S]: F:Tests accessible field error feedback. | R:- | A:- | S:-
field-contract.spec.mjs[SE4S]: F:Tests that form controls have accessible names. | R:- | A:- | S:-
fixture.mjs[SE4L]: F:Installs the browser fixture transport. | R:- | A:- | S:-
fixture.mjs[SE4L]: F:Installs the browser fixture transport and supports named Mini App refusal reasons. | R:- | A:- | S:-
goal-retention.spec.mjs[SE4S]: F:Tests retention of session goal state during a pending refresh. | R:- | A:- | S:-
harness.mjs[TQ4M]: F:Provides built-client browser fixtures, readiness checks and failure artifacts. | R:code:playwright.config.mjs,code:packages/webui/test/browser/server.mjs | A:openApp, waitForLocalImages | S:Assert the synchronously injected server ID after navigation without polling. Windows buffer errors trigger a bounded TCP census; image evidence omits URL queries.
miniapp-panel.spec.mjs[SE4L]: F:Tests Mini App launcher refresh behavior. | R:- | A:- | S:-
miniapp-standalone-tab.spec.mjs[SE4S]: F:Tests promotion of inline Mini Apps to standalone tabs. | R:- | A:- | S:-
miniapp-standalone-tab.spec.mjs[SE4M]: F:Exercises standalone Mini App presentation and explicit retry after preparation refusal. | R:code:packages/webui/test/browser/fixture.mjs | A:- | S:Verifies the failed view persists after toast dismissal.
model-picker-interactions.spec.mjs[SE4M]: F:Tests model picker interactions and display of the selected model. | R:- | A:- | S:-
motion.spec.mjs[SE4S]: F:Tests shared WebUI motion contracts. | R:- | A:- | S:-
native-design-tasks.spec.mjs[TB6L]: F:Exercises native Design node runs, reference understanding, authenticated media and cancellation through the browser. | R:code:packages/webui/test/browser/support/native-design-browser-host.ts | A:- | S:Wait for the connected image reference to render after an out-of-band setup write before triggering the slow understanding run. Preserve provider and host evidence for uncompleted runs.
Expand Down Expand Up @@ -5838,7 +5838,7 @@ webui-font-environment.mjs[SE4S]: F:Configures the font environment used for Web
webui-overlay-inventory.json[SE4S]: F:Inventories overlays covered by WebUI checks. | R:- | A:- | S:-
webui-presentation-coverage.d.mts[SE4S]: F:Declares the shared presentation coverage API. | R:- | A:- | S:-
webui-presentation-coverage.mjs[SE4L]: F:Calculates coverage of shared WebUI presentation contracts. | R:- | A:- | S:-
webui-presentation-inventory.json[SE4M]: F:Inventories WebUI presentation surfaces. | R:- | A:- | S:-
webui-presentation-inventory.json[SE4M]: F:Records classified WebUI presentation surfaces and their reviewed content digests. | R:code:packages/webui/src/client/features/miniapp/ui/MiniAppView.public.tsx | A:- | S:-
webui-publication.d.mts[SE4S]: F:Declares helpers for WebUI package publication. | R:- | A:- | S:-
webui-publication.mjs[SE4M]: F:Implements validation and preparation for WebUI publication. | R:- | A:- | S:-
webui-raw-control-budget.json[SE4T]: F:Tracks allowances for raw WebUI controls. | R:- | A:- | S:-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ An absent session is reported as `none`; no session lookup or ended-session noti
A runtime that stops while the tab is open clears the view and reports the stop reason; it does not
restart the Mini App, because the tab may be unattended and a retry would start work the user did not
ask for. A retry is a user action.
A failed start leaves an actionable “not opened” state in the mounted view, alongside the
attempt's error toast. Dismissing the toast does not remove the state or its explicit retry
control. Only an `OWNED_ELSEWHERE` refusal tells the user to close the other client's app;
a generic preparation failure does not establish ownership. Retry uses the normal open
operation, never a takeover, and polling does not restart a failed presentation. Stop or
lease failures do not create this failed-start state.


### The standalone presentation is a lease

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ const MINIAPP_PRESENTATION_RECONNECT_GRACE_MS = 300;
* `open` carries the proxy's view URL and nothing else — not the Mini App's
* origin, not its surface path, not the credential its guard demands. `stopped`
* is a cleared view that remembers why, which is what the panel renders instead
* of a dead frame.
* of a dead frame. `failed` retains an unsuccessful start until the person
* retries; a stop or lease failure cannot create that state.
*/
export type WebuiMiniAppPresentation =
| { readonly kind: "opening" }
| { readonly kind: "failed"; readonly refusal: WebuiMiniAppRefusal }
| {
readonly kind: "open";
readonly viewUrl: string;
Expand Down Expand Up @@ -667,7 +669,7 @@ export function createWebuiMiniAppWorkflows(deps: {
} catch (error) {
if (!isCurrent()) return false;
const refusal = refusalOf(error);
setPresentation(pluginId, undefined);
setPresentation(pluginId, { kind: "failed", refusal });
setRefusal(pluginId, refusal);
// The runtime refused to start, so the row it refused about is stale: a
// capacity refusal names the running apps, and those names come from here.
Expand Down Expand Up @@ -877,7 +879,7 @@ export function createWebuiMiniAppWorkflows(deps: {
const existing = current.presentations[pluginId];
if (existing?.kind === "opening") return "presented";
// A cleared presentation or a refusal is the person's to retry, never a timer's.
if (existing?.kind === "stopped" || current.refusals[pluginId] !== undefined) return "blocked";
if (existing?.kind === "stopped" || existing?.kind === "failed" || current.refusals[pluginId] !== undefined) return "blocked";
let catalogue: WebuiMiniAppCatalogue | undefined;
try {
catalogue = observed ? observed.catalogue : await readCatalogue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import {
import { sessionHash } from "../../../projection/common/router.js";
import { FeedbackLiveRegion } from "../../../ui/feedback.js";
import { useWebuiToastError } from "../../../ui/toast.js";
import { WebuiIconButton } from "../../../ui/button.js";
import { WebuiButton, WebuiIconButton } from "../../../ui/button.js";
import { WebuiSkeletonProjection } from "../../../ui/page.js";
import { FeedbackEmpty } from "../../../ui/feedback.js";
import {
Expand Down Expand Up @@ -739,6 +739,23 @@ export function MiniAppView({
</FeedbackLiveRegion>
</div>
) : null}
{presentation?.kind === "failed" && !detached ? (
// The toast reports the attempt; this state remains until another
// explicit open succeeds. Polling must never restart a failed app.
<div className="webui-miniapp-view-state">
<FeedbackEmpty
testId="miniapp-view-start-failed"
title="应用尚未打开"
description={presentation.refusal.code === "OWNED_ELSEWHERE"
? "请先在其他客户端关闭该应用,再重试。"
: webuiMiniAppRefusalText({ ...presentation.refusal, rows: state.listing.rows })}
action={<WebuiButton
variant="secondary"
onClick={() => workflows?.open(pluginId)}
>重试打开应用</WebuiButton>}
/>
</div>
) : null}
{detached ? (
<div
className="webui-miniapp-view-state webui-miniapp-view-detached"
Expand Down
2 changes: 1 addition & 1 deletion packages/webui/test/browser/fixture.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ export function installFixtureTransport() {
replies,
pending,
setResponse(operation, value) { responses.set(operation, clone(value)); },
refuseOperation(operation, code, message) { refusals.set(operation, { code, message }); },
refuseOperation(operation, code, message, reasonCode) { refusals.set(operation, { code, message, reasonCode }); },
/**
* Answers an operation again after `refuseOperation`.
*
Expand Down
Loading
Loading