viewer: make addresses, tables and charts usable for analysis - #6
Merged
Merged
Conversation
A dataset in an ingest project whose snapshot apply does not write (a lookup table filled in by a script afterwards) passed validation, since ingest snapshots appear at apply time, and then failed the build with an internal error carrying the stat call's ENOENT. It is now a validation error naming the dataset, its path and what to do. Schema errors for an additional property now name the key. "must NOT have additional properties" alone sent a reader hunting; the key usually gives the cause away, as when an unquoted comma in a flow-mapping title splits it into a second key. The missing-snapshot pointer for dataset-only projects also narrows from /datasets to the entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A dashboard over wallets, contracts and transactions could not be read or checked: every hex value was shortened with the full one only in a tooltip, nothing linked anywhere, headers were SQL aliases, and an unexplained dot marked amount columns. - Every hex cell has a copy button for the full value; a panel's columns.<name>.full shows it unshortened. - chain_sources[].explorer_url links address, transaction and block cells. Addresses are detected from their values, tx_hash and block_number by name; a 32-byte value is never guessed to be a transaction, since it may be any id. - columns.<name>.label, .description and .kind on a panel. A header with a description is underlined and explains itself on hover; an amount column explains its decimals. The dot is gone. - Each panel links to its SQL in the source bundle, tables and charts download their rows as CSV with exact values, and a table over ten rows gets a filter. - Bar charts with up to 30 bars label every bar, tilted when crowded; past that the axis is a scale and labels thin out as before. - A KPI beside a table or chart keeps its own height instead of stretching into an empty card; two KPIs side by side still level. explorer_url and the SQL paths are written into the dashboard doc, not release.json, so they count toward the content digest. Releases built before this render as they did, without the new links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The Presentation paragraph listed the panel options without columns, and capabilities did not say how bar labels and KPI height now behave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validation holds explorer_url to http(s), but the viewer renders whatever dashboard JSON it is served, and a release's JSON can be edited after the build: a javascript: base would have become a clickable script. explorerHref now refuses a base that is not http(s), and a panel's SQL link renders only for a path inside the release's source/ directory. security.md says what the viewer turns into links and why a cell value cannot carry a scheme into one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compatibility.md still described the bundle as committed under viewer/dist/, which .gitignore has excluded since the bundle and its sources could drift. Match the README: pnpm build produces it, and build refuses to write a release without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Found building a dashboard over a real dataset full of wallets, token contracts and transaction hashes. Each item below is something a project could not fix from its own SQL or YAML.
Viewer
Hex values can be copied whole. Every hex cell has a copy button;
columns.<name>.full: trueon a panel shows the value unshortened. Before, the full value lived only in atitletooltip and selecting the cell copied the shortened text.Explorer links. New optional
chain_sources[].explorer_url. Address, transaction and block cells link to<url>/address/…,/tx/…,/block/…. Addresses are detected from their values,tx_hashandblock_numberby name; a 32-byte value is never guessed to be a transaction, since it may be any bytes32 id.kindoverrides either way.Column labels and descriptions.
columns.<name>.label,.description,.kindper panel. A header with a description is underlined and explains itself on hover. Amount columns explain their decimals, which replaces the unexplained blue dot after their headers.Analysis affordances. Each panel links to its SQL in the source bundle (
source/queries/*.sql, already shipped, never linked). Tables and charts download their rows as CSV with exact values under the query's column names. Tables over ten rows get a filter.Bar labels. With up to 30 bars every bar is labelled, tilted when crowded;
hideOverlapused to drop every other one, leaving bars nobody could identify. Past 30 the axis is a scale (a bar per day) and labels thin out as before.KPI height. A KPI beside a table or chart keeps its own height instead of stretching to its row-mate's with the number pinned to the bottom of an empty card. Two KPIs side by side still level.
Link guards. The viewer builds explorer links only from an
http(s)base and renders a SQL link only for a path inside the release'ssource/directory, whatever the dashboard JSON says; validation already holdsexplorer_urlto http(s), but a release's JSON can be edited after the build.docs/security.mddescribes what the viewer turns into links.explorer_urland the SQL paths are written intodashboards/<id>.json, notrelease.json, so they count toward the content digest. Releases built before this render as they did, without the new links.CLI
applydoes not write (a lookup table a script fills in afterwards) passed validation and then failed the build withinternal: ENOENT: … stat …. It is now avalidationerror naming the dataset, its path and asuggested_next.must NOT have additional propertiesnow ends with the key, e.g.: "by size". An unquoted comma in a flow-mapping title splits it into a second key, and the message used to give no hint of it.Testing
pnpm test: 369 passed; the 3 live tests (S3, mainnet e2e) skipped.explorer_urlin the dashboard doc; validate tests cover the new schema fields and the stray-key message.transfer-trafficandprotocol-flowsby forking their published releases and building with this branch, andusdc-supplyfrom its published results with this branch's viewer; compared each against the live page. The 358-bar daily chart inusdc-supplythins its labels as before.explorer_url: https://robinhoodchain.blockscout.comrendered every address, transaction and block cell as a working Blockscout link.Not in this PR: indexing account code or token metadata as datasets. A project that needs them still fills a lookup table from a script.
🤖 Generated with Claude Code