Various refactoring after 3.1.2 release#251
Open
leslielazzarino wants to merge 2 commits into
Open
Conversation
Clean up dead code, fix typo/version pin, route error paths through error sink
Architecture cleanup pass: remove dead IPC surface, fix a few small
inconsistencies, and migrate genuine error/catch paths onto the central
errors.report() sink (per AGENTS.md convention) instead of bare toast.error.
Dead code & small fixes:
- Remove dead IPC commands refreshLLMModles / getDownloadedLLMs (both
returned [] after the old ipexllm backend was removed). Dropped the
handlers, preload bridge entries, and env.d.ts type defs.
- Fix `singal` -> `signal` typo (all references) in
service/model_download_adpater.py.
- Pin OpenVINO backend to Python ==3.12.* (was >=3.10) to match the
service/, home-agent/, and ComfyUI/ backends.
Error-handling consistency (route through useErrors sink):
- InstallationManagement.vue: 5 service start/stop/setup failures now go
through errors.report(...) with category backend/setup and serviceName
context; removed the now-unused toast import.
- McpServerDialog.vue: add/update failure reported as surface:'inline'
(dialog already renders the message inline, drops a redundant toast);
remove failure reported as a normal toast.
- PromptArea.vue: audio-recorder error, image-load catch, and RAG-add
catch now go through errors.report(...).
Signed-off-by: Leslie Lazzarino <leslie.lazzarino@tngtech.com>
#1 Backend process-lifecycle helpers (composition, not inheritance) - New WebUI/electron/subprocesses/processLifecycle.ts exporting terminateProcessTree() (SIGTERM → Windows taskkill /T /F tree / SIGKILL) and waitForServerReadyOrThrow() (health poll; supports llamacpp's getStartupError and openvino's stderr/exit-signal diagnostics). - service.ts (base stop()), openVINOBackendService.ts and llamaCppBackendService.ts now delegate to these instead of each reimplementing health-check / kill logic. - Fix: llamacpp LLM/embedding stops previously used SIGTERM→SIGKILL with no Windows tree-kill, leaking descendant processes and causing reinstall EPERM; they now tree-kill like the other backends. #2 Shared Python loopback-auth - New backend_shared/aipg_loopback_auth.py: stdlib-only, transport-agnostic evaluate_loopback_auth() + get_loopback_token(). - service/web_api.py and home-agent/web_api.py import it via a ../backend_shared sys.path bootstrap (resolves identically in dev and packaged layouts); each keeps its own response/CORS handling so behavior is preserved. - build-config.json: package backend_shared/ alongside the backends. #3 Split comfyUiPresets store (1600 → 1368 lines) - New comfyUiMessages.ts: ComfyUI WS message schema + execution-error summarizer. - New comfyUiWorkflowTransforms.ts: workflow-graph transforms (OVMS image url inject, model-path normalize, node bypass). - comfyUiPresets.ts imports both; reactive store surface unchanged. Signed-off-by: Leslie Lazzarino <leslie.lazzarino@tngtech.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes Made:
Clean up dead code, fix typo/version pin, route error paths through error sink
inconsistencies, and migrate genuine error/catch paths onto the central
errors.report() sink (per AGENTS.md convention) instead of bare toast.error.
Dead code & small fixes:
returned [] after the old ipexllm backend was removed). Dropped the
handlers, preload bridge entries, and env.d.ts type defs.
singal->signaltypo (all references) inservice/model_download_adpater.py.
service/, home-agent/, and ComfyUI/ backends.
Error-handling consistency (route through useErrors sink):
through errors.report(...) with category backend/setup and serviceName
context; removed the now-unused toast import.
(dialog already renders the message inline, drops a redundant toast);
remove failure reported as a normal toast.
catch now go through errors.report(...).
Backend process-lifecycle helpers (composition, not inheritance)
terminateProcessTree() (SIGTERM → Windows taskkill /T /F tree / SIGKILL)
and waitForServerReadyOrThrow() (health poll; supports llamacpp's
getStartupError and openvino's stderr/exit-signal diagnostics).
llamaCppBackendService.ts now delegate to these instead of each
reimplementing health-check / kill logic.
Windows tree-kill, leaking descendant processes and causing reinstall
EPERM; they now tree-kill like the other backends.
Shared Python loopback-auth
evaluate_loopback_auth() + get_loopback_token().
../backend_shared sys.path bootstrap (resolves identically in dev and
packaged layouts); each keeps its own response/CORS handling so behavior
is preserved.
Split comfyUiPresets store (1600 → 1368 lines)
summarizer.
url inject, model-path normalize, node bypass).