Remove code that nothing imports or calls:
- web/doctor_chat.js (the ChatPanel class, superseded by the chat
island; only its import in doctor_ui.js remained), web/doctor_chat.css
and web/doctor_telemetry.js. ComfyUI still loaded these files as
extension scripts, but they had no module-level side effects.
- DoctorUI.triggerAIAnalysis and DoctorUI.updatePollInterval;
DoctorAPI.getHistory, DoctorAPI.verifyApiKey and DoctorAPI.chat;
renderContentPipeline.
- The first, shadowed PatternLoader.get_pattern_info definition (the
later one was always the one in effect).
- verify_routes.py, which could not run under package imports and
replaced sys.modules entries with mocks when imported.
The architecture guide lists only existing frontend modules, enforced by
a new test, and the import-scan skip lists no longer name the script.
- Privacy diagnostics: the provider name is None for unknown endpoints
and when no base URL is set; calling .lower() on it raised and dropped
every issue of the check, including the warning for privacy_mode=none
with an unknown remote endpoint.
- Telemetry: the pattern allowlist built a PatternLoader without its
required directories, so it was always empty and every pattern label
became __unknown__. It now reads ids from the shared loader through a
new PatternLoader.get_pattern_ids().
- Error summary: the LLM context builder read the category from a nested
pattern_match key that the pattern stage never writes; it now reads the
top-level category (nested key kept as a fallback).
- Sidebar: an error delivered before the sidebar panel existed (it waits
for UI text) threw on auto-open, and so did the menu toggle. Visibility
is now applied when the panel is created.
- OpenAPI info.version now matches the package version, and the version
metadata test enforces it.
- A missing optional patterns/custom directory is logged at debug level
instead of a warning; missing built-in directories still warn.