Skip to content

Qt-removal R7.4c: Llama.cpp settings page + native file-picker capability#146

Merged
dovvnloading merged 1 commit into
mainfrom
qt-removal/r7-4c-llamacpp-settings
Jul 26, 2026
Merged

Qt-removal R7.4c: Llama.cpp settings page + native file-picker capability#146
dovvnloading merged 1 commit into
mainfrom
qt-removal/r7-4c-llamacpp-settings

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

Summary

  • Closes R7.4 (all 3 of R2.5d's deferred settings pages are now real): adds backend/native_dialogs.py - the one genuinely new capability this increment needed - wrapping pywebview's create_file_dialog into pick_file/pick_folder, gracefully returning None when no native window exists rather than raising.
  • backend/settings.py gains the Llama.cpp page for real: reasoning mode, runtime tunables (chat format/n_ctx/n_gpu_layers/n_threads), GGUF model scan (system + real folder-picker), and staged-then-Saved chat/title model paths (saveLlamaCppSettings validates then persists, matching legacy's own two-phase design) - 12 new intents, 11 new payload fields.
  • Building the picker capability also retroactively un-defers the Ollama page's own long-disabled "Scan Folder..." button (pickOllamaScanFolder), the exact dependency R7.4b's own docstring flagged.
  • A 5-way adversarial review (backend/frontend/integration/legacy-parity/security - the 5th lens added since this is the first native-OS-integration point in the whole rewrite) found and fixed 4 real issues, all mutation-tested: a stranded reentrancy gate if the native dialog itself raises; an unlocked read race in the live-reapply paths; 5 collapsed legacy error messages restored verbatim; missing initial-directory seeding + a dropped "All Files" filter fallback on every native dialog call site, both restored to match legacy. Security review found nothing above informational (single-user localhost desktop app; GGUF loading is always lazy/non-preloading; no path-traversal-shaped concatenation anywhere).
  • One narrow, already-accepted-elsewhere risk documented inline rather than chased further: the new numeric-field/chat-format draft buffers (added to fix a real, deterministic multi-digit-typing bug their own test caught) can still have a same-session echo of an older keystroke stomp a newer draft under sustained fast typing during a slow round trip - matches OllamaTaskField's own already-accepted unbuffered risk, not a new regression.

Test plan

  • python -m compileall -q . clean
  • Burn-down gate (tests/test_no_qt_anywhere.py) unchanged: 152/84/68
  • Full backend pytest: 2496 passed (2494 + 2 net new)
  • Full frontend npm run check (schema-check/tsc/eslint/vitest/build): 1100 vitest passed, 0 lint errors, build clean
  • All 4 fix-pass regressions mutation-verified (revert the fix → test fails), including both new native-dialog-failure tests
  • Live WS drive against a real running backend exercising the native dialog's graceful no-window path and a real, unmocked GGUF filesystem scan, using an isolated scratch settings file - the real ~/.graphlink/session.dat confirmed byte-identical before and after

…lity

Closes R7.4 (all 3 of R2.5d's deferred settings pages are now real).
Adds backend/native_dialogs.py - the one genuinely new capability this
increment needed - wrapping pywebview's create_file_dialog into
pick_file/pick_folder, gracefully returning None when no native window
exists rather than raising. backend/settings.py gains the Llama.cpp page
for real (reasoning mode, runtime tunables, GGUF scan, staged-then-Saved
model paths) and a retroactive real wiring for the Ollama page's own
long-disabled "Scan Folder..." button, which needed this same capability.

A 5-way adversarial review (backend/frontend/integration/legacy-parity/
security - security added since this is the first native-OS integration
point in the rewrite) found and fixed 4 real issues: a stranded
reentrancy gate if the native dialog itself raises, an unlocked read
race in the live-reapply paths, 5 collapsed legacy error messages
restored verbatim, and missing initial-directory seeding on every native
dialog call site - all mutation-tested. One narrow, already-accepted-
elsewhere risk (a same-session echo race in the new numeric-field draft
buffers) is documented inline rather than chased further.

Verified with a live WS drive against a real backend exercising both
the native dialog's graceful no-window path and a real, unmocked GGUF
filesystem scan - the real ~/.graphlink/session.dat confirmed untouched.
@dovvnloading
dovvnloading merged commit 4e8aa24 into main Jul 26, 2026
2 checks passed
@dovvnloading
dovvnloading deleted the qt-removal/r7-4c-llamacpp-settings branch July 26, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant