feat: add Ollama model management widget#15
Conversation
Slow polling to 15s when panel is closed (reduced CPU/memory load), restore 2s when panel is open for responsive GPU and loaded-model updates. Follows the same adaptive pattern already used by the AI usage timer.
|
All six findings from the review have been addressed. Changes are on the branch at P1 — Runtime configuration not restored (
P1 — Parallel refreshes overwriting each other's errors ( Replaced the single P1 — Delete accepting stale tag data (
P2 — Pull progress spawning tail every 500 ms ( Replaced the progress file, P2 — Native smoke test accepting a killed/hung shell ( Addressed in the same commit as P1 above. P2 — GPU metric reporting only the first GPU ( The collection command now emits all samples from nvidia-smi (every GPU, no Two-monitor UI smoke — completed manually:
Test results at
|
|
Thanks for the thorough follow-up. I verified the updated branch at The runtime-config restore, per-endpoint error slots, delete epoch/coalesced refresh, streaming pull progress, clean native-smoke exit, and multi-GPU maximum are all present. I also confirmed the reported automated results locally: 57/57 QtTests, wiring, native smoke, and the Arch/Theme/Shell updater regressions pass. The original fixes are well targeted. One P1 issue remains in the new connection-state aggregation:
Native reproduction against So after Ollama has responded successfully once, all three current endpoint requests can fail while the widget still reports Please clear the respective endpoint flag on both transport/HTTP and parse failures. Add an integration-style test against the real
After that test passes, I do not currently see another automated merge blocker. The documented two-monitor smoke remains accepted as the contributor's manual runtime validation. |
applyTags() and applyLoaded() were setting the endpoint connected flag to true on success but not resetting it to false on HTTP/transport or parse failures, so after one successful response all subsequent failures left connected=true. All three failure paths now clear the flag: - applyTags(): HTTP failure and parse exception - applyLoaded(): HTTP failure and parse exception - handleOperationModels(): malformed response (catch path) in addition to the existing exitCode != 0 branch
Exercises the real OllamaData component (not just pure-logic helpers) against the three new-in-review scenarios: 1. Version, tags, and loaded all succeed -> connected true and all endpoint flags true. 2. All three then fail via HTTP error -> every flag and connected are false. 3. Succeed again, then fail with malformed response bodies (unparseable JSON for tags; non-array models for loaded) -> respective endpoint connected flags reset to false.
|
All points addressed at
57 QtTests, wiring, native smoke, and updater regressions all pass. |
|
The offline merged runtime test is now in progress against the real local Two UI findings were reproduced during the live test: P2 - Delete button loses contrast and the glyph is not fully renderedIn Please keep the icon fully bounded and use a foreground color with clear contrast in all three states: idle, hover, and armed-for-confirmation. The armed state should remain visually distinct from a normal hover. Verification: on a dark/gold theme, inspect idle -> hover -> first-click/armed at scale 1.0. The complete glyph must remain visible and immediately recognizable in every state. P2 - Tooltip coverage is inconsistent for icon-only controlsSome icon controls already use Please add tooltips to all icon-only controls. For delete, the UI/tooltip should make the two-stage behavior explicit: the first click only arms confirmation; the second click permanently deletes the local model; Escape, closing the panel, or clicking elsewhere cancels the armed state. Verification: hover every icon-only control and confirm a correctly anchored tooltip appears without clipping. For delete, verify that the first click performs no deletion, the armed state is clearly communicated, cancellation works, and only the second confirmed click sends DELETE. P2 - Configuration option chips have no hover feedbackThe clickable Keep Alive ( Please give these clickable option chips the same restrained hover treatment used by the rest of the panel while preserving the stronger selected state. Disabled/busy options must remain visually distinct and must not show an active cursor. Verification: move across every Keep Alive and Context option in selected, unselected, and disabled states. Unselected enabled options should visibly but subtly react; selected options must remain clearly selected; disabled options must not imply clickability; no layout shift should occur. No code was changed during this test. These are runtime UI findings from the isolated local merge candidate. |
|
Additional UI consistency findings from the same offline runtime test: P2 - Configuration alignment and icon scale do not match the surrounding UIThe Please align the label and disclosure indicator as one visually centered unit, and use the established Control Center icon sizing/bounds for the gear action rather than a visually smaller glyph. This should be optical alignment, not only mathematical Verification: compare the Configuration control and gear action directly with existing Control Center icon controls at scale 1.0. Their visual centers, glyph bounds, and perceived icon sizes should match without shifting on hover. P2 - Infinite Keep Alive option is too small to read reliablyThe infinity option immediately to the right of Please size the infinity glyph optically rather than forcing the same text size as Verification: at scale 1.0, No code was changed; these are additional observations from the isolated merged candidate. |
|
One more configuration-layout issue confirmed in the offline runtime candidate: P2 - Custom Context text is not centered like the other option chipsThe normal Context options use centered Please use the same optical horizontal/vertical alignment and typography contract as the other configuration chips for both the placeholder and entered value. Editing/focus state must not shift the text or resize the row. Verification: compare No code was changed; this was confirmed from the merged runtime candidate and the corresponding QML layout. |
P2 - Pull field rejects a pasted
|
P2 - Pull progress has no transferred-size, speed, or ETA feedbackDuring the real 4.7 GiB model pull, the panel shows status/progress/percentage but no estimated remaining time. This matches the implementation: Please add compact transfer feedback such as: Important: Ollama progress is reported per digest/layer. A naive Recommended behavior:
Verification: exercise a throttled multi-layer fixture with changing rates and a real model pull. Confirm size/rate update, ETA stabilizes after several samples, layer transitions do not produce negative or nonsensical values, and success/failure resets the display. P2 - Raw layer digests are exposed as user-facing statusThe real pull displays statuses such as Please map known Ollama states to user-facing labels, for example:
Keep the raw digest only in an optional diagnostic detail/tooltip if needed. Unknown statuses should degrade to a readable generic download state rather than exposing an opaque identifier. P1 - An active pull cannot be cancelled from the panelWhile Please add an explicit Cancel action during pull. Cancellation should terminate the active curl process, distinguish Verification:
No code was changed; this was observed during the isolated merged runtime test. |
P1 - Successful pull is not reconciled into Installed ModelsThe real end-to-end pull exposed a lifecycle gap:
This matches the control flow: Please treat stream success as Verification fixture:
P2 - Pull success feedback disappears immediately
After successful reconciliation, show a short stable confirmation such as: Keep it visible for a few seconds without shifting panel dimensions. If the panel was closed during a long pull, surface completion through the existing shell notification/badge pattern. Failure should remain visible until acknowledged; success may auto-dismiss. Verification: use a deterministic clock fixture and assert that success appears only after tag reconciliation, contains the model and elapsed duration, remains visible for the intended interval, then clears without hiding an error or moving the layout. No code was changed. This is evidence from the isolated merged candidate and the real Ollama pull lifecycle. |
|
Follow-up to the Before this follow-up, Verified working
Remaining P1 blockers
Remaining UI/UX work
Please add targeted regressions for cancellation, delayed post-pull tag visibility, command normalization, status mapping, and completion-state lifetime. The visual findings require a runtime theme/scale smoke in addition to static assertions. Single-monitor runtime behavior is independently verified. The two-monitor matrix remains the contributor's documented validation because the reviewer currently has only one output available. No project or live files were modified for these findings; the candidate runs from an isolated local review worktree. |
|
@HANCORE-linux Thanks for the detailed runtime review. I addressed the follow-up findings in the new commits.
Targeted regression coverage was added for pull integration and panel wiring. The current targeted suites pass:
|
|
Thanks for the substantial follow-up work. The optional/default-off contract, API-only model operations, bar-order migration, and G16/control-panel integration are well structured. The current PR also merges cleanly with current I completed a review of all 20 changed files. I am not ready to merge the PR yet. Please address the following items and include the requested performance evidence. Required correctness fixes1. Restore correct global tooltip placement
The current wiring test asserts the new formula but does not validate geometry, so it preserves the regression. Please retain the existing bar-position-aware placement for bar-origin tooltips and add a separate placement mode/anchor path for panel-origin tooltips. Verify top bar, bottom bar, and Ollama panel tooltips on more than one screen position. 2. Make pull reconciliation match the observed Ollama lifecycleThe current reconciliation limit is eight attempts at one-second intervals. Our real Please use a documented time-based deadline/backoff that covers the observed finalization period. Keep the state at During reconciliation the download has already completed. The current No badge or desktop notification is required for merge. Either may be added as an optional UX enhancement for pulls completed while the panel is closed. The required behavior is that the model list updates automatically and failures remain visible when the panel is reopened. 3. Validate
|
Summary
Adds an optional, default-off Ollama widget for monitoring GPU usage and managing local models directly from the Quickshell bar.
This supersedes #14 and is updated for the latest
mainchanges.Features
Bar Integration
G16mainwidget-cache schema (archBadgeShellat+31) and appends Ollama fieldsmainReliability And Safety
-1for infinite Keep Alive values/api/psresponses without locking controlsTesting
git diff --checkNotes
Ollama is optional. The widget is disabled by default, and users without a local Ollama runtime will not incur polling or visible UI changes.