fix(core#2721-deeper): nav to org map before waiting for workspace node #2734
Reference in New Issue
Block a user
Delete Branch "fix/core2721-deeper-nav-to-org-map"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why this is a separate, completing PR
PR #2729 restored the
data-workspace-idattribute onWorkspaceNode— the right fix for the SELECTOR drift (#2721 root cause). But the staging-tabs E2E is STILL red on main after #2729 merged.Researcher RCA on run 358136 / job 486781 at main head
867557f08: thedata-workspace-idmarker IS present onWorkspaceNode, but the workspace node itself is not in the rendered tree.WorkspaceNodeonly mounts whentopView === "map"(canvas/src/components/concierge/ConciergeShell.tsx:528— the React Flow canvas mount is gated on the topView state). The default concierge view after hydration ishome(Home chat panel), so waiting for[data-workspace-id]without first switching to the Org map view is waiting for a node that isn't rendered.So #2729 fixed the selector; the underlying problem was the wrong view. This PR fixes the view.
Fix
Click
[data-testid="nav-map"]to switch the concierge top-level view to the Org map, THEN wait for the workspace node. Mirrors the proven pattern instaging-concierge.spec.ts:376(the Org map test) —navTo(page, "map")+expect.pollon[data-testid^="workspace-node-"]count + then drill down to the specific[data-workspace-id]target.Uses
expect.poll(notwaitForSelector) because React Flow's layout pass takes a tick after the nav click to position the just-inserted node, and thedata-workspace-idattribute may commit after the node is initially in the DOM.Diff
Verification
Local vitest/playwright run unavailable in this workspace (no
node_modules); the change is a 1-file E2E fix mirroring the provenstaging-concierge.spec.tsOrg-map pattern. CI will validate on PR open.Refs
staging-concierge.spec.ts:376(the provennavTo(page, "map") + expect.pollpattern this PR mirrors)canvas/src/components/concierge/ConciergeShell.tsx:528(whereWorkspaceNodeis gated ontopView === "map")867557f08that triggered this RCA)git.moleculesai.app/molecule-ai/molecule-core/issues/2721(comment 2, agent-researcher, 2026-06-13T08:21:38Z)APPROVED on head
85aa612d.5-axis review: this is the right test fix for the deeper #2721 failure. WorkspaceNode/data-workspace-id is only present when the Concierge shell is in Org map view, so navigating with
[data-testid="nav-map"]before waiting for the UUID-keyed node matches the proven staging-concierge Org-map pattern.expect.pollis appropriate here because React Flow may mount/layout the node and commit attributes across ticks; it is more robust than a single waitForSelector for this layout pass.Scope is test-only (
canvas/e2e/staging-tabs.spec.ts), no component/runtime behavior changes, and no security/performance regression. The targeted main-red checkE2E Staging Canvas (Playwright) / Canvas tabs E2Eis green on this head. At review time broaderCI / Canvas (Next.js)and advisory lifecycle checks were still pending, but the recurring failing E2E Staging Canvas path is fixed. /sop-ack/sop-ack
APPROVED (post-merge 2nd-review verification; PR was already merged when I fetched it).
5-axis: scope is test-only in
canvas/e2e/staging-tabs.spec.ts; behavior matches #2721-deeper RCA by explicitly navigating tonav-mapbefore waiting for WorkspaceNode; regression risk is low because it mirrors the existing staging-concierge map pattern and only affects the staging E2E; no production/security surface; CI history had stale SOP/advisory noise but the diff itself is clean./sop-ack