summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-07-20 14:16:52 -0500
committerChristian Cleberg <[email protected]>2026-07-20 14:42:07 -0500
commit91041af60b5a98ef01f5588478302c1ef04e043d (patch)
tree330d9b68f3d1fa92d07dff10134cf2f7774967b7
parentce71e6d93f5200972b9baff0fd17f55d93dbd2b9 (diff)
downloaddomain-dig-91041af60b5a98ef01f5588478302c1ef04e043d.tar.gz
domain-dig-91041af60b5a98ef01f5588478302c1ef04e043d.tar.bz2
domain-dig-91041af60b5a98ef01f5588478302c1ef04e043d.zip
fix: Generate Now tap target, remove keyboard dismiss button and launch focus
Scheduled Reports: the entire Overview section was wrapped in a single VStack inside one List row, so SwiftUI collapsed every control into one tap target and the menu-style Cadence Picker captured taps intended for the Generate Now button. Unwraps the VStack so each control is its own row, matching the pattern used in IntegrationsView and elsewhere. Also extends the .automatedMonitoring gate to the two Pickers and the Generate Now button. Previously only the Toggle was disabled, leaving a button that appeared active on Free but silently no-opped against the guard in ScheduledReportService. Inspect tab: removes the keyboard toolbar's Dismiss Keyboard button and the onAppear that focused the single-domain field at launch.
-rw-r--r--DomainDig.xcodeproj/xcuserdata/cmc.xcuserdatad/xcschemes/xcschememanagement.plist4
-rw-r--r--DomainDig/ContentView.swift10
-rw-r--r--DomainDig/ScheduledReportsView.swift95
3 files changed, 49 insertions, 60 deletions
diff --git a/DomainDig.xcodeproj/xcuserdata/cmc.xcuserdatad/xcschemes/xcschememanagement.plist b/DomainDig.xcodeproj/xcuserdata/cmc.xcuserdatad/xcschemes/xcschememanagement.plist
index cb3b8b8..5f600f0 100644
--- a/DomainDig.xcodeproj/xcuserdata/cmc.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/DomainDig.xcodeproj/xcuserdata/cmc.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -12,12 +12,12 @@
<key>DomainDigShareExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
- <integer>2</integer>
+ <integer>1</integer>
</dict>
<key>DomainDigWidgetExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
- <integer>1</integer>
+ <integer>2</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
diff --git a/DomainDig/ContentView.swift b/DomainDig/ContentView.swift
index 8f4eada..3e1015d 100644
--- a/DomainDig/ContentView.swift
+++ b/DomainDig/ContentView.swift
@@ -186,21 +186,11 @@ struct ContentView: View {
}
}
}
-
- ToolbarItemGroup(placement: .keyboard) {
- Spacer()
- Button("Dismiss Keyboard") {
- focusedInputField = nil
- }
- }
}
.navigationDestination(for: WorkflowNavigationTarget.self) { target in
WorkflowDetailView(viewModel: viewModel, workflowID: target.workflowID)
}
}
- .onAppear {
- focusedInputField = .singleDomain
- }
.task {
await viewModel.refreshUsageCredits()
}
diff --git a/DomainDig/ScheduledReportsView.swift b/DomainDig/ScheduledReportsView.swift
index f97ee77..170e02d 100644
--- a/DomainDig/ScheduledReportsView.swift
+++ b/DomainDig/ScheduledReportsView.swift
@@ -10,63 +10,62 @@ struct ScheduledReportsView: View {
var body: some View {
List {
Section("Overview") {
- VStack(alignment: .leading, spacing: 8) {
- if !FeatureAccessService.hasAccess(to: .automatedMonitoring) {
- Text("Scheduled reports require Pro.")
- .font(appDensity.font(.caption))
- .foregroundStyle(.secondary)
- }
+ if !FeatureAccessService.hasAccess(to: .automatedMonitoring) {
+ Text("Scheduled reports require Pro.")
+ .font(appDensity.font(.caption))
+ .foregroundStyle(.secondary)
+ }
- Toggle("Scheduled Reports", isOn: Binding(
- get: { settings.isEnabled },
- set: { newValue in
- settings.isEnabled = newValue
- saveSettings()
- }
- ))
- .disabled(!FeatureAccessService.hasAccess(to: .automatedMonitoring))
+ Toggle("Scheduled Reports", isOn: Binding(
+ get: { settings.isEnabled },
+ set: { newValue in
+ settings.isEnabled = newValue
+ saveSettings()
+ }
+ ))
+ .disabled(!FeatureAccessService.hasAccess(to: .automatedMonitoring))
- Picker("Cadence", selection: Binding(
- get: { settings.cadence },
- set: { newValue in
- settings.cadence = newValue
- saveSettings()
- }
- )) {
- ForEach(ScheduledReportCadence.allCases) { cadence in
- Text(cadence.title).tag(cadence)
- }
+ Picker("Cadence", selection: Binding(
+ get: { settings.cadence },
+ set: { newValue in
+ settings.cadence = newValue
+ saveSettings()
}
+ )) {
+ ForEach(ScheduledReportCadence.allCases) { cadence in
+ Text(cadence.title).tag(cadence)
+ }
+ }
+ .disabled(!FeatureAccessService.hasAccess(to: .automatedMonitoring))
- Picker("Format", selection: Binding(
- get: { settings.format },
- set: { newValue in
- settings.format = newValue
- saveSettings()
- }
- )) {
- ForEach([DomainExportFormat.markdown, .pdf, .json]) { format in
- Text(format.title).tag(format)
- }
+ Picker("Format", selection: Binding(
+ get: { settings.format },
+ set: { newValue in
+ settings.format = newValue
+ saveSettings()
}
+ )) {
+ ForEach([DomainExportFormat.markdown, .pdf, .json]) { format in
+ Text(format.title).tag(format)
+ }
+ }
+ .disabled(!FeatureAccessService.hasAccess(to: .automatedMonitoring))
- LabeledContent(
- "Last Generated",
- value: settings.lastGeneratedAt?.formatted(date: .abbreviated, time: .shortened) ?? "Never"
- )
+ LabeledContent(
+ "Last Generated",
+ value: settings.lastGeneratedAt?.formatted(date: .abbreviated, time: .shortened) ?? "Never"
+ )
- if let statusMessage {
- Text(statusMessage)
- .font(appDensity.font(.caption))
- .foregroundStyle(.secondary)
- }
+ if let statusMessage {
+ Text(statusMessage)
+ .font(appDensity.font(.caption))
+ .foregroundStyle(.secondary)
+ }
- Button(isGenerating ? "Generating…" : "Generate Now") {
- Task { await generateNow() }
- }
- .disabled(isGenerating)
+ Button(isGenerating ? "Generating…" : "Generate Now") {
+ Task { await generateNow() }
}
- .padding(.vertical, 4)
+ .disabled(isGenerating || !FeatureAccessService.hasAccess(to: .automatedMonitoring))
}
.listRowBackground(Color(.systemGray6).opacity(0.5))