feat(webmcp): add dashboard tab management tools - #7335
Conversation
Expose list, select, create, rename, and delete tools so agents can manage named persistent panel workspaces by stable tab ID. Mutations reuse the dashboard tab bar paths, honor tab caps and last-tab guards, and require target-side cancellation plus explicit delete confirmation. Co-authored-by: Elie Habib <koala73@users.noreply.github.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Drop Array.findLastIndex so tab-list truncation typechecks under the ES2020 lib, and update leftover registration and eval totals for the thirteen-tool SPA inventory. Co-authored-by: Elie Habib <koala73@users.noreply.github.com>
Reuse one denied-create payload for named and unnamed creates, and assign cap.cap directly instead of branching on the same value. Co-authored-by: Elie Habib <koala73@users.noreply.github.com>
Drive create, rename, select, delete, and reload through the visible tab bar in ordinary Chromium, dismiss the mission overlay, and only assert list_dashboard_tabs when WM_REQUIRE_WEBMCP=1. Co-authored-by: Elie Habib <koala73@users.noreply.github.com>
Keep create denials reporting the live tab cap, mark existing-name create as changed when it switches workspaces, drop oldest tabs when bounding list output, and classify last_tab/tab_not_found for telemetry. Co-authored-by: Elie Habib <koala73@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 991854c09a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
CI Chrome still omits the target-side AbortSignal, so create/rename/ select/delete cannot persist through executeTool. Keep list coverage and prove the cancellation denial, then reuse the visible tab bar for the persistence walk. Co-authored-by: Elie Habib <koala73@users.noreply.github.com>
Keep every tab id and name enumerable under the 1,400-character output budget by returning nextCursor and walking pages. #7335 Co-authored-by: Elie Habib <koala73@users.noreply.github.com>
saveTabsState now returns a persisted receipt. WebMCP select, create, rename, and delete no longer report ok/applied after a swallowed private-mode or quota write; they deny with persist_failed. Co-authored-by: Elie Habib <koala73@users.noreply.github.com>
Summary
Adds five typed WebMCP tools so an agent can manage dashboard tabs (named persistent panel workspaces) instead of only operating the currently active tab:
list_dashboard_tabs(read-only)select_dashboard_tabcreate_dashboard_tabrename_dashboard_tabdelete_dashboard_tabTools address tabs by stable IDs, reuse the existing tab manager and persistence path, return active tab / IDs / names / availability, enforce tab-cap and entitlement rules, and treat select/create as idempotent when the requested end state already exists. Persistent mutations require target-side cancellation. Delete requires
confirm: trueand refuses the last required tab. Names use the same 40-character validation as the dashboard UI.Closes #7324
Type of change
Affected areas
Checklist
api/rss-proxy.jsallowlist (if adding feeds) — N/Anpm run typecheck)expiresAtbounded to the first scheduled cron window (if applicable) — N/ADocumentation Alignment Checklist
Behavior
tabCap, lock reason). WhentabsTruncatedis true,tabCountis the total persisted workspace count and the tabs array may omit non-active entries (oldest first).WebMcpAppBindings.applyDashboardTabAction→PanelLayoutManager.applyWebMcpTabAction→ the samesaveTabsState/applyTabPanelState/ tab-bar refresh as the UI.target_cancellation_unsupportedunless the target supplies anAbortSignal.alreadyExisted: true) and selects it if inactive.unchangedis true only when that tab was already active. Unnamed create always creates.canCreatefrom the live cap (not forced false).confirm !== truereturnsconfirmation_required. Last tab returnslast_tab(validation telemetry). Missing tab IDs returntab_not_found(stale telemetry).{ ok: true, status: 'applied', unchanged: true }rather thanskipped(which the WebMCP classifier treats as a denial).Testing
Local (this PR):
tests/dashboard-tab-actions.test.mts— 9/9tests/webmcp-tab-action-wiring.test.mts— 3/3tests/tab-cap.test.mts— 25/25docs:check+ inventory/runtime/evals/docs/dashboard) — passedmalformed_argumentsandtab_cap/last_tabexecute coverage intests/webmcp.test.mjsnpm run typecheck,npm run typecheck:api,npm run typecheck:dom-tests— passnpm run lint:boundaries— passe2e/webmcp.spec.tstab persistence: visible tab-bar create → rename → select → delete → reload. WithWM_REQUIRE_WEBMCP=1,list_dashboard_tabsis exercised andcreate_dashboard_tabis expected to returntarget_cancellation_unsupportedon current Chrome (no target-side AbortSignal), then the same tab-bar walk proves persistence.CI on
a3e121c89(final snapshot 2026-08-29T06:53:25Z):variant-smoke-full,unit,typecheck,biome,dom-tests,sidecar,convex-tests, and commit statusgateall succeeded. Mergeability is CLEAN. The earliervariant-smoke-fullfailure on38f0694dwas the PlaywrightexecuteToolcreate expectation; that is now asserted as a cancellation denial.Known Residuals
From review run
20260829-060456-513b0cb5(correctness, testing, agent-native, adversarial; project-standards and maintainability were not independently dispatched). Auto-accepted after applying mechanical P1/P2 fixes:src/app/webmcp-dashboard.ts—get_dashboard_contextstill has noactiveTabId; agents pair it withlist_dashboard_tabs(out of feat(webmcp): add dashboard tab management tools #7324 scope).{ id, active }continuation). Oldest full descriptors are dropped first;tabCountremains the persisted total.last_tabis returned beforetab_not_foundwhen only one tab remains.PanelLayoutManager.applyWebMcpTabActionpersistence is covered by wiring greps plus resolver tests, not a mounted-manager harness (test(panel-layout): no DOM harness for PanelLayoutManager — tab-cap wiring is still guarded by source greps #5892).executeTooluntil Chrome delivers a target-side AbortSignal.Post-Deploy Monitoring & Validation
webmcp,list_dashboard_tabs,select_dashboard_tab,create_dashboard_tab,rename_dashboard_tab,delete_dashboard_tab,tab_cap,last_tab,confirmation_required,target_cancellation_unsupported,invalid_name,tab_not_found.tab_cap,confirmation_required,last_tabas validation,tab_not_foundas stale, cancellation denials).list_dashboard_tabssucceeds with a tab snapshot; create/select/rename/delete apply through the existing persistence path when a targetAbortSignalis present; unnamed create still adds a tab; named create against an existing inactive name switches and returnsunchanged: false.malformed_argumentsortabs_unavailable; tab bar / persistence drift vs tool snapshot; agents deleting tabs without confirmation. Rollback is reverting this PR; tab state lives in existing client persistence, so a rollback does not wipe user tabs.Screenshots
N/A. Persistence is proven by Playwright against the dashboard tab bar. WebMCP tool execute for mutations remains cancellation-gated on current Chrome.