Wine review establishes navigation ownership and stores the window title without speaking an activation. The native title controller treated that metadata as an already announced title, suppressing the introduction when review focus arrived first. Frame-to-control focus updates also reset the window title controller, cancelling pending introductions and discarding duplicate history. Distinguish Wine review ownership from spoken AT-SPI activations when classifying and deduplicating native introductions. Use the native Wine application identity when waiting for committed application preferences, so introductions remain audible with automatic title changes disabled while subsequent title changes honor that application's settings. Separate object focus cleanup from window title cleanup. Wine review revisions now retain the pending title and its duplicate history; actual foreground transitions, native window lifecycle cleanup, screen lock, and shutdown continue to reset title state. Preserve XTerm/Fenrir handoff and ordinary AT-SPI activation deduplication. Add regressions for both native/review arrival orders, ordinary Wine windows and virtual desktop children, duplicate reports, return to the same window, and application preference handoff. Add a private D-Bus event-loop test for a frame-to-control focus burst and document focused verification and live acceptance procedures in tests/window_titles.md. Validation: - Confirmed the new title introduction, preference handoff, and private focus-burst regressions fail before the fix and pass afterward. - go test ./... -count=1 passed with local socket access; the sandboxed attempt was blocked by Unix and loopback speech fixture sockets. - Focused Title, WineReview, XTerm, and Foreground tests passed with the race detector. - Private D-Bus TestPrivateWineTitleSurvivesReviewFocusBurst passed with the race detector. - go vet ./internal/app, the reader build, and git diff --check passed. Installed-reader behavior, real Wine/X11 switching, physical Alt+Tab, audible speech, and physical Braille acceptance remain pending. The private fixture uses copied foreground metadata and a real registry, not a real Wine window. No installed reader was replaced.
2.1 KiB
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.
Run the focused checks from the repository root:
go test -race ./internal/app -run 'Title|WineReview|XTerm|Foreground' -count=1
dbus-run-session -- 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.
For live acceptance, use a rebuilt reader after arranging any active reader replacement with its user. Review and listening are required before submission.
- Alt+Tab between a Wine application, an accessible Linux application, and xterm. Each destination should speak its title once on every return.
- Tab between controls inside Wine. Controls should speak normally without repeating the title. Check Wine flat review still follows the focused window.
- Check Fenrir retains xterm keyboard input and terminal reading. Return to Linux controls and confirm ordinary focus speech and reader commands work.
- 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.
- If used, repeat with a Wine virtual desktop and check title messages on a physical Braille display.
Automated queue assertions do not establish physical Alt+Tab, audible speech, installed-binary behavior, or physical Braille acceptance.