agent-desktop/crates
Lahfir 1246ef4acb fix: unify accessible-name computation across builder and resolver
Code review found the STALE_REF name-divergence class was re-introduced: the
snapshot builder stores a ref's name via its own chain (title -> description ->
static value -> label_from_children child text), but resolve_element_name — used
by strict ref re-resolution — dropped the child-label rung and trimmed blanks
differently. So an interactive element named only by descendant text (Finder /
Mail / System Settings sidebar cells) or by a whitespace/blank title stored one
name and recomputed another, failing identity_matches -> STALE_REF on
click/type/get. Confirmed: 5/5 Finder sidebar cells returned STALE_REF.

- One shared reducer `builder::accessible_name` (title -> description ->
  static-text value -> aggregated child label, each trimmed and blank-as-absent),
  with the own-text portion factored into the pure, unit-testable
  `reduce_text_name`. Both the snapshot builder and resolve_element_name reduce
  through it, so a stored ref name always equals what the resolver recomputes.
- Deleted the now-single-producer/single-consumer NameEvidence indirection
  (crates/core/src/accname.rs, crates/macos/src/tree/name_evidence.rs) and the
  now-dead label_from_child_attrs.
- Added reduce_text_name unit tests covering the rung precedence and the
  blank/whitespace handling that accname_tests used to guard.

Verified: 5/5 Finder sidebar cells now re-resolve, e2e 71/0, clippy clean,
workspace tests green.
2026-07-03 20:39:32 -07:00
..
core fix: unify accessible-name computation across builder and resolver 2026-07-03 20:39:32 -07:00
ffi fix: append native_id in AdRefEntry, bump ABI major, codegen timeout wrapper 2026-07-03 02:10:08 -07:00
linux refactor: split PlatformAdapter into capability supertraits 2026-07-02 19:32:23 -07:00
macos fix: unify accessible-name computation across builder and resolver 2026-07-03 20:39:32 -07:00
windows refactor: split PlatformAdapter into capability supertraits 2026-07-02 19:32:23 -07:00