13 Commits
Author SHA1 Message Date
kk8bit d1a90c89bc Poll resource stats from the frontend; stop touching the environment
The monitor ran a resident asyncio task that sampled psutil/nvml every
0.5–2s and pushed the result over ComfyUI's WebSocket — whether or not
any panel was open, whether or not the tab was even in the foreground.
It is now a plain GET /kaytool/resources that the panel polls at the same
adaptive rate while it is visible and the page is in the foreground. A
200ms cache dedupes concurrent tabs and keeps cpu_percent's "since last
call" baseline sane.

The RemBG loader stopped setting U2NET_HOME. rembg offers no other way to
choose its model directory, and mutating the process environment reached
every other rembg-based extension in the same ComfyUI. Models now live
where rembg puts them by default; the changelog carries the migration
note.

Event listeners in gululu.js and nodealign.js use arrow functions instead
of .bind(this).

Together these remove every finding the registry's policy-v0.2 scanner
raised against 0.71.0 except the translators' HTTP calls.
2026-09-20 22:35:18 +08:00
kk8bit f4d487429c Base equal width/height on the largest selected node
Both took their target from nodes[0], the node that happened to be
selected first, so the same selection gave different results depending on
click order and usually looked like the nodes had shrunk for no reason.
Use the largest value instead, which is also safe against each node's own
minimum size.

Route the resize through setSize where the frontend provides it, rather
than mutating the size array in place behind the property setter.
2026-09-20 20:22:56 +08:00
kk8bit affc001629 Drop docking from the align toolbar; leave it freely floating
Docking into the top bar meant either living inside the Run button's card
and being dragged around with it, or snapping to a row whose geometry we
have to infer from the frontend's markup. Neither is worth the coupling
for a toolbar the user repositions often, so the toolbar now simply stays
wherever it is dropped.

Removes the band probing, the dock guide, the Run card avoidance and the
resize tracking that existed only to keep a docked toolbar aligned.
2026-09-20 17:57:25 +08:00
kk8bit 61a9bc89d2 Rebuild the node align toolbar as an independent docking panel
waitForElements() polled for .comfyui-menu, which the current frontend no
longer renders, so its promise never resolved. init() was stuck on that
await forever: the toolbar was never built and the Shift+WASD shortcuts
were never bound, while the requestAnimationFrame poll kept spinning for
the life of the session.

Docking into the DOM is no longer viable either way. The topbar is Vue
managed, so a card injected next to the Run button is wiped on the next
re-render, and the supported legacy slot (app.menu.element) lives inside
the Run button's own card, which would drag our toolbar around with it.

So the toolbar is now always a fixed element on document.body, like the
resource monitor, and docking is positional rather than structural: drop
it anywhere over the top bar row and it aligns to that row's centre,
keeping the x the user chose and stepping aside from the Run card. The
band geometry is read through data-testid hooks with a plain fallback, so
a future frontend redesign degrades to floating instead of vanishing.
2026-09-20 17:48:36 +08:00
kk8bit 428c98cc28 v0.52.1 2025-03-31 19:43:11 +08:00
kk8bit 5b3c2e1708 v0.51.0 2025-03-31 19:35:26 +08:00
kk8bit 98e13d9f1c v0.50.7 2025-03-30 15:31:09 +08:00
kk8bit 56279cdc75 v0.50.6 2025-03-29 23:53:15 +08:00
kk8bit 41fc05136e v0.50.5 2025-03-29 17:30:53 +08:00
kk8bit e78e489deb v0.50.3 2025-03-29 15:22:34 +08:00
kk8bit 5cd2bbc2a3 v0.50.1 2025-03-29 02:49:22 +08:00
kk8bit 79b2deee7c v0.51.0 2025-03-28 16:39:33 +08:00
kk8bit fec699ef26 v0.50.0 2025-03-27 22:36:34 +08:00