Skip to content

feat: add writing-preset combo to main window (Paket K)#31

Merged
TimInTech merged 1 commit into
mainfrom
feat/paket-k-preset-combo-main-window
Jun 24, 2026
Merged

feat: add writing-preset combo to main window (Paket K)#31
TimInTech merged 1 commit into
mainfrom
feat/paket-k-preset-combo-main-window

Conversation

@TimInTech

@TimInTech TimInTech commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a QComboBox for the writing-style preset directly below the workflow selector in the main window
  • Preset combo is only visible when the Blitztext+ (TEXT_IMPROVER) workflow is selected; window auto-resizes via adjustSize() on workflow change
  • Bidirectional sync: tray submenu ↔ main window combo, single source of truth is config.writing_preset
  • Combo is disabled while processing (mirrors workflow combo IDLE gate)
  • set_preset() uses blockSignals to prevent circular signal emission
  • main_window_preset_changed() in controller: no-op on same key, else saves config + rebuilds LLM service + refreshes tray checkmark
  • show_settings_dialog() re-syncs the combo after dialog accept (preset may have changed)
  • _ensure_main_window() initialises combo from persisted config on first open

Test 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)
  • Full suite: WHISPER_GUI_TESTS=1 QT_QPA_PLATFORM=offscreen python -m pytest tests/ -q394 passed, no regressions
  • New TestMainWindowPresetSync tests cover: init sync, tray→window, window→tray, no-op on same key, settings-dialog sync, visibility per workflow

🤖 Generated with Claude Code

… 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)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@TimInTech TimInTech merged commit e6f6506 into main Jun 24, 2026
7 checks passed
@TimInTech TimInTech deleted the feat/paket-k-preset-combo-main-window branch June 24, 2026 19:56
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