Conversation
A chart's `dataset:` name now resolves two ways — a managed dataset in the
store, or an inline one defined in the dashboard's own optional `datasets:`
block:
datasets:
order_data: |
id,status,amount
1,paid,42
The point is prototyping without leaving the editor: invent a table, chart it,
iterate, with no upload step and nothing to clean up. A dashboard that carries
its own data is also a single file you can hand to someone, and the assistant's
prompt now teaches the block, so "mock me up some sales data and chart it" is
one turn.
The block holds CSV and nothing else. A path or a header-only line is rejected
with a message saying so, because either would otherwise parse as a valid
one-column, zero-row table and fail much later complaining about a missing
column.
An inline name overrides a managed one: the block is part of the file being
rendered, so quietly reading someone else's stored data would be the surprising
choice. Anything it doesn't define falls through to the store as before.
Each block converts to Parquet once and is cached by content checksum in the
temp dir, so an unchanged block costs a stat, an edit lands on a fresh path, and
two dashboards with the same sample data share a file. The write is a rename,
which is atomic, so concurrent renders can't read a half-written file.
Also:
- `Dashboard.dataset_names()` reports only managed names, so a chart on inline
data doesn't pin a stored dataset against the portal's delete-guard.
- The edit modal's column dropdowns resolve inline datasets, which would
otherwise be empty for such a chart.
- The starter dashboard carries its own data, and `files/` is gone entirely.
The sample now lives in the dashboard that uses it, so the Parquet (a derived
binary in git), the CSV, the generator that made them, the Dockerfile `COPY`
and the compose bind-mounts were all machinery around a file nothing read any
more. The `orders` dataset is no longer seeded at startup in either mode.
- The docs show YAML rather than Python. The examples in `architecture.md` and
the README passed a `.csv` path, which has not worked since datasets moved to
Parquet — `scan()` calls `scan_parquet`, so every one of those snippets failed
on its first line. Rather than correct paths in Python that duplicated the
YAML anyway, the product-facing examples are now the YAML a user actually
writes. The README's "Use it as a library" section is dropped for now; the
contributor guides (`SKILL.md`, `PARAM_SKILL.md`) keep their Python, since
they show how to write chart and widget code.
- Two dashboard examples in the docs did not parse: each placed one chart twice,
which is only legal as a contiguous vertical span. Found by rendering every
complete example in the docs rather than reading them; all three now parse and
render. Stale claims went with them — the README and compose no longer promise
a seeded `orders` dataset, which nothing creates any more.
- The route tests carry their own data too. They had leaned on that seeded
dataset, which meant they were passing off a leftover file on the developer's
disk and would have failed on a clean checkout; the suite now runs with no
dataset store present at all.
Minor bump: `datasets:` is optional, so existing dashboards are untouched.
523 tests pass.
dankor
force-pushed
the
inline-datasets
branch
from
August 21, 2026 15:36
bc7f822 to
542a061
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A chart's
dataset:name now resolves two ways — a managed dataset in the store, or an inline one defined in the dashboard's own optionaldatasets:block:The point is prototyping without leaving the editor: invent a table, chart it, iterate, with no upload step and nothing to clean up. A dashboard that carries its own data is also a single file you can hand to someone, and the assistant's prompt now teaches the block, so "mock me up some sales data and chart it" is one turn.
The block holds CSV and nothing else. A path or a header-only line is rejected with a message saying so, because either would otherwise parse as a valid one-column, zero-row table and fail much later complaining about a missing column.
An inline name overrides a managed one: the block is part of the file being rendered, so quietly reading someone else's stored data would be the surprising choice. Anything it doesn't define falls through to the store as before.
Each block converts to Parquet once and is cached by content checksum in the temp dir, so an unchanged block costs a stat, an edit lands on a fresh path, and two dashboards with the same sample data share a file. The write is a rename, which is atomic, so concurrent renders can't read a half-written file.
Also:
Dashboard.dataset_names()reports only managed names, so a chart on inline data doesn't pin a stored dataset against the portal's delete-guard.files/orders.parquetis gone (a derived binary in git), theordersdataset is no longer seeded at startup in either mode, andfiles/inline_orders.pyregenerates the block fromfiles/orders.csvso the two can't drift.523 tests pass.