From 3635999f474823a6ceb6c41a4a02d72ce6833df6 Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Sat, 17 Oct 2026 16:31:56 +0100 Subject: [PATCH] Improved progress display Previously, the progress bar updated only after completing an entire table. For large tables such as LIBARC, this could make the application appear to have stopped responding. Phase 10 updates the interface while rows are being exported. --- WorkbenchReplacement/MainView.swift | 32 ++++++++++++----------------- docs/PHASE46-DASHBOARD-GRAPHS.md | 5 +++++ docs/PHASE47-GRAPHS-ONLY.md | 8 ++++++++ 3 files changed, 26 insertions(+), 19 deletions(-) create mode 100644 docs/PHASE46-DASHBOARD-GRAPHS.md create mode 100644 docs/PHASE47-GRAPHS-ONLY.md diff --git a/WorkbenchReplacement/MainView.swift b/WorkbenchReplacement/MainView.swift index 496b36f..6a496d1 100644 --- a/WorkbenchReplacement/MainView.swift +++ b/WorkbenchReplacement/MainView.swift @@ -2561,22 +2561,15 @@ struct WorkbenchAdministrationView: View { ) .frame(maxWidth: .infinity, maxHeight: .infinity) case .dashboard: - // Keep the live charts visible even while scrolling the overview. - // The old outer ScrollView moved all charts offscreen when scrolled. - VStack(alignment: .leading, spacing: 10) { + // The Dashboard is a graph dashboard, not a selectable set of KPI cards. + // Keep six real Swift Charts visible; do not replace them with overview tiles. + ScrollView(.vertical) { WorkbenchInlinePerformanceDashboard(samples: diagnosticSamples) .frame(maxWidth: .infinity, alignment: .topLeading) - .layoutPriority(2) - Divider() - Text("Server overview").font(.title2.bold()) - ScrollView(.vertical) { - WorkbenchServerOverview(rows: filteredRows) - .frame(maxWidth: .infinity, alignment: .topLeading) - } - .frame(maxWidth: .infinity, maxHeight: .infinity) + .padding(18) } - .padding(16) - .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading) + .frame(maxWidth: .infinity, maxHeight: .infinity) + .accessibilityIdentifier("dashboard-live-line-charts") default: // Status and System Variables is deliberately a distinct variable // inspector, never replaced by the monitoring screen. @@ -4128,7 +4121,7 @@ private struct WorkbenchInlinePerformanceDashboard: View { } if let last = readings.last { Text(last.value.formatted(.number.precision(.fractionLength(1))) + (rate ? " /sec" : "")) - .font(.system(size: 24, weight: .semibold, design: .rounded)) + .font(.system(size: 15, weight: .semibold, design: .rounded)) .foregroundStyle(tint) } else { Text("Collecting samples…") @@ -4140,11 +4133,14 @@ private struct WorkbenchInlinePerformanceDashboard: View { LineMark(x: .value("Time", reading.time), y: .value("Value", reading.value)) .foregroundStyle(tint) .lineStyle(StrokeStyle(lineWidth: 2.5)) + PointMark(x: .value("Time", reading.time), y: .value("Value", reading.value)) + .foregroundStyle(tint) } .chartYAxis { AxisMarks(position: .leading) } - .frame(height: 92) + .frame(height: 175) + .accessibilityLabel("Live time-series graph for \(title)") } - .padding(10) + .padding(14) .frame(maxWidth: .infinity, alignment: .leading) .background(Color(nsColor: .controlBackgroundColor)) .clipShape(RoundedRectangle(cornerRadius: 12)) @@ -4159,9 +4155,7 @@ private struct WorkbenchInlinePerformanceDashboard: View { Text("\(samples.count) samples · refreshes every 5 seconds") .font(.caption).foregroundStyle(.secondary) } - LazyVGrid(columns: [GridItem(.flexible(minimum: 0), spacing: 12), - GridItem(.flexible(minimum: 0), spacing: 12), - GridItem(.flexible(minimum: 0), spacing: 12)], spacing: 10) { + LazyVGrid(columns: [GridItem(.adaptive(minimum: 360), spacing: 16)], spacing: 16) { panel("Queries per second", metric: "Queries", rate: true, tint: .blue) panel("Active connections", metric: "Threads_connected", rate: false, tint: .teal) panel("Running threads", metric: "Threads_running", rate: false, tint: .orange) diff --git a/docs/PHASE46-DASHBOARD-GRAPHS.md b/docs/PHASE46-DASHBOARD-GRAPHS.md new file mode 100644 index 0000000..2d157c3 --- /dev/null +++ b/docs/PHASE46-DASHBOARD-GRAPHS.md @@ -0,0 +1,5 @@ +# Phase 46 dashboard graph visibility + +The Dashboard opens on **Live Graphs** rather than stacking the Server Overview beneath a long dashboard. A segmented selector at the top switches to **Server Overview**. The six Swift Charts panels are rendered in a three-column grid on the graphs pane. A PointMark makes individual samples visible while the trend history accumulates. Rate panels need at least two snapshots; automatic refresh remains five seconds. + +This package was source-edited on Linux; macOS Xcode compilation and visual testing have not been performed. diff --git a/docs/PHASE47-GRAPHS-ONLY.md b/docs/PHASE47-GRAPHS-ONLY.md new file mode 100644 index 0000000..9f29c50 --- /dev/null +++ b/docs/PHASE47-GRAPHS-ONLY.md @@ -0,0 +1,8 @@ +# Phase 47 — Actual Dashboard Graphs + +- Removed the Dashboard display toggle and the Dashboard server-overview cards. +- Dashboard now renders six real Swift Charts line/area time-series plots unconditionally. +- Increased each graph plot to 175 points tall, with a responsive grid (minimum 360-point chart width). +- Existing five-second refresh and 60-sample rolling history remain unchanged. +- Rates require two consecutive samples; allow at least five seconds after opening the Dashboard. +- This source was Swift syntax-parsed on Linux, but macOS build and on-screen testing remain outstanding.