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 {
140140 .navigationTitle("DomainDig")
141141 .toolbar {
142142 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 {
144152 Button {
145153 viewModel.reset()
146154 } label: {
@@ -150,6 +158,15 @@ struct ContentView: View {
150158 .accessibilityLabel("Clear results")
151159 }
152160 }
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 }
153170 }
154171 .navigationDestination(for: WorkflowNavigationTarget.self) { target in
155172 WorkflowDetailView(viewModel: viewModel, workflowID: target.workflowID)
DomainDig/DashboardView.swift +11 −1
@@ -26,7 +26,7 @@ struct DashboardView: View {
2626 EmptyStateCardView(
2727 title: "No Portfolio Yet",
2828 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.",
3030 systemImage: "square.stack.3d.up.fill",
3131 showsCardBackground: false
3232 )
@@ -187,6 +187,16 @@ struct DashboardView: View {
187187 .disabled(viewModel.batchLookupRunning)
188188 }
189189 }
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 }
190200 }
191201 }
192202
DomainDig/DomainViewModel.swift +7
@@ -370,6 +370,13 @@ final class DomainViewModel {
370370 ].allSatisfy { $0 }
371371 }
372372
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
373380 var activeLoadingLabels: [String] {
374381 var labels: [String] = []
375382 if availabilityLoading { labels.append("Availability") }
DomainDig/SettingsViews.swift +2 −10
@@ -49,14 +49,6 @@ struct SettingsView: View {
4949 }
5050
5151 Section("Preferences") {
52 NavigationLink("Tracked Domains") {
53 WatchlistView(viewModel: viewModel)
54 }
55
56 NavigationLink("Workflows") {
57 WorkflowsView(viewModel: viewModel)
58 }
59
6052 NavigationLink("Display") {
6153 DisplaySettingsView()
6254 }
@@ -67,7 +59,7 @@ struct SettingsView: View {
6759 }
6860
6961 Section("Services") {
70 NavigationLink("Monitoring Activity") {
62 NavigationLink("Monitoring Log") {
7163 MonitoringView(viewModel: viewModel)
7264 }
7365
@@ -83,7 +75,7 @@ struct SettingsView: View {
8375 CloudSyncSettingsView()
8476 }
8577
86 NavigationLink("Monitoring") {
78 NavigationLink("Monitoring Settings") {
8779 MonitoringSettingsView(viewModel: viewModel)
8880 }
8981
DomainDigUITests/AccessibilityAuditTests.swift +17 −17
@@ -38,14 +38,14 @@ final class AccessibilityAuditTests: XCTestCase {
3838
3939 func testTrackedDomainsScreen() throws {
4040 let app = AccessibilityAuditHarness.launch()
41 app.selectRootTab("Settings")
41 app.selectRootTab("Dashboard")
4242
43 let trackedDomains = app.buttons["Tracked Domains"]
43 let watchlist = app.buttons["Watchlist"]
4444 XCTAssertTrue(
45 trackedDomains.waitForExistence(timeout: 5),
46 "Settings no longer offers a Tracked Domains row"
45 watchlist.waitForExistence(timeout: 5),
46 "Dashboard no longer offers a Watchlist row"
4747 )
48 trackedDomains.tap()
48 watchlist.tap()
4949
5050 let audited = try AccessibilityAuditHarness.audit(app, screen: "tracked-domains", test: self)
5151 try XCTSkipUnless(audited, "Tracked Domains audit did not complete in time")
@@ -96,10 +96,10 @@ final class AccessibilityAuditTests: XCTestCase {
9696 /// The watchlist's dense rows (up to nine text elements each).
9797 func testSeededTrackedDomains() throws {
9898 let app = AccessibilityAuditHarness.launch(seeded: true)
99 app.selectRootTab("Settings")
100 let trackedDomains = app.buttons["Tracked Domains"]
101 XCTAssertTrue(trackedDomains.waitForExistence(timeout: 5))
102 trackedDomains.tap()
99 app.selectRootTab("Dashboard")
100 let watchlist = app.buttons["Watchlist"]
101 XCTAssertTrue(watchlist.waitForExistence(timeout: 5))
102 watchlist.tap()
103103 let audited = try AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains", test: self, reportOnly: true)
104104 try XCTSkipUnless(audited, "Audit did not complete in time for seeded Tracked Domains")
105105 }
@@ -139,10 +139,10 @@ final class AccessibilityAuditTests: XCTestCase {
139139 unaudited.append("Inspect batch")
140140 }
141141
142 app.selectRootTab("Settings")
143 let trackedDomains = app.buttons["Tracked Domains"]
144 if trackedDomains.waitForExistence(timeout: 5) {
145 trackedDomains.tap()
142 app.selectRootTab("Dashboard")
143 let watchlist = app.buttons["Watchlist"]
144 if watchlist.waitForExistence(timeout: 5) {
145 watchlist.tap()
146146 if try !AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains-accessibilityL", test: self, reportOnly: true) {
147147 unaudited.append("Tracked Domains")
148148 }
@@ -174,10 +174,10 @@ final class AccessibilityAuditTests: XCTestCase {
174174 unaudited.append("Inspect batch")
175175 }
176176
177 app.selectRootTab("Settings")
178 let trackedDomains = app.buttons["Tracked Domains"]
179 if trackedDomains.waitForExistence(timeout: 5) {
180 trackedDomains.tap()
177 app.selectRootTab("Dashboard")
178 let watchlist = app.buttons["Watchlist"]
179 if watchlist.waitForExistence(timeout: 5) {
180 watchlist.tap()
181181 if try !AccessibilityAuditHarness.audit(app, screen: "seeded-tracked-domains-accessibilityXXXL", test: self, reportOnly: true) {
182182 unaudited.append("Tracked Domains")
183183 }
DomainDigUITests/AccessibilityMetadataTests.swift +10 −10
@@ -40,8 +40,8 @@ final class AccessibilityMetadataTests: XCTestCase {
4040 "Dashboard refresh lost its 'Refresh all tracked domains' label"
4141 )
4242
43 // Watchlist (Tracked Domains) add + filter.
44 openTrackedDomains(app)
43 // Watchlist add + filter.
44 openWatchlist(app)
4545 XCTAssertTrue(
4646 app.buttons["Add domain"].waitForExistence(timeout: 5),
4747 "Watchlist add-domain lost its 'Add domain' label"
@@ -61,9 +61,9 @@ final class AccessibilityMetadataTests: XCTestCase {
6161 /// is reachable.
6262 func testWorkflowsCreateLabel() {
6363 let app = AccessibilityAuditHarness.launch(seeded: true)
64 app.selectRootTab("Settings")
64 app.selectRootTab("Inspect")
6565 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")
6767 workflows.tap()
6868 XCTAssertTrue(
6969 app.buttons["Create workflow"].waitForExistence(timeout: 5),
@@ -79,7 +79,7 @@ final class AccessibilityMetadataTests: XCTestCase {
7979 /// contract.
8080 func testWatchlistRowLabelAndValue() {
8181 let app = AccessibilityAuditHarness.launch(seeded: true)
82 openTrackedDomains(app)
82 openWatchlist(app)
8383
8484 assertElement(in: app, label: "healthy.example", value: "Registered")
8585 // The stress-length fixture with no known availability.
@@ -111,11 +111,11 @@ final class AccessibilityMetadataTests: XCTestCase {
111111
112112 // MARK: Helpers
113113
114 private func openTrackedDomains(_ app: XCUIApplication) {
115 app.selectRootTab("Settings")
116 let trackedDomains = app.buttons["Tracked Domains"]
117 XCTAssertTrue(trackedDomains.waitForExistence(timeout: 5), "Settings no longer offers Tracked Domains")
118 trackedDomains.tap()
114 private func openWatchlist(_ app: XCUIApplication) {
115 app.selectRootTab("Dashboard")
116 let watchlist = app.buttons["Watchlist"]
117 XCTAssertTrue(watchlist.waitForExistence(timeout: 5), "Dashboard no longer offers Watchlist")
118 watchlist.tap()
119119 }
120120
121121 /// 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 {
4545 _ = app.buttons["Refresh all tracked domains"].waitForExistence(timeout: 5)
4646 attach(app, name: "dashboard-\(suffix)")
4747
48 app.selectRootTab("Settings")
49 let trackedDomains = app.buttons["Tracked Domains"]
50 if trackedDomains.waitForExistence(timeout: 5) {
51 trackedDomains.tap()
48 let watchlist = app.buttons["Watchlist"]
49 if watchlist.waitForExistence(timeout: 5) {
50 watchlist.tap()
5251 _ = element(app, labelled: "healthy.example").waitForExistence(timeout: 5)
5352 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")
5456 }
5557
5658 app.selectRootTab("Inspect")
@@ -78,8 +80,8 @@ final class AccessibilityScreenshotTests: XCTestCase {
7880 /// "Appearance, <current value>". Returns `false` (rather than failing) if
7981 /// any step is unreachable on this runtime.
8082 private func setAppearance(_ app: XCUIApplication, to option: String) -> Bool {
81 // A prior capture may have left the Settings tab on a pushed view
82 // (Tracked Domains). Re-selecting the active tab pops it back to root.
83 // A prior step may have left the Settings tab on a pushed view.
84 // Re-selecting the active tab pops it back to root.
8385 app.selectRootTab("Settings")
8486 let display = app.buttons["Display"]
8587 if !display.waitForExistence(timeout: 2) {