Files
cthulhu/docs/testing/browser-release-review.md

141 lines
8.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Browser release review
Reviewed `423590e` (Browser updates) and `ebb9ad4` (Better logging for browser)
on the Go `testing` branch, including the surrounding navigation and activation
paths. References were the local Orca web caret-context and removed-child recovery
code and Python Cthulhu's `master:src/cthulhu/scripts/web/script.py` clickable
activation. Reference checkouts were not changed.
## Findings and changes
- Native selection clearing could emit a temporary caret at the selection start
before Braille routing finished. A private Chromium mode test reproduced a
routed offset of one being reset to zero, so Right read “e” instead of “x”.
Native echo tracking now recognizes selection-collapse endpoints separately
from the requested caret. A new nonempty selection remains native input.
- Recovering a removed native focus anchor reset an otherwise valid virtual
position. Recovery now rebinds the anchor within the same document generation,
retaining the virtual object and offset.
- The recent single-text-child recovery did not cover replacement of several
children or a containing paragraph. Navigation now retains at most 32 ancestor
references per saved position and can restart inside a surviving noninteractive
container. This fallback transfers no offset and is excluded from activation.
Document changes, hidden content and editable contexts remain boundaries.
- Native caret placement failure was spoken after successful structural reading.
The content now speaks without that misleading failure announcement; diagnostic
errors remain available. Arrow navigation now uses the same bounded stale
placement retry as structural navigation, without advancing twice.
- Name-event echo suppression could bypass both live-region presentation and the
new focused-button coalescer. Live regions and buttons now reach those existing
handlers; button updates still refresh Braille immediately and debounce speech.
- Enter failures announced “Could not activate current item.” All activation
results now remain silent, without interrupting page-generated feedback.
- Snapshot capture recognized only `click`, although activation supported
`click-ancestor`, `press`, `jump`, `open` and `activate`. Capture now recognizes
the same names. Explicitly named custom clickables are whole browse stops;
ordinary clickable text remains readable and activates its clickable ancestor.
- Enter on ordinary text needlessly recaptured the document. A distinct
nonactivatable result avoids that work. Native action names are fetched once
rather than repeatedly for each preferred action spelling, and metadata capture
stops after finding an activation action.
- Action refresh could accept a replaced document generation with reused object
paths. It now rejects that case when the retained tree establishes replacement.
No additional confirmed defect was found in the build-identity logging changes.
These changes do not establish complete Orca browsing parity or a failure rate on
arbitrary real pages. Browser/provider timeouts and genuinely missing document
context can still produce a location error. Virtual movement cannot guarantee
native Tab/selection placement when a provider refuses to move its caret.
## Automated checks
The review uses existing package tests plus focused regressions for silent
activation, removed focus anchors, surviving-container recovery, custom clickable
stops, document-generation rejection, live names, button coalescing and native
placement retries. The private Chromium fixtures cover pointer input, list
positions, tabs, linked headings, dynamic pages, live regions, structural commands,
editing, selection and browse/focus modes. Firefox has baseline and tab checks.
The expanded real-reader changing-page test uses private i3, Xvfb, D-Bus, a browser
profile and recorded SSIP output. It executes 76 navigation commands, checks silent
Enter on ordinary text, and activates a custom clickable twice, requiring exactly
the page's “Action count 1” and “Action count 2” messages. It does not use the
desktop reader or audible speech.
Relevant commands:
```sh
GOCACHE=/tmp/cthulhu-go-cache GOPROXY=off go test -race ./... -count=1 -timeout=120s
go vet ./...
go build -o /tmp/cthulhu-browser-review ./cmd/cthulhu
go build -tags brlapi -o /tmp/cthulhu-browser-review-braille ./cmd/cthulhu-braille
CTHULHU_BINARY=/tmp/cthulhu-browser-review python3 tests/native_browser_navigation.py
CTHULHU_NATIVE_BROWSER_TESTS=pointer,positions,dynamic,linkedheadings,document,editing,selection,tabs,modes,live python3 tests/native_browser.py
python3 tests/native_firefox.py
```
## Generated-link recovery acceptance (2026-10-22)
The original reproduction was the attribution link on
[the Techrights article](https://techrights.org/n/2026/10/22/Linux_Kernel_Needs_Diversity_and_Diversity_of_Good_Code_Not_LLM.shtml).
Brave recreated its CSS-generated `::before` text during native caret placement.
Navigation repeatedly fell back to the containing paragraph instead of advancing.
The first paragraph-only replacement fixture did not cover that link structure.
Recovery now recognizes a replaced plain text child within the same surviving
ordinary link and adjacent sibling identities. Navigation-triggered defunct
events refresh the affected parent's children while preserving live siblings.
Native text disappearing during text/geometry queries requests a refresh instead
of silently dropping the fragment. Read All uses navigation recovery and rejects
document-generation changes; activation retains its stricter target checks.
The `generatedlinks` browser fixture uses the page's CSS and reproduces the loop
without a script forcing replacements. It fails with the first recovery fix and
passes with the completed fix, including exact prefix/body text, both navigation
directions and Read All. Three consecutive generated-link runs passed, followed
by a passing combined run of `generatedlinks,replacement,tooltips,fragments,namedlinks,linkedheadings`.
The AT-SPI, review and app race suites, reader build and diff checks passed.
On 2026-10-22 the maintainer confirmed that the updated reader could read the
entire original article without looping. This accepts full-article reading and
navigation recovery for that live Brave page. The input method was not specified;
separate manual reverse-navigation, Read All, activation and physical Braille
acceptance were not reported. This result does not close the other workflows
below or the separate dynamic-page flat-review failure reproduced before this fix.
## Other live acceptance checks
The contribution policy requires human review and live testing before submission.
Automated speech requests and Braille frames do not verify audible output, physical
keys or a physical Braille display. Those automated checks use private sessions
rather than the desktop reader; the live reading result above was reported by
the maintainer separately.
1. Quit the current Cthulhu with Cthulhu+Q. Press Ctrl+Escape to enter i3 personal
mode, then separately press Shift+G. These are separate key presses. Shift+G
runs `~/devel/cthulhu-go.sh` and rebuilds the reader and Braille helper.
2. Open `file:///home/angus/devel/cthulhu/tests/browser-changing.html` in Brave.
Tab to “Changing document”. Use H through Sections 1–10 and Statistics, then
Shift+H backwards. Pause for several seconds partway through each direction.
Expect the next heading in order, with matching Braille and no unexpected jump
to an earlier heading or location/caret error.
3. At Statistics, press Down to the changing counter. Try Right, Home,
Ctrl+Right, Down and Up. Expect the requested character/word/line and matching
Braille despite the counter updating. Down from the counter should reach
“Following stable line”.
4. On “Following stable line”, press Enter: expect no action feedback. Press
Down to “Custom action”, then Enter twice. Expect only the page's “Action count
1” and “Action count 2” messages, one per press. No “activated”, “activating” or
activation error should be added.
5. On a stable text line, press Home, Shift+Right twice and Shift+Left once.
Expect selection feedback for the first two characters and removal of the
second. If using Braille, route to the second character to clear selection;
Right must then read the third character, with the Braille cursor there.
6. Check Tab and Shift+Tab into the editable field, type, and use its arrows.
Check Ctrl+L and browser tab switching. Expect native editing/chrome keys to
work and browsing to resume at the correct page after returning.
7. Repeat heading traversal and Enter on the real updating pages that previously
failed. Report the exact key sequence, spoken text, focused control, Braille
text/cursor and any unexpected keyboard behavior. Unexpected results should
be diagnosed from `~/devel/cthulhu-go.log` before another restart.