8000 feat: modular refactor, display word-wrap, and cancel command by tanevanwifferen · Pull Request #1 · johannboehme/HexMentraBridge · GitHub
[go: up one dir, main page]

Skip to content

feat: modular refactor, display word-wrap, and cancel command - #1

Open
tanevanwifferen wants to merge 12 commits into
johannboehme:mainfrom
tanevanwifferen:main
Open

tanevanwifferen wants to merge 12 commits into
johannboehme:mainfrom
tanevanwifferen:main

Conversation

@tanevanwifferen
Copy link
Copy Markdown

Summary

  • Split monolithic src/index.ts into separate modules (bridge, config, display, filter, openclaw, push-server, etc.)
  • Add proper word-wrapping for G1 display (40 chars/line, 4 lines/page) to prevent text running off screen
  • Add voice cancel/clear commands: "cancel", "stop", "stopp", "abbrechen", "clear buffer", "clear display"
  • Add docker-compose.yml for containerized deployment

Test plan

  • Verify long agent replies wrap correctly on G1 display
  • Verify pagination shows [1/N] labels and advances automatically
  • Test cancel voice commands clear the display mid-reply
  • Confirm all existing voice commands still work (copilot mode, manual mode, new session, etc.)

🤖 Generated with Claude Code

tanevanwifferen and others added 12 commits March 7, 2026 13:15
Split monolithic index.ts into separate modules (bridge, config, display,
filter, openclaw, push-server, etc.). Add proper word-wrapping (40 chars/line,
4 lines/page) for G1 display and voice cancel/clear commands
(cancel, stop, abbrechen, clear buffer, clear display).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Cancel and clear now both clear the display and manual buffer
- Add 'backspace'/'zurück' to remove last manual buffer entry
- Add 'submit' as alias for confirm/send/commit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Messages from other sessions (e.g. Telegram) were being sent to all
connected glasses displays. Now unmatched messages are logged and dropped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows the full numbered buffer (paginated on glasses) so you can
review everything before sending. Trigger: "preview" / "vorschau".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- src/stt.ts: transcription via any OpenAI-compatible /v1/audio/transcriptions
- src/tts.ts: speech synthesis via any OpenAI-compatible /v1/audio/speech
- /app-ws protocol: hello/hello_ack capability handshake, turn-based
  audio_start/audio/audio_end utterance buffering, stt_result, ordered
  tts_audio blobs (per-client chain so replies never cut each other off)
- /tts and /stt HTTP test endpoints; stt/tts flags in /status
- ios/OpenClawMic: SwiftUI two-way mic app (hold-to-talk 16kHz PCM in,
  queued spoken replies out, typed messages, auto-reconnect)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- docker-compose: stt service (whisper.cpp server built for host CPU,
  greedy decoding) and tts service (Piper via openedai-speech)
- docker/whisper.Dockerfile: native build — prebuilt images need AVX2
  and SIGILL on older CPUs
- WHISPER_MODEL env knob; STT_URL/TTS_URL default to the local services
- ios: add ready-made Info.plist for manual Xcode project setup

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- pad utterances with 500ms silence (whisper is unreliable on sub-second clips)
- bias whisper with a command-vocabulary prompt (STT_PROMPT, configurable)
- fuzzy command matching (edit distance scaled to command length) so
  near-miss transcripts like 'Cancell.' or 'Annual mode' still trigger

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add isReadyToRecord computed property (checks state, serverStt, AND task != nil)
- Show 'No Active Session' alert with Connect button when recording is attempted without a session
- Add wantsRecording flag to prevent hold-to-talk race condition where rapid
  touch/release would leave recording stuck on after permission callback fires
- Auto-stop recorder if session ends mid-recording (client disconnects)
- Reset serverStt/serverTts on disconnect to prevent stale state

Closes task: fix crash when recording with no active session
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

0