87 lines
5.3 KiB
Markdown
87 lines
5.3 KiB
Markdown
# Window title regression checks
|
|
|
|
Wine review focus provides navigation ownership and title metadata. It does
|
|
not speak a window activation. The native title controller must introduce
|
|
that window once, retain its pending announcement across Wine control focus
|
|
updates, and introduce it again after a foreground switch. Title changes
|
|
within the window still follow the application's title-change preference.
|
|
|
|
Fresh input cancels titles still waiting for their coalescing deadline or an
|
|
application override, as well as titles already in the speech queue. Held-key
|
|
repeats retain automatic titles; Control and Escape remain explicit stop keys.
|
|
Input that initiates a window switch precedes the destination's title and must
|
|
not cancel that new introduction. Later title changes remain enabled normally.
|
|
|
|
Run the focused checks from the repository root:
|
|
|
|
```sh
|
|
go test -race ./internal/app -run 'Title|WineReview|XTerm|Foreground' -count=1
|
|
CTHULHU_NATIVE_BROWSER_TESTS=editing GOCACHE=/tmp/cthulhu-go-cache GOPROXY=off python3 tests/native_browser.py
|
|
python3 tests/native_test_session.py env CTHULHU_NATIVE_WINDOW_TITLES=1 GOCACHE=/tmp/cthulhu-go-cache GOPROXY=off go test ./internal/app -run '^TestNativeAutomaticTitleDispatchLatency$' -count=1 -v
|
|
python3 tests/native_test_session.py env CTHULHU_WINE_TITLE_DBUS=1 go test -race ./internal/app -run '^TestPrivateWineTitleSurvivesReviewFocusBurst$' -count=1 -v
|
|
```
|
|
|
|
The private D-Bus test runs the event loop against copied foreground metadata
|
|
and a real Wine review registry. It checks that a frame-to-control focus burst
|
|
keeps the pending title and that later review revisions do not repeat it.
|
|
Unit tests cover both arrival orders, Wine desktop children, returning to the
|
|
same window, native application preferences, and XTerm handoff.
|
|
|
|
## Read the title on demand
|
|
|
|
The desktop command is **Cthulhu+Numpad Enter**; the laptop command is
|
|
**Cthulhu+Slash**. Both use the existing copied foreground title metadata,
|
|
with the owned accessible window title available when native title metadata
|
|
is unavailable. The command reports when no title is available, respects
|
|
screen locking and terminal handoff, and does not move focus or the browse
|
|
cursor. Automatic title preferences and duplicate suppression do not prevent
|
|
an explicit request. Repeated presses repeat the title; status-bar reading
|
|
is not implemented.
|
|
|
|
```sh
|
|
go test ./internal/input ./internal/app -run 'WindowTitle|WhereAmI|CommandRuntimeRoutesFocusPresentationRequests' -count=1
|
|
python3 tests/native_test_session.py env CTHULHU_NATIVE_X11=1 go test ./internal/platform/xorg -run '^TestNativeDispatchBeforeRelease$' -count=1 -v
|
|
```
|
|
|
|
The native automatic-title fixture above also checks the desktop title chord
|
|
through actual X11 command dispatch and the event loop with automatic changes
|
|
disabled. The native command test checks desktop and laptop bindings on press
|
|
with both release orders. Event-loop tests check changed titles and preserved
|
|
Where Am I focus; a queue test checks Braille flash delivery.
|
|
|
|
For live acceptance, use a rebuilt reader after arranging any active reader
|
|
replacement with its user. Review and listening are required before submission.
|
|
|
|
1. Alt+Tab between a Wine application, an accessible Linux application, and
|
|
xterm. Each destination should speak its title once on every return.
|
|
2. Tab between controls inside Wine. Controls should speak normally without
|
|
repeating the title. Check Wine flat review still follows the focused window.
|
|
3. Check Fenrir retains xterm keyboard input and terminal reading. Return to
|
|
Linux controls and confirm ordinary focus speech and reader commands work.
|
|
4. Repeat with the application's automatic title changes disabled. Window
|
|
introductions should still speak; subsequent status/title changes should
|
|
stay quiet. With the preference enabled, changed titles should speak once.
|
|
5. If used, repeat with a Wine virtual desktop and check title messages on a
|
|
physical Braille display.
|
|
6. In Brave, use Ctrl+L and immediately type several characters. Each character
|
|
should echo and interrupt previous speech without an older title following
|
|
it. Repeat while a long title is speaking, and use Control and Escape to stop
|
|
it. Switch away and back without typing; the window title must still speak.
|
|
7. With automatic title reading enabled, change a page's title and verify it
|
|
speaks once. The editing fixture's F8 key changes its title to
|
|
"Cthulhu Browser Probe updated". Check address suggestions, deletion, and
|
|
native caret movement still announce their usual output.
|
|
8. Use Cthulhu+Numpad Enter on desktop or Cthulhu+Slash on laptop in a native
|
|
application, a browser page and a Wine application. Confirm the foreground
|
|
title is spoken, including an active dialog. Repeat after switching tabs
|
|
and windows and after disabling automatic title changes. Repeating the
|
|
command should repeat the title. Check the Braille flash if enabled.
|
|
9. Navigate to a browser heading, read the title, then continue heading and
|
|
arrow navigation in both directions. The reading position must remain
|
|
intact. Plain Numpad Enter on desktop or Cthulhu+Enter on laptop should
|
|
still describe the focused item. Check learn mode describes the title
|
|
command, and confirm its binding can be changed in Preferences.
|
|
|
|
Automated queue assertions do not establish physical Alt+Tab, audible speech,
|
|
installed-binary behavior, or physical Braille acceptance.
|