feat(ash): zoom keys [/], history pan ←→, cursor crosshair, context-sensitive timeline (#773)#774
feat(ash): zoom keys [/], history pan ←→, cursor crosshair, context-sensitive timeline (#773)#774
Conversation
|
REQUEST_CHANGES Solid feature set — zoom keys, history pan, and cursor crosshair are all the right UX moves. Three issues need fixing before merge: a timestamp display bug, a potential off-by-one in cursor positioning, and a zero-duration History window on first pan. The rest are cleanup items. [HIGH] Timestamp in cursor infobox is relative to ash.epoch(), not Unix epoch [HIGH] Zero-duration History window on first pan_left() [MEDIUM] Off-by-one risk in cursor_x_in_bar [MEDIUM] Code duplication: aggregate_buckets_by_event / aggregate_buckets_by_query [MEDIUM] label_color: NO_COLOR env check on every render frame [LOW] #[allow(dead_code)] on zoom_in/zoom_out/ZOOM_MIN_SECS/ZOOM_MAX_SECS [LOW] ColorFn as fn pointer vs trait object [INFO] LABEL_COLOR_COUNT magic number |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #774 +/- ##
==========================================
- Coverage 67.25% 66.72% -0.53%
==========================================
Files 52 52
Lines 34133 34408 +275
==========================================
+ Hits 22955 22957 +2
- Misses 11178 11451 +273 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ensitive timeline (#773) - Reassign zoom to [ and ] keys (zoom_cycle_back/forward) - Left/Right arrows now pan through history with cursor crosshair - pan_left switches Live→History mode, pan_right returns to Live at offset 0 - Draw │ cursor line at pan position in bar area (bright white) - Drill-down pane shows per-bucket infobox (ts, AAS, top-3 wait types) when cursor active - Context-sensitive timeline: WaitEvent level shows wait events by label_color, QueryId level shows query labels by label_color (deterministic hash palette) - Update footer hints to show [/]:zoom ←→:pan Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
26a005e to
931adaa
Compare
|
Addressed REV findings (commit HIGH — zero-duration History window on first HIGH — timestamp display: Confirmed correct — no fix needed. LOW — cursor off-by-one: Fixed. Changed guard to Build clean, clippy -D warnings: zero errors. |
Testing evidence (commit
|
- state.rs: fix indentation on missed_samples doc comment - renderer.rs: unwrap HashMap::new() assignment to single line (line fits within rustfmt line_length limit)
|
REV re-review (commits 931adaa → 9edf92b) HIGH-1 (zero-duration History window) — Fixed. HIGH-2 (timestamp display) — Fixed. Verified the math: 1,735,689,600 / 86,400 = 20,088 exactly, so ash.epoch is an exact multiple of 86400. LOW (cursor off-by-one) — Fixed. Guard MEDIUM (duplicate chunking logic) — Well done. Verdict: APPROVE. Both HIGH findings are resolved. No remaining blockers. |
Ready to mergeCI: green (run 23729283326) No blockers. Waiting for Nik's merge approval. |
|
Bug fix (commit Root cause: the cursor column was rendering a white Fix: render the cursor column as an inverted white New demo sent directly to Nik — visible white cursor column on each ← press. |
Ready to merge (updated)Bug fix (commit CI: green (run 23748898237) Cursor fix summary (60d5493): Replaced white No blockers. Waiting for Nik's merge approval. |
…rlay height/truncation
CI fix (commit
|
Ready to merge (final)CI: green (run 23754872952 — 2026-03-30 16:10 UTC) Changes since last ready-to-merge signal:
No blockers. Waiting for Nik's merge approval. |
- Remove zoom_in/zoom_out methods and ZOOM_MIN/MAX_SECS constants (no longer called after zoom moved to [/] keys) - Remove corresponding tests and unused test imports - Fix duplicated doc comments on compute_list_len and run_ash - Update zoom_level doc to reference [/] instead of ←/→ Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix name[..18] byte slicing that could panic on multi-byte UTF-8 — use char_indices instead - Move in_history computation after collect_frame_snapshots to avoid stale state if the function ever mutates mode - Show b:back in hint line when panning while drilled down - Fix doc: HashMap<String, i32> → u32, "Top-3" → all non-zero, epoch year 2026 → 2025, remove stale merged doc comment - Add 13 tests: pan_left, pan_right, Esc-to-live, hint_line variants, Left/Right key dispatch Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
REV Code Review Report
BLOCKING ISSUES (0)No blocking issues found. NON-BLOCKING (3)LOW
LOW
LOW
POTENTIAL ISSUES (0)No medium-confidence issues remaining after fixes. ISSUES FIXED IN THIS REVIEWThe following issues were found and fixed during review:
Summary
Result: PASSED — no blocking issues. REV-assisted review (AI analysis by postgres-ai/rev) |
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

Closes #773
Changes
1. Zoom keys reassigned:
[/][= zoom out,]= zoom in←/→for history pan[/]:zoom ←→:pan2. History pan with
←/→←pans backward in time (auto-switches Live → History mode)→pans forward; returns to Live mode when pan_offset reaches 0pan_offset: i64andcursor_col: Option<usize>added toAshState3. Vertical cursor crosshair
│line is drawn at the cursor column (bright white, over existing bars)4. Context-sensitive timeline
WaitTypelevel: unchanged (all types stacked)WaitEvent { selected_type }level: timeline shows only that type's data, broken down by individual wait events with deterministic colors (label_color()hash)QueryIdlevel: timeline shows only that event's contribution, colored by query labelFiles changed
src/ash/state.rs— pan state, key handlers, footer hintssrc/ash/renderer.rs— cursor line, infobox, context-sensitive bar buildingTesting
cargo buildcleancargo clippy --all-targets --all-features -- -D warnings— zero warnings