Commit 9dd9622e19

9dd9622e199458a0855bf3032d245584794e6231

parent: 86b2b1a65e

Unsigned

cmc <hello@cleberg.net> · 2026-10-25 09:19 UTC

Move the watchlist and workflows out of Settings (!36)

Closes U2 and U3 from the review catalogue, under D6.

The watchlist becomes a navigation destination from Dashboard — the read view of
the same data drilling into the edit view — and Workflows becomes one from the
Inspect tab, where batch input already lives. Both Settings → Preferences rows
are removed. Five tabs stay five and the deployment target stays 17.6, so
nothing collapses into the system More list.

Settings → Services listed "Monitoring Activity" and "Monitoring", which the
user could not tell apart before tapping. They are now "Monitoring Log" and
"Monitoring Settings". Their position in the section is unchanged.

While a single lookup is in flight the Inspect toolbar shows a labelled
"Cancel"; once the sections settle it goes back to the clear button. The clear
button already cancelled the lookup — the finding was that nothing said so — so
this is the affordance and nothing else. `DomainViewModel.singleLookupRunning`
names that window, as `batchLookupRunning` already did for batches.

Two things the move broke, both fixed here. The Dashboard empty state told the
user to "add one directly from Tracked Domains in Settings", a row that no
longer exists. And seven navigation sites across the three accessibility UI test
files reached the watchlist and workflows through Settings. Screen identifiers
(`tracked-domains`, `seeded-tracked-domains`) are unchanged, so the results
matrix in Docs/ACCESSIBILITY.txt still keys into them.

Verification: 277 unit tests green on iOS 18.6 and 27.0. The UI suite on iOS
27.0 passes all four `AccessibilityMetadataTests` — including
`testIconOnlyControlLabels`, which now reaches the watchlist through Dashboard,
and `testWorkflowsCreateLabel`, which reaches Workflows through Inspect — and
both `AccessibilityScreenshotTests`. The four `AccessibilityAuditTests` failures
are `.dynamicType` findings on History, Settings, Tracked Domains and the
largest-size sweep: the issue #21 phase-3 burndown that
Docs/ACCESSIBILITY.txt records as failing on 27.0 specifically. None of them is
a navigation failure. Complexity ratchet unchanged at 280, nothing over it.

Worth knowing separately: this clone has no `core.hooksPath`, so
`.githooks/pre-push` never runs and neither the ratchet nor the audit gates a
push. The install step is in Docs/ACCESSIBILITY.txt. Both gates were run by
hand for this branch.

Layout: unified · split

DomainDig/ContentView.swift +18 −1
@@ -140,7 +140,15 @@ struct ContentView: View {
140 .navigationTitle("DomainDig") 140 .navigationTitle("DomainDig")
141 .toolbar { 141 .toolbar {
142 ToolbarItem(placement: .topBarTrailing) { 142 ToolbarItem(placement: .topBarTrailing) {
143 if viewModel.hasRun { 143 // While a lookup is in flight the same action is a cancel,
144 // so it says so rather than leaving an unlabelled glyph to
145 // stand for both.
146 if viewModel.singleLookupRunning {
147 Button("Cancel") {
148 viewModel.reset()
149 }
150 .accessibilityLabel("Cancel lookup")
151 } else if viewModel.hasRun {
144 Button { 152 Button {
145 viewModel.reset() 153 viewModel.reset()
146 } label: { 154 } label: {
@@ -150,6 +158,15 @@ struct ContentView: View {
150 .accessibilityLabel("Clear results") 158 .accessibilityLabel("Clear results")
151 } 159 }
152 } 160 }
161
162 ToolbarItem(placement: .topBarTrailing) {
163 NavigationLink {
164 WorkflowsView(viewModel: viewModel)
165 } label: {
166 Label("Workflows", systemImage: "square.stack.3d.up")
167 }
168 .accessibilityLabel("Workflows")
169 }
153 } 170 }
154 .navigationDestination(for: WorkflowNavigationTarget.self) { target in 171 .navigationDestination(for: WorkflowNavigationTarget.self) { target in
155 WorkflowDetailView(viewModel: viewModel, workflowID: target.workflowID) 172 WorkflowDetailView(viewModel: viewModel, workflowID: target.workflowID)
DomainDig/DashboardView.swift +11 −1
@@ -26,7 +26,7 @@ struct DashboardView: View {
26 EmptyStateCardView( 26 EmptyStateCardView(
27 title: "No Portfolio Yet", 27 title: "No Portfolio Yet",
28 message: "Track domains to get portfolio health, recent changes, expiry visibility, and an attention queue in one place.", 28 message: "Track domains to get portfolio health, recent changes, expiry visibility, and an attention queue in one place.",
29 suggestion: "Inspect a domain and use the Track action, or add one directly from Tracked Domains in Settings.", 29 suggestion: "Inspect a domain and use the Track action, or add one directly from the watchlist.",
30 systemImage: "square.stack.3d.up.fill", 30 systemImage: "square.stack.3d.up.fill",
31 showsCardBackground: false 31 showsCardBackground: false
32 ) 32 )
@@ -187,6 +187,16 @@ struct DashboardView: View {
187 .disabled(viewModel.batchLookupRunning) 187 .disabled(viewModel.batchLookupRunning)
188 } 188 }
189 } 189 }
190
191 // The dashboard reads the portfolio; the watchlist edits it.
192 ToolbarItem(placement: .topBarTrailing) {
193 NavigationLink {
194 WatchlistView(viewModel: viewModel)
195 } label: {
196 Label("Watchlist", systemImage: "list.bullet")
197 }
198 .accessibilityLabel("Watchlist")
199 }
190 } 200 }
191 } 201 }
192 202
DomainDig/DomainViewModel.swift +7
@@ -370,6 +370,13 @@ final class DomainViewModel {
370 ].allSatisfy { $0 } 370 ].allSatisfy { $0 }
371 } 371 }
372 372
373 /// A single lookup is in flight. `hasRun` is set when one starts and the
374 /// sections settle as they land, so this is the window in which cancelling
375 /// means something — the counterpart to `batchLookupRunning`.
376 var singleLookupRunning: Bool {
377 hasRun && !resultsLoaded
378 }
379
373 var activeLoadingLabels: [String] { 380 var activeLoadingLabels: [String] {
374 var labels: [String] = [] 381 var labels: [String] = []
375 if availabilityLoading { labels.append("Availability") } 382 if availabilityLoading { labels.append("Availability") }
DomainDig/SettingsViews.swift +2 −10
@@ -49,14 +49,6 @@ struct SettingsView: View {
49 } 49 }
50 50
51 Section("Preferences") { 51 Section("Preferences") {
52 NavigationLink("Tracked Domains") {
53 WatchlistView(viewModel: viewModel)
54 }
55
56 NavigationLink("Workflows") {
57 WorkflowsView(viewModel: viewModel)
58 }
59
60 NavigationLink("Display") { 52 NavigationLink("Display") {
61 DisplaySettingsView() 53 DisplaySettingsView()
62 } 54 }
@@ -67,7 +59,7 @@ struct SettingsView: View {
67 } 59 }
68 60
69 Section("Services") { 61 Section("Services") {
70 NavigationLink("Monitoring Activity") { 62 NavigationLink("Monitoring Log") {
71 MonitoringView(viewModel: viewModel) 63 MonitoringView(viewModel: viewModel)
72 } 64 }
73 65
@@ -83,7 +75,7 @@ struct SettingsView: View {
83 CloudSyncSettingsView() 75 CloudSyncSettingsView()
84 } 76 }
85 77
86 NavigationLink("Monitoring") { 78 NavigationLink("Monitoring Settings") {
87 MonitoringSettingsView(viewModel: viewModel) 79 MonitoringSettingsView(viewModel: viewModel)
88 } 80 }
89 81
DomainDigUITests/AccessibilityAuditTests.swift +17 −17
@@ -38,14 +38,14 @@ final class AccessibilityAuditTests: XCTestCase {
38 38
39 func testTrackedDomainsScreen() throws { 39 func testTrackedDomainsScreen() throws {
40 let app = AccessibilityAuditHarness.launch() 40 let app = AccessibilityAuditHarness.launch()
41 app.selectRootTab("Settings") 41 app.selectRootTab("Dashboard")
42 42
43 let trackedDomains = app.buttons["Tracked Domains"] 43 let watchlist = app.buttons["Watchlist"]
44 XCTAssertTrue( 44 XCTAssertTrue(
45 trackedDomains.waitForExistence(timeout: 5), 45 watchlist.waitForExistence(timeout: 5),
46 "Settings no longer offers a Tracked Domains row" 46 "Dashboard no longer offers a Watchlist row"
47 ) 47 )
48 trackedDomains.tap() 48 watchlist.tap()
49 49
50 let audited = try AccessibilityAuditHarness.audit(app, screen: "tracked-domains", test: self) 50 let audited = try AccessibilityAuditHarness.audit(app, screen: "tracked-domains", test: self)
51 try XCTSkipUnless(audited, "Tracked Domains audit did not complete in time") 51 try XCTSkipUnless(audited, "Tracked Domains audit did not complete in time")
@@ -96,10 +96,10 @@ final class AccessibilityAuditTests: XCTestCase {
96 /// The watchlist's dense rows (up to nine text elements each). 96 /// The watchlist's dense rows (up to nine text elements each).
97 func testSeededTrackedDomains() throws { 97 func testSeededTrackedDomains() throws {
98 let app = AccessibilityAuditHarness.launch(seeded: true) 98 let app = AccessibilityAuditHarness.launch(seeded: true)
99 app.selectRootTab("Settings") 99 app.selectRootTab("Dashboard")
100 let trackedDomains = app.buttons["Tracked Domains"] 100 let watchlist = app.buttons["Watchlist"]
101 XCTAssertTrue(trackedDomains.waitForExistence(timeout: 5)) 101 XCTAssertTrue(watchlist.waitForExistence(timeout: 5))
102 trackedDomains.tap() 102 watchlist.tap()
103 let audited = try AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains", test: self, reportOnly: true) 103 let audited = try AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains", test: self, reportOnly: true)
104 try XCTSkipUnless(audited, "Audit did not complete in time for seeded Tracked Domains") 104 try XCTSkipUnless(audited, "Audit did not complete in time for seeded Tracked Domains")
105 } 105 }
@@ -139,10 +139,10 @@ final class AccessibilityAuditTests: XCTestCase {
139 unaudited.append("Inspect batch") 139 unaudited.append("Inspect batch")
140 } 140 }
141 141
142 app.selectRootTab("Settings") 142 app.selectRootTab("Dashboard")
143 let trackedDomains = app.buttons["Tracked Domains"] 143 let watchlist = app.buttons["Watchlist"]
144 if trackedDomains.waitForExistence(timeout: 5) { 144 if watchlist.waitForExistence(timeout: 5) {
145 trackedDomains.tap() 145 watchlist.tap()
146 if try !AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains-accessibilityL", test: self, reportOnly: true) { 146 if try !AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains-accessibilityL", test: self, reportOnly: true) {
147 unaudited.append("Tracked Domains") 147 unaudited.append("Tracked Domains")
148 } 148 }
@@ -174,10 +174,10 @@ final class AccessibilityAuditTests: XCTestCase {
174 unaudited.append("Inspect batch") 174 unaudited.append("Inspect batch")
175 } 175 }
176 176
177 app.selectRootTab("Settings") 177 app.selectRootTab("Dashboard")
178 let trackedDomains = app.buttons["Tracked Domains"] 178 let watchlist = app.buttons["Watchlist"]
179 if trackedDomains.waitForExistence(timeout: 5) { 179 if watchlist.waitForExistence(timeout: 5) {
180 trackedDomains.tap() 180 watchlist.tap()
181 if try !AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains-accessibilityXXXL", test: self, reportOnly: true) { 181 if try !AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains-accessibilityXXXL", test: self, reportOnly: true) {
182 unaudited.append("Tracked Domains") 182 unaudited.append("Tracked Domains")
183 } 183 }
DomainDigUITests/AccessibilityMetadataTests.swift +10 −10
@@ -40,8 +40,8 @@ final class AccessibilityMetadataTests: XCTestCase {
40 "Dashboard refresh lost its 'Refresh all tracked domains' label" 40 "Dashboard refresh lost its 'Refresh all tracked domains' label"
41 ) 41 )
42 42
43 // Watchlist (Tracked Domains) add + filter. 43 // Watchlist add + filter.
44 openTrackedDomains(app) 44 openWatchlist(app)
45 XCTAssertTrue( 45 XCTAssertTrue(
46 app.buttons["Add domain"].waitForExistence(timeout: 5), 46 app.buttons["Add domain"].waitForExistence(timeout: 5),
47 "Watchlist add-domain lost its 'Add domain' label" 47 "Watchlist add-domain lost its 'Add domain' label"
@@ -61,9 +61,9 @@ final class AccessibilityMetadataTests: XCTestCase {
61 /// is reachable. 61 /// is reachable.
62 func testWorkflowsCreateLabel() { 62 func testWorkflowsCreateLabel() {
63 let app = AccessibilityAuditHarness.launch(seeded: true) 63 let app = AccessibilityAuditHarness.launch(seeded: true)
64 app.selectRootTab("Settings") 64 app.selectRootTab("Inspect")
65 let workflows = app.buttons["Workflows"] 65 let workflows = app.buttons["Workflows"]
66 XCTAssertTrue(workflows.waitForExistence(timeout: 5), "Settings no longer offers Workflows") 66 XCTAssertTrue(workflows.waitForExistence(timeout: 5), "Inspect no longer offers Workflows")
67 workflows.tap() 67 workflows.tap()
68 XCTAssertTrue( 68 XCTAssertTrue(
69 app.buttons["Create workflow"].waitForExistence(timeout: 5), 69 app.buttons["Create workflow"].waitForExistence(timeout: 5),
@@ -79,7 +79,7 @@ final class AccessibilityMetadataTests: XCTestCase {
79 /// contract. 79 /// contract.
80 func testWatchlistRowLabelAndValue() { 80 func testWatchlistRowLabelAndValue() {
81 let app = AccessibilityAuditHarness.launch(seeded: true) 81 let app = AccessibilityAuditHarness.launch(seeded: true)
82 openTrackedDomains(app) 82 openWatchlist(app)
83 83
84 assertElement(in: app, label: "healthy.example", value: "Registered") 84 assertElement(in: app, label: "healthy.example", value: "Registered")
85 // The stress-length fixture with no known availability. 85 // The stress-length fixture with no known availability.
@@ -111,11 +111,11 @@ final class AccessibilityMetadataTests: XCTestCase {
111 111
112 // MARK: Helpers 112 // MARK: Helpers
113 113
114 private func openTrackedDomains(_ app: XCUIApplication) { 114 private func openWatchlist(_ app: XCUIApplication) {
115 app.selectRootTab("Settings") 115 app.selectRootTab("Dashboard")
116 let trackedDomains = app.buttons["Tracked Domains"] 116 let watchlist = app.buttons["Watchlist"]
117 XCTAssertTrue(trackedDomains.waitForExistence(timeout: 5), "Settings no longer offers Tracked Domains") 117 XCTAssertTrue(watchlist.waitForExistence(timeout: 5), "Dashboard no longer offers Watchlist")
118 trackedDomains.tap() 118 watchlist.tap()
119 } 119 }
120 120
121 /// A `children: .ignore` row can surface as a button, cell, or other-element 121 /// A `children: .ignore` row can surface as a button, cell, or other-element
DomainDigUITests/AccessibilityScreenshotTests.swift +8 −6
@@ -45,12 +45,14 @@ final class AccessibilityScreenshotTests: XCTestCase {
45 _ = app.buttons["Refresh all tracked domains"].waitForExistence(timeout: 5) 45 _ = app.buttons["Refresh all tracked domains"].waitForExistence(timeout: 5)
46 attach(app, name: "dashboard-\(suffix)") 46 attach(app, name: "dashboard-\(suffix)")
47 47
48 app.selectRootTab("Settings") 48 let watchlist = app.buttons["Watchlist"]
49 let trackedDomains = app.buttons["Tracked Domains"] 49 if watchlist.waitForExistence(timeout: 5) {
50 if trackedDomains.waitForExistence(timeout: 5) { 50 watchlist.tap()
51 trackedDomains.tap()
52 _ = element(app, labelled: "healthy.example").waitForExistence(timeout: 5) 51 _ = element(app, labelled: "healthy.example").waitForExistence(timeout: 5)
53 attach(app, name: "watchlist-\(suffix)") 52 attach(app, name: "watchlist-\(suffix)")
53 // Pop the push, so a later pass's Dashboard capture is the
54 // Dashboard rather than this view again.
55 app.selectRootTab("Dashboard")
54 } 56 }
55 57
56 app.selectRootTab("Inspect") 58 app.selectRootTab("Inspect")
@@ -78,8 +80,8 @@ final class AccessibilityScreenshotTests: XCTestCase {
78 /// "Appearance, <current value>". Returns `false` (rather than failing) if 80 /// "Appearance, <current value>". Returns `false` (rather than failing) if
79 /// any step is unreachable on this runtime. 81 /// any step is unreachable on this runtime.
80 private func setAppearance(_ app: XCUIApplication, to option: String) -> Bool { 82 private func setAppearance(_ app: XCUIApplication, to option: String) -> Bool {
81 // A prior capture may have left the Settings tab on a pushed view 83 // A prior step may have left the Settings tab on a pushed view.
82 // (Tracked Domains). Re-selecting the active tab pops it back to root. 84 // Re-selecting the active tab pops it back to root.
83 app.selectRootTab("Settings") 85 app.selectRootTab("Settings")
84 let display = app.buttons["Display"] 86 let display = app.buttons["Display"]
85 if !display.waitForExistence(timeout: 2) { 87 if !display.waitForExistence(timeout: 2) {