Skip to content

feat(voice): talk to Pylon from the GUI + a shortcut settings card - #33

Merged
YCistak merged 7 commits into
masterfrom
feat/voice-buttons
Aug 6, 2026
Merged

YCistak merged 7 commits into
masterfrom
feat/voice-buttons

Conversation

@YCistak

@YCistak YCistak commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Voice is now one click away in the app, and the daily briefing too — the demo-facing surface for talking to Pylon.

GUI

A VoiceBar under the Pylon stage with two buttons:

  • 🎤 Konuş — push-to-talk. Records, transcribes, runs the intent, and Pylon answers by voice. Pulses while listening; shows what it heard and the reply.
  • 📰 Brifing Ver — fires today's briefing (desktop banner + spoken).

A Ses & Konuşma card in Settings to pick the push-to-talk shortcut. Wayland can't grab a global hotkey from the app, so the card captures the combo and generates the exact line to paste into hyprland:

bind = SUPER, P, exec, pylon listen

…with a copy button.

Daemon

A new listen IPC command runs one push-to-talk cycle in-process: record → transcribe → resolve+execute the intent → speak the reply. The say and listen handlers now share a runIntent closure, so typed and spoken input take the exact same path. It returns » <heard>\n<reply> for the UI to render.

New Wails bindings App.Listen / App.Briefing use a longer socket deadline (recording takes a few seconds).

Testing

  • go test ./..., daemon + pylon-ui module + frontend + wails build all green (wails regenerated the bindings to match).
  • The live mic/audio path and a GUI screenshot were not exercised here to avoid interrupting an active desktop session; the voice pipeline is the same voice.Pipeline that pylon listen already uses.

🤖 Generated with Claude Code

YCistak and others added 7 commits August 6, 2026 23:48
Voice is now one click away in the app, and the daily briefing too.

- daemon: a "listen" IPC command runs one push-to-talk cycle in-process —
  record → transcribe → resolve+execute the intent → speak the reply. The say
  and listen handlers now share a runIntent closure, so typed and spoken input
  take the exact same path. Returns "» <heard>\n<reply>" for the UI to show.
- GUI: a VoiceBar under the Pylon stage with two buttons — "🎤 Konuş"
  (push-to-talk, pulses while listening) and "📰 Brifing Ver" (desktop banner +
  spoken). Both call new Wails bindings App.Listen / App.Briefing (a longer
  socket deadline, since recording takes a few seconds).
- Settings: a "Ses & Konuşma" card to pick the push-to-talk shortcut. Wayland
  can't grab a global hotkey from the app, so the card captures the combo and
  generates the exact `bind = …, exec, pylon listen` line to paste into
  hyprland, with a copy button.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two changes on top of the voice buttons.

Briefing has no button — you ask for it by voice ("brifing ver"). Running the
briefing action now shows the desktop banner itself, so every trigger (the
spoken command, the daily scheduler, `pylon briefing`) presents it the same way:
banner + spoken. The dedicated "briefing" IPC command, its Wails binding, and
the 📰 button are gone; the mic button is the single entry point.

The shortcut card is no longer hyprland-only. A new App.Platform() detects the
desktop (hyprland / Sway / GNOME / KDE / other Linux / macOS / Windows) and the
card generates the matching way to bind the captured combo to `pylon listen` —
a hyprland `bind =` line, a Sway `bindsym`, an skhd line for macOS, an
AutoHotkey binding for Windows, or the command to paste into GNOME/KDE custom
shortcuts. A dropdown overrides the detected platform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Settings gains an "API Anahtarı" card: paste the Gemini key, and it's saved to
the daemon's encrypted vault (never to config in plaintext) and the daemon is
bounced so it takes effect. A "kayıtlı ✓" badge shows when one is already stored,
without ever revealing the value.

- daemon: a "secret" IPC command (set / rm / has) so the GUI can manage the
  vault over the local socket, the same store as `pylon secret set`.
- intent chain: each model's key now falls back to the vault (secret:<provider>)
  when its env var is unset — so a user who never exported GEMINI_API_KEY can
  enable the model straight from Settings.
- GUI: App.SetSecret / HasSecret / RestartDaemon bindings, and a daemonManager
  restart that re-applies config for a daemon the GUI started.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Settings gains a "Bağlı Hesaplar" card with a Google row — sign in to let Pylon
reach your calendar, mail and Drive. The consent runs in the daemon (the same
OAuth flow as `pylon auth google`), and the token lands in the encrypted vault.

The row reflects real state via a new "auth google status" IPC: "connected"
(signed in) shows a badge, "ready" shows an active sign-in button, and
"unavailable" (no OAuth client embedded in this build yet) shows the button
disabled with a "yakında" note — so it's present in the GUI now, honest about
not being wired for this build, and works the moment a client is embedded.

- daemon: "auth google <status|login>" IPC handler.
- GUI: App.GoogleStatus / App.GoogleLogin bindings (login uses a long deadline
  since it waits on the browser).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signing in from the GUI flipped the badge to "Bağlı ✓" while calendar and
drive commands kept failing. buildServiceRegistry registers those services
only when a token exists, and it runs once at daemon startup — so the token
saved by the consent flow was not seen until the user restarted Pylon
themselves, with nothing on screen suggesting they should. Accounts.svelte
now calls RestartDaemon() after GoogleLogin(), which is what ApiKeys.svelte
already does after saving a key.

GoogleStatus also folded "the daemon did not answer" into "unavailable", so
a cold launch — when the GUI has spawned the daemon but it is still starting
— told the user Google sign-in was missing from this build. That was wrong
and sounded permanent, and it never corrected itself, because the card
checked once on mount instead of following the shared daemonOnline store.
There is now a distinct "offline" state, and the card re-checks when the
daemon comes up, using the same change-only guard as Widget.svelte so the
1.5s store ticks do not turn into an IPC call each.

app_test.go is the GUI module's first test; it pins all three outcomes.
Confirmed it catches the old behaviour: with no daemon listening the old
GoogleStatus returned "unavailable" where the test wants "offline". Since
the GUI is a separate module, the daemon job's `go test ./...` never reaches
it, so ci.yml gains a step that would otherwise never run these.

Not click-verified: the app builds and runs, and the Go side is covered, but
the Accounts card itself still wants a human to open Settings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Settings had grown card by card into one long column — widgets, sidebar,
accounts, API key, voice — so reaching any one of them meant scrolling past
the rest. They now sit behind three tabs: Görünüm (widgets + sidebar),
Hesaplar (accounts + API key), Ses. Each screen answers one question.

The tabs carry tablist/tab roles with a roving tabindex and left/right arrow
navigation, so the row behaves like a tab strip rather than three more
buttons competing with the ones inside the cards.

Fixes a spacing bug found on the way: `.settings .card + .card` gave the two
sections defined in this file an 18px gap, but Svelte scopes that selector to
this component's own elements, so the Accounts, ApiKeys and VoiceSettings
cards sat flush against each other with no separation at all. A flex column
with `gap` on the container spaces every card the same, wherever it is
defined.

Opening a widget's pen icon from Home also lands on Görünüm now, so closing
the modal leaves you looking at the widget it belongs to.

Verified by building and running the app and reading the rendered Settings
screen: the tab strip renders, switching works, and the accounts cards are
now separated. The initial tab is Görünüm by construction (activeTab starts
at TABS[0].id, confirmed in the built bundle) but a screenshot caught the
window after it had been clicked, so that one detail is unconfirmed by eye.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The voice card asked you to pick your own window manager from a dropdown and
then copy a line into its config by hand. Both halves were wrong. The app
already knows what it is running, so asking is busywork; and a line pasted
into hyprland.conf is a change nobody can find again later — to move the
shortcut you have to remember where you put it, and Pylon can never take it
back cleanly.

Hyprland and Sway both accept bindings over their control socket, so
internal/hotkey registers the shortcut at runtime instead. No config file is
read or written. The daemon re-applies it on every start, so it survives a
reboot, and changing the shortcut in Settings takes effect immediately.

Hyprland needs two dialects: `hyprctl keyword bind` for the hyprlang config,
and a Lua call through `hyprctl eval` for the config that replaces it in
0.57 — which rejects the first with "keyword can't work with non-legacy
parsers. Use eval." Both exit 0 either way, so success is read from the
output, not the exit code. This machine runs the Lua config, which is how
the split was found.

The shortcut is remembered in the context table rather than config, since
the GUI writes it and Pylon does not otherwise rewrite pylon.yaml. The
binding runs the daemon's own absolute path: "pylon listen" alone only
resolves if the compositor's PATH happens to include it.

Caveat worth stating: binding is idempotent by unbinding the combo first, so
if the shortcut you choose is already bound to something else, Pylon takes
it over. The card says so.

Desktops with no runtime API (GNOME, KDE, macOS, Windows) still get the
copy-paste snippet — but the platform is detected, never asked.

Also fixes the white dropdown that prompted this: the app never declared
color-scheme, so every control the engine draws itself came out light
against the dark surfaces. Declared dark globally and stripped the native
<select> chrome, which GTK renders as a white pill regardless — that also
fixes the refresh-interval dropdown on the Docker page.

Verified live on Hyprland 0.56.1: the daemon logs "hotkey: bağlandı" and the
bind appears in `hyprctl binds` (modmask 64, key P) pointing at the absolute
path; changing it over IPC moves the bind and leaves no duplicate; a restart
re-applies it from the database; and the rebuilt Settings screen shows the
card with no dropdown and "Hyprland üzerinde etkin".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@YCistak
YCistak force-pushed the feat/voice-buttons branch from bddfee1 to dd914bc Compare August 6, 2026 20:49
@YCistak
YCistak merged commit 2699826 into master Aug 6, 2026
@YCistak
YCistak deleted the feat/voice-buttons branch August 6, 2026 20:49
YCistak added a commit that referenced this pull request Aug 10, 2026
* feat(voice): talk to Pylon from the GUI + a shortcut settings card

Voice is now one click away in the app, and the daily briefing too.

- daemon: a "listen" IPC command runs one push-to-talk cycle in-process —
  record → transcribe → resolve+execute the intent → speak the reply. The say
  and listen handlers now share a runIntent closure, so typed and spoken input
  take the exact same path. Returns "» <heard>\n<reply>" for the UI to show.
- GUI: a VoiceBar under the Pylon stage with two buttons — "🎤 Konuş"
  (push-to-talk, pulses while listening) and "📰 Brifing Ver" (desktop banner +
  spoken). Both call new Wails bindings App.Listen / App.Briefing (a longer
  socket deadline, since recording takes a few seconds).
- Settings: a "Ses & Konuşma" card to pick the push-to-talk shortcut. Wayland
  can't grab a global hotkey from the app, so the card captures the combo and
  generates the exact `bind = …, exec, pylon listen` line to paste into
  hyprland, with a copy button.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(voice): briefing by voice, and a cross-platform shortcut card

Two changes on top of the voice buttons.

Briefing has no button — you ask for it by voice ("brifing ver"). Running the
briefing action now shows the desktop banner itself, so every trigger (the
spoken command, the daily scheduler, `pylon briefing`) presents it the same way:
banner + spoken. The dedicated "briefing" IPC command, its Wails binding, and
the 📰 button are gone; the mic button is the single entry point.

The shortcut card is no longer hyprland-only. A new App.Platform() detects the
desktop (hyprland / Sway / GNOME / KDE / other Linux / macOS / Windows) and the
card generates the matching way to bind the captured combo to `pylon listen` —
a hyprland `bind =` line, a Sway `bindsym`, an skhd line for macOS, an
AutoHotkey binding for Windows, or the command to paste into GNOME/KDE custom
shortcuts. A dropdown overrides the detected platform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(settings): enter the AI API key from the GUI

Settings gains an "API Anahtarı" card: paste the Gemini key, and it's saved to
the daemon's encrypted vault (never to config in plaintext) and the daemon is
bounced so it takes effect. A "kayıtlı ✓" badge shows when one is already stored,
without ever revealing the value.

- daemon: a "secret" IPC command (set / rm / has) so the GUI can manage the
  vault over the local socket, the same store as `pylon secret set`.
- intent chain: each model's key now falls back to the vault (secret:<provider>)
  when its env var is unset — so a user who never exported GEMINI_API_KEY can
  enable the model straight from Settings.
- GUI: App.SetSecret / HasSecret / RestartDaemon bindings, and a daemonManager
  restart that re-applies config for a daemon the GUI started.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(settings): sign in with Google from the GUI

Settings gains a "Bağlı Hesaplar" card with a Google row — sign in to let Pylon
reach your calendar, mail and Drive. The consent runs in the daemon (the same
OAuth flow as `pylon auth google`), and the token lands in the encrypted vault.

The row reflects real state via a new "auth google status" IPC: "connected"
(signed in) shows a badge, "ready" shows an active sign-in button, and
"unavailable" (no OAuth client embedded in this build yet) shows the button
disabled with a "yakında" note — so it's present in the GUI now, honest about
not being wired for this build, and works the moment a client is embedded.

- daemon: "auth google <status|login>" IPC handler.
- GUI: App.GoogleStatus / App.GoogleLogin bindings (login uses a long deadline
  since it waits on the browser).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(settings): make Google sign-in actually take effect

Signing in from the GUI flipped the badge to "Bağlı ✓" while calendar and
drive commands kept failing. buildServiceRegistry registers those services
only when a token exists, and it runs once at daemon startup — so the token
saved by the consent flow was not seen until the user restarted Pylon
themselves, with nothing on screen suggesting they should. Accounts.svelte
now calls RestartDaemon() after GoogleLogin(), which is what ApiKeys.svelte
already does after saving a key.

GoogleStatus also folded "the daemon did not answer" into "unavailable", so
a cold launch — when the GUI has spawned the daemon but it is still starting
— told the user Google sign-in was missing from this build. That was wrong
and sounded permanent, and it never corrected itself, because the card
checked once on mount instead of following the shared daemonOnline store.
There is now a distinct "offline" state, and the card re-checks when the
daemon comes up, using the same change-only guard as Widget.svelte so the
1.5s store ticks do not turn into an IPC call each.

app_test.go is the GUI module's first test; it pins all three outcomes.
Confirmed it catches the old behaviour: with no daemon listening the old
GoogleStatus returned "unavailable" where the test wants "offline". Since
the GUI is a separate module, the daemon job's `go test ./...` never reaches
it, so ci.yml gains a step that would otherwise never run these.

Not click-verified: the app builds and runs, and the Go side is covered, but
the Accounts card itself still wants a human to open Settings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* feat(settings): group the settings into tabs

Settings had grown card by card into one long column — widgets, sidebar,
accounts, API key, voice — so reaching any one of them meant scrolling past
the rest. They now sit behind three tabs: Görünüm (widgets + sidebar),
Hesaplar (accounts + API key), Ses. Each screen answers one question.

The tabs carry tablist/tab roles with a roving tabindex and left/right arrow
navigation, so the row behaves like a tab strip rather than three more
buttons competing with the ones inside the cards.

Fixes a spacing bug found on the way: `.settings .card + .card` gave the two
sections defined in this file an 18px gap, but Svelte scopes that selector to
this component's own elements, so the Accounts, ApiKeys and VoiceSettings
cards sat flush against each other with no separation at all. A flex column
with `gap` on the container spaces every card the same, wherever it is
defined.

Opening a widget's pen icon from Home also lands on Görünüm now, so closing
the modal leaves you looking at the widget it belongs to.

Verified by building and running the app and reading the rendered Settings
screen: the tab strip renders, switching works, and the accounts cards are
now separated. The initial tab is Görünüm by construction (activeTab starts
at TABS[0].id, confirmed in the built bundle) but a screenshot caught the
window after it had been clicked, so that one detail is unconfirmed by eye.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* feat(voice): register the push-to-talk shortcut instead of explaining it

The voice card asked you to pick your own window manager from a dropdown and
then copy a line into its config by hand. Both halves were wrong. The app
already knows what it is running, so asking is busywork; and a line pasted
into hyprland.conf is a change nobody can find again later — to move the
shortcut you have to remember where you put it, and Pylon can never take it
back cleanly.

Hyprland and Sway both accept bindings over their control socket, so
internal/hotkey registers the shortcut at runtime instead. No config file is
read or written. The daemon re-applies it on every start, so it survives a
reboot, and changing the shortcut in Settings takes effect immediately.

Hyprland needs two dialects: `hyprctl keyword bind` for the hyprlang config,
and a Lua call through `hyprctl eval` for the config that replaces it in
0.57 — which rejects the first with "keyword can't work with non-legacy
parsers. Use eval." Both exit 0 either way, so success is read from the
output, not the exit code. This machine runs the Lua config, which is how
the split was found.

The shortcut is remembered in the context table rather than config, since
the GUI writes it and Pylon does not otherwise rewrite pylon.yaml. The
binding runs the daemon's own absolute path: "pylon listen" alone only
resolves if the compositor's PATH happens to include it.

Caveat worth stating: binding is idempotent by unbinding the combo first, so
if the shortcut you choose is already bound to something else, Pylon takes
it over. The card says so.

Desktops with no runtime API (GNOME, KDE, macOS, Windows) still get the
copy-paste snippet — but the platform is detected, never asked.

Also fixes the white dropdown that prompted this: the app never declared
color-scheme, so every control the engine draws itself came out light
against the dark surfaces. Declared dark globally and stripped the native
<select> chrome, which GTK renders as a white pill regardless — that also
fixes the refresh-interval dropdown on the Docker page.

Verified live on Hyprland 0.56.1: the daemon logs "hotkey: bağlandı" and the
bind appears in `hyprctl binds` (modmask 64, key P) pointing at the absolute
path; changing it over IPC moves the bind and leaves no duplicate; a restart
re-applies it from the database; and the rebuilt Settings screen shows the
card with no dropdown and "Hyprland üzerinde etkin".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: YCistak <YCistak@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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