Browser and flat review fixes.
This commit is contained in:
1 parent
754f1ce6d7
commit
fb2c5b818d
25 files changed
+1204
-78
No files matched your search
@@ -74,11 +74,42 @@ CTHULHU_NATIVE_BROWSER_TESTS=pointer,positions,dynamic,linkedheadings,document,e
|
||||
python3 tests/native_firefox.py
|
||||
```
|
||||
|
||||
## Live acceptance still required
|
||||
## 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. The active reader has not been replaced.
|
||||
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
|
||||
|
||||
@@ -55,7 +55,7 @@ alone would not reproduce that behavior.
|
||||
| Clipped text ranges | Previously emitted one range per clipped visible character. | Confirmed defect; repaired here. Count contiguous visible spans against the range budget. |
|
||||
| Viewport discovery | Uses character rectangles first; large objects can use a bounded binary search over line rectangles. | Private GTK coverage seeks into a 101000-character scrolled object with unavailable character rectangles. Small objects keep their existing bounded path. |
|
||||
| Long horizontal lines | Oversized viewport intervals use glyph locations and bounded text retrieval; oversized native line responses also enter that path. | A real GTK 100000-character line is captured without increasing the character budget. New text requests contain at most 128 characters. Sparse or defective point providers remain bounded and explicitly limited. |
|
||||
| Failure scope | Known unavailable text objects and failed child enumeration retain healthy content with explicit completeness counts. | A partial result announces a speech and Braille warning on entry or a changed omission count. Its line boundaries say top/bottom of available content. Root failure, cancellation, stale snapshots, invalid trees, and aggregate layout limits still fail the operation. |
|
||||
| Failure scope | Known unavailable text objects and failed child enumeration retain healthy content with explicit completeness counts. | Partial-result counts remain diagnostic log data. Line boundaries always use "Top of screen." and "Bottom of screen."; no extra partial-content speech or Braille message is emitted. Root failure, cancellation, stale snapshots, invalid trees, and aggregate layout limits still fail the operation. |
|
||||
| Focus anchoring | Tries exact focus, displayed descendants, then the nearest displayed ancestor within the review root. | A targeted fixture proves pruned focus stays on its parent text rather than an unrelated first line. Preserved position still uses object generations and native offsets. |
|
||||
| Updates and cancellation | Cthulhu refreshes owned layout per command and rejects stale results; native capture and queues are bounded. | Preserve these safeguards. Snapshot refresh, provider timeout, and audible responsiveness are separate concerns. |
|
||||
| Diagnostics | Capture timings include `text_issues` counts for viewport, character, range, tree-byte, query-budget, and provider failures. Partial presentation logs omission counts. | These fields contain no accessible text or names. A wholly limited window retains its existing spoken text-limit message. |
|
||||
@@ -133,18 +133,19 @@ Bounded endpoint lookup also handles a huge line ending in a zero-area newline.
|
||||
atomic review snapshot. Recovery is restricted to review-only child enumeration;
|
||||
root enumeration failure and cancellation remain fatal. `FlatCompleteness`
|
||||
travels with each worker result. No partial object's accessible name is silently
|
||||
substituted for its missing text. A warning is announced when entering a partial
|
||||
layout or when its omission counts change; returning to a complete layout clears
|
||||
that warning state. Ordinary invalidation triggers recapture as before; there
|
||||
is no broad automatic retry loop. The warning uses the existing system-message
|
||||
output path for both speech and Braille, while spelling retains its own request.
|
||||
substituted for its missing text. Incomplete-capture diagnostics are logged on
|
||||
entry or when omission counts change; returning to a complete layout clears
|
||||
that diagnostic state. Ordinary invalidation triggers recapture as before; there
|
||||
is no broad automatic retry loop. Partial layouts add no speech or Braille
|
||||
warning, and boundaries retain the standard top/bottom-of-screen messages.
|
||||
Spelling retains its own request.
|
||||
|
||||
Seven private native cases cover cache reuse, bounded geometry, clipped spans,
|
||||
a 100000-character horizontal line, scrolled line-only geometry, unavailable
|
||||
child enumeration, and zero-area glyphs. Additional worker and presentation
|
||||
fixtures cover healthy-content recovery, omission counts, recovery to a complete
|
||||
layout, ancestor anchoring, spelling, Braille warning delivery, and incomplete
|
||||
boundary feedback. Run native modes in separate processes:
|
||||
layout, ancestor anchoring, spelling without extra speech/Braille messages,
|
||||
and standard boundary feedback on incomplete layouts. Run native modes in separate processes:
|
||||
|
||||
```sh
|
||||
python3 tests/native_test_session.py env CTHULHU_NATIVE_REVIEW_VIEWPORT=1 CTHULHU_NATIVE_REVIEW_VIEWPORT_MODE=long go test ./internal/atspi -run '^TestNativeFlatReviewLargeTextViewport$' -count=1 -v
|
||||
@@ -175,6 +176,111 @@ changed tree, and a subsequent complete harness run passed. The initial failure
|
||||
was not explained; passing reruns do not establish that this startup/event-order
|
||||
behavior is stable. Existing GTK `Atk-CRITICAL` role warnings also remain.
|
||||
|
||||
## Dynamic-page visibility cache regression
|
||||
|
||||
On 2026-10-22, `TestNativeBrowserDynamicNavigation` reproduced a separate
|
||||
flat-review failure after browse navigation scrolled a 1000-paragraph page to
|
||||
newly inserted content. Window-end review returned "New content", but previous
|
||||
line returned the same text with `Moved=false`, including after a text-triggered
|
||||
recapture.
|
||||
|
||||
Temporary capture diagnostics showed one review line: cached AT-SPI `SHOWING`
|
||||
states still described the original viewport. Paragraphs now on screen were
|
||||
treated as hidden, while the originally showing paragraphs had current bounds
|
||||
far above the window. Cursor restoration was not the cause. The 40 omitted
|
||||
objects were browser-chrome text-provider failures and remained after the fix;
|
||||
they did not account for the missing page paragraphs.
|
||||
|
||||
For a node entering a review-only native capture, refresh the cached state bits
|
||||
before reading its snapshot and geometry. Preserve cached children, interfaces,
|
||||
and the existing dirty-node refresh policy. This recovers the current viewport
|
||||
without adding retries or changing any text, range, tree, or deadline limits.
|
||||
The diagnostic capture then contained 26 review lines. Temporary text-bearing
|
||||
diagnostics were removed from the code.
|
||||
|
||||
```sh
|
||||
CTHULHU_NATIVE_BROWSER_TESTS=dynamic python3 tests/native_browser.py
|
||||
```
|
||||
|
||||
The strengthened regression keeps the original window-end/previous-line
|
||||
sequence and requires "New content", "End of page", and "Unrelated paragraph
|
||||
999" in order. It also checks forward lines, words, characters, the last
|
||||
character at window end, and backward recovery after the bottom boundary.
|
||||
Private GTK provider-cache and clipped-text regressions and the native AT-SPI
|
||||
harness passed, including terminal and table workflows. The table harness still
|
||||
emitted GTK `Atk-CRITICAL` role warnings while its assertions passed.
|
||||
Race tests and vet for `internal/atspi`, `internal/review`, and `internal/app`,
|
||||
plus `go build ./cmd/...`, also passed. The initial ordinary app-package run
|
||||
could not create private Unix speech sockets inside the sandbox; the approved
|
||||
race run outside that restriction passed all three packages.
|
||||
|
||||
For live acceptance after an authorized build/restart, browse to the bottom of
|
||||
a long dynamically updated page. Press Cthulhu+Numpad 9, then Numpad 7: speech
|
||||
and Braille should move from the final visible line to its predecessor. Check
|
||||
forward movement back to the final line, bottom feedback, and backward movement
|
||||
again. Repeat after scrolling back up and check word/character review and a
|
||||
native terminal. These automated checks do not establish physical-key, audible
|
||||
speech, or Braille acceptance.
|
||||
|
||||
## Browser chrome omissions and standard messages
|
||||
|
||||
A private Chromium-family browser probe reproduced 40 omitted objects. Native
|
||||
text queries exposed three distinct provider patterns: containers containing
|
||||
only embedded-child placeholders, named controls returning their accessible
|
||||
labels through Text but invalid line offsets, and real text with unavailable
|
||||
geometry. Both character and range geometry were zero for the failing chrome
|
||||
objects. The address entry's native Text contained its URL, not its label.
|
||||
|
||||
After a provider failure, bounded verification now allows embedded-only
|
||||
containers to use child-provided content. A noneditable named control or static
|
||||
label can use the existing synthetic-name path only when its native text
|
||||
exactly equals its accessible name and its component is fully inside the clip.
|
||||
Editable text, passwords, differing names/text, mixed container content, capture
|
||||
limits, and clipped labels do not qualify. Recovered names have no native text
|
||||
offsets. This is a generic provider-content rule, not a browser-name exception.
|
||||
|
||||
Tabs and compound menu rows also retain their own label beside independently
|
||||
named child actions such as Close. Text/label descendants still suppress duplicate
|
||||
parent labels. Ordinary nested-button suppression is preserved.
|
||||
|
||||
The new browser proof fails with the fixes disabled: Back, Forward, Reload,
|
||||
New Tab, and the tab label are absent, with 40 omissions. With the fixes enabled,
|
||||
these controls and popup entries are reviewable. The window fixture reports
|
||||
two omissions (the address entry and a mixed-text panel); its popup reports
|
||||
none. These counts describe this fixture, not every browser or screen.
|
||||
The mixed-text panel remains conservatively unresolved even though a static
|
||||
child supplies its displayed label. The address URL remains unavailable in flat review because
|
||||
its visible character span cannot be established from zero geometry. Neither
|
||||
its label nor its entire potentially clipped value is substituted. Ordinary
|
||||
address-bar focus and editing remain separate from geometric flat review.
|
||||
|
||||
The partial-content speech/Braille warning is removed. Both complete and partial
|
||||
layouts use "Top of screen." and "Bottom of screen." Omission counts remain in
|
||||
diagnostics; fatal capture errors keep their existing messages. Ask before
|
||||
adding or replacing established user-facing messages.
|
||||
|
||||
```sh
|
||||
CTHULHU_NATIVE_BROWSER_TESTS=flat-chrome,dynamic,menu python3 tests/native_browser.py
|
||||
```
|
||||
|
||||
The new proof checks actual tab-label zones, toolbar controls, focused/unfocused
|
||||
address handling, and popup review. The dynamic-page proof retains its stale
|
||||
state-cache fix and backward/forward line, word, and character navigation.
|
||||
Focused unit cases reject unsafe component recovery and verify tab/menu labels
|
||||
with child actions and text-label deduplication. Existing cache, clipping, and
|
||||
zero-area-glyph native checks also remain relevant.
|
||||
|
||||
After an authorized build/restart, check speech and physical Braille separately:
|
||||
review the tab strip and toolbar, including a tab's title and Close control;
|
||||
open the browser menu and review its rows and inline controls; return to the
|
||||
page and exercise dynamic-page backward review. At the first/last review line,
|
||||
Numpad 7/9 must announce only the standard screen boundary. No partial-content
|
||||
message should interrupt review or flash Braille. Check normal address-bar
|
||||
focus/typing, a narrow/scrolled field, passwords, a native terminal, and native
|
||||
text clipping. Address-value flat review remains a known limitation in the
|
||||
observed provider. Private tests do not establish audible speech, physical
|
||||
keys, or Braille acceptance, and the running reader was not replaced.
|
||||
|
||||
## Human review and live acceptance
|
||||
|
||||
Review the generated diff before submission. With an authorized build/restart:
|
||||
@@ -193,9 +299,10 @@ Review the generated diff before submission. With an authorized build/restart:
|
||||
Password contents must stay excluded. Review must stay in the foreground
|
||||
window and ordinary focus/caret navigation must still work afterward.
|
||||
4. Exercise a window with one unavailable text object or child subtree. Healthy
|
||||
content must remain reviewable with an explicit warning. Repeated navigation
|
||||
should not repeat the warning continuously; after the provider recovers and
|
||||
the tree is refreshed, ordinary top/bottom feedback must return.
|
||||
content must remain reviewable without an additional partial-content
|
||||
announcement. Verify omission diagnostics in the log, then refresh after the
|
||||
provider recovers. Top/bottom feedback must use the same standard messages
|
||||
before and after recovery.
|
||||
5. Confirm audible speech and physical Braille separately, including routing
|
||||
within a merged span. Native capture and Go test success do not establish
|
||||
these outcomes. Preserve fresh logs for any remaining failure.
|
||||
|
||||
Reference in new issue
Block a user