Qt-removal R7.4c: Llama.cpp settings page + native file-picker capability#146
Merged
Merged
Conversation
…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.
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.
Summary
backend/native_dialogs.py- the one genuinely new capability this increment needed - wrapping pywebview'screate_file_dialogintopick_file/pick_folder, gracefully returningNonewhen no native window exists rather than raising.backend/settings.pygains 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 (saveLlamaCppSettingsvalidates then persists, matching legacy's own two-phase design) - 12 new intents, 11 new payload fields.pickOllamaScanFolder), the exact dependency R7.4b's own docstring flagged.OllamaTaskField's own already-accepted unbuffered risk, not a new regression.Test plan
python -m compileall -q .cleantests/test_no_qt_anywhere.py) unchanged: 152/84/68npm run check(schema-check/tsc/eslint/vitest/build): 1100 vitest passed, 0 lint errors, build clean~/.graphlink/session.datconfirmed byte-identical before and after