Skip to content

feat(webmcp): add dashboard tab management tools - #7335

Open
koala73 wants to merge 8 commits into
mainfrom
cursor/webmcp-dashboard-tab-tools-2bce
Open

feat(webmcp): add dashboard tab management tools#7335
koala73 wants to merge 8 commits into
mainfrom
cursor/webmcp-dashboard-tab-tools-2bce

Conversation

@koala73

@koala73 koala73 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

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_tab
  • create_dashboard_tab
  • rename_dashboard_tab
  • delete_dashboard_tab

Tools 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: true and refuses the last required tab. Names use the same 40-character validation as the dashboard UI.

Closes #7324

Type of change

  • New feature
  • Documentation

Affected areas

  • Other: WebMCP dashboard tools, panel tab manager, agent-readiness

Checklist

  • Tested on worldmonitor.app variant
  • Tested on tech.worldmonitor.app variant (if applicable)
  • New RSS feed domains added to api/rss-proxy.js allowlist (if adding feeds) — N/A
  • No API keys or secrets committed
  • TypeScript compiles without errors (npm run typecheck)
  • New or repointed health probes have a completed Railway-side pre-seed, a one-way durable activation marker for an intentionally gated producer, or an owner-bound baseline acknowledgement with an entry-level expiresAt bounded to the first scheduled cron window (if applicable) — N/A

Documentation Alignment Checklist

  • Claim ledger attached or linked — N/A (WebMCP SPA tool inventory docs updated in lockstep EN/ZH)
  • All required Audit Council role signoffs attached — N/A
  • Generated docs regenerated from proto where applicable — N/A
  • Fixture-backed examples recomputed — eval fixture inventory updated to 13 tools
  • Redis writers/readers enumerated for every documented key — N/A

Behavior

  • List returns a snapshot of tabs, the active tab, and availability (tabCap, lock reason). When tabsTruncated is true, tabCount is the total persisted workspace count and the tabs array may omit non-active entries (oldest first).
  • Select/create/rename/delete go through WebMcpAppBindings.applyDashboardTabActionPanelLayoutManager.applyWebMcpTabAction → the same saveTabsState / applyTabPanelState / tab-bar refresh as the UI.
  • On Chrome 149–151, the four mutation tools return target_cancellation_unsupported unless the target supplies an AbortSignal.
  • Create with an existing name returns that tab (alreadyExisted: true) and selects it if inactive. unchanged is true only when that tab was already active. Unnamed create always creates.
  • Invalid create names report canCreate from the live cap (not forced false).
  • Delete with confirm !== true returns confirmation_required. Last tab returns last_tab (validation telemetry). Missing tab IDs return tab_not_found (stale telemetry).
  • Success no-ops use { ok: true, status: 'applied', unchanged: true } rather than skipped (which the WebMCP classifier treats as a denial).

Testing

Local (this PR):

  • tests/dashboard-tab-actions.test.mts — 9/9
  • tests/webmcp-tab-action-wiring.test.mts — 3/3
  • tests/tab-cap.test.mts — 25/25
  • Focused WebMCP ladder (docs:check + inventory/runtime/evals/docs/dashboard) — passed
  • Extra-key malformed_arguments and tab_cap/last_tab execute coverage in tests/webmcp.test.mjs
  • npm run typecheck, npm run typecheck:api, npm run typecheck:dom-tests — pass
  • npm run lint:boundaries — pass
  • Playwright e2e/webmcp.spec.ts tab persistence: visible tab-bar create → rename → select → delete → reload. With WM_REQUIRE_WEBMCP=1, list_dashboard_tabs is exercised and create_dashboard_tab is expected to return target_cancellation_unsupported on 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 status gate all succeeded. Mergeability is CLEAN. The earlier variant-smoke-full failure on 38f0694d was the Playwright executeTool create 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:

  • P2 src/app/webmcp-dashboard.tsget_dashboard_context still has no activeTabId; agents pair it with list_dashboard_tabs (out of feat(webmcp): add dashboard tab management tools #7324 scope).
  • P1/P2 product unnamed create does not uniqueness-check the UI default name; rename still allows duplicate display names; create-by-name uses first exact match.
  • P2 homoglyph / format-character names are not NFC-normalized or rejected beyond C0 controls.
  • P1 product truncated lists still omit overflow ids (no compact { id, active } continuation). Oldest full descriptors are dropped first; tabCount remains the persisted total.
  • P2 UI rename can persist control characters that WebMCP name normalization rejects.
  • P2 last_tab is returned before tab_not_found when only one tab remains.
  • Live PanelLayoutManager.applyWebMcpTabAction persistence 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).
  • Default CI still cannot persist tab mutations through WebMCP executeTool until Chrome delivers a target-side AbortSignal.

Post-Deploy Monitoring & Validation

  • Log / search terms: 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.
  • Metrics / dashboards: WebMCP tool invocation counts and denial reasons (especially tab_cap, confirmation_required, last_tab as validation, tab_not_found as stale, cancellation denials).
  • Healthy signals: list_dashboard_tabs succeeds with a tab snapshot; create/select/rename/delete apply through the existing persistence path when a target AbortSignal is present; unnamed create still adds a tab; named create against an existing inactive name switches and returns unchanged: false.
  • Failure signals / rollback: spike in malformed_arguments or tabs_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.
  • Validation window / owner: first agent sessions after deploy that exercise dashboard tools; area: panels / platform: web maintainers.

Screenshots

N/A. Persistence is proven by Playwright against the dashboard tab bar. WebMCP tool execute for mutations remains cancellation-gated on current Chrome.

Open in Web Open in Cursor 

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>
@mintlify

mintlify Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
WorldMonitor 🟢 Ready View Preview Aug 29, 2026, 5:54 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Ready Ready Preview Aug 29, 2026 8:37am

Request Review

cursoragent and others added 3 commits August 29, 2026 05:56
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>
@koala73
koala73 marked this pull request as ready for review August 29, 2026 06:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T06:37:01.414315Z 991854c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/app/panel-layout.ts Outdated
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>
Comment thread src/services/webmcp.ts Outdated
Comment thread src/app/panel-layout.ts Outdated
cursoragent and others added 2 commits August 29, 2026 08:24
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(webmcp): add dashboard tab management tools

2 participants