feat: add writing-preset combo to main window (Paket K)#31
Merged
Conversation
… sync (Paket K) Surfaces the writing-style preset selector directly in the main window (TEXT_IMPROVER only, hidden for other workflows) and keeps it in sync with the tray submenu and Settings dialog — single source of truth remains config.writing_preset. - app/main_window.py: _preset_combo below _workflow_combo; visible only for WorkflowType.TEXT_IMPROVER; adjustSize() on workflow change; set_preset(key) with blockSignals to avoid circular emission; _on_preset_changed() delegates to controller; setEnabled follows IDLE state - app/blitztext_linux.py: main_window_preset_changed() handler (no-op on same key, else Config+save+LLM rebuild+tray refresh); tray handler pushes changes to open window; _ensure_main_window() initialises combo from config; show_settings_dialog() re-syncs combo after dialog accept - tests/test_tray_preset_menu.py: TestMainWindowPresetSync class with 6 new GUI-gated tests (394 passed, no regressions)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
QComboBoxfor the writing-style preset directly below the workflow selector in the main windowadjustSize()on workflow changeconfig.writing_presetset_preset()usesblockSignalsto prevent circular signal emissionmain_window_preset_changed()in controller: no-op on same key, else saves config + rebuilds LLM service + refreshes tray checkmarkshow_settings_dialog()re-syncs the combo after dialog accept (preset may have changed)_ensure_main_window()initialises combo from persisted config on first openTest plan
WHISPER_GUI_TESTS=1 QT_QPA_PLATFORM=offscreen python -m pytest tests/test_tray_preset_menu.py -v→ 13/13 passed (7 existing + 6 new)WHISPER_GUI_TESTS=1 QT_QPA_PLATFORM=offscreen python -m pytest tests/ -q→ 394 passed, no regressionsTestMainWindowPresetSynctests cover: init sync, tray→window, window→tray, no-op on same key, settings-dialog sync, visibility per workflow🤖 Generated with Claude Code