asterism branch T-2353/bugfix-works-filter-menu-ambiguous-labels commits 3 files 11 touched lines +529 / -39 review 2nd (1st: needs fixes, docs only)

Pre-push review: T-2353/bugfix-works-filter-menu-ambiguous-labels

Second review, against origin/main (e21d64da) after the rebase over PR #90. Three commits qualify the Works filter menu's “Any” and status rows in their visible text so VoiceOver and XCUITest can tell them apart; the third commit answers the first review.

At a glance

  • Fix shape. Only a row's visible text reaches VoiceOver or XCUI on this inline-Picker-in-a-Menu control (identifier and .accessibilityLabel are both dropped, the latter measured), so the fix changes what the row shows: Any type … Any release days, and Work: Ongoing / Reading: To read … for every status row.
  • First-review items: all resolved. Eight not nine everywhere (with a correction note in launch-to-today/verification-run.md); test comments name the visible-text mechanism; the report says the three tests were already green on main via T-2354's nextTo; “Reading: Reading” is in Decision 1's Negative list; nextTo/rowSpan annotated as unexercised; testing.md gained the .accessibilityLabel sentence; the Any derivation lives in WorksFilterPresentation with a unit test.
  • Counts verified against the code. 8 filterPicker calls (Sort is a plain Picker with no Any row); 9 changed chooseOption/chooseWorksOption sites (7 + 1 + 1); 5 of them dropped nextTo; .above(/.below( now appear only in doc comments.
  • Left open (docs only). Report's Affected Files table is missing docs/agent-notes/testing.md and specs/launch-to-today/verification-run.md; specs/work-and-reading-status/design.md:107 still says the status rows are “labelled by WorkStatusPresentation.name”; the bare-“Any” prose in works-list-options/smolspec.md, implementation.md and docs/asterism-design.md carried over from review 1 as a nit.
  • Verification this review ran. make test-quick (Mac compile + 1,840 unit cases) passed; WorksListOptionsUITests on iPhone 18 Pro Max: 8/8 passed in 454 s, the two originally failing cases included (111.9 s and 108.6 s under a load average above 230). make test-core deliberately skipped (no Core code in the diff; the pending-capture suites EPERM on this host). Host load averaged 120–240 throughout.

Verdict

Ready to push

The three code hunks are right and small: the eight filterPicker “Any” rows are now spelled per dimension through WorksFilterPresentation.anyRowLabel(title), and every row of the two status pickers goes through the same accessibilityLabel helper the pills already use, so “Work: Finished” and “Reading: Finished” are one string in the menu, the pill and the empty state. Every UI-test literal matches what the app renders, no bare Any/Finished call site is left anywhere under AsterismUITests, and no call site passes nextTo. All items from the first review are resolved in fc017488. The unit bundle (1,840 cases, the new anyRowLabelIsQualifiedByTitle included) passed on the simulator with the Mac compile ahead of it, and WorksListOptionsUITests passed 8/8 on iPhone 18 Pro Max — both originally failing cases in that suite now resolve their rows by the qualified text alone. What remains is documentation only: the bugfix report's Affected Files table omits two files the diff touches, and one sentence in specs/work-and-reading-status/design.md now states the opposite of what the code does. Neither blocks the push; both are worth a follow-up commit.

Review findings

7 raised · 0 fixed · 7 skipped

Jump to findings →

Tests

Pass rate: 100% (1848 of 1848)

New tests: 1

Diff coverage: n/a

Jump to tests →

Commits

Three-level explanation

What changed

The Works screen has a “Sort and Filter” menu with eight filter sections (Type, Tag, Site, Series, Creator, Work status, Reading status, Release days). Each section used to start with a row that just said Any, and two sections both had a row called Finished. If you can see the screen, the section headers tell you which “Any” is which. If you use VoiceOver, or if an automated test is driving the app, you only get the row's own words — and eight rows that all say “Any” are indistinguishable.

This change makes each row say which section it belongs to: “Any type”, “Any site”, “Any release days”, and in the two status sections “Work: Finished”, “Reading: Finished”, “Reading: To read”, and so on. Those status spellings are the same ones the app already shows on the little filter pills above the list.

Why it matters

Three UI tests were failing because they could not tell the rows apart. More importantly, a VoiceOver user had the same problem. One small change fixes both.

Key concepts

  • Accessibility label / identifier: hidden names a developer can attach to a control so screen readers and tests can find it. On this particular menu the system ignores both and only uses the visible text — which the branch proved by trying the hidden-label approach first and measuring that it did not work.
  • VoiceOver: iOS's screen reader. It reads a row's text aloud; “Any” eight times is useless, “Any site” is not.
  • XCUITest: Apple's UI-test framework. It finds rows by the same text VoiceOver reads, so anything ambiguous for one is ambiguous for the other.

Changes overview

  • WorksView.filterPicker (the one helper all eight filter dimensions go through) now draws its “Any” row as Text(WorksFilterPresentation.anyRowLabel(title)), i.e. "Any \(title.lowercased())", instead of Text("Any"). The signature is unchanged.
  • The Work status and Reading status filterPicker calls pass WorkStatusPresentation.accessibilityLabel / ReadingStatusPresentation.accessibilityLabel as the row-label closure instead of .name. Those helpers already produce “Work: X” / “Reading: X” for the pills and the empty state (Q23 of work-and-reading-status), so no new string is minted.
  • WorksFilterPresentation.anyRowLabel(_:) is new, placed beside the eight any*RowIdentifier constants, with a unit test pinning all eight outputs.
  • Nine UI-test call sites now pass the qualified label; the five that used T-2354's nextTo: neighbour resolution drop it. WorksOptionNeighbour and the neighbour branch of worksOptionRow stay, documented as currently unexercised.
  • Documentation: a bugfix report, Decision 1 in works-list-options/decision_log.md, a sentence in docs/agent-notes/testing.md, and a count correction in launch-to-today/verification-run.md.

Implementation approach

The ticket offered two candidates: make the menu item carry an identifier (app side) or thread the picker section through ~20 test call sites (test side). The branch measured the app-side fallback first — .accessibilityLabel on the row's Text — and found it dropped exactly like the identifier: SwiftUI builds an inline Picker row inside a Menu as a native UIMenu action from the row's title string. So the visible text is the only channel, and the fix changes it. Once “Finished” had to carry its dimension, the whole status picker was moved to the qualified form rather than special-casing one row, which keeps the menu, pill and empty-state spelling identical and needs no new parameter.

Trade-offs

  • Status rows are longer and repeat the section header (“Reading: Abandoned” under “Reading status”), and the .reading row reads “Reading: Reading”. Accepted because the pill already shows that string.
  • The “Any” text is derived from the picker's title by lowercased(). That is one fewer place to spell each dimension, but a renamed title silently renames its Any row; Decision 1 records this as a negative consequence and the unit test pins the current eight spellings.
  • nextTo is kept rather than deleted: it costs nothing unused and is general infrastructure for a future label collision.

Technical deep dive

filterPicker<Option, Tag, RowLabel>(_ title: String, …) takes a plain String, so Picker(title, selection:) resolves to the StringProtocol overload and Text(anyRowLabel(title)) to Text<S: StringProtocol> — nothing here is a LocalizedStringKey, so lowercased() operates on the literal and there is no catalog lookup to break. String.lowercased() is the locale-independent form; the first review's “locale-sensitive” remark applied to lowercased(with:), which is not used. The interpolation runs once per picker per evaluation of the menu content closure, the same cost class as the per-row filterOptions.label(for:) closures already there; not a hot path.

In the UI-test helper, worksOptionRow's identifier-first lookup still misses (no menu row carries its identifier), so resolution is by label == %@; with the labels now unique the candidates.count == 1 branch is taken and no .frame round trips happen. The pre-flight waitForExistence(timeout: 5) on the label query is now more selective, not less.

Architecture impact

Presentation strings for the two status dimensions collapse to one source (*Presentation.accessibilityLabel, a name Q60 already flagged as a misnomer for what is now visibly a qualified display name). The “Any” row text, however, is derived from the picker title while the identifiers are hand-authored constants; the doc comment on anyRowLabel slightly overclaims that both are pinned. A small per-dimension table (title, Any text, identifier) would close that, and is the natural next step if a ninth filter dimension arrives.

Potential issues

  • The Mac draws the same menu through AppKit's NSMenu, which is likewise title-driven, so the qualified rows appear there too; the report's runs were simulator-only and the Mac rendering of “Reading: Reading” under a “Reading status” header is unverified by anyone but the owner.
  • The eight-title literal in anyRowLabelIsQualifiedByTitle has no compile-time link to WorksView; it pins today's spellings and will not notice a title rename on its own (the UI tests will).
  • specs/work-and-reading-status/design.md:107 now states “rows labelled by WorkStatusPresentation.name”, which is no longer true; the next agent reading that spec before touching the status pickers will be misled.
  • Any future dimension whose title is a proper noun or acronym gets a lowercased Any row (“Any isbn”); anyRowLabel would need a case at that point.

Completeness assessment

Fully implemented: the ticket's app-side preference (qualify the rows VoiceOver reads), the three originally failing tests driven by the qualified rows, the unit-tested extraction, and the first review's full item list. Partially implemented: documentation sync — the report's Affected Files table and one sentence in another spec's design doc lag the code. Missing: nothing functional.

Important changes — detailed

WorksView.filterPicker: the Any row shows its dimension

Asterism/Asterism/Views/WorksView.swift

Why it matters. User-visible and VoiceOver-visible text on every one of the eight filter dimensions; the only string the native menu item carries, so it is the fix itself.

What to look at. WorksView.swift:439-441 (Text(WorksFilterPresentation.anyRowLabel(title))), doc comment 413-430

Takeaway. An inline Picker inside a Menu becomes a native UIMenu action built from the row's title string; .accessibilityIdentifier and .accessibilityLabel on the SwiftUI Text are both dropped. Disambiguate in what the row shows.
Rationale. Decision 1: the accessibility-label fallback the ticket suggested was tried first and measured not to reach the row; visible text is the remaining channel and fixes VoiceOver and XCUI together.

WorksView status pickers: every row through the pill's qualified spelling

Asterism/Asterism/Views/WorksView.swift

Why it matters. “Finished” existed in both status vocabularies; the whole picker moves to “Work: X” / “Reading: X” rather than special-casing one row, reusing WorkStatusPresentation/ReadingStatusPresentation.accessibilityLabel.

What to look at. WorksView.swift:355-370 (the two filterPicker label closures)

Takeaway. When one value in a closed vocabulary collides, qualify the dimension consistently — menu row, pill and empty state from one helper — instead of the one colliding value.
Rationale. Decision 1 Rationale: a picker reading “Ongoing / Work: Finished / On hiatus” is inconsistent inside itself; the pills already qualify whichever value is active. Costs four extra test-literal changes and a “Reading: Reading” row.

WorksFilterPresentation.anyRowLabel + unit test

Asterism/Asterism/ViewModels/WorksListOptions.swift

Why it matters. Moves the Any-text derivation out of the view into the unit-tested presentation enum that owns the any*RowIdentifier constants; the test pins the eight current spellings the UI tests hardcode.

What to look at. WorksListOptions.swift:641-646; WorksListOptionsTests.swift:496-507

Takeaway. Presentation strings the UI tests depend on belong in a nonisolated, unit-testable helper, not minted in the view.
Rationale. First-review follow-up. The comment's claim that the identifier is thereby pinned too is an overstatement — identifiers stay hand-authored constants. (inferred — not stated by the author)

UI tests: nine call sites re-labelled, nextTo dropped at five

Asterism/AsterismUITests/WorksListOptionsUITests.swift

Why it matters. These literals are the regression guard: they only resolve if the app renders exactly the qualified text. No bare Any/Finished/Abandoned/To read/On hiatus label is left anywhere in AsterismUITests.

What to look at. WorksListOptionsUITests.swift:385-390, 401, 407-410, 424-426, 436, 491-492, 521-525; WorksCreatorOptionsUITests.swift:210-213; AccessibilityJourneyUITests.swift:305-308

Takeaway. Passing the qualified label directly replaces neighbour resolution; the helper's identifier-first lookup still misses on this menu, so the label is the whole contract.
Rationale. Decision 1: nextTo (T-2354) fixed the test symptom but gave VoiceOver nothing; it stays as unexercised infrastructure rather than being deleted with the only rows that needed it.

Documentation: Decision 1, bugfix report, testing.md, verification-run correction

specs/works-list-options/decision_log.md

Why it matters. Records the measured .accessibilityLabel finding, the three alternatives, the “Reading: Reading” consequence and the eight/nine correction so the next agent with an ambiguous menu row does not repeat the experiment.

What to look at. decision_log.md:27-169; report.md (new); testing.md:892-896; verification-run.md:341-343

Takeaway. Where a spec's own diagnosis carried a wrong count, annotate the section in place rather than editing history: “read nine below as eight throughout this section”.
Rationale. First-review follow-ups; all landed in fc017488 and 89f921af.

Key decisions

Qualify the row's visible text, not an accessibility label.

Decision 1 (specs/works-list-options/decision_log.md): the ticket's fallback — .accessibilityLabel on the row's Text — was implemented and measured on iPhone 18 Pro Max; both target rows stayed unreachable by their qualified label. The native UIMenu action is built from the row's title string and drops SwiftUI accessibility modifiers, so the visible text is the only channel.

Move the whole status picker to the qualified form, not only Finished.

Decision 1 Rationale and fourth Alternative: a picker reading “Ongoing / Work: Finished / On hiatus” is inconsistent with itself and with the pill that qualifies whichever value is active; special-casing one row needs a new filterPicker parameter or a conditional in the label closure. Cost accepted: four call sites for values that were never ambiguous, longer rows, and “Reading: Reading”.

Keep nextTo / WorksOptionNeighbour, unexercised.

Decision 1 second Alternative: T-2354's neighbour mechanism is general infrastructure for a future label collision and costs nothing unused; deleted call sites would otherwise leave nothing pointing at it. rowSpan's doc now says its four measured examples were removed by T-2353.

Derive the Any text from the picker title with lowercased().

Decision 1 third Negative consequence: a renamed title silently renames its Any row; nothing pins the two together beyond the decision and, since fc017488, the unit test's literal list of eight titles. title is a plain String, never a LocalizedStringKey, so there is no catalog interaction today.

Annotate launch-to-today/verification-run.md rather than rewrite it.

The §3.4 diagnosis said nine Any rows; a parenthetical correction is inserted after the first occurrence, telling the reader to read “nine” as eight throughout the section, leaving the original tree dump and prose intact as a record.

(inferred — not stated by the author.)
Put anyRowLabelIsQualifiedByTitle in WorksFilterTests rather than WorksFilterPresentationTests.

No rationale stated. The project has a dedicated WorksFilterPresentationTests suite (“the pills, the empty sentence and the menu identifiers”) that already covers the sibling status-qualification logic; the new test sits in the filter-state suite instead.

(inferred — not stated by the author.)

Review findings

SeverityAreaFindingResolution
minorreport.md:517-528 Affected FilesThe table lists eight files; the diff touches ten. docs/agent-notes/testing.md (the .accessibilityLabel sentence) and specs/launch-to-today/verification-run.md (the eight/nine correction) are missing.Add the two rows. Not applied: the review brief says not to modify the branch.
minorspecs/work-and-reading-status/design.md:107States the two status filterPicker calls draw “rows labelled by WorkStatusPresentation.name” and that only activeLabels/emptyDescription emit the qualified form. After this diff the rows go through accessibilityLabel; the sentence now contradicts the code.One in-place annotation pointing at works-list-options Decision 1, the way verification-run.md §3.4 was annotated. Not applied: branch is read-only for this review.
minorWorksListOptionsTests.swift:496 test placementanyRowLabelIsQualifiedByTitle tests a WorksFilterPresentation helper but sits in WorksFilterTests (filter state/pruning). WorksFilterPresentationTests.swift is the suite for pills, the empty sentence and menu identifiers and already holds the sibling status-qualification test; the first review named that file.Move the test next to the “two status dimensions” section of WorksFilterPresentationTests. Behaviour-neutral; skipped under the no-modification brief.
nitWorksListOptions.swift:641-643 doc comment“so the row and its identifier cannot be spelled a different way per dimension” — anyRowLabel derives only the row text; the any*RowIdentifier constants remain hand-authored and a call site can still pair a mismatched identifier.Claim only what the function does, or add a per-dimension table pairing title, Any text and identifier. Skipped.
nitBare “Any” prose (carried over from review 1)specs/works-list-options/smolspec.md:13, implementation.md:20 and :119, docs/asterism-design.md:310 still describe the row as “Any”. No requirement is contradicted — they constrain the option set — but the smolspec's own approach says superseded wording is annotated in place.A pointer to Decision 1 at each, when those files are next touched. Skipped.
nitWorksListOptionsUITests.swift:214 / UIJourneySupport.swift:79 (pre-existing)“Any, which every picker draws” — the Sort picker draws none; and UIJourneySupport's “not one of the other eight” should be seven. testing.md:889 still names worksOptionRow(_:labelled:in:), whose signature gained nextTo in T-2354.Wording only. Skipped.
nitDuplicated root-cause proseThe UIMenu-built-from-visible-text explanation is restated in WorksView.swift, twice in UIJourneySupport.swift, WorksCreatorOptionsUITests.swift, WorksListOptionsUITests.swift, testing.md, the report and Decision 1. All eight agree today; that is a lot of surface to keep in sync if the OS behaviour changes.Make testing.md or the filterPicker doc comment canonical and cross-reference from the rest. Optional; skipped.

Tests

Source: local run at 2026-09-22T20:53:22+10:00 · snapshot fc017488f634914624f14a44a263828eff25a1f2

Baseline: none

Execution: passed · JUnit: 2 files · Coverage: none · Baseline: absent

Coverage scope: as the project configures it

Totals: 1848 passed · 0 failed · 0 skipped · 0 errored · 0 flaky

New and removed tests

Derived by declaration name, from the diff (no baseline run).

Blast radius

Files that import a changed file on the left, changed files in the centre, files a changed file imports on the right. Snapshot working-tree against base e21d64da24371aa152615cf38a9029707eef3dc7.

addedmodifieddeletedrenamedunchangedcollapsed package group or +N more⚑N test files with an edge to the node

Per-file diffs

Click to expand.

Asterism/Asterism/ViewModels/WorksListOptions.swift Modified +7 / -0
diff --git a/Asterism/Asterism/ViewModels/WorksListOptions.swift b/Asterism/Asterism/ViewModels/WorksListOptions.swiftindex 7ad97467..238bd937 100644--- a/Asterism/Asterism/ViewModels/WorksListOptions.swift+++ b/Asterism/Asterism/ViewModels/WorksListOptions.swift@@ -638,6 +638,13 @@ nonisolated enum WorksFilterPresentation {         "works-sort-\(sort.rawValue)"     } +    /// `T-2353`'s "Any" row text, derived from the picker's own title so the+    /// row and its identifier cannot be spelled a different way per dimension+    /// (`WorksView.filterPicker`'s doc comment has the full defect writeup).+    static func anyRowLabel(_ title: String) -> String {+        "Any \(title.lowercased())"+    }+     static let anyTypeRowIdentifier = "works-filter-type-any"     static let anyTagRowIdentifier = "works-filter-tag-any"     static let anySiteRowIdentifier = "works-filter-site-any"
Asterism/Asterism/Views/WorksView.swift Modified +28 / -3
diff --git a/Asterism/Asterism/Views/WorksView.swift b/Asterism/Asterism/Views/WorksView.swiftindex 7af5fa8a..01fffceb 100644--- a/Asterism/Asterism/Views/WorksView.swift+++ b/Asterism/Asterism/Views/WorksView.swift@@ -344,12 +344,20 @@ struct WorksView: View {             // `allCases` rather than a slice of `filterOptions`: the             // vocabularies are closed, so every value is offered whether or not             // a work currently carries it (Req 6.3, Q30).+            // T-2353: both status vocabularies have a value called "Finished"+            // (Q23), and — per `filterPicker`'s own note — only a row's+            // visible text reaches VoiceOver or XCUI, never an+            // `.accessibilityLabel`. So every row of both pickers shows the+            // same qualified spelling their own pill already does+            // (`WorkStatusPresentation.accessibilityLabel` /+            // `ReadingStatusPresentation.accessibilityLabel`) rather than+            // qualifying only the one value that collides.             filterPicker(                 "Work status", options: WorkStatus.allCases, selection: $filter.workStatus,                 anyIdentifier: WorksFilterPresentation.anyWorkStatusRowIdentifier,                 tag: \.self,                 identifier: WorksFilterPresentation.workStatusRowIdentifier-            ) { Text(WorkStatusPresentation.name($0)) }+            ) { Text(WorkStatusPresentation.accessibilityLabel($0)) }              filterPicker(                 "Reading status", options: ReadingStatus.allCases,@@ -357,7 +365,7 @@ struct WorksView: View {                 anyIdentifier: WorksFilterPresentation.anyReadingStatusRowIdentifier,                 tag: \.self,                 identifier: WorksFilterPresentation.readingStatusRowIdentifier-            ) { Text(ReadingStatusPresentation.name($0)) }+            ) { Text(ReadingStatusPresentation.accessibilityLabel($0)) }              // `update-schedule` Req 11.1's ninth dimension, after the reading             // status. Its vocabulary is closed too, so both values are offered@@ -402,6 +410,23 @@ struct WorksView: View {     /// it cannot be drawn from the options — then every value the snapshot     /// offers. Stated once for every dimension so the "Any" row and the     /// identifiers cannot be spelled a different way per filter.+    ///+    /// **T-2353.** `.accessibilityIdentifier` on the `Text` inside an inline+    /// `Picker` does not reliably reach the menu item XCUI (or VoiceOver) sees+    /// on this OS — `docs/agent-notes/testing.md` already records that as a+    /// general fact about this control — and measurement for this bug found+    /// that `.accessibilityLabel` fares no better: SwiftUI builds this row as a+    /// native `UIMenu` action from the row's own visible text, not from the+    /// view (or its accessibility modifiers) that produced it, so a label+    /// applied in SwiftUI is dropped along with the identifier. The only string+    /// that reaches VoiceOver or XCUI is what the row **shows**. So every one+    /// of the eight `filterPicker`s this menu draws falls back to it, and every+    /// one of them draws an "Any" row: eight identical, unqualified "Any" a+    /// VoiceOver reader cannot place, which is the same defect that made+    /// `app.buttons["Any"]` ambiguous for a UI test. (The menu's ninth picker,+    /// Sort, is drawn separately above and offers no "Any" row.) Qualifying the+    /// row's own text by dimension — "Any type", "Any site" — fixes both at+    /// once.     private func filterPicker<Option: Hashable, Tag: Hashable, RowLabel: View>(         _ title: String,         options: [Option],@@ -412,7 +437,7 @@ struct WorksView: View {         @ViewBuilder label: @escaping (Option) -> RowLabel     ) -> some View {         Picker(title, selection: selection) {-            Text("Any")+            Text(WorksFilterPresentation.anyRowLabel(title))                 .accessibilityIdentifier(anyIdentifier)                 .tag(Tag?.none)             ForEach(options, id: \.self) { option in
Asterism/AsterismTests/WorksListOptionsTests.swift Modified +13 / -0
diff --git a/Asterism/AsterismTests/WorksListOptionsTests.swift b/Asterism/AsterismTests/WorksListOptionsTests.swiftindex 9085b66a..cfb44db7 100644--- a/Asterism/AsterismTests/WorksListOptionsTests.swift+++ b/Asterism/AsterismTests/WorksListOptionsTests.swift@@ -492,6 +492,19 @@ struct WorksFilterTests {         let filter = WorksFilter(type: .untyped, tag: "t", hostname: "h")         #expect(filter.pruned(to: options) == filter)     }++    @Test("The Any row's text is the picker's own title, lowercased and qualified — T-2353")+    func anyRowLabelIsQualifiedByTitle() {+        let titles = [+            "Type", "Tag", "Site", "Series", "Creator", "Work status", "Reading status",+            "Release days",+        ]+        #expect(+            titles.map(WorksFilterPresentation.anyRowLabel) == [+                "Any type", "Any tag", "Any site", "Any series", "Any creator",+                "Any work status", "Any reading status", "Any release days",+            ])+    } }  @Suite("Works filter options")
Asterism/AsterismUITests/AccessibilityJourneyUITests.swift Modified +4 / -6
diff --git a/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift b/Asterism/AsterismUITests/AccessibilityJourneyUITests.swiftindex 963b1d00..a0236e08 100644--- a/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift+++ b/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift@@ -305,12 +305,10 @@ final class AccessibilityJourneyUITests: XCTestCase {         // the same menu at this size, and the row it leaves wears a work-status         // glyph and a reading-status glyph — the row that has to stay hittable.         // ANDed with the site filter above, it is Zephyr Court alone.-        // Named by a neighbour because the menu rows carry no identifiers and-        // the reading side has a "Finished" too (`work-and-reading-status`-        // Q23): this is the one directly below Ongoing.-        chooseWorksOption(-            "works-filter-work-status-finished", labelled: "Finished",-            nextTo: .below("Ongoing"), in: app)+        // The menu rows carry no identifiers and the reading side has a+        // "Finished" too (`work-and-reading-status` Q23), so T-2353 has the+        // app qualify this row's visible text as "Work: Finished".+        chooseWorksOption("works-filter-work-status-finished", labelled: "Work: Finished", in: app)         let marked = app.buttons.matching(             NSPredicate(format: "label BEGINSWITH %@", "Open Work Zephyr Court")).firstMatch         XCTAssertTrue(
Asterism/AsterismUITests/UIJourneySupport.swift Modified +22 / -0
diff --git a/Asterism/AsterismUITests/UIJourneySupport.swift b/Asterism/AsterismUITests/UIJourneySupport.swiftindex 4cbde8c4..78c9d81a 100644--- a/Asterism/AsterismUITests/UIJourneySupport.swift+++ b/Asterism/AsterismUITests/UIJourneySupport.swift@@ -109,6 +109,12 @@ enum WorksOptionNeighbour {     /// So every intended row is at two or less and every wrong one at more than     /// three and a half. Verified on `iPhone Air` at the default text size and,     /// for the first `.below("Ongoing")` site, at AXXXL.+    ///+    /// **T-2353** qualified the app's own visible text for every row these four+    /// examples named, so no call site in this repository passes `nextTo`+    /// any more — `WorksOptionNeighbour`/`nextTo` are unexercised, kept as+    /// general infrastructure for a future dimension whose label collides+    /// (`specs/works-list-options/decision_log.md` Decision 1).     static let rowSpan: CGFloat = 3 } @@ -472,6 +478,22 @@ extension XCTestCase {     /// (absent) identifier element, so the walk keeps scrolling and a genuine     /// miss fails by name rather than tapping whichever row came first and     /// quietly changing a different dimension.+    ///+    /// **T-2353, after this was written: the "identifier reads empty" half of+    /// the diagnosis above sharpened into a standing regression** —+    /// `app.buttons["Finished"]` and `app.buttons["Any"]` went from *raising*+    /// on more than one match to reporting `exists` true and `isHittable`+    /// false forever, so the 8-swipe loop this feeds gave up on a row that was+    /// on screen the whole time. The fix is at the source: `WorksView.filterPicker`+    /// now qualifies the rows' own visible text — the only string that reaches+    /// XCUI or VoiceOver on this menu — so `Any` reads per dimension ("Any+    /// type", "Any site", …) and every row of the two status pickers wears+    /// its pill's spelling ("Work: Finished", "Reading: Finished", "Reading:+    /// To read", …). No call site in this repository passes `nextTo`+    /// any more, because no row's label collides with another's; this+    /// mechanism stays as the fallback for a future dimension whose label+    /// does, rather than being deleted with the only rows it was ever needed+    /// for.     func worksOptionRow(         _ identifier: String, labelled label: String,         nextTo neighbour: WorksOptionNeighbour? = nil, in app: XCUIApplication
Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift Modified +6 / -5
diff --git a/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift b/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swiftindex 9910db7d..47f5ca99 100644--- a/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift+++ b/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift@@ -118,8 +118,9 @@ final class WorksCreatorOptionsUITests: XCTestCase {     }      /// `nextTo` names a uniquely labelled row of the same picker, for a label-    /// another picker also draws — every one of the eight filter pickers draws an `Any`, and-    /// the menu's rows carry no identifiers (`worksOptionRow`).+    /// no accessibility qualification distinguishes; the menu's rows carry no+    /// identifiers (`worksOptionRow`). T-2353 qualified the "Any" row every+    /// filter picker draws, so this file no longer needs it.     private func chooseOption(         _ identifier: String, labelled label: String,         nextTo neighbour: WorksOptionNeighbour? = nil,@@ -206,9 +207,9 @@ final class WorksCreatorOptionsUITests: XCTestCase {          // Req 5.2: nothing about the rows changed — the list the filter narrows         // is the one that was there.-        // The Creator picker's own "Any", which is the row directly above its-        // "No creators" — seven other pickers draw an "Any" too.-        chooseOption("works-filter-creator-any", labelled: "Any", nextTo: .above("No creators"))+        // T-2353: the Creator picker's own "Any" reads "Any creator" — every+        // other picker draws its own qualified "Any" too.+        chooseOption("works-filter-creator-any", labelled: "Any creator")         assertListed(newestOrder, "Req 5.1: Any returns the whole list")     } }
Asterism/AsterismUITests/WorksListOptionsUITests.swift Modified +25 / -24
diff --git a/Asterism/AsterismUITests/WorksListOptionsUITests.swift b/Asterism/AsterismUITests/WorksListOptionsUITests.swiftindex 3d8a2b7d..01e64a8c 100644--- a/Asterism/AsterismUITests/WorksListOptionsUITests.swift+++ b/Asterism/AsterismUITests/WorksListOptionsUITests.swift@@ -143,9 +143,11 @@ final class WorksListOptionsUITests: XCTestCase {     /// the accessibility journey (`UIJourneySupport`) and carries the     /// identifier-or-label resolution and the scrolling a tall menu needs.     ///-    /// `nextTo` names a uniquely labelled row of the same picker, for the rows-    /// whose own label another picker also draws — `Any`, which all nine draw,-    /// and `Finished`, which both status vocabularies have.+    /// `nextTo` names a uniquely labelled row of the same picker, for a label+    /// no accessibility qualification distinguishes; T-2353 qualified the two+    /// that used to need it — `Any`, which every picker draws, and `Finished`,+    /// which both status vocabularies have — so no call site in this file+    /// passes it any more, and it stays available for a future collision.     private func chooseOption(         _ identifier: String, labelled label: String,         nextTo neighbour: WorksOptionNeighbour? = nil,@@ -380,8 +382,11 @@ final class WorksListOptionsUITests: XCTestCase {         selectTab(.works, in: app)         waitFor(app.collectionViews["works-list"], "Works lists the seeded library") -        // Work status: the fixture's one work on hiatus.-        chooseOption("works-filter-work-status-hiatus", labelled: "On hiatus")+        // Work status: the fixture's one work on hiatus. T-2353: every row of+        // this picker shows its qualified spelling ("Work: On hiatus"), the+        // same text its pill wears — only a row's visible text reaches+        // VoiceOver or XCUI on this menu (`WorksView.filterPicker`).+        chooseOption("works-filter-work-status-hiatus", labelled: "Work: On hiatus")         assertListed(["Ashfall"], "A work-status filter keeps the works carrying it")         waitFor(pill("Work: On hiatus"), "Req 6.2: the pill names the dimension it filtered")         XCTAssertEqual(@@ -393,19 +398,16 @@ final class WorksListOptionsUITests: XCTestCase {         app.anyElement("works-filter-clear").tap()         assertListed(newestOrder, "Clear removes the status filter as it does any other") -        chooseOption("works-filter-reading-status-abandoned", labelled: "Abandoned")+        chooseOption("works-filter-reading-status-abandoned", labelled: "Reading: Abandoned")         assertListed(["Marrow Lane"], "A reading-status filter keeps the works carrying it")         waitFor(pill("Reading: Abandoned"), "…under its own qualified pill")          // Req 6.3: the two dimensions are not faceted and their vocabularies are         // closed, so a pair no work carries is reachable — and the empty state         // names both dimensions rather than reading "Finished, Abandoned".-        // "Finished" is also the reading side's name for a value (Q23), and-        // the menu rows carry no identifiers — so the picker is named by a row-        // only it has, and this is the Finished directly below Ongoing.-        chooseOption(-            "works-filter-work-status-finished", labelled: "Finished",-            nextTo: .below("Ongoing"))+        // "Finished" is also the reading side's name for a value (Q23), which+        // is exactly why every row of both pickers wears its qualifier.+        chooseOption("works-filter-work-status-finished", labelled: "Work: Finished")         waitFor(             app.anyElement("works-filter-empty"),             "A combination no work carries is reachable and explains itself")@@ -419,10 +421,9 @@ final class WorksListOptionsUITests: XCTestCase {          // Q23's whole reason: both vocabularies have a value called "Finished",         // and with the pair the fixture does carry, both pills are on screen at-        // once and have to be tellable apart.-        chooseOption(-            "works-filter-reading-status-finished", labelled: "Finished",-            nextTo: .below("Catching up"))+        // once and have to be tellable apart. T-2353 qualifies this row's own+        // visible text the same way, "Reading: Finished".+        chooseOption("works-filter-reading-status-finished", labelled: "Reading: Finished")         assertListed(["Zephyr Court"], "The pair one work does carry lists it")         waitFor(pill("Work: Finished"), "The work side's Finished names itself")         waitFor(pill("Reading: Finished"), "…and the reading side's names itself too")@@ -432,7 +433,7 @@ final class WorksListOptionsUITests: XCTestCase {         // so the work-status Finished above is not ANDed into a miss.         app.anyElement("works-filter-clear").tap()         assertListed(newestOrder, "Clear removes both filters before the fifth value goes on")-        chooseOption("works-filter-reading-status-toRead", labelled: "To read")+        chooseOption("works-filter-reading-status-toRead", labelled: "Reading: To read")         assertListed(["Vesper Tide"], "Req 1.1: the to-read filter keeps the to-read work")         waitFor(pill("Reading: To read"), "Req 1.1: under the qualified pill the value spells")         XCTAssertTrue(@@ -488,8 +489,8 @@ final class WorksListOptionsUITests: XCTestCase {          // Req 11.3: ANDed with another dimension like any other, reachable as a         // combination no work carries — Marrow Lane is the abandoned work and it-        // is the one with days.-        chooseOption("works-filter-reading-status-abandoned", labelled: "Abandoned")+        // is the one with days. T-2353: the row's own text is qualified.+        chooseOption("works-filter-reading-status-abandoned", labelled: "Reading: Abandoned")         waitFor(             app.anyElement("works-filter-empty"),             "A combination no work carries is reachable and explains itself")@@ -517,11 +518,11 @@ final class WorksListOptionsUITests: XCTestCase {         // others alone.         chooseOption("works-filter-release-days-some", labelled: "Has release days")         assertListed(["Ashfall", "Marrow Lane"], "The dimension is on again")-        // Every picker draws an "Any"; this is the one directly above the-        // Release days row that is on.-        chooseOption(-            "works-filter-release-days-any", labelled: "Any",-            nextTo: .above("Has release days"))+        // T-2353: every picker draws an "Any" row, so the app qualifies each+        // one's visible text by dimension (`WorksView.filterPicker`) —+        // this picker's is "Any release days", not the bare "Any" every other+        // picker also offers.+        chooseOption("works-filter-release-days-any", labelled: "Any release days")         assertListed(newestOrder, "Req 11.1: Any returns the whole list")         XCTAssertFalse(             pill("Has release days").exists, "…with the pill gone")
docs/agent-notes/testing.md Modified +6 / -1
diff --git a/docs/agent-notes/testing.md b/docs/agent-notes/testing.mdindex 5a92aade..885ee095 100644--- a/docs/agent-notes/testing.md+++ b/docs/agent-notes/testing.md@@ -888,7 +888,12 @@ the menu item XCUI sees.** The Works list's sort and filter rows carry one each, but on iOS the generated menu item often exposes only the visible label, so `UIJourneySupport.worksOptionRow(_:labelled:in:)` resolves by identifier first and falls back to the label. Drive any new inline-picker row through that helper-(or the same fallback) rather than by identifier alone.+(or the same fallback) rather than by identifier alone. `.accessibilityLabel` on+that same `Text` is dropped the same way, not only the identifier: SwiftUI+builds the row as a native `UIMenu` action from the row's own **visible text**,+so a label applied in SwiftUI never reaches VoiceOver or XCUI either — measured+in `T-2353` (`specs/bugfixes/works-filter-menu-ambiguous-labels/report.md`),+whose fix was to qualify the row's visible text instead.  **`accessibilityElement(children: .contain)` is not the fix.** It looks like one — name the container as a container and the children keep their own names — and
specs/bugfixes/works-filter-menu-ambiguous-labels/report.md Added +262 / -0
diff --git a/specs/bugfixes/works-filter-menu-ambiguous-labels/report.md b/specs/bugfixes/works-filter-menu-ambiguous-labels/report.mdnew file mode 100644index 00000000..35561d5f--- /dev/null+++ b/specs/bugfixes/works-filter-menu-ambiguous-labels/report.md@@ -0,0 +1,262 @@+# Bugfix Report: Works Filter Menu Tests Fail on Ambiguous Accessibility Labels++**Date:** 2026-09-22+**Status:** Fixed++## Description of the Issue++Three UI tests failed because a Works filter-menu row could not be addressed+unambiguously:++- `AsterismUITests/WorksListOptionsUITests/testTheReleaseDaysFilterNarrowsTheListByPresenceAndNamesItself`+- `AsterismUITests/WorksListOptionsUITests/testTheStatusFiltersNarrowTheListAndNameTheirDimension`+- `AsterismUITests/WorksCreatorOptionsUITests/testTheCreatorFilterNarrowsTheListAndExplainsAnEmptyOne`++Diagnosed during `launch-to-today` task 13 (`specs/launch-to-today/verification-run.md`+section 3.4); not caused by that spec. Tracked as T-2353.++**Reproduction steps (as originally diagnosed):**+1. Run `WorksListOptionsUITests` or `WorksCreatorOptionsUITests` on+   `iPhone 18 Pro` or `iPhone 18 Pro Max`.+2. `chooseWorksOption` opens the sort-and-filter menu and tries to tap the+   `Any` row of a filter dimension, or the `Finished` row of the Work-status+   dimension.+3. The 8-swipe scroll loop exhausts itself and the test fails with+   `"The menu offers Any"` / `"The menu offers Finished"`, even though the+   target row is on screen and hittable the whole time.++**Impact:** three UI tests red on the `launch-to-today` branch's own+suites, unrelated to that feature's changes — inherited by every branch that+runs `WorksListOptionsUITests`/`WorksCreatorOptionsUITests`. Beyond the test+failure, the underlying cause is an accessibility defect in its own right: a+VoiceOver reader hears an unqualified "Any" from any of the menu's eight+dimensions, or "Finished" from either status vocabulary, with no way to tell+which row they are on.++## Investigation Summary++The root cause was already fully diagnosed in `specs/launch-to-today/verification-run.md`+section 3.4, including a tree dump at the point the scroll loop gives up:++```+DIAG-MENU id=works-filter-work-status-finished idExists=false labelCount=2+          subscriptExists=true subscriptHittable=false+DIAG-MENU   [0] id= hittable=true frame=(171.3, 110.0, 250.0, 42.0)+DIAG-MENU   [1] id= hittable=true frame=(171.3, 341.0, 250.0, 42.0)+```++- The `.accessibilityIdentifier` on the `Text` inside each `filterPicker`'s+  inline `Picker` does not reach the menu item XCUI sees — every row+  publishes an empty identifier (`docs/agent-notes/testing.md` already+  records this as a general limitation of this control on this OS).+- `worksOptionRow` falls back to the row's visible label. Every one of the+  eight `filterPicker` rows draws an `Any` row, and both status vocabularies+  (`WorkStatus`, `ReadingStatus`) have a value called `Finished`+  (`work-and-reading-status` Q23).+- `app.buttons["Finished"]` matches two rows, `app.buttons["Any"]` matches+  up to eight (one per `filterPicker`, of which the menu draws eight; its+  ninth picker, Sort, draws no `Any` row). An ambiguous `NSPredicate` query+  reports `exists` true but `isHittable` false — XCUITest will not hit-test a query+  with more than one match — so the scroll loop can never satisfy+  `row.exists, row.isHittable` and gives up after 8 swipes.+- A related but narrower fix (`to-read`, T-2354, already on `main` before+  this branch) added a `nextTo` neighbour-resolution parameter to+  `worksOptionRow`/`chooseWorksOption` that made the three named tests pass+  again by naming a uniquely labelled neighbour row. Verified independently+  (2026-09-22): all three tests already pass on `main` with that mechanism.+  It fixes the *test* symptom but not the underlying accessibility defect —+  a VoiceOver user gets no such "neighbour" hint, and still hears an+  unqualified "Any" eight times over.+- **First fix attempt (rejected after measurement):** applying+  `.accessibilityLabel` to the `Text` inside `filterPicker`, qualifying only+  the `Any` row and the `Finished` rows while leaving every row's *visible*+  text unchanged. This compiled and looked correct, but a UI-test run+  (`iPhone 18 Pro Max`, solo) showed both target rows still unreachable by+  their new qualified label (`"The menu offers Any release days"`,+  `"The menu offers Work: Finished"`). SwiftUI builds this row as a native+  `UIMenu` action from the row's own **visible text**, not from the view (or+  its accessibility modifiers) that produced it — so `.accessibilityLabel`+  is dropped exactly like `.accessibilityIdentifier` is. Only a change to+  the row's displayed text reaches VoiceOver or XCUI on this control.++## Discovered Root Cause++**Defect type:** Ambiguous accessibility labelling, compounded by an OS+limitation.++**Why it occurred:** `WorksView.filterPicker`'s "Any" row and the two status+pickers' "Finished" rows were only ever distinguished by their identifier,+which does not reach an inline `Picker`'s native menu item on this OS. Once+XCUITest fell back to the (unqualified, shared) visible label, a query+matching more than one element degrades from a raising subscript+(`app.buttons["Finished"]`, which used to fail loudly when it accidentally+matched two rows) to a silently-never-hittable `NSPredicate` match — the+5th-reading-status change (`to-read`) shifted row offsets enough that both+same-labelled rows became materialised in the lazy menu at once, turning a+latent ambiguity into a standing failure.++**Contributing factors:** SwiftUI's `Picker(style: .inline)` inside a `Menu`+is rendered as a native `UIMenu`, built from each row's own title string;+neither `.accessibilityIdentifier` nor `.accessibilityLabel` applied to the+row's SwiftUI view carries over to that native element — only the visible+text does. This was not previously documented for `.accessibilityLabel`+specifically (only for the identifier); this bugfix adds that finding to+`WorksView.filterPicker`'s own doc comment.++## Resolution for the Issue++**Changes made:**+- `Asterism/Asterism/Views/WorksView.swift` — `filterPicker`'s "Any" row now+  shows `WorksFilterPresentation.anyRowLabel(title)` (e.g. "Any type", "Any+  release days") instead of a bare "Any", derived automatically from the+  picker's own title so no call site has to restate it. The Work-status and+  Reading-status `filterPicker` calls now draw every row's label through+  `WorkStatusPresentation.accessibilityLabel` / `ReadingStatusPresentation+  .accessibilityLabel` ("Work: Ongoing", "Work: Finished", "Work: On+  hiatus" / "Reading: To read", …) — the same qualified spelling those two+  dimensions' pills already use (`work-and-reading-status` Q23) — rather than+  the bare `WorkStatusPresentation.name`/`ReadingStatusPresentation.name`.+- `Asterism/AsterismUITests/WorksListOptionsUITests.swift`,+  `WorksCreatorOptionsUITests.swift`, `AccessibilityJourneyUITests.swift` —+  the five call sites that used to pass `nextTo` now pass the row's new+  qualified label directly and no longer need it.+- `Asterism/AsterismUITests/UIJourneySupport.swift` — doc-comment update+  only, explaining that no call site currently exercises `nextTo` and why it+  is kept rather than deleted.+- `specs/works-list-options/decision_log.md` — Decision 1, recording the+  choice (qualify the row's visible text at the source) and the two+  alternatives it displaced.++**Approach rationale:** T-2353 asked to prefer the app-side fix because it+also addresses the VoiceOver defect, and to fall back to qualifying the+accessibility label per dimension if identifiers cannot reach the menu item.+Measurement showed the accessibility-label-only fallback does not reach the+control either (see Investigation Summary), so the label that actually+reaches VoiceOver/XCUI — the row's own visible text — is qualified instead.+This fixes both the test ambiguity and the underlying VoiceOver defect with+one change, and reuses spelling the app already shows on the filter pills for+the two status dimensions, rather than inventing a new one.++**Alternatives considered:**+- Thread the picker's section through `chooseWorksOption` and its ~20 call+  sites (test-only) — rejected: does not touch the VoiceOver defect, and is a+  larger, riskier diff for a narrower fix.+- Leave `to-read`'s `nextTo` neighbour mechanism as the final answer — it+  already made the three tests pass. Rejected as the final answer for the+  same reason; kept in place as general infrastructure for a future+  collision, since it costs nothing sitting unused.+- Qualify only the `Finished` rows and leave the rest of each status+  picker's rows unqualified — rejected: it would have made only three test+  call sites correctness-sensitive, but it leaves an unnecessary asymmetry+  inside one picker's own rows and works against the row-text constraint+  discovered above, which meant the *whole* row list needed to move to+  qualified text once "Finished" moved.++Full reasoning is in `specs/works-list-options/decision_log.md`, Decision 1.++## Regression Test++**Test files:**+- `Asterism/AsterismUITests/WorksListOptionsUITests.swift`+- `Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift`++**Test names:**+- `testTheReleaseDaysFilterNarrowsTheListByPresenceAndNamesItself`+- `testTheStatusFiltersNarrowTheListAndNameTheirDimension`+- `testTheCreatorFilterNarrowsTheListAndExplainsAnEmptyOne`++**What it verifies:** each test drives the sort-and-filter menu to an+ambiguously-labelled row (`Any` in one case, the Work-status `Finished` in+another) and asserts the resulting list narrows correctly. These three were+the ones named in T-2353 and were originally red; by the time this branch+started they were green on `main` through T-2354's `nextTo` workaround+(see Investigation Summary), which resolves the ambiguous row by naming a+neighbour without qualifying the row itself. This fix makes them pass by+addressing the row directly — qualifying its visible text — which fixes the+underlying VoiceOver defect the workaround did not touch.++**Run commands:**+```+make test-only TEST=AsterismUITests/WorksListOptionsUITests+make test-only TEST=AsterismUITests/WorksCreatorOptionsUITests+make test-only TEST=AsterismUITests/WorksSeriesOptionsUITests+```++## Affected Files++| File | Change |+|------|--------|+| `Asterism/Asterism/Views/WorksView.swift` | `filterPicker`'s "Any" row and the two status pickers' rows now show qualified visible text |+| `Asterism/AsterismUITests/WorksListOptionsUITests.swift` | Seven call sites updated to the new qualified labels; `nextTo` dropped where no longer needed |+| `Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift` | One call site updated; doc comment updated |+| `Asterism/AsterismUITests/AccessibilityJourneyUITests.swift` | One call site updated |+| `Asterism/AsterismUITests/UIJourneySupport.swift` | Doc comment only |+| `Asterism/Asterism/ViewModels/WorksListOptions.swift` | `WorksFilterPresentation.anyRowLabel(_:)` added beside the `any*RowIdentifier` constants; `filterPicker` calls it instead of inlining `"Any \(title.lowercased())"` |+| `Asterism/AsterismTests/WorksListOptionsTests.swift` | New test pinning the eight `anyRowLabel` outputs |+| `specs/works-list-options/decision_log.md` | Decision 1 added |++## Verification++**Automated:**+- [x] Regression tests pass — `WorksListOptionsUITests` (8/8),+      `WorksCreatorOptionsUITests` (1/1), both on `iPhone 18 Pro Max`+      (solo, to avoid a concurrent run on the default simulator from another+      worktree — see Manual verification)+- [x] `WorksSeriesOptionsUITests` (2/2, shares the same helper, no+      ambiguous-label call sites of its own)+- [x] `AccessibilityJourneyUITests` (16/17 on `iPhone 18 Pro Max`; the one+      failure, `testTheReleaseDayTogglesStayOperableAtLargestDynamicType`, is+      the documented `iPhone 18 Pro Max`-width artefact from+      `specs/launch-to-today/verification-run.md` §3.5 — confirmed passing+      solo on the default `iPhone 18 Pro`)+- [x] `make test-quick` (unit-test bundle, simulator) — `Test Succeeded`+- [x] `make build-mac` — `Build Succeeded` (compiled only, never installed+      or launched, per this project's device-run rule)+- [ ] `make test-core` — **not clean**, but not because of this change: all+      124 recorded issues are in `PendingCaptureDrainTests.swift` /+      `PendingCaptureSpoolTests.swift` (`AsterismCoreTests`, a target this+      diff never touches), and the underlying error is+      `NSPOSIXErrorDomain Code=1 "Operation not permitted"` reading a+      file-protected JSON file in a temp spool directory — the exact+      signature the project's own memory note already records as a+      pre-existing, host-environment issue (a locked login keychain+      producing file-protection EPERM in the pending-capture suites, not a+      code defect). This diff touches only `Asterism/Asterism/Views/WorksView.swift`+      and files under `Asterism/AsterismUITests/`, neither of which the+      `AsterismCore` package depends on, so there is no causal path from+      this change to that failure.++**Manual verification:** confirmed simulator contention from a concurrent+`xcodebuild test` process in a different worktree (`T-2328`) holding the+default `iPhone 18 Pro`; re-ran solo on `iPhone 18 Pro Max` for a clean+signal, then spot-confirmed the one remaining anomaly against the default+simulator once it was free.++## Prevention++**Recommendations to avoid similar bugs:**+- On this OS, an inline `Picker` presented inside a `Menu` is rendered as a+  native `UIMenu`, built from each row's **visible text** — neither+  `.accessibilityIdentifier` nor `.accessibilityLabel` set on the SwiftUI+  view reaches the resulting element. Any future ambiguous row in this menu+  (or a similar one) needs its displayed text qualified, not an+  accessibility-only label. This is now recorded in `filterPicker`'s own doc+  comment.+- When two enum vocabularies share a spelling (like `WorkStatus.finished`+  and `ReadingStatus.finished`), qualify the whole dimension consistently —+  in the menu row, the pill, and the empty-state sentence — rather than only+  the one colliding value, so a picker's own rows read consistently.++## Related++- `specs/launch-to-today/verification-run.md` section 3.4 — original+  diagnosis and tree dump.+- `to-read` / T-2354 — added the `nextTo` neighbour-resolution mechanism this+  fix supersedes (but does not delete) as the reason these three tests could+  already be made to pass before this ticket was picked up.+- `work-and-reading-status` Q23 — established the qualified "Work: "/"Reading: "+  pill spelling this fix reuses.+- `docs/agent-notes/testing.md` — the pre-existing note on identifiers not+  reaching an inline `Picker`'s menu item; this fix's finding about+  `.accessibilityLabel` sharing that limitation lives in+  `WorksView.filterPicker`'s own doc comment rather than duplicated there.
specs/launch-to-today/verification-run.md Modified +3 / -0
diff --git a/specs/launch-to-today/verification-run.md b/specs/launch-to-today/verification-run.mdindex eb5a3152..bbaca82a 100644--- a/specs/launch-to-today/verification-run.md+++ b/specs/launch-to-today/verification-run.md@@ -338,6 +338,9 @@ Read it in order: - `labelCount=2`: two rows are labelled `Finished` — the Work status one and the   Reading status one, which `work-and-reading-status` Req 6.2 is entirely about   telling apart. Nine rows are labelled `Any`, one per filter dimension.+  (`T-2353` corrected this count: the menu draws eight `filterPicker`s, each+  with an `Any` row — the ninth picker, Sort, draws none — so read "nine"+  below as eight throughout this section.) - `app.buttons["Finished"]` is therefore ambiguous: `exists` is true but   `isHittable` is **false**, because XCUITest will not hit-test a query with   more than one match. The loop's `row.exists, row.isHittable` can never hold,
specs/works-list-options/decision_log.md Modified +153 / -0
diff --git a/specs/works-list-options/decision_log.md b/specs/works-list-options/decision_log.mdindex 93f025f7..27af8bee 100644--- a/specs/works-list-options/decision_log.md+++ b/specs/works-list-options/decision_log.md@@ -24,3 +24,156 @@ | Q18 | 2026-09-03 | Every active-filter pill carries the same identifier, `works-filter-pills`; the empty state's identifier sits on its title text | An identifier on the `FlowLayout` or on the whole `ContentUnavailableView` is pushed down onto every child and overwrote `works-filter-clear` on the Clear button — Req 7's one meaningful control was then addressable only by label. The cost is that a journey can assert the pill row exists but not read one pill's text; `WorksFilterPresentation.activeLabels` is unit-tested instead. | | Q19 | 2026-09-03 | The seeded works-options fixture creates each work whole (capture, create, move, metadata) before the next capture | `works()` orders on the newest entry's `lastSharedAt`, quantized to a millisecond with a random-identifier tie-break; the writes between captures are what keep the next capture in a later millisecond, so the four sort orders the journey asserts are deterministic. Sequential seeding is load-bearing, not a missed concurrency. | | Q20 | 2026-09-03 | A filter value the new snapshot no longer offers is pruned when the options change; the sort's `@AppStorage` keeps the explicit `WorksSort(storedValue:)` fallback rather than the `RawRepresentable` overload | Pruning: without it the picker holds a selection none of its rows carry and the only way out is Clear. The explicit fallback: Req 4's "unrecognised value reads as the default" is a stated, unit-tested contract of the value type, worth one small binding in the view. Both from the pre-push review. |++## Decision 1: Qualify the filter menu's ambiguous rows at the source, in their visible text, rather than threading the picker section through the test helper++**Date**: 2026-09-22+**Status**: accepted++### Context++T-2353 (bug): three UI tests failed because `WorksListOptionsUITests` and+`WorksCreatorOptionsUITests` could not address a filter-menu row+unambiguously. `filterPicker`'s row carries an `.accessibilityIdentifier` on+the inline `Picker`'s `Text`, but that identifier does not reliably reach the+menu item XCUI (or VoiceOver) sees on this OS — an existing, general fact+already recorded in `docs/agent-notes/testing.md` before this bug. Every row+therefore falls back to its visible label, and two labels are not unique+across the menu's eight `filterPicker`s: every one of them draws an `Any` row+(the menu's ninth picker, Sort, draws no `Any` row and is unaffected), and+both the Work status and Reading status vocabularies have a value called+`Finished` (`work-and-reading-status` Q23). `app.buttons["Finished"]` matches+two rows and `app.buttons["Any"]` matches eight; an ambiguous query reports+`exists` true but never `isHittable`, so the menu's 8-swipe scroll loop gave up on a+row that was on screen and hittable the whole time.++A related, narrower fix had already landed for one symptom of this+(`to-read`, T-2354): `chooseWorksOption`/`worksOptionRow` grew a `nextTo`+parameter that resolves an ambiguous label by finding the occurrence nearest a+uniquely labelled neighbour in the same picker, within a bounded number of row+heights. That mechanism is general — it works for any future collision — but+it does not touch the underlying defect: a VoiceOver reader still hears an+unqualified "Any" eight times over with no way to tell the dimensions apart,+which the bug ticket named as "an accessibility defect in its own right, not+only a test problem."++The ticket's suggested fallback — qualify the row's accessibility label per+dimension — was tried first and measured: `.accessibilityLabel` on the row's+`Text` left both target rows unreachable by their qualified label. SwiftUI+builds this row as a native `UIMenu` action from the row's own visible text,+not from the view or the accessibility modifiers that produced it, so the+label is dropped exactly as the identifier is. The only string that reaches+VoiceOver or XCUI is what the row shows.++### Decision++Qualify the colliding rows in `WorksView.filterPicker` through the text each+row shows. Every picker's `Any` row shows `"Any \(title.lowercased())"` (e.g.+"Any type", "Any release days"), derived from the picker's own title so no+call site has to state it twice. The Work status and Reading status pickers+draw **every** row — not only `Finished` — through their existing `label`+closure with `WorkStatusPresentation.accessibilityLabel` /+`ReadingStatusPresentation.accessibilityLabel` in place of `.name`: "Work:+Ongoing", "Work: Finished", "Work: On hiatus"; "Reading: To read", "Reading:+Finished", "Reading: Abandoned", and so on — the qualified spelling their own+pills already use. `filterPicker`'s signature is unchanged. The nine test+call sites that name these rows pass the qualified label; the five of them+that used `nextTo` drop it.++### Rationale++The identifier-on-`Text` approach (candidate 1 in the ticket) is what the row+already does, and it is the thing that does not reach the menu item on this+OS, so a second identifier of the same shape would not fix anything. The+accessibility-label fallback the ticket offered fails for the same reason,+measured rather than assumed (see Context). What is left is the visible text,+which VoiceOver and XCUI both read.++Once `Finished`'s visible text has to carry its dimension, the rest of that+picker's rows follow: a picker reading "Ongoing / Work: Finished / On hiatus"+is inconsistent inside itself, and the pills already qualify whichever status+value is active (`WorksFilterPresentation.activeLabels`, Q23), not only+`Finished`. Drawing every status row through the same presentation helper+the pill uses makes the menu row, the pill and the empty-state sentence one+spelling, and needs no change to `filterPicker`'s signature.++This fixes the VoiceOver defect and the test defect with the same change,+which the `nextTo` neighbour mechanism could not do: that only helps a test+that already knows which neighbour to ask for, and a VoiceOver reader gets no+such hint.++### Alternatives Considered++- **Thread the picker's section through `chooseWorksOption` and its call+  sites (candidate 2, test-only)**: give every call site an explicit+  dimension tag so the helper can scope its label query. Rejected: it is a+  test-only fix for a defect that also exists outside the tests — a real+  VoiceOver user hears the same unqualified "Any" eight times — and the+  ticket's own estimate (~20 call sites) is a larger, riskier diff for a+  narrower fix.+- **Leave the existing `nextTo` mechanism as the fix**: T-2354 had already+  made the three failing tests pass by naming a neighbour. Rejected as the+  final answer for the reason above — it resolves the test symptom without+  touching the accessibility defect the ticket asked to be looked at — but+  kept in place rather than deleted, since it is now-unexercised, general+  infrastructure for a future dimension whose label collides.+- **`.accessibilityLabel` on the row's `Text`, visible text unchanged** (the+  ticket's fallback, and this fix's first attempt): qualify only `Any` and+  the two `Finished` rows for VoiceOver and XCUI while the menu keeps+  showing the bare words. Rejected after measurement: a UI-test run on+  `iPhone 18 Pro Max` still could not reach either row by its qualified+  label, because the native menu action is built from the visible text and+  drops the modifier (`specs/bugfixes/works-filter-menu-ambiguous-labels/report.md`).+- **Qualify only the `Finished` rows' visible text, leave the other status+  rows bare**: touch the one value that collides. Rejected: with the visible+  text as the only channel, this leaves a picker whose rows read "Ongoing /+  Work: Finished / On hiatus", inconsistent with each other and with the+  pill that qualifies whichever value is active; and special-casing one row+  needs either a new `filterPicker` parameter for one call site or a+  conditional inside the `label` closure. The four extra call sites it+  would have spared (`On hiatus`, `Abandoned` ×2, `To read`) are a smaller+  cost than the asymmetry.++### Consequences++**Positive:**+- The eight `Any` rows and every row of the two status pickers read+  unambiguously under VoiceOver, not only under XCUITest.+- The status rows are the same strings the pills and `WorkDetailView`+  already use (`WorkStatusPresentation.accessibilityLabel` /+  `ReadingStatusPresentation.accessibilityLabel`), so the menu does not+  invent a second spelling of the same fact, and a renamed value moves the+  pill, the row and the test together.+- `filterPicker`'s signature is unchanged; the change rides through the+  `label` closure every call site already passes.+- The three originally failing tests, plus the two others that used `nextTo`+  for the same collision, no longer need it; `WorksOptionNeighbour` remains+  available for a future collision without dead call sites pointing at it.++**Negative:**+- The status pickers' rows are longer ("Reading: Abandoned"), repeating the+  dimension the picker's own title already states, on a menu that is+  already tall enough to need the test helper's scroll loop.+- Nine test call sites changed their expected label, four of them for values+  that were never ambiguous; a reader of that diff has to know the whole+  picker moved, not only the colliding row.+- The qualified `Any` label is derived from the picker's `title` string+  (`"Any \(title.lowercased())"`), so a future rename of a picker's title+  silently renames its `Any` row too; nothing pins the two together beyond+  this decision.+- The Reading status picker's `.reading` row reads "Reading: Reading" — the+  dimension name and the value happen to coincide, so the qualification+  produces a visibly redundant row for that one case. The pill already shows+  this same string, so nothing new is invented; it is simply more noticeable+  repeated in a menu row than in a pill.++### Impact++`Asterism/Asterism/Views/WorksView.swift` (`filterPicker`'s `Any` row and doc+comment, the two status `filterPicker` calls' `label` closures);+`Asterism/AsterismUITests/WorksListOptionsUITests.swift`,+`WorksCreatorOptionsUITests.swift`, `AccessibilityJourneyUITests.swift` (the+nine call sites); `Asterism/AsterismUITests/UIJourneySupport.swift` (doc+comment only, no behaviour change).++---

Things to double-check

Mac rendering.

The same Menu is drawn on the Mac through NSMenu, equally title-driven, so the qualified rows appear there too. The branch's runs are simulator-only; “Reading: Reading” under a “Reading status” header is the row most worth a glance in the owner's own Mac check (launching the Mac app is a device run and was not done here).

Which suites this review re-ran.

Only make test-quick and WorksListOptionsUITests on iPhone 18 Pro Max, per the brief. The report's runs of WorksCreatorOptionsUITests, WorksSeriesOptionsUITests and AccessibilityJourneyUITests (16/17 with the documented Pro-Max-width artefact) are the author's and were not repeated; their labels were checked by reading, not by running. The suite took 454 s on a host at load 230+; the two menu-heavy cases were 109–112 s each, so a quieter host will read faster, not differently.

The eight-title literal.

anyRowLabelIsQualifiedByTitle lists the titles by hand. It matches the eight filterPicker( calls in order today, but nothing ties the two: a renamed picker title changes its Any row and the unit test stays green; the UI test for that dimension is what would notice.

Test data provenance.

The JUnit files were converted from the two .xcresult bundles with xcrun xcresulttool get test-results tests (script in the review inputs); no Makefile target emits JUnit, so this is not a tier-1/2/3 runner and there is no coverage file. Swift Testing case names are used as the test names.