Skip to content

fix(den-web): let a dashboard hold the same MCP App more than once with different launch input - #4390

Merged
yomgui merged 9 commits into
devfrom
6-dashboard-duplicate-tool
Sep 4, 2026
Merged

yomgui merged 9 commits into
devfrom
6-dashboard-duplicate-tool

Conversation

@yomgui

@yomgui yomgui commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Problem

An organization dashboard could not hold two tiles of the same MCP App with different launch input — for example two searchJiraIssuesUsingJql tiles with different queries. After the first add, the Add app picker row turned into a terminal ✓ Added badge: no Add button, no launch-input field, and any second add of the same app was silently dropped.

Root cause: the Den Web picker identified a tile by serverName:toolName only (org-dashboard-detail-screen.tsx), ignoring launchArguments. Nothing else in the stack has that limitation — the API accepts duplicates, elements are a plain JSON array, and Desktop's grantedEntryId already includes launch arguments (pinned by granted-dashboard-store.test.ts). The authoring UI simply disagreed with the rest of the feature.

Internal ref #6 (customer report; identity kept in the private tracker).

Change

  • Tile identity = App + canonical launch arguments (dashboardElementKey in dashboard-mcp-app-catalog.ts), matching Desktop. Same tool + different input → two tiles; same tool + same input → one.
  • Picker row is no longer a dead-end: after the first add it keeps the Add control (labelled Add another), the auto-run toggle, and the launch-input field, and shows an Added / Added ×N count hint.
  • Identical tile is refused visibly ("This app is already on the dashboard with the same launch input.") instead of silently dropped.
  • Element rows show their launch input, so same-App tiles are distinguishable.

No API, schema, or Desktop change. No migration: no saved dashboard can contain duplicates today because the UI prevented them; element identity is content-based on both sides and unchanged for existing tiles.

Proof

Lane: local (MySQL local placement). Daytona is available but cannot reach this spec: on Daytona placements server({ env }) is not forwarded to the shared Den sandbox, so DEN_DASHBOARDS_ENABLED never reaches den-api and Den Web redirects the dashboards route before the picker exists (pre-existing; evals/packages/env/src/den.ts provisionDenSandbox call, unchanged here). The spec is therefore registered in daytona-e2e-regression-profile.json under the existing per-test-den-env category rather than producing a spurious CI red. Forwarding per-test Den env to the Daytona sandbox is a separate harness change.

  • evals/specs/dashboard-duplicate-capability-tiles.e2e.test.ts — a spec.world spec (imports only @openwork/testkit; world in evals/worlds/dashboards.ts) that drives the real Den Web picker against a witness MCP exposing exactly one App-visible launch tool: adds it with one JQL, asserts the row still offers Add another and an editable launch input, adds it again with a second JQL, asserts both persist via GET /v1/dashboards/:id with their own arguments (first not replaced), asserts an identical third is refused visibly with persistence unchanged, and asserts each element row shows its own launch input. Red on origin/dev before the fix (reproduced the report at 0a9cc40, 4041e92, f7b1f73); green with it.
    OPENWORK_EVAL_E2E_TESTS=1 pnpm --dir evals exec vitest run --config vitest.config.ts --project e2e specs/dashboard-duplicate-capability-tiles.e2e.test.ts → exit 0, 1 passed / 0 failed / 0 skipped on ec77079 (head).
  • evals/specs/dashboard-atlassian-tile-error.e2e.test.ts (from fix(dashboards): surface missing required launch input instead of "Unexpected server error" #4385, same picker) → 1 passed on ec77079. dashboard-atlassian-launch-input.test.ts → 1 passed.
  • evals/specs/dashboard-element-identity.test.ts (PR lane) — pins the identity: different input → distinct keys; key order / empty-vs-absent input → same key; capability key ignores input. → 1 passed.
  • pnpm --dir evals test (the openwork-tests-unit step: layer lint + ratchet + runner/package unit tests) → exit 0, 219 pass / 0 fail, no dependency violations.
  • pnpm --filter @openwork-ee/den-web typecheck → exit 0. den-web bun test for the dashboard catalog + sidebar-IA files → 7 pass / 0 fail. Hosts provision.test.ts → 14 pass; cdp input.test.ts + transport.test.ts → 7 pass. Profile guards (daytona-e2e-regression-concurrency, daytona-e2e-singles-toolchain) → 6 pass.
  • next lint fails repo-wide on this Next version ("no such directory …/lint"), unrelated to this change.

Test-infra included:

  • Witness: scripts/mock-oauth-mcp-server.mjs gains an env-gated MOCK_APP_TOOL_NAME launch tool (_meta.ui.resourceUri, required input), plumbed through mcpMock({ appToolName }) for local and Daytona mock boots.
  • Two primitive repairs surfaced by porting the spec to spec.world: seed.web navigates to the Den Web origin before writing the auth token (the surface can attach while Chrome is still on its opaque-origin start page, where localStorage throws); pressKey names the editing command for select-all / move-to-end chords, since synthesized CDP key events bypass the OS keymap and user.type({ replace }) appended instead of replacing.

Merged origin/dev twice while open (no history rewrite): #4378 removed the e2e quarantine mechanism, so the quarantine registrations were dropped and only the Daytona profile entry remains; #4385 touched the same picker (required-key validation and a required-key placeholder) and was merged alongside with both behaviours kept.

Verdict: Passed (local lane on head ec77079; Daytona lane not reachable for this spec, see above).

…th different launch input

Adds an app-visible MCP App launch tool to the witness MCP (MOCK_APP_TOOL_NAME),
plumbed through mcpMock for both local and Daytona mock boots, and a Den Web
authoring spec asserting that a dashboard can hold two tiles of the same
capability with different launch arguments. The spec is red today: the picker
keys tiles by serverName:toolName and shows a terminal Added state after the
first add.
…oken handoff

The raw openwork:web:auth-token handoff is bounced to the sign-in page on
Daytona placements; use the same signInInBrowser flow the other Den Web
authoring specs use so the spec runs in both lanes.
The spec is red by design until the Den Web dashboard picker stops keying
tiles by serverName:toolName. It also needs DEN_DASHBOARDS_ENABLED before Den
starts, which the shared Daytona Den does not receive, so list it with the
other per-test-den-env exclusions.
…th different launch input

The Add app picker identified a tile by serverName:toolName, so after one add
the row turned into a terminal Added badge with no Add button and no launch
input, and any second add of the same app was silently dropped. A dashboard
therefore could not hold two tiles of one App with different launch input
(two JQL queries), even though the API, the stored element array, and the
Desktop tile identity already allow it.

Identify a tile by its App plus canonical launch arguments, matching Desktop.
The picker row keeps its Add control (labelled Add another), auto-run toggle,
and launch input after the first add and shows an Added count; an identical
tile (same App, same launch input) is refused with a visible message instead
of a silent drop. Element rows show their launch input so same-App tiles are
distinguishable.

The e2e spec that reproduced the report is now green and moves from
product-finding to needs-topology; a PR-lane spec pins the tile identity.
…tool

# Conflicts:
#	evals/specs/daytona-e2e-regression-profile.json
#	evals/specs/quarantine.json
@vercel

vercel Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 4, 2026 6:24am UTC
openwork-den Ready Ready Preview Sep 4, 2026 6:24am UTC
2 Skipped Deployments
Project Deployment Actions Updated
openwork-diagnostics Ignored Ignored Preview Sep 4, 2026 6:24am UTC
openwork-landing Ignored Ignored Preview Sep 4, 2026 6:24am UTC

@yomgui

yomgui commented Sep 4, 2026 •

Copy link
Copy Markdown
Member Author

Test evidence — an-organization-dashboard-holds-two-tiles-of-the-same-mcp-app-capability-with-di — ✅ passed

✅ 0/2 screenshots passed · 4 assertions · 4 expectations passed · 0 failed · 0 pending

[world] mock(mcp) · den(local) · orgConnection("Issue tracker 1788502852555") · [seed] api GET /v1/mcp-connections/emc_01m1nh7s8fehhrbwq7j4r9avgt/mcp-apps · [seed] api POST /v1/dashboards · web(signed in)
[user] see(text=JQL board 1788502852555, timeoutMs=90000) · click(Add app) · see(text=Search issues (JQL), timeoutMs=90000) · type(placeholder={ "jql": "…" }, "{"jql":"project = ALPHA ORDER BY created DESC"}", replace) · click(Add)
[probe] api(GET /v1/dashboards/dsb_01m1nh7sbfejdsbvc0k2n1y7z6) ×2 · eventually(first tile persisted in Den)
[user] see(Add another, timeoutMs=15000) · see(placeholder={ "jql": "…" }, editable) · screenshot
[probe] has("Add another") · has("Added")
[user] type(placeholder={ "jql": "…" }, "{"jql":"project = BETA AND status = Open"}", replace) · click(Add another)
[probe] api(GET /v1/dashboards/dsb_01m1nh7sbfejdsbvc0k2n1y7z6) ×2 · eventually(second same-capability tile persisted in Den)
[user] see(text=Added ×2, timeoutMs=15000) · click(Add another) · see(text=This app is already on the dashboard with the same launch input., timeoutMs=15000)
[probe] api(GET /v1/dashboards/dsb_01m1nh7sbfejdsbvc0k2n1y7z6) · has("This app is already on the dashboard with the same launch input.")
[user] click(Done) · notSee(Done) · see(text=search_issues_using_jql · {"jql":"project = ALPHA ORDER BY created DESC"}) · see(text=search_issues_using_jql · {"jql":"project = BETA AND status = Open"}) · screenshot
steps 1 ✅ add the App once (0.4s) · 2 ✅ add the same App again with different launch input (0.0s) · 3 ✅ try to add an identical tile (0.0s)
verdict passed · 11 user observations (see ×8, screenshot ×2, notSee ×1) · 10 probes · steps 3/3

ℹ️ ASSERTION — 1. The witness connection exposes exactly one MCP App launch tool

GET /v1/mcp-connections/emc_01m1nh7s8fehhrbwq7j4r9avgt/mcp-apps returned ["search_issues_using_jql"]

  • ✅ PASS The witness connection exposes exactly one MCP App launch tool — GET /v1/mcp-connections/emc_01m1nh7s8fehhrbwq7j4r9avgt/mcp-apps returned ["search_issues_using_jql"]

ℹ️ ASSERTION — 2. The Add app picker keeps offering an already-added capability for a second tile with different launch input

Picker row after the first add: {"addAnotherOffered":true,"addedHintVisible":true}; launch input field still editable

  • ✅ PASS The Add app picker keeps offering an already-added capability for a second tile with different launch input — Picker row after the first add: {"addAnotherOffered":true,"addedHintVisible":true}; launch input field still editable

ℹ️ ASSERTION — 3. An identical tile is refused visibly and does not change the saved dashboard

refusal shown=true; persisted after attempt=[{"toolName":"search_issues_using_jql","jql":"project = ALPHA ORDER BY created DESC"},{"toolName":"search_issues_using_jql","jql":"project = BETA AND status = Open"}]

  • ✅ PASS An identical tile is refused visibly and does not change the saved dashboard — refusal shown=true; persisted after attempt=[{"toolName":"search_issues_using_jql","jql":"project = ALPHA ORDER BY created DESC"},{"toolName":"search_issues_using_jql","jql":"project = BETA AND status = Open"}]

ℹ️ ASSERTION — 4. Two tiles of the same MCP App capability with different launch arguments coexist on one dashboard

Persisted elements: [{"toolName":"search_issues_using_jql","jql":"project = ALPHA ORDER BY created DESC"},{"toolName":"search_issues_using_jql","jql":"project = BETA AND status = Open"}]; each element row shows its own launch input

  • ✅ PASS Two tiles of the same MCP App capability with different launch arguments coexist on one dashboard — Persisted elements: [{"toolName":"search_issues_using_jql","jql":"project = ALPHA ORDER BY created DESC"},{"toolName":"search_issues_using_jql","jql":"project = BETA AND status = Open"}]; each element row shows its own launch input

⚪ UNVALIDATED — 5. an-organization-dashboard-holds-two-tiles-of-the-same-mcp-app-capability-with-di artifact 2

  • ⚪ UNVALIDATED — no visual expectations recorded.

an-organization-dashboard-holds-two-tiles-of-the-same-mcp-app-capability-with-di artifact 2

⚪ UNVALIDATED — 6. an-organization-dashboard-holds-two-tiles-of-the-same-mcp-app-capability-with-di artifact 5

  • ⚪ UNVALIDATED — no visual expectations recorded.

an-organization-dashboard-holds-two-tiles-of-the-same-mcp-app-capability-with-di artifact 5


Test run created 2026-09-04T06:20:52.532Z · Source: evals/results/test-runs/2026-09-04T06-20-52-531Z-an-organization-dashboard-holds-two-tiles-of-the-same-mcp-app-capability-with-di/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4390 --test-run 2026-09-04T06-20-52-531Z-an-organization-dashboard-holds-two-tiles-of-the-same-mcp-app-capability-with-di

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 4, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (4078fdca2986c7cef68fd9cfb9c25680aa8933b5). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

…d primitives

The spec now imports only @openwork/testkit, satisfying the
specs-use-testkit-only layer rule that failed openwork-tests-unit: a
worlds/dashboards.ts world seeds Den, the witness App, the connection, the
empty dashboard and a signed-in Den Web tab, and the body uses user/probe.

Two primitive repairs surfaced by the port:
- seed.web navigates to the Den Web origin before writing the auth token; the
  surface can attach while Chrome is still on its opaque-origin start page,
  where localStorage access throws.
- pressKey names the editing command for select-all and move-to-end chords;
  synthesized CDP key events bypass the OS keymap, so user.type({ replace })
  appended instead of replacing.
…tool

# Conflicts:
#	ee/apps/den-web/app/(den)/dashboard/_components/org-dashboard-detail-screen.tsx
…lder

dev now renders the required input keys in the picker placeholder (#4385).

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (ec770794fa1c66d7b106156f30c598cca40abeea). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui
yomgui merged commit 7bc43b9 into dev Sep 4, 2026
34 checks passed
@yomgui
yomgui deleted the 6-dashboard-duplicate-tool branch September 4, 2026 06:33
benjaminshafii pushed a commit that referenced this pull request Sep 4, 2026
… module (#4404)

#4390 added evals/specs/dashboard-element-identity.test.ts, which imports
den-web source; #4398 landed minutes later with the spec boundary ratchet
whose baseline predates that file, so dev's openwork-tests-unit went red on
the combination. Unit tests belong beside the module they test: run it in
den-web's bun suite and drop it from evals/specs.
benjaminshafii pushed a commit that referenced this pull request Sep 4, 2026
…ded specs

The Daytona E2E regression plan intersected changed specs with the
eligible set after deciding whether to fall back. A PR whose only e2e
change is a profile-excluded spec (PR #4390 added
dashboard-duplicate-capability-tiles.e2e.test.ts and excluded it in the
same change) produced a non-empty matched list, no fallback, an empty
matrix, a skipped e2e job, and a failed verdict.

Intersect changed specs with eligible specs first so the existing
fallback applies, and make the plan summary say what actually happened.

Refs #3915
benjaminshafii pushed a commit that referenced this pull request Sep 4, 2026
Every legacy evals/specs file flagged by the boundary ratchet was read and
classified. 104 are deleted: they regex product source text, assert on
workflow/config text, spawn another test runner and grade its output, or
duplicate an existing colocated unit or journey spec. 18 genuine
pure-function tests move next to their module under that package's own
runner (bun:test for app/server/den-api/den-web, node:test for desktop and
release scripts). 13 remain baselined: they observe a live boundary through
a raw channel and are tagged for server() migration.

Also moves dashboard-element-identity (merged in #4390 alongside the
ratchet) to den-web tests, which unbreaks test:eval-runner on dev.

boundary-ratchet.baseline.json: 116 -> 13.
benjaminshafii pushed a commit that referenced this pull request Sep 4, 2026
Every legacy evals/specs file flagged by the boundary ratchet was read and
classified. 104 are deleted: they regex product source text, assert on
workflow/config text, spawn another test runner and grade its output, or
duplicate an existing colocated unit or journey spec. 18 genuine
pure-function tests move next to their module under that package's own
runner (bun:test for app/server/den-api/den-web, node:test for desktop and
release scripts). 13 remain baselined: they observe a live boundary through
a raw channel and are tagged for server() migration.

Also moves dashboard-element-identity (merged in #4390 alongside the
ratchet) to den-web tests, which unbreaks test:eval-runner on dev.

boundary-ratchet.baseline.json: 116 -> 13.
benjaminshafii pushed a commit that referenced this pull request Sep 4, 2026
…4402)

* evals: retire 104 laundered unit tests from evals/specs, colocate 18

Every legacy evals/specs file flagged by the boundary ratchet was read and
classified. 104 are deleted: they regex product source text, assert on
workflow/config text, spawn another test runner and grade its output, or
duplicate an existing colocated unit or journey spec. 18 genuine
pure-function tests move next to their module under that package's own
runner (bun:test for app/server/den-api/den-web, node:test for desktop and
release scripts). 13 remain baselined: they observe a live boundary through
a raw channel and are tagged for server() migration.

Also moves dashboard-element-identity (merged in #4390 alongside the
ratchet) to den-web tests, which unbreaks test:eval-runner on dev.

boundary-ratchet.baseline.json: 116 -> 13.

* test(server): complete ServerConfig fixture in moved engine drain test

* test(release): compare extracted link URLs by equality, not substring

* test(release): assert extracted links with Set.has to satisfy CodeQL

* test(release): collect every URL in the notes before asserting membership

* test(desktop): type the empty env fixture as ProcessEnv

This branch was successfully deployed

3 active (1 outdated) deployments
Preview – openwork-app — ec770794 Deployed Sep 4, 2026 by vercel[bot]
Preview – openwork-den — ec770794 Deployed Sep 4, 2026 by vercel[bot]
Preview – openwork-diagnostics — 4078fdca Deployed Sep 4, 2026 by vercel[bot]
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.

1 participant