Repository navigation
refactor: migrate remaining locate buttons to shared LocateNodeButton - #13795
mattmillerai wants to merge 24 commits into
Conversation
Deduplicate the byte-identical locate icon-button repeated across four sites in the errors panel (ErrorNodeCard, TabErrors, MissingPackGroupRow x2) into a single LocateNodeButton component. Standardizes the decorative icon's aria-hidden and the click .stop modifier, which previously varied between sites.
…cate labels - Replace closure-captured counter with vi.fn() spy in the click-propagation test so it actually fails when @click.stop is removed - Add keyboard-activation coverage and pin aria-label via DOM assertion - Give each MissingPackGroupRow locate button a distinct accessible name via locateNodeFor, matching ErrorGroupList (WCAG 2.4.6) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The LocateNodeButton extraction switched the locate button aria-label
from the static "Locate node on canvas" to the per-item
`rightSidePanel.locateNodeFor` ("Locate {item}"), but these test queries
were not updated, so they failed to find the button.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ange
The extracted LocateNodeButton now carries a per-item accessible name
("Locate {item}"), so getByRole('button', { name }) matched both the row
label button and the locate button, tripping Playwright strict mode. Use
exact matching to target the row label button.
…ode-button # Conflicts: # src/components/rightSidePanel/errors/ErrorGroupList.vue
Use rightSidePanel.locateNodeFor with the card node title (safe fallback to generic label) so runtime error cards expose distinguishable locate buttons. Strengthen MissingPackGroupRow negative assertions to check locate-button count, not only a specific label's absence.
Replace the five inline lucide--locate Button usages in SwapNodeGroupRow, MissingModelRow, and MissingMediaCard with the shared LocateNodeButton component, passing node-specific accessible labels via rightSidePanel.locateNodeFor to match the errors-panel siblings. This also gives the swap-node and missing-model locate buttons click.stop (harmless: no ancestor binds a DOM click handler) and node-specific aria-labels in place of the previous generic label.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
📦 Bundle: 12.2 MB gzip 🟢 -370 BDetailsSummary
Category Glance App Entry Points — 6.92 kB (baseline 6.92 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 3.66 MB (baseline 3.66 MB) • 🟢 -1.4 kBGraph editor runtime, canvas, workflow orchestration
Status: 4 added / 4 removed / 1 unchanged Views & Navigation — 150 kB (baseline 150 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 15 added / 15 removed / 3 unchanged Panels & Settings — 899 kB (baseline 899 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 14 added / 14 removed / 21 unchanged User & Accounts — 108 kB (baseline 108 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 11 added / 11 removed / 7 unchanged Editors & Dialogs — 502 kB (baseline 502 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 13 added / 13 removed / 6 unchanged UI Components — 368 kB (baseline 368 kB) • ⚪ 0 BReusable component library chunks
Status: 13 added / 13 removed / 21 unchanged Data & Services — 2.01 MB (baseline 2.01 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 40 added / 40 removed / 5 unchanged Utilities & Hooks — 1.37 MB (baseline 1.37 MB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 49 added / 49 removed / 36 unchanged Vendor & Third-Party — 9.7 MB (baseline 9.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 35.8 MB (baseline 35.8 MB) • 🟢 -41 BBundles that do not match a named category
Status: 117 added / 117 removed / 646 unchanged ⚡ Performance: ⏳ Performance tests in progress…🎭 Playwright: ✅ 3285 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure
Findings and check detailsExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight The matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped. Full docs: scripts/registry-census/README.md Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
🌾 Fallow: ✅ PassedFindings and check detailsFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Full docs: ADR-DEVEX-LINT-0015 Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since a1d37f54eafdb825ef4af156c6314670ed8aff4f
🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (498)
Full docs: Frontend domain catalog Reproduce locallypnpm architecture:check |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
✅ No high-signal findings.
Panel: 8/8 reviewers contributed findings.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #13795 +/- ##
==========================================
- Coverage 87.76% 87.67% -0.10%
==========================================
Files 3132 3025 -107
Lines 167988 164610 -3378
Branches 45212 49046 +3834
==========================================
- Hits 147439 144320 -3119
+ Misses 19594 19493 -101
+ Partials 955 797 -158
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 116 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…ode-button-migration # Conflicts: # src/components/rightSidePanel/errors/LocateNodeButton.test.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ode-button-migration # Conflicts: # src/platform/missingMedia/components/MissingMediaCard.vue # src/platform/missingModel/components/MissingModelRow.vue # src/platform/nodeReplacement/components/SwapNodeGroupRow.vue
dante01yoon
left a comment
There was a problem hiding this comment.
Thanks, this is a clean follow-up to #13401. All five locate controls now share LocateNodeButton, and the node-specific accessible names (with #id on expanded swap rows) are a real accessibility improvement. I checked that click.stop is safe: the parent cards only listen to the custom locate-* events. The domain-record changes match the PR description. No gate concerns: no API types or server-derived state are involved.
Two non-blocking notes:
Unanchored
- suggestion:
rightSidePanel.missingModels.locateNodeinsrc/locales/en/main.jsonhas no remaining references after this PR (its only users were the twoMissingModelRowbuttons). Consider removing it fromen/main.jsonso it doesn't linger.rightSidePanel.locateNodeis still used byErrorNodeCardandSectionWidgets, so it should stay.
Not run locally: I reviewed the diff only. CI shows no failing checks.
…locale key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ode-button-migration # Conflicts: # docs/architecture/domains/records/node-replacement.domain.json
…ode-button-migration Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed only what changed since my last review (fa7ec9ce → e5dc34ec). Apart from main merges, the one PR-owned commit is 6d30516d88:
- My earlier suggestion is addressed:
rightSidePanel.missingModels.locateNodeis removed fromen/main.json, andgit grepfinds no remaining references.rightSidePanel.locateNodestays becauseErrorNodeCardandSectionWidgetsstill use it. SwapNodeGroupRownow uses onelocateNodeLabelFor(item)helper instead of two inlinet('rightSidePanel.locateNodeFor', …, { escapeParameter: false })calls. Both labels render the same as before.- The new
keybindings/*entries in theworkflow-errors/presentation/publicallow-list ofboundaries.jsoncome from regeneration. That layer inherits workflow-errors' allow-list, which gained keybindings on main in #22154. It is not a hand edit.
All three gates are still clear: this is a refactor, it derives no server state on the client, and it hand-declares no API types. CI on this head: 92 passing, none failing. I didn't run tests locally because dependencies aren't installed in this checkout. Approving.
Resolve import conflicts from the error-panel move to src/platform/workflowErrors/panel and repoint the architecture public entry point for LocateNodeButton. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed only what changed since my last approval (e5dc34ec → 329ac96e). The only new commit merges origin/main, and the PR-owned diff changes in just one way: it follows the file move from #22194.
MissingMediaCard.vue,MissingModelRow.vueandSwapNodeGroupRow.vuenow importLocateNodeButton,selectionEmphasisClassandSwapNodeGroupfrom@/platform/workflowErrors/panel/. All three files exist at the new path, andgit grepfinds no references to the oldcomponents/rightSidePanel/errors/paths.- The
workflow-errorsdomain record and theworkflow-errors/presentation/publiclayer pattern inboundaries.jsonnow point tosrc/platform/workflowErrors/panel/LocateNodeButton.vue. - The one new allow-list line adds
workflow-errors/presentation/publictoworkflow-errors/integration. That layer can now see its own domain's public layer, the same wayworkflow-errors/presentationalready does, so it is regenerated output, not a hand edit.
The component and test changes are otherwise identical to what I approved. All three gates are still clear: this is a refactor, it derives no server state on the client, and it hand-declares no API types. CI on this head: 92 passing, none failing. I didn't run tests locally because dependencies aren't installed in this checkout. Approving.
…ode-button-migration # Conflicts: # docs/architecture/domains/boundaries.json # docs/architecture/domains/records/workflow-errors.domain.json
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed only what changed since my last approval (329ac96e → 03723bbc). The only new commit merges origin/main. I compared the PR-owned diff before and after the merge, and it changes in just one place: boundaries.json.
- The
workflow-errors/presentation/publicallow-list now also listsextension-manager/domain,/application,/presentation,/domain/outer-1and/application/outer-2. This comes from regeneration. On main, #22156 addedextension-managerto theallowedDependenciesinworkflow-errors.domain.json, and that list now matches theworkflow-errors/presentationallow-list entry for entry. It is not a hand edit. - The component, test, locale and domain-record changes are the same as what I approved before. All imports in the three migrated components still resolve on the merged tree.
My earlier notes are still addressed: rightSidePanel.missingModels.locateNode is gone with no remaining references, and SwapNodeGroupRow uses the shared locateNodeLabelFor helper. All three gates are still clear: this is a refactor, it derives no server state on the client, and it hand-declares no API types. CI on this head is green, including lint-pr / repo-checks and unit/e2e. I didn't run tests locally because dependencies aren't installed in this checkout. Approving.
…ode-button-migration Regenerates boundaries.json, which goes stale when main's workflow-errors dependencies combine with this branch's public entry point.
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed only what changed since my last approval (03723bbc → 9953b3ca). The only new commit is another merge of origin/main. I compared the PR-owned diff (each merge commit against its main parent) before and after it, and it changes in just one place: boundaries.json.
- The
workflow-errors/presentation/publicallow-list gainskeybindings/application,keybindings/domain/outer-1andextension-manager/presentation/outer-1, and dropsextension-manager/application. That list is now identical to theworkflow-errors/presentationallow-list on this head. The presentation entry differs from main only by the new public layer itself. So this is regenerated output, not a hand edit. - The component, test, locale and domain-record changes are the same as what I approved before.
Checks: at this exact head, in an isolated worktree with a frozen install, MissingMediaCard.test.ts, MissingModelRow.test.ts and SwapNodeGroupRow.test.ts pass (44 tests). CI: 92 passing, 18 skipped, none failing. All three gates are still clear: this is a refactor, it derives no server state on the client, and it hand-declares no API types. Approving.
…ode-button-migration # Conflicts: # docs/architecture/domains/boundaries.json # docs/architecture/domains/records/missing-media.domain.json # docs/architecture/domains/records/missing-models.domain.json # docs/architecture/domains/records/node-replacement.domain.json # docs/architecture/domains/records/workflow-errors.domain.json
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed the delta since my last approval (9953b3ca → 7d49d918). The only new commit is another merge of origin/main. I compared the PR-owned diff against the merge base. The component, test, locale and domain-record changes are the same as what I approved before. No PR-owned file changed except through the merge, and the merged tree still resolves the @/platform/workflowErrors/panel/ imports.
Migration behavior, checked per call site against LocateNodeButton:
- Click:
@locateis wired to the same handler in all five sites. The newclick.stopis safe because the parent cards only bind the customlocate-*events. - Aria label: now
Locate {item}throughrightSidePanel.locateNodeForin all five sites. Expanded swap rows add#<nodeId>. - Disabled state: none of the five original buttons had one.
- Icon sizing and classes:
size-8and thelucide--locateicon come from the shared component.MissingModelRowkeepsml-autoas a class. - Tests use
@testing-library/vuewithuser-event. No vue-i18n mocks were added.
My earlier notes are addressed: the unused missingModels.locateNode key is gone, and SwapNodeGroupRow uses a locateNodeLabelFor helper.
Gates: all three are clear. This is a refactor, it derives no server state on the client, and it hand-declares no API types.
Checks: CI on this head has 92 passing, 21 skipped and none failing. I did not run any tests locally.
…ode-button-migration # Conflicts: # docs/architecture/domains/boundaries.json
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed the delta since my last approval (7d49d918 → a884d49c). The only new commit is another merge of origin/main. I compared the PR-owned diff, each merge commit against its main parent, before and after the merge.
- The component, test, locale and
workflow-errors.domain.jsonchanges are identical. Only hunk offsets moved. boundaries.json: main switched to flat layer names, so the PR's public layer is now emitted asworkflow-errors/public(patterns:src/platform/workflowErrors/panel/LocateNodeButton.vue) instead ofworkflow-errors/presentation/public. It is added to the same consumer allow-lists as before. This is regenerated output, not a hand edit, and the boundary checks are green on this head.
No new discussion to answer. LGTM again.
…ode-button-migration Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ELI5
The panels that list errors and missing files have small "find this on the canvas" buttons. This change makes every one of those buttons the same shared button, so they look and behave alike, and screen readers now announce which specific item each button will find instead of a generic label.
Summary
Follow-up to #13401 (now merged to
main). That PRextracted
LocateNodeButton.vuefor the errors panel but intentionally leftthe platform-sibling rows untouched. This PR migrates the remaining five inline
Button+icon-[lucide--locate]usages:SwapNodeGroupRow.vue(2 — header + per-node list)MissingModelRow.vue(2 — header + per-reference list)MissingMediaCard.vue(1)Each inline button becomes
<LocateNodeButton :label @locate />, with anode-specific accessible label built from
rightSidePanel.locateNodeFor(
Locate {item}), matching the pattern already used inErrorNodeCard/ErrorGroupList/MissingPackGroupRow:MissingMediaCardalready usedlocateNodeFor— label unchanged.SwapNodeGroupRowandMissingModelRowpreviously used a generic"Locate node on canvas" label; they now name the node type / display name.
In an expanded swap group, each per-node control also carries the node ID
(
Locate OldNodeType #1,#2) so same-type nodes stay distinguishable.Behavior note:
click.stopLocateNodeButtonstops click propagation, whereas the swap-node andmissing-model rows previously used a plain
@click. Stopping propagation isthe desired, consistent behavior and is safe here: the parent components
(
SwapNodesCard,MissingModelCard) only bind the custom@locate-node/@locate-modelevents and no ancestor binds a DOMclickhandler on the row,so nothing relied on the native click bubbling.
Domain boundaries
The three migrated components live in other architecture domains than
LocateNodeButton.vue(workflow-errors).LocateNodeButton.vueis now listed as aworkflow-errorspublic entry point, so it is the supported way for other domains to use it.mainno longer has per-domain dependency or consumer lists, so no other domain record changes.boundaries.jsonis regenerated from these records.Tests
SwapNodeGroupRow.test.ts: updated the locate-button assertions to the newnode-specific accessible names (including
#<nodeId>on expanded per-nodecontrols) and added a test asserting each control gets a node-specific label.
MissingModelRow.test.ts: added a test asserting the header locate buttonexposes the node-specific aria-label and emits
locateModel.MissingMediaCard.test.ts: added a locate emit test (the existingspecial-characters aria-label test already covers the node-specific label).
nodeReplacement.spec.ts(e2e): the single-replacement locate assertion nowexpects the node-specific name
Locate E2E_OldSampler.All three files' tests plus the parent-card and
LocateNodeButtontests pass;typecheckandeslintare clean on the changed files.Notes / judgment calls
rightSidePanel.missingModels.locateNodestring is removedfrom
en/main.json, per review.SectionWidgets.vuealso has alucide--locatebutton, but it lives in theparameters panel (a different context, generic label) and is not one of the
five usages this ticket scopes — left untouched.
Provenance
Authored by: agent-work loop
Verified:
c4de0aemergesmainata1d37f5(which reworkedMissingModelRowfor Desktop download progress); the merge kept both that change and this PR's shared locate buttonsrc/platform/workflowErrors(44 files, 1009 tests) passes on the merged treepnpm typecheckis clean; eslint is clean on the three migrated component folderspnpm architecture:checkpasses; its warnings are about files no domain claims, none in this PR's diffc4de0aepassed, including the required lint, unit and e2e checks; no merge-queue run yetDeviations:
nodeReplacement.spec.tsthat still expected the old genericLocate node on canvaslabelLocateNodeButton.vueas a public entry point, per a review finding on boundary violations; the earlier declared-dependency edits were dropped becausemainremoved those listslocateNodeLabelForhelper inSwapNodeGroupRowand removed the unusedmissingModels.locateNodekey