Comfy-Org / Comfy-Org/ComfyUI_frontend

Add test coverage for PromotedWidgetViewManager viewKey parameter and removeByViewKey method

Open
#9,291 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
area:subgraph area:testing
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Context

As noted in PR #9282, the new `viewKey` parameter and `removeByViewKey` method in `PromotedWidgetViewManager` are not covered by existing tests.

## Description

The `viewKey` mechanism prevents cache collisions when two inputs share one concrete widget name. This functionality should have direct test coverage to ensure correctness and prevent regressions.

## Files to test

- `src/lib/litegraph/src/subgraph/PromotedWidgetViewManager.ts`
- `viewKey` optional parameter in `getOrCreate` method
- `removeByViewKey` method
- Cache key generation with `viewKey` in `reconcile` method

## References

- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9282
- Comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9282#discussion_r2866949171
- Requested by: @christian-byrne

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-9291-Add-test-coverage-for-PromotedWidgetViewManager-viewKey-parameter-and-removeByViewKey--3156d73d365081c68eb5e0cbb7a79422) by [Unito](https://www.unito.io)

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.