feat: Schreibstil-Presets ins Tray-Dropdown integrieren (Paket F) - #13
Merged
Conversation
Ergaenzt das in e19278e eingefuehrte Tray-Submenu "Schreibstil-Vorlage" um die Verfuegbarkeitskopplung: update_menu_availability deaktiviert das Submenu zusammen mit den LLM-Workflows (Blitztext+/$%&!/:)), da die Schreibstil-Vorlage nur den Text-Verbesserer beeinflusst. - app/blitztext_linux.py: menu_preset.setEnabled(available). - tests/test_tray_preset_menu.py: +2 Faelle (disabled/enabled je nach is_available), jetzt 7 Tests; volle Suite 229 gruen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019c7crwbrY9q5pUeZxAEMBg
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e759dd019c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3 tasks
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.
Überblick
Macht die sieben Schreibstil-Vorlagen direkt im Tray-Kontextmenü (dem „Haupt-Dropdown") auswählbar, ohne die Einstellungen öffnen zu müssen. Die Auswahl gilt für Blitztext+ (Text-Verbesserer).
Single Source of Truth bleibt
config.writing_preset; die bestehende Pipelineconfig → _build_llm_service → rewriteist unverändert. Settings-Dialog und Tray-Menü bleiben synchron.Änderungen
app/blitztext_linux.pyQActionGroup(checkable Radio-Items), gespeist ausWRITING_PRESET_KEYS, platziert unteraction_improver._on_writing_preset_selected(key): No-Op-Guard bei gleichem Preset →config.writing_presetsetzen →config.save()→LLMServiceneu bauen →update_menu_availability()._refresh_preset_menu()hält Häkchen undconfig.writing_presetsynchron (Init und nach Settings-Save), inkl. Fallback aufstandardbei verwaistem Config-Wert.update_menu_availability(): Submenu wird anLLMService.is_available()gekoppelt deaktiviert (Vorlage wirkt nur auf Blitztext+).tests/test_tray_preset_menu.py(neu, GUI-gated überWHISPER_GUI_TESTS=1)standardbei unbekanntem Wertis_available()Commits
e19278e— Basis: Submenu + Handler + Sync-Helper + 5 Testse759dd0— Verfügbarkeitskopplung (Submenu deaktivieren ohne LLM) + 2 TestsTestplan
QT_QPA_PLATFORM=offscreen WHISPER_GUI_TESTS=1 pytest tests/test_tray_preset_menu.py→ 7 passedpytest tests/→ 229 passedpy_compileOK🤖 Generated with Claude Code