Commit Graph

14 Commits

Author SHA1 Message Date
Ethanfel 4ebad1bd6c feat(trials): reset_trials_for zeroes counter on use 2026-06-21 12:27:05 +02:00
Ethanfel 69eef149eb feat(trials): tick_boot_days counts distinct boot-days 2026-06-21 12:26:31 +02:00
Ethanfel 7b5fb32b31 feat(trials): add trial_packages table, start_trial, get_trials 2026-06-21 12:25:52 +02:00
Ethanfel ba7f503e7d feat: disable unused packages via ComfyUI Manager
Add per-package and per-section "Disable" buttons on the Safe to Remove
and Consider Removing tiers. Uses ComfyUI Manager's queue API
(/customnode/installed, /manager/queue/disable|start|status) to move
packages into custom_nodes/.disabled, reconciling against Manager's
actual state and surfacing a restart banner. Hidden when Manager is
absent.

Also:
- tracker: extract shared _classify_age() recency helper (DRY), add tests
- js: centralize STATUS_META, replace inline hover handlers with CSS,
  de-duplicate summary bar
- bump version to 1.2.0, update README

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 10:36:19 +02:00
Ethanfel 831ed302e9 fix: update model_type on upsert conflict and scope close button to dialog
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 18:20:18 +02:00
Ethanfel 800692d190 feat: add model_usage table and tracker methods
Adds model_usage schema, record_model_usage(), get_raw_model_stats(), and get_model_stats() to UsageTracker, with reset() support and 8 passing tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 17:55:27 +02:00
Ethanfel 2387a8d8ef Store usage database in ComfyUI user directory
Moves the SQLite database from the extension folder to
ComfyUI/user/nodes_stats/ so stats survive reinstalls.
Automatically migrates existing data on first load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 13:51:28 +01:00
Ethanfel 71fdcbdfd6 Make package exclusion case-insensitive
Directory names vary depending on how users clone or symlink
(e.g. ComfyUI-Manager vs comfyui-manager).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:15:02 +01:00
Ethanfel ca01871cf6 Exclude ComfyUI-Manager and node-stats from package list
These are management/meta tools, not workflow node packages.
Showing them in the stats would be confusing since they're
never used in actual workflows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:14:08 +01:00
Ethanfel 371cbb2bed Remove redundant get_all_packages() call in get_package_stats
node_counts already contains all packages from both mapper.mapping
and get_all_packages(), so the second call for installed_packages
was unnecessary duplicate work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:05:47 +01:00
Ethanfel 161da60537 Defer DB initialization to first use
Move SQLite schema creation from import time to the first
actual DB operation, which happens in a background thread.
Avoids blocking ComfyUI startup on slow storage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:03:11 +01:00
Ethanfel ae2c786d3a Mark removed/disabled packages as uninstalled
Packages that only exist in the DB but are no longer in
NODE_CLASS_MAPPINGS or LOADED_MODULE_DIRS get status
"uninstalled" and appear in a separate greyed-out section
at the bottom of the dialog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:00:05 +01:00
Ethanfel 17a27ed5b2 Add 4-tier package classification by usage recency
Packages are now classified as:
- Used: actively used
- Recently Unused (<1 month): too early to judge
- Consider Removing (1-2 months unused): deletion suggestion
- Safe to Remove (2+ months unused): confident removal candidate

Never-used packages are classified based on how long tracking
has been active. Summary bar and sections are color-coded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:58:12 +01:00
Ethanfel 25f1729f23 Initial commit: ComfyUI node usage stats tracker
Tracks every node used in every prompt submission via SQLite,
maps class_types to source packages, and exposes API endpoints
and a frontend dialog for viewing per-package usage stats.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:29:08 +01:00