Comfy-Org / Comfy-Org/ComfyUI_frontend

test(minimap): cover layout-store-only change detection

Open
#15,217 1 comment 1 reaction 1 assignee Claimed by @benjcooley View on GitHub
area:minimap area:testing
Dominant language
TypeScript
Stars
2k
Forks
702
Avg merge
1d 8h
Merged PRs (30d)
512

Description

## Summary
Add automated coverage for minimap change detection when only `layoutStore.layoutVersion` changes.

## Rationale
`useMinimapGraph.ts` includes `layoutStore.layoutVersion` in `computeLayoutDigest()` so the minimap refreshes when layout-store geometry changes but the write-back to `graph._nodes` does not land. Current minimap tests do not detect removal of this digest input.

## Affected area
- `src/renderer/extensions/minimap/composables/useMinimapGraph.ts`
- `src/renderer/extensions/minimap/composables/useMinimapGraph.test.ts`

## Required change
Add a focused test that establishes a baseline with `checkForChanges()`, changes only the layout-store version or layout-store state that increments that version, and verifies that the next `checkForChanges()` returns `true`.

## Acceptance criteria
- The test fails if `computeLayoutDigest()` does not mix in `layoutStore.layoutVersion`.
- The test does not require a change to `graph._nodes`.
- The test verifies the layout-related minimap update flags as applicable.

## Backlinks
- Pull request: https://github.com/Comfy-Org/ComfyUI_frontend/pull/15029
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/15029#discussion_r3778403508

Requested by: @christian-byrne

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.