Skip to content

Audit dashboard charts, and draw what the data says - #79

Merged
JetSquirrel merged 8 commits into
mainfrom
codex/dashboard-quality-audit-20261102
Nov 2, 2026
Merged

JetSquirrel merged 8 commits into
mainfrom
codex/dashboard-quality-audit-20261102

Conversation

@JetSquirrel

@JetSquirrel JetSquirrel commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Part of #64 and #65.

Why

A chart can mislead without being wrong about any one number. A line spaced one day and eight days alike, a NULL reading vanished under a line running across it, a pick on SQL NULL also caught the text 'NULL', and a pie drawn from a query cut short looked complete.

The audit specified in docs/dashboard-quality-audit.md is done, with the results in docs/dashboard-quality-audit-findings.md. Codex never ran on this (the repo has no Codex environment), so this was done here instead.

What

Severity Before After
P0 Uneven times evenly spaced line and scatter placed by time, in dashboards and the results chart
P0 NULL reading vanished on a dashboard line The time stays and the line breaks, with a note
P0 Picking NULL also matched the text 'NULL' Each selects its own rows
P0 Query cut short, unsaid on most charts Every dashboard chart says so
P1 A series vanishing recolored the rest A series keeps its color by name
P1 One NaN made a whole average NaN Left out, and counted on dashboards
P1 13 series read as "112" Counts series
P1 open --state gave source rows only Each plot adds scope: what it draws of its query
P1 Area over uneven times, unsaid A dashboard area says it's evenly spaced

Decisions to review

  • A line over times draws in time order, whatever the query's ORDER BY. A row with a NULL time is left off, with a note.
  • A line breaks only at a NULL the query returned. Where a series has no row at all it still crosses, because breaking there would shatter a series that only has rows at some times. The wider spacing shows that gap.
  • A pick on NULL narrows further than before. The old match on both was deliberate, and a dashboard relying on it now gets one or the other.
  • scope is added beside rows, so the state schema version stays.

Gaps

  • Not seen in the window. Nothing here has been looked at on screen; the findings end with a checklist. This is why it's still a draft.
  • Area charts stay evenly spaced and don't break at NULL. The kit's area chart can't take time positions, and it draws a series' missing row as zero. That's the largest gap left, and it needs hand-built drawing.
  • Smaller ones are in the findings: the results chart's NULL rows, bars over times that aren't whole days, a chart drawing NULL and 'NULL' as one band, and a card's tone shown by color alone.
  • No zoom or pan. The Dynatrace comparison is written up and nothing was implemented; zoom on a time axis deserves its own issue.

Testing

  • cargo test --locked: 495 unit, 35 CLI, 8 LSP and 4 network-path tests pass, with 1 ignored. Fmt and clippy are clean.
  • New tests cover each fix, including a real query over the row budget, every timestamp type DuckDB renders, and a paint of a broken line on a time axis.
  • Paint probes show no regression against main, in a debug build. They don't use a time axis or NULL breaks, so those paths have no baseline.

🤖 Generated with Claude Code

JetSquirrel and others added 3 commits November 2, 2026 16:15
A .dash file already carries its data paths relative to itself, but a whole
investigation had nothing saying what it consisted of, or whether it would work
on the machine it had just arrived on.

An optional ducklocal-project.json lists the dashboards, any other data and the
versions and extensions the work used. `project check` runs the existing check
over each dashboard and adds what a move breaks: files that did not come along,
paths that were never going to, extensions this machine lacks. Each problem says
what to do next. It never reaches the network or installs anything: a dashboard
reading remote data is left unrun, and says so. `limitations` says what passing
does not cover, such as a source with the same name and different data.

`project relink` points a source at where its file is now, keeping the old
dashboard as a backup. Opening the manifest in the window opens its dashboards,
and only those inside its folder, since one elsewhere would run SQL from
somewhere nobody looked. A lone .dash file works as it always has.

Closes #70.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its cross join built up memory, so on a fast enough machine it reached the 2GB
limit inside the 1s timeout and reported resource_limit, failing macOS CI. The
limits were right; the query was testing the wrong one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copy link
Copy Markdown
Owner Author

@codex Please implement the Dashboard quality audit in this draft PR, using docs/dashboard-quality-audit.md as the task specification.

You own the inspection, regression tests and focused fixes. Start by reading the existing dashboard/results-chart implementations and tests; do not reimplement features that already work.

  1. Audit P0 data correctness first: missing/irregular timestamps and honest time scales, sample/series caps and truncation disclosures, NULL/zero/negative values, format/units, cross-filters and stable series identity.
  2. Audit P1 states and interactions: loading vs empty vs error, SQL/source visibility, tooltip/legend/CJK readability, local map behavior, dense-chart performance.
  3. Add deterministic regression tests for real findings, and implement only scoped fixes in this PR branch. Do not replace the chart library or add unrelated chart types.
  4. Run cargo fmt --check, cargo test --locked and cargo clippy --all-targets --locked where available. Report any missing test environment.
  5. Post a findings matrix with code references, P0/P1/P2 severity, evidence, and what was changed. Mark missing-but-large features as follow-up tasks, not surprise scope expansion.

Use Dynatrace Strato's chart guidance as a quality benchmark, not as code to copy. The maintainer will review the changes before merging. Please keep this PR as draft until findings and tests are ready.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

JetSquirrel and others added 5 commits November 2, 2026 21:28
# Conflicts:
#	skills/ducklocal/references/cli.md
#	src/cli.rs
#	tests/cli.rs
Make an analysis folder portable, and say what a move broke
The audit in #79 found dashboard charts that misread their data. A line
spaced one day and eight days alike, a NULL reading vanished under a line
running across it, a pick on SQL NULL also caught the text 'NULL', and a pie
drawn from a query cut short looked complete.

Lines and scatters over times are now placed by time, and a dashboard line
breaks at a NULL. A result records which cells hold the text NULL, so a pick
selects only its own rows. Every dashboard chart says when its query was cut
short, NaN and infinity stay out of averages, a series keeps its color while
others come and go, and the series cap counts series.

`open --state` adds each plot's `scope`, so an agent can read what the chart
says. Area charts can't take time positions in the kit, so they say they're
evenly spaced; that and the other gaps are in the findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A map drew from a truncated result with nothing said, so its points could look
like all of them. The results chart also let NaN and infinity into its buckets.

The audit's specification now points at its findings and no longer names an
owner that never ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JetSquirrel JetSquirrel changed the title [Codex] Audit Dashboard data fidelity, states and interactions Audit dashboard charts, and draw what the data says Nov 2, 2026
@JetSquirrel
JetSquirrel marked this pull request as ready for review November 2, 2026 16:53
@JetSquirrel
JetSquirrel merged commit cfdc234 into main Nov 2, 2026
3 checks passed
@JetSquirrel JetSquirrel mentioned this pull request Nov 3, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant