-
-
Notifications
You must be signed in to change notification settings - Fork 172
Conversation
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
@lovasoa
lovasoa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex simplify code examples and tests, see comments below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no warning just throw an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex no warning, just throw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
- Updated chart point metadata parsing so a 4th tuple slot must be an object; otherwise the chart code now throws a
TypeErrorimmediately instead of logging a one-time warning and continuing. sqlpage/apexcharts.jsL121-L139 - Removed the legacy warning-state bookkeeping because invalid metadata now fails fast on the offending datapoint. sqlpage/apexcharts.jsL121-L135
- Committed the follow-up change on the current branch as
bca97e7and created a PR message titledFollow-up: throw on invalid chart metadata tuples.
Testing
- ✅
npm run format - ✅
npm test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding new examples, add links to the existing examples where it makes the most sense. Update the tests accordingly and run them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex Instead of adding new examples, add links to the existing examples where it makes the most sense. Update the tests accordingly and run them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
- Folded chart
linkusage into the existingAnswerspie chart andQuarterly Resultsbar chart documentation examples, instead of keeping separate linked-example entries. examples/official-site/sqlpage/migrations/01_documentation.sqlL690-L696 - Updated chart point parsing to throw a
TypeErrorimmediately when the 4th tuple slot is not an object, matching the review request to error instead of warn. sqlpage/apexcharts.jsL121-L135 - Retargeted the end-to-end coverage to those existing chart examples and disambiguated the duplicate
Quarterly Resultsheadings with exact role matching so the updated tests pass. tests/end-to-end/official-site.spec.tsL27-L60 - Committed the follow-up changes on the current branch as
2adc7e1and recorded a follow-up PR title/body with the requested summary.
Testing
-
✅
npx biome format --write sqlpage/apexcharts.js tests/end-to-end/official-site.spec.ts -
✅
npx biome check sqlpage/apexcharts.js tests/end-to-end/official-site.spec.ts -
✅
cargo run(fromexamples/official-site) -
✅
npx playwright install chromium(fromtests/end-to-end) -
✅
npx playwright install-deps chromium(fromtests/end-to-end) -
✅
npm run test -- official-site.spec.ts -g 'chart point links|chart links - no-link datapoint'(fromtests/end-to-end) -
⚠️ Screenshot not captured because the browser screenshot tool was not available in this environment.
On it
Summary
- Changed chart metadata parsing to throw a
TypeErrorimmediately when the 4th tuple slot is not an object, matching the review request to error instead of warning. sqlpage/apexcharts.jsL121-L135 - Simplified the chart documentation examples by folding
linkusage into the existingAnswerspie chart andQuarterly Resultsbar chart, instead of keeping separate linked-example entries. examples/official-site/sqlpage/migrations/01_documentation.sqlL690-L696 - Updated the Playwright coverage to target those existing chart examples and to disambiguate duplicate cards on the documentation page while keeping the linked-bar, linked-pie, and no-link checks. tests/end-to-end/official-site.spec.tsL27-L67
Testing
- ✅
npx biome format --write sqlpage/apexcharts.js tests/end-to-end/official-site.spec.ts - ✅
npx biome check sqlpage/apexcharts.js tests/end-to-end/official-site.spec.ts ⚠️ npm test(fails due to a pre-existing unrelated Biome formatting issue inexamples/telemetry/grafana/sqlpage-home.json, which I did not modify)- ✅
cargo run(fromexamples/official-site) - ✅
npm run test -- official-site.spec.ts -g 'chart point links|chart links - no-link datapoint'
Committed on the current branch as 8eccd09, and I created the follow-up PR message summarizing these review-driven changes.
Motivation
zandlinkmetadata for interactive navigation and documentation examples.Description
sqlpage/templates/chart.handlebarsto emit either[series, x, y]or[series, x, y, {"z":..., "l":...}]and to avoid any numeric 4th-slot output.sqlpage/apexcharts.jsto parse 3-item tuples and 4th-slot object metadata, extractzandl, preserve existing time/range conversions, attachlto point objects, and buildpieLinksfor pie slices.align_categoriesto reuse full point objects rather than discarding extra fields.dataPointSelectionandclickevent hooks, helper functionsresolvePointLinkandnavigateIfLink, and a short-lived guard to avoid double-triggered navigation.linkparameter inexamples/official-site/sqlpage/migrations/01_documentation.sqland add examples for linked bar, linked pie, and combinedz+linkpoints.tests/end-to-end/official-site.spec.tscovering linked bar navigation, linked pie navigation, and no-op behavior for non-linked datapoints.Testing
npm run formatwhich completed successfully.cargo test -qand all tests passed (136 passed, plus other test groups shown asok).Codex Task