feat: improve compose UX and simplify writing prompts#53
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 083b231e9e
ℹ️ 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".
| if route_to_compose: | ||
| self._ensure_compose_window().set_input_text(result_text) |
There was a problem hiding this comment.
Preserve the existing draft when routing voice input
When voice routing is enabled for a compose window that already contains a draft, the completed transcription is passed to set_input_text(), which replaces the entire draft and also clears its output and variant history. This makes dictating an addition into an existing draft cause irreversible text loss, despite the checkbox tooltip saying the recording will be inserted into the draft field; the routed text should be inserted or appended without discarding existing content.
Useful? React with 👍 / 👎.
| try: | ||
| self.audio_recorder.start(device=self.config.audio_device) | ||
| self._recording_routes_to_compose = self._compose_voice_routing_enabled() |
There was a problem hiding this comment.
Cancel routing when the compose window closes mid-recording
Routing is captured once when recording starts, so if the user closes the compose window before stopping the recording, closeEvent() unchecks the routing control but this saved flag remains true. The worker consequently skips both paste and clipboard delivery, and _on_worker_result() writes the transcription into the now-hidden window, contrary to the close handler's guarantee that a hidden window is not a routing target.
Useful? React with 👍 / 👎.
Ziel
Dieser PR bündelt vier zusammenhängende UX-Verbesserungen für das Fenster „Text verfassen“ sowie die Schreibstil-/Prompt-Auswahl.
Änderungen
Kompaktlayout für „Text verfassen“
Sprachaufnahmen in den Entwurf umleiten
„Text bearbeiten“ in der Hauptansicht
Ctrl+Eergänzt.ComposeWindow-Instanz übershow_compose_window()/_ensure_compose_window().Schreibstile und Prompts vereinfachen
Die sichtbare Auswahl wurde auf fünf Kernaktionen reduziert:
Weitere Punkte:
customwird zentral imLLMServiceaufgelöst.Migration alter Werte
email_formal,email_locker,du_form,sie_form→change_tonestichpunkte,zusammenfassung,kurz_praezise→shortenstandardVerifikation
python -m compileall app tests: bestandenbash -n scripts/install.sh: bestandenbash -n scripts/verify.sh: bestandengit diff --check: bestandenCommits
72be6bcfix(compose): prevent controls overlapping in compact layout500bac2feat(compose): route voice recordings to draft8b545c4feat(ui): expose text editing in main window0639cb7refactor(prompts): simplify writing styles and preserve compatibility083b231fix(prompts): keep tone changes scoped to toneNicht enthalten