Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]

### Fixed

- **Live views got slower the longer a run lasted.** The Dashboard on every new wave, and a live run selected or compared in History every couple of seconds, reloaded every recorded row for that run. A run selected in History also redrew all of them, even after switching to another tab. They now fetch only the rows added since the last refresh.

- **Clicking a coin/min point in select mode did nothing.** The highlight drawn on the point under the mouse was taking the click. Coin/min points can now be selected by clicking them.
- **Select mode in History could look stuck on a long run.** Turning it on froze the app for several seconds before the button even changed. That's gone with the paged tables below. Clicking a point on the chart also no longer scrolls the chart off screen, and a slightly shaky click no longer counts as a drag.
- **Dragging a rectangle on the chart could select the wrong points, or not start at all.** It worked out coin values from the run's own range rather than the chart's axis, so the selection didn't match the rectangle on any run whose coin/min stayed well above zero. Drags can now also start on top of a point.

### Changed

- **The coin/min, GC activation and wave skip tables in History now show 100 rows per page.** Clicking a point on the chart jumps to the page holding its row. "Select all" and the outlier selection still cover the whole run.

---

## [0.4.24] — 2026-10-27
Expand Down
74 changes: 4 additions & 70 deletions src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use base64::Engine;
use tauri::{AppHandle, Emitter, Manager, State};

use crate::backup::{self, BackupExport, BackupRestore};
use crate::db::{self, RunFilter, RunRow, SnapshotRow, WaveSkipRow};
use crate::db::{self, RunFilter, RunRow};
use crate::debug_package::{self, DebugPackageExport, DebugScreenshotInput};
use crate::export::{self, ExportFileResult};
use crate::scanner::{ScanStartMode, Scanner};
Expand Down Expand Up @@ -441,75 +441,9 @@ pub fn clear_snapshot_golden_combo(snapshot_ids: Vec<String>) -> Result<usize, S
}

#[tauri::command]
pub async fn run_snapshots(run_id: String) -> Result<Vec<SnapshotRow>, String> {
run_blocking("run_snapshots", move || {
db::run_snapshots(&conn()?, &run_id).map_err(|e| e.to_string())
})
.await
}

#[derive(Debug, Serialize)]
pub struct DashboardRunView {
pub snapshot_total: usize,
pub chart_snapshots: Vec<SnapshotRow>,
pub skip_total: usize,
pub chart_wave_skips: Vec<WaveSkipRow>,
pub chart_normal_jumps: Vec<i64>,
pub avg_golden_combo_caret: Option<f64>,
}

fn dashboard_run_view(run_id: &str) -> Result<DashboardRunView, String> {
let conn = conn()?;
let (snapshot_total, chart_snapshots, chart_normal_jumps) = db::run_snapshot_chart_bundle(
&conn,
run_id,
db::CHART_SNAPSHOT_LIMIT,
db::CHART_SKIP_LIMIT,
)
.map_err(|e| e.to_string())?;
let (skip_total, chart_wave_skips) =
db::run_wave_skips_for_chart(&conn, run_id, db::CHART_SKIP_LIMIT)
.map_err(|e| e.to_string())?;
let avg_golden_combo_caret =
db::avg_golden_combo_caret(&conn, run_id).map_err(|e| e.to_string())?;
Ok(DashboardRunView {
snapshot_total,
chart_snapshots,
skip_total,
chart_wave_skips,
chart_normal_jumps,
avg_golden_combo_caret,
})
}

#[tauri::command]
pub async fn current_run_dashboard(
state: State<'_, AppState>,
) -> Result<DashboardRunView, String> {
let id = state.scanner.current_run_id.lock().unwrap().clone();
run_blocking("current_run_dashboard", move || match id {
Some(id) => dashboard_run_view(&id),
None => Ok(DashboardRunView {
snapshot_total: 0,
chart_snapshots: Vec::new(),
skip_total: 0,
chart_wave_skips: Vec::new(),
chart_normal_jumps: Vec::new(),
avg_golden_combo_caret: None,
}),
})
.await
}

#[tauri::command]
pub async fn run_dashboard_data(run_id: String) -> Result<DashboardRunView, String> {
run_blocking("run_dashboard_data", move || dashboard_run_view(&run_id)).await
}

#[tauri::command]
pub async fn run_wave_skips(run_id: String) -> Result<Vec<WaveSkipRow>, String> {
run_blocking("run_wave_skips", move || {
db::run_wave_skips(&conn()?, &run_id).map_err(|e| e.to_string())
pub async fn run_rows(run_id: String, after: db::RunRowsCursor) -> Result<db::RunRowsPage, String> {
run_blocking("run_rows", move || {
db::run_rows_after(&conn()?, &run_id, after).map_err(|e| e.to_string())
})
.await
}
Expand Down
Loading
Loading