Add Mumble message review shortcuts
This commit is contained in:
1 parent
d5f8a392cf
commit
64440fbb78
18 files changed
+484
-30
No files matched your search
@@ -1,11 +1,19 @@
|
||||
# Messaging support
|
||||
|
||||
Pidgin now uses the shared Go messaging history. This first port follows the
|
||||
Pidgin and Mumble use the shared Go messaging history. The Pidgin port follows the
|
||||
legacy defaults: announce inserted messages from all conversations, keep one
|
||||
combined history for each running Pidgin accessibility provider, omit room-name
|
||||
prefixes, and suppress typing-status announcements. History contains messages
|
||||
received while this reader is running; it does not import an existing transcript.
|
||||
|
||||
Mumble captures insertions into its read-only **Activity log**, matching the
|
||||
legacy application script. It retains twelve messages per provider, strips a
|
||||
leading `[HH:MM:SS]` timestamp, removes Qt noncharacters, and normalizes whitespace
|
||||
including paragraph separators. Timestamp-only insertions stay silent and do not
|
||||
occupy history slots. Identical messages remain separate entries. Log messages
|
||||
can speak in the background without taking focus. Mumble's message entry and
|
||||
other text controls do not supply history.
|
||||
|
||||
The legacy controls for separate conversation histories, room-name prefixes,
|
||||
typing announcements, and message verbosity are not yet ported.
|
||||
|
||||
@@ -25,10 +33,13 @@ Both desktop and laptop layouts use:
|
||||
|
||||
- **Cthulhu+F1–F9**: review the newest through ninth-newest message.
|
||||
- **Cthulhu+Shift+F1–F9**: copy that message and confirm after the write succeeds.
|
||||
- In **Mumble**, both ranges extend through **F12**: F10, F11 and F12 review the
|
||||
tenth-, eleventh- and twelfth-newest messages; adding Shift copies them.
|
||||
- **Cthulhu+H**: enter or exit learn mode. Cthulhu+F1 no longer opens it.
|
||||
|
||||
Empty history slots are silent. Chat commands act only when Pidgin owns the
|
||||
reader's current focus. They are configurable in the existing key-binding page.
|
||||
Empty history slots are silent. Chat commands act only when the corresponding
|
||||
Pidgin or Mumble instance owns the reader's current focus. Pidgin retains its
|
||||
nine-message review range. Commands are configurable in the existing key-binding page.
|
||||
An explicit shortcut assignment takes precedence over an uncustomized chat
|
||||
default, preserving existing configurations; the shortcut list reflects this.
|
||||
Within temporary OCR review, Cthulhu+F5 retains its refresh behavior.
|
||||
@@ -46,8 +57,11 @@ Steam script nor this port provides F-key conversation review for Steam.
|
||||
to a provider whose process name is `pidgin`. Its bounded ancestor scan copies
|
||||
conversation/window identities and the room name. Typing status is identified
|
||||
from the inserted range's smaller/lighter text attributes.
|
||||
- `internal/atspi/mumble_native.go` recognizes Mumble by process identity and the
|
||||
read-only Activity log's text or label role, then copies transcript and window
|
||||
identities with a bounded ancestor walk. `mumble.go` cleans the inserted text.
|
||||
- `internal/messaging` stores copied messages without native handles or output
|
||||
dependencies. It bounds each provider's history to nine messages and the number
|
||||
dependencies. It bounds each provider's history to twelve messages and the number
|
||||
of retained providers to 32. Provider identities prevent cross-instance replay.
|
||||
- `internal/app/messaging.go` coordinates passive speech, one Braille flash,
|
||||
review, and asynchronous clipboard copying on the reader event loop. A bounded
|
||||
@@ -74,6 +88,7 @@ notification text alone does not establish conversation identity.
|
||||
From the repository root:
|
||||
|
||||
```sh
|
||||
python3 -B tests/native_messaging.py
|
||||
GOCACHE=/tmp/cthulhu-cache go test ./...
|
||||
GOCACHE=/tmp/cthulhu-cache go test -race ./internal/messaging ./internal/input ./internal/atspi ./internal/app
|
||||
python3 tests/native_test_session.py env GOCACHE=/tmp/cthulhu-cache CTHULHU_NATIVE_MESSAGING=1 go test ./internal/atspi -run '^TestNativePidginTranscriptCapture$' -count=1 -v
|
||||
@@ -83,9 +98,11 @@ go test ./internal/input ./internal/app -run '^(TestPlainEnterActivityLifetime|T
|
||||
python3 tests/native_test_session.py env CTHULHU_NATIVE_SUBMISSION_ECHO=1 go test ./internal/app -run '^TestNativeSubmissionClearAndSelectedReplacement$' -count=1 -v
|
||||
```
|
||||
|
||||
Native checks use private X11 and D-Bus sessions. The transcript fixture sets its
|
||||
own process name to exercise the Pidgin detector; it is not the actual Pidgin
|
||||
client. These checks verify copied metadata, recorded presentation, synthetic
|
||||
Native checks use private X11 and D-Bus sessions. `native_messaging.py` uses a
|
||||
24-bit display and separate sessions for Mumble/Qt, Pidgin/GTK, clipboard, and
|
||||
X11 shortcut checks. It requires PySide6 and GTK3's Python introspection bindings.
|
||||
The transcript fixtures set their own process names to exercise the detectors;
|
||||
they are not the actual clients. These checks verify copied metadata, recorded presentation, synthetic
|
||||
keys, and clipboard contents. They do not establish audible speech, physical
|
||||
keyboard behavior, or a connected Braille display.
|
||||
|
||||
@@ -129,6 +146,35 @@ The implementation work does not replace the running reader.
|
||||
|
||||
Actual Pidgin listening, physical shortcuts, and Braille acceptance remain pending.
|
||||
|
||||
### Mumble live acceptance
|
||||
|
||||
1. Quit the current reader with **Cthulhu+Q**. Press **Ctrl+Escape**, then press
|
||||
**Shift+G**. These are separate key presses. The launch script rebuilds the
|
||||
reader and Braille helper, starts debug logging, and opens a test terminal.
|
||||
2. Focus Mumble's message entry and receive at least twelve distinct messages.
|
||||
Confirm each incoming message speaks once, without a timestamp-only
|
||||
announcement. On Braille, check one flash per message and return to the
|
||||
message entry afterward. Keyboard focus must remain in the entry.
|
||||
3. Press **Cthulhu+F1**, **F2**, **F10**, **F11**, and **F12**, keeping the Cthulhu
|
||||
modifier for each. Expect the newest, previous, tenth-, eleventh-, and
|
||||
twelfth-newest messages. Receive a thirteenth message and check that the
|
||||
oldest retained message shifts by one. Review must not move focus or the caret.
|
||||
4. Press **Cthulhu+Shift+F12** and paste in an editor. Expect the same message
|
||||
as F12, with a successful copy confirmation. Switch to another application:
|
||||
review keys must not replay Mumble history there. Receive a Mumble message in
|
||||
the background and verify it speaks without changing keyboard focus.
|
||||
5. Return to Mumble and check typing, selection, deletion, Tab, and channel-tree
|
||||
navigation. Ordinary control feedback must remain correct. Verify
|
||||
**Cthulhu+H** learn mode and any saved custom F-key bindings still work.
|
||||
If Pidgin is available, check its existing F1–F9 review and Shift-copy behavior.
|
||||
6. Report the exact speech for F1/F10/F11/F12, any Braille differences, which
|
||||
control retained focus, and any keys that behaved unexpectedly. If necessary,
|
||||
inspect `~/devel/cthulhu-go.log` before restarting again.
|
||||
|
||||
Actual Mumble listening, installed-binary behavior, physical shortcuts, and a
|
||||
physical Braille display remain pending. Review the diff and perform these live
|
||||
checks before submitting the change.
|
||||
|
||||
## Discord message focus
|
||||
|
||||
Named article ancestors are announced when focus enters their controls, matching
|
||||
|
||||
Reference in new issue
Block a user