Repository navigation
fix(app-shell): a node click on a read-only flow canvas selects the node and opens the inspector read-only (objectui#11546) - #11603
Merged
objectstack-fleet[bot] merged 1 commit intoOct 4, 2026
Conversation
…ode and opens the inspector read-only (objectui#11546) On a read-only canvas FlowCanvas's node pointer-down returned before stopping propagation, so the press reached the background: it cleared the selection and took pointer capture on the viewport, and the browser fired the click at the viewport, so the node's select never ran. In design mode a node press now stops propagation whether or not the canvas is editable; only the drag start stays gated on `editable`. Outside design mode a node press still falls through to the background pan. Pins route the press the way a browser does (pointerup and click to the capturing element), which happy-dom does not do on its own: the Studio Automations pillar on a read-only package (inspector opens, every input disabled) with its writable control, and FlowCanvas cases for read-only select, withheld drag, the editable designer and the non-design pan. Claude-Session: https://claude.ai/code/session_01FjqrwXPfSMkSfkKYDSRkN2 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
objectstack-fleet
Bot
deleted the
claude/issue-11546-readonly-canvas-select
branch
October 4, 2026 09:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11546
Clause-②: no
On a read-only package, a click on a flow canvas node in Studio → Automations now selects the node and opens the flow inspector read-only. Only the drag is withheld. No editable input appears.
Mechanism (measured in Chromium before the fix)
FlowCanvas'sonNodePointerDownreturned early on a read-only canvas (if (!editable || e.button !== 0) return;) beforee.stopPropagation(). The press therefore reached the viewport'sonBgPointerDown, which callsonSelect(null)and takes pointer capture on the viewport. A browser sends the pointerup and the click to the capturing element, so the click landed on the viewport and the node card'sonClick(its select) never ran.A scratch harness (untracked, deleted after use) mounted the registered
FlowPreviewexactly as the Automations pillar mounts it on a read-only package (editing: true,onSelectionChange, noonPatch), with the registeredFlowInspectorgivenreadOnly: true. It was driven in Chromium (/opt/pw-browsers/chromium) at base2e818d0and again with the fix:2e818d0page.click)none, inspector absentnode:find, 7 inputs, 0 enabledmouse.down/mouse.up)nonenode:findgotpointercapture/ pointerup / click on the viewport (role=application)edge:e_start_find, 3 inputs, 0 enablednode:find, 7 inputs, 7 enabled / movedChange
FlowCanvasonNodePointerDown: in design mode a node press stops propagation whether or not the canvas is editable, and only the drag start stays gated oneditable. The Delete-key handler is untouched and still gated oneditable. Outside design mode, where a node click selects nothing, a node press still falls through to the background pan, as before.StudioDesignSurface.tsxis unchanged. The selection already opened the inspector with the pillar's realreadOnlyflag (objectui#11124's path). It was the selection that never happened.Edges are a different mechanism and needed nothing. The edge hit-path and its branch-label pill stop propagation on pointer-down unconditionally whenever the edge is selectable (design mode with
onSelectEdge). The table above shows a read-only edge click selecting the edge at base already. Nested region-tray nodes also stop propagation unconditionally.Pins
packages/app-shell/src/views/studio-design/StudioDesignSurface.automationsReadOnlySelect-11546.test.tsx, with the realAutomationsPillar,FlowPreviewandFlowInspector:FlowCanvas.test.tsx, a new describe block for objectui#11546: a read-only click selects that node and never callsonSelect(null); a read-only drag captures nothing, writes nothing and pans nothing; the editable designer (the control) still selects on click and commitspositionon drag; outside design mode a node press still pans.packages/app-shell/src/views/metadata-admin/previews/__tests__/browserClick.ts(browserClick,browserDrag). It sends the pointerup and the click to the element holding pointer capture, then releases capture, as a browser does. happy-dom recordssetPointerCapturebut routes no event by it. That routing gap is why objectui#11124's pins stayed green on this defect: they sendfireEvent.clickstraight to the node card, with no press. The helper sits under__tests__/, which app-shell'stsconfig.jsonexcludes from the build. The dist check below confirms nothing of it ships.StudioDesignSurface.automationsReadOnly-11124.test.tsx, is untouched and green, together with the rest of that file.Ablation (fix committed first; the subject resolves from
src, so no build sits on the path)The ablation used
node /home/user/objectstack/scripts/ablation-replace.mjsunder the verify lock. The anchor was the three fixed lines (if (!editable && !designMode) return;/e.stopPropagation();/if (!editable) return;). They were replaced by the base order (if (!editable) return;/e.stopPropagation();). The tool reported: anchor hits 1 → 0, blob82501d693e1d→95126d94e35d.Tests 3 failed | 29 passed (32)over the new pin file,FlowCanvas.test.tsxand the objectui#11124 file. The 3 red were the host read-only pin (the inspector's Label never appears), the canvas read-only click (expected [ null ] to deeply equal [ 'b' ]) and the canvas read-only drag (the viewport captured the press). Every objectui#11124 pin stayed green under the defect.git checkout HEAD -- PATHwas run with PATH absolute. Blob after the restore = HEAD blob82501d693e1d58384729c3cf61f9c29284399a98, andgit diff HEADis empty.Gates (all at
c47b708)pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build(lock)Scope: 29 of 47 workspace projects,VERDICT command-exit 0pnpm --filter @object-ui/app-shell type-check(tsc --noEmit && tsc -p tsconfig.test.json) (lock)--listFilesOnlyontsconfig.test.jsonlists the helper and both pin files (3)pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/ packages/app-shell/src/views/studio-design/+packages/app-shell/src/__tests__/spec-symbol-parity.test.ts,apps/console/src/__tests__/registry-inputs-spec-parity.test.ts,scripts/__tests__/{markdown-test-inputs,one-authority-per-exported-name-6273,check-lucide-icon-record-names}.test.ts(lock)Test Files 472 passed (472),Tests 5352 passed / 1 skipped (5353)pnpm --filter @object-ui/app-shell build, then adist/probe (lock)FlowCanvas.js1 (control, carries the fix);browserClick*0;__tests__paths 0;*11546*0node scripts/check-control-bytes.mjsOK (scanned 7497 tracked text file(s)…)node scripts/check-new-cross-file-line-citations.mjs0 new citation(s)node scripts/check-changeset-presence.mjs1 changeset(s) addednode scripts/check-changeset-claims.mjsNo pending changeset names a file this change touches.node scripts/check-pending-changeset-literals.mjsNo test source names a pending changeset.node scripts/check-changeset-no-major.mjs/check-changeset-overwrite.mjsNo changeset declares a major bump./No pre-existing changeset was modified or deleted.node scripts/check-vi-mock-specifiers.mjs/check-vi-mock-inherit.mjs/check-vi-mock-override-shape.mjsOKeachnode scripts/check-test-path-roots.mjsOKnode scripts/check-phantom-dependencies.mjs/check-published-tsconfig-tooling-exclude.mjsEvery in-scope i…/all 34 enforced package(s) carry the directory formTest selection, narrowed: both touched directories in full, plus every test that imports or reads as source text a changed file or
FlowCanvas. The selection was made bygit grepforFlowCanvas/flow-canvas-parts/browserClickover test files, and byreadFileSync/?rawreaders that name the previews path. The rest of app-shell and the whole-repopnpm testare declared to CI.Lint, a proven narrowing (not
pnpm lint):npx eslint --format jsonwas run frompackages/app-shell, as itseslint .would be..ts/.tsxfiles. eslint's own config answers the changeset.mdwith "File ignored because no matching configuration was supplied."react-hooks/exhaustive-depsonaddNode'suseCallback. The base file linted identically shows the same warning at the same place, so it is not this diff's.eslint.config.jssets noparserOptions.project/projectService, so the linting is not type-aware. No rule undereslint-rules/reads another file (zeroreadFileSync/readdirSync/globSynchits). This diff therefore cannot move the verdict on an untouched file.NOT MEASURED:
pnpm check:published-dist, reason: it builds the whole workspace (CI's run). The narroweddist/probe above covers this diff's helper. NOT MEASURED: fullpnpm test/pnpm lint, reason: repository-wide runs owned by CI.Acceptance notes
react-hooks/exhaustive-depswarning onaddNode(an unnecessarypositionOfdependency) predates this branch and is left alone. It is out of scope and not a defect.Session:
https://claude.ai/code/session_01FjqrwXPfSMkSfkKYDSRkN2Generated by Claude Code