Repository navigation
feat(skills): add a data-explorer skill that turns a dataset into an interactive page from one report.json - #410
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
comark-annotate
comark-badge
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
There was a problem hiding this comment.
Important
The new explorer has reproducible chart-value and filtering defects, and the latest docs page fails YAML parsing. These need correction before merging.
Reviewed changes across all three commits, including the rename from dashboard to data-explorer that landed during review.
- Skill and reference: Adds the dataset-profiling and prep workflow,
report.jsonblock/filter contract, and standalone installation instructions. - Interactive page and builder: Adds the responsive template, filtered statistics and tables, Vega-Lite charts, validation, dependency resolution, and screenshot generation.
- Distribution and documentation: Ships the new skill through the existing package discovery and links it from the docs and sibling skills.
Validation: pnpm build passed; workspace and packaged-skill tests passed with 420 passed, 2 skipped. Generated reports were exercised from disk on desktop and phone, including the complete screenshot builder; the inline findings include concrete reproductions. The latest CI docs-prepare failure was independently reproduced by parsing the changed frontmatter.
gpt-6.1-sol(xhigh) | 𝕏
| description: Your agent explores a dataset and turns what it finds into an interactive page of findings, graphs, matrices and tables, from one report.json. | ||
| icon: layout-dashboard | ||
| keywords: data, data science, dashboard, analytics, report.json, filters, charts, tables, heatmap, vega-lite | ||
| tagline: Hand your agent a dataset and get back what's in it: the findings, and the graphs and tables behind them, on a page you click through, filter and share. |
There was a problem hiding this comment.
[P1] Class: invalid YAML frontmatter
The unquoted tagline contains it: the findings, so YAML treats part of the sentence as another mapping. This already stops the latest CI run during docs prepare with YAMLParseError: Nested mappings are not allowed in compact mappings; quote the complete scalar or use a folded YAML scalar.
| display: flex; | ||
| height: 12px; | ||
| min-width: 2px; | ||
| max-width: calc(100% - 92px); |
There was a problem hiding this comment.
[P1] Class: bar-length scaling saturates below the maximum
A bars block with values 100, 90, 50, 10 renders the first two bars at exactly the same length, while the 50 bar is much more than half the maximum. The inline percentage uses the entire track as its denominator, but this absolute cap truncates the larger bars, so the primary ranking visualization misrepresents the data.
Technical details
# Preserve numeric ratios in HTML bar lists
## Affected sites
- [style.css:543–547](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/style.css#L543-L547) caps the fill independently of its value.
- [app.js:981](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/app.js#L981) calculates percentages against the full track.
## Required outcome
- Reserve end-label space before applying the numeric percentage, so 90/100 stays 0.9 at desktop and phone widths.
- Cover single-value and segmented bars through a generated page.| type: "quantitative", | ||
| title: block.yTitle ?? null, | ||
| stack: stacked ? (percent ? "normalize" : "zero") : null, | ||
| scale: log ? { type: "log" } : { domain: [0, yMax], nice: false }, |
There was a problem hiding this comment.
[P1] Class: signed numeric values fall outside forced positive domains
A valid profit series [-20, 10, -10] gets an axis covering only 0..10, with its negative line points drawn hundreds of pixels below the plotting area. Bar charts have the same fixed-zero lower bound, so ordinary signed datasets produce misleading axes and severely expanded plots even though the screenshot build exits successfully.
Technical details
# Include signed values in quantitative plot domains
## Affected sites
- [app.js:389–413](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/app.js#L389-L413) derives only a maximum and fixes the line/area minimum at zero.
- [app.js:577–588](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/app.js#L577-L588) repeats this for bar/grouped/stacked charts.
## Required outcome
- Ordinary linear domains contain both signed extrema, including the positive/negative extents of stacks where applicable.
- Signed marks remain within the intended plotting area with a truthful axis.
- Preserve the separate logarithmic and percentage behavior.| ...keys.map((k) => ({ | ||
| field: field(k), | ||
| type: "quantitative", | ||
| format: percent || block.format === "percent" ? ".1%" : format, |
There was a problem hiding this comment.
[P1] Class: percentage hover values format unnormalized counts
For the documented area chart with stack: "percent", counts A=10 and B=30 plot correctly as 25% and 75%, but hovering displays 1000.0% and 3000.0%. The tooltip pivots the original counts and applies percent formatting without the normalization used by the marks.
Technical details
# Make normalized area tooltips agree with the marks
## Affected sites
- [app.js:482–501](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/app.js#L482-L501) formats the raw pivot output as shares.
## Required outcome
- For `chart: "area", stack: "percent"`, each series' tooltip shows its actual share at the hovered x value, or explicitly labeled raw counts rather than false percentages.
- Verify with unequal raw counts, not just already-normalized 0–1 inputs.| scale: { type: "utc" }, | ||
| axis: { | ||
| format: block.xFormat ?? (rows.some((r) => String(r[x]).length > 7) ? "%b %d" : "%b %Y"), | ||
| formatType: "utc", |
There was a problem hiding this comment.
[P1] Class: UTC scale mode is passed as an unsupported formatter type
For a multi-series line or area chart with ISO dates, the visible hover heading becomes NaN instead of the date. formatType: "utc" also causes Vega-Lite to discard the configured axis date format, including an explicit xFormat, because this is not its temporal formatter type.
Technical details
# Separate UTC scales from temporal formatting
## Affected sites
- [app.js:344–346](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/app.js#L344-L346) uses `utc` as the axis formatter type.
- [app.js:484–488](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/app.js#L484-L488) does the same for the date tooltip.
## Evidence
- With the installed Vega-Lite 6.5, compilation warns that the custom format is dropped on the axis.
- The tooltip compiles to `utc(datum["date"], "%b %d, %Y")`, a date-construction expression rather than a formatter. Actual generated-page hover reads `NaN`.
## Required outcome
- Use a supported temporal formatting mechanism while retaining UTC interpretation.
- Verify both the axis format and the visible tooltip date for an ISO-date series.| .map(([k, xs]) => [k, [Math.max(...xs), Math.min(...xs)]]), | ||
| ); | ||
| const shown = rows.slice(0, own.shown); | ||
| const clickField = block.columns.find((c) => clickable(c.field))?.field; |
There was a problem hiding this comment.
[P1] Class: table clicks route every entity through the first filter field
With two documented list filters, such as entity and country, clicking the ES country cell sets entity=A and leaves country unset. Selecting one clickField for the entire row means the second entity never gets the table click target promised by the skill and can filter the wrong dataset dimension.
Technical details
# Route table entity clicks by the clicked column
## Affected sites
- [app.js:1239](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/app.js#L1239) selects only the first filterable column.
- [app.js:1291–1297](https://github.com/onmax/comark-ui/blob/e056178d5e3d749417a61870417ff8aa8efe51db/skills/data-explorer/assets/app.js#L1291-L1297) assigns that field to every click in the row.
## Required outcome
- Each rendered entity cell filters its own field/value when multiple entities are present.
- Ensure its click does not bubble into a competing row-level filter action.
- Exercise a table with two entity columns and verify the resulting filter state for each.| .rp-brand span, | ||
| .rp-check { | ||
| display: none; |
There was a problem hiding this comment.
[P1] Class: responsive layout removes the only toggle controls
At the documented 390px phone width, every toggle filter is hidden by .rp-check { display: none }, and the sidebar deliberately excludes toggles. For a report with Include gift cards, those rows remain excluded but phone and tablet readers have no control to include them; retain or relocate the controls at this breakpoint.
| const [view, query] = location.hash.slice(1).split("?"); | ||
| if (views.some((v) => v.id === view)) state.view = view; | ||
| for (const [k, v] of new URLSearchParams(query ?? "")) { |
There was a problem hiding this comment.
[P2] Class: fragment restoration retains omitted filter state
After selecting A, changing #ranking?entity=A to #ranking still leaves A selected and the evidence table restricted to A, even though reopening that same URL starts unfiltered. readHash() only merges present parameters; reset filters and search to their configured initial values before applying the fragment so navigation and reload agree.
| const report = JSON.parse(document.getElementById("report-data").textContent); | ||
| const data = report.data ?? {}; | ||
| const views = [...report.views]; | ||
| if (report.method || report.intro) views.push({ id: "method", label: "Method", method: true }); |
There was a problem hiding this comment.
[P2] Class: generated Method view collides with accepted user IDs
A report with a user view id: "method" and nonempty report.method passes validation but produces two tabs with the same ID. Clicking the generated Method tab resolves the user view through views.find(), making the actual methodology unreachable; reserve this ID in validation or generate a collision-free ID.
| max: (xs) => Math.max(...xs), | ||
| min: (xs) => Math.min(...xs), |
There was a problem hiding this comment.
[P2] Class: empty filtered extrema display infinities
When a list-filter combination has no matching rows, documented min and max statistics render ∞ and -∞ rather than an empty value. Handle empty inputs as mean already does so a valid no-results state shows the existing placeholder instead of fabricated extrema.
Latest result Pull request merged. Final answersSession Pull request merged. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. Session Waiting for review checks before the next pass. |
…tter zeros, clicks and labels
…e dashboard trigger
…ercent tooltips, per-cell table clicks and phone toggles
…, search caret, stack on line, and the limits an agent without Node needs
…ment where notes and percent stacking apply



A sixth skill,
data-explorer, for a dataset someone wants to see into rather than decide from: the agent writes the questions, profiles the data, computes every number in a rerunnable prep script, and puts the findings and the graphs behind them on one page. It writes onereport.json(data rows, filters, and the blocks on each tab) and a shared template draws it: a top bar with tabs, a stats strip and an evidence list that stay on every tab, flat sections of charts, segmented bar lists, heatmap matrices and tables, and a filter sidebar where every name keeps one color and a click filters the page.Agents writing dashboards by hand get two things wrong: too much text and a layout that's hard to scan. Here the agent picks what to show and writes no HTML, CSS or page script.
Example, built by an agent with this skill in one run from the public Nuxters data: https://drop.vitehub.dev/d/qmjw7dwepwfa/who-builds-nuxt-dashboard
Works with or without Node
assets/page.htmlis the one page, with slots forreport.json,style.cssandapp.js:scripts/build.mjschecksreport.jsonagainst every limit (each error names the fix), fills the slots, and with--shotsscreenshots every tab in light, dark and on a phone. It needs nothing installed; where comark-ui is installed it also inlines Vega, so the page opens offline.comark-uilatest,vega@6,vega-lite@6). A filled page fetches nothing from it.I ran ChatGPT Pro on the skill with the Nuxters files. Its sandbox couldn't run the build, so it wrote its own renderer, which mislabeled its stats; its
report.jsonfailed our check on 3 errors and, with those fixed, drew cleanly in this template. That's what the page shell is for.Changes
skills/data-explorer/: the steps,references/blocks.md(every block, filter and limit),assets/(the page shell, template script and style),scripts/check.mjs(limits and errors) andscripts/build.mjs.NaN), percent tooltips show shares, percent stacking applies only to charts that stack, table clicks filter by the clicked column, phones keep the toggles, a URL without filters clears them, emptymin/maxshow a dash,countwithoutfieldcounts rows, sorts put empty values last, table search keeps the caret, and the check reservesmethod, rejectsstackon line charts and requires atitlewith anote.blocks.mdnow lists every limit the check enforces, for agents without Node./skills/data-explorer/that links the live example, since the skill doesn't write Comark, anddata-explorerin the skills overview,report's page andSKILL.md,comark-ui's list of siblings, andAGENTS.md.test/data-explorer.test.tsbuilds the example inblocks.mdand reads the page: every slot filled and nothing else changed, and a too-long title fails with its error.Validation
comark-uiandplaywright: exit 0, every screenshot read.report.json(template routed to the local files, since it isn't on npm until this is released).packages/ui/test/skills.test.ts,test/workspace.test.tsandtest/data-explorer.test.ts: 422 passed. The stray-text check fails on the title bug an earlier commit here had.preparestep, which parses every page's frontmatter.pnpm readyand the docs site build.