Skip to content

Feature upgrades: generator workflow, testing, and accessibility improvements#20

Merged
brianfunk merged 13 commits intomainfrom
dev
Feb 11, 2026
Merged

Feature upgrades: generator workflow, testing, and accessibility improvements#20
brianfunk merged 13 commits intomainfrom
dev

Conversation

@brianfunk
Copy link
Collaborator

@brianfunk brianfunk commented Feb 11, 2026

Summary

  • implemented major generator workflow upgrades across data input, URL/session sharing, output validation, and Drupal package scaffolding
  • added test automation with Vitest and wired tests into CI
  • improved accessibility semantics (skip link, landmarks, aria states, live regions, heading order) and reduced homepage accessibility issues
  • upgraded vulnerable dependencies and resolved audit findings

Key Changes

  • Generator UX/state: multi-mode data input (JSON/CSV/manual), share links, robust status/error handling
  • Output system: download preflight validation + richer Drupal ZIP scaffold
  • Performance: lazy-loaded heavy preview modules and improved chunking
  • Quality: lint/test/build/audit gates passing

Validation

  • npm test
  • npm run lint
  • npm run build
  • npm audit --audit-level=high

All commands pass locally on dev.

Accessibility Notes

  • generator route scans clean in axe for tested checks
  • homepage still has remaining color-contrast findings tied to current visual palette; structural/semantic issues were addressed in this pass

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3389d0a4aa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

run: npm run lint

- name: Run unit tests
run: npm test

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align test runtime with Vitest engine requirements

This new npm test step executes in the existing Node 18/20 matrix, but the same commit upgrades to vitest@4.0.18, whose lockfile metadata (package-lock.json node_modules/vitest) requires Node ^20.0.0 || ^22.0.0 || >=24.0.0; the 18.x leg will therefore fail for environment reasons, making CI red even when code is correct.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7ad2bfc. Updated CI matrix from [18.x, 20.x] to [20.x, 22.x] since vitest@4.0.18 requires Node ^20.0.0 || ^22.0.0 || >=24.0.0.

Comment on lines +180 to +181
if (isValidChartJsData(parsed)) {
return parsed as ChartJsLikeData;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Accept datasets-only JSON for scatter chart inputs

This parser path only accepts non-map JSON when isValidChartJsData succeeds, which requires a labels array; scatter/bubble inputs in this project are datasets-only objects with {x,y[,r]} points (for example src/data/sampleData/scatter.json), so they now fail normalization and are converted to empty data in currentData, breaking scatter preview/output generation that previously worked.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7ad2bfc. isValidChartJsData now treats labels as optional — datasets-only JSON with {x,y} points (scatter/bubble) is accepted. Labels/data length matching is only enforced when labels are present. Added test coverage for this case.

brianfunk and others added 2 commits February 11, 2026 14:39
Address PR #20 review comments:
- Replace regex-based HTML sanitization with proper entity encoding to
  fully prevent XSS (fixes GitHub Advanced Security findings for
  incomplete URL scheme check, multi-char sanitization, and bad regexp).
- Make labels optional in isValidChartJsData so scatter/bubble
  datasets-only JSON ({x,y} points without labels) is accepted.
- Drop Node 18.x from CI matrix since vitest@4.0.18 requires >=20.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BaseGenerator.sanitizeForCodeGeneration still used the vulnerable
regex-based approach while Generator.tsx was already fixed. Align
both to use consistent HTML entity encoding for XSS prevention.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@brianfunk brianfunk merged commit 2d38028 into main Feb 11, 2026
12 checks passed
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