Repository navigation
fix(den-web): let a dashboard hold the same MCP App more than once with different launch input - #4390
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
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) ℹ️ ASSERTION — 1. The witness connection exposes exactly one MCP App launch toolGET /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 inputPicker 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 dashboardrefusal 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 dashboardPersisted 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 — 6. 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: |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
… 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.
…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
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.
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.
…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


Problem
An organization dashboard could not hold two tiles of the same MCP App with different launch input — for example two
searchJiraIssuesUsingJqltiles 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:toolNameonly (org-dashboard-detail-screen.tsx), ignoringlaunchArguments. Nothing else in the stack has that limitation — the API accepts duplicates, elements are a plain JSON array, and Desktop'sgrantedEntryIdalready includes launch arguments (pinned bygranted-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
dashboardElementKeyindashboard-mcp-app-catalog.ts), matching Desktop. Same tool + different input → two tiles; same tool + same input → one.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, soDEN_DASHBOARDS_ENABLEDnever reaches den-api and Den Web redirects the dashboards route before the picker exists (pre-existing;evals/packages/env/src/den.tsprovisionDenSandboxcall, unchanged here). The spec is therefore registered indaytona-e2e-regression-profile.jsonunder the existingper-test-den-envcategory 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— aspec.worldspec (imports only@openwork/testkit; world inevals/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 viaGET /v1/dashboards/:idwith 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 onorigin/devbefore 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(theopenwork-tests-unitstep: 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-webbun testfor the dashboard catalog + sidebar-IA files → 7 pass / 0 fail. Hostsprovision.test.ts→ 14 pass; cdpinput.test.ts+transport.test.ts→ 7 pass. Profile guards (daytona-e2e-regression-concurrency,daytona-e2e-singles-toolchain) → 6 pass.next lintfails repo-wide on this Next version ("no such directory …/lint"), unrelated to this change.Test-infra included:
scripts/mock-oauth-mcp-server.mjsgains an env-gatedMOCK_APP_TOOL_NAMElaunch tool (_meta.ui.resourceUri, required input), plumbed throughmcpMock({ appToolName })for local and Daytona mock boots.spec.world:seed.webnavigates to the Den Web origin before writing the auth token (the surface can attach while Chrome is still on its opaque-origin start page, wherelocalStoragethrows);pressKeynames the editing command for select-all / move-to-end chords, since synthesized CDP key events bypass the OS keymap anduser.type({ replace })appended instead of replacing.Merged
origin/devtwice 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).