Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Data Pitfalls bridge, docs, and tests#1030

Open
emeeks wants to merge 3 commits into
main from
data-pitfalls-hook
Open

Add Data Pitfalls bridge, docs, and tests #1030
emeeks wants to merge 3 commits into
main from
data-pitfalls-hook

Conversation

@emeeks

@emeeks emeeks commented Jun 16, 2026

Copy link
Copy Markdown
Member

Introduce a Data Pitfalls bridge for Semiotic: add buildDataPitfallsBridge and toDataPitfallsChain (with full types) that serialize chart config, JSX, grounding, diagnostics, accessibility audit, and optional render evidence into a dependency-free datapitfalls chain input. Includes implementation (src/components/ai/dataPitfallsBridge.ts), unit tests (dataPitfallsBridge.test.ts), and exports from semiotic-ai. Add a new documentation page with a live payload builder and examples (docs/src/pages/features/DataPitfallsBridgePage.js), update README and system prompt to document the API, and wire the page into the docs navigation and routes. Also make small UI/style tweaks: add CodeBlock wrap prop and wrapping behavior, normalize border style properties in Sidebar and CodeBlock, and remove hover handlers from the copy button.

This pull request introduces a new "Data Pitfalls Bridge" feature that enables seamless integration between Semiotic chart configurations and the datapitfalls analysis tool. It also adds the corresponding documentation, navigation, and tests for this bridge, while making minor UI improvements to code and sidebar components.

Data Pitfalls Bridge integration:

  • Added the toDataPitfallsChain and buildDataPitfallsBridge utilities in semiotic/ai to generate a dependency-free input chain for the datapitfalls tool, aggregating chart config, JSX, grounding, diagnostics, accessibility audit, and optional render evidence or images. Comprehensive tests were added to ensure correct stage generation and serialization.
  • Updated documentation (README.md, ai/system-prompt.md) with usage instructions and description of the new Data Pitfalls bridge function. [1] [2]

Documentation site updates:

  • Added a new "Data Pitfalls Bridge" documentation page and integrated it into navigation, sidebar, and page sequencing. [1] [2] [3] [4] [5]

UI and styling improvements:

  • Improved the CodeBlock component to support line wrapping and more robust border styling, making code samples more readable and visually consistent. [1] [2] [3] [4]
  • Updated the Sidebar component's border styling for better theme compatibility.

Introduce a Data Pitfalls bridge for Semiotic: add buildDataPitfallsBridge and toDataPitfallsChain (with full types) that serialize chart config, JSX, grounding, diagnostics, accessibility audit, and optional render evidence into a dependency-free datapitfalls chain input. Includes implementation (src/components/ai/dataPitfallsBridge.ts), unit tests (dataPitfallsBridge.test.ts), and exports from semiotic-ai. Add a new documentation page with a live payload builder and examples (docs/src/pages/features/DataPitfallsBridgePage.js), update README and system prompt to document the API, and wire the page into the docs navigation and routes. Also make small UI/style tweaks: add CodeBlock wrap prop and wrapping behavior, normalize border style properties in Sidebar and CodeBlock, and remove hover handlers from the copy button.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new "Data Pitfalls Bridge" in semiotic/ai that packages a Semiotic chart (config + JSX + grounding + diagnostics + a11y audit + optional render artifacts) into a dependency-free chain input consumable by the external datapitfalls tool, with documentation and docs-site integration.

Changes:

  • Introduced buildDataPitfallsBridge / toDataPitfallsChain utilities (and exported types) to generate a datapitfalls chain payload from a chart component + props.
  • Added unit tests covering default stage generation, optional rendered artifacts, and includeData: false config serialization.
  • Added a new docs page + navigation/routing updates, plus minor docs UI tweaks to CodeBlock/Sidebar.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/components/semiotic-ai.ts Re-exports the new bridge utilities and their types from semiotic/ai.
src/components/ai/dataPitfallsBridge.ts Implements chain-stage construction from config/JSX/grounding/diagnostics/a11y/rendered artifacts.
src/components/ai/dataPitfallsBridge.test.ts Adds vitest coverage for stage inclusion/ordering and data omission in serialized config.
README.md Documents how to build a datapitfalls chain input from Semiotic.
docs/src/pages/features/ReaderGroundingPage.js Updates next-page sequencing to point to the new bridge page.
docs/src/pages/features/DataPitfallsBridgePage.js New documentation page with a live payload builder demo and examples.
docs/src/pages/features/ConversationArcPage.js Updates prev-page sequencing to come after the new bridge page.
docs/src/components/Sidebar.js Normalizes sidebar border styling for theme consistency.
docs/src/components/navData.js Adds "Data Pitfalls Bridge" to the docs navigation tree.
docs/src/components/CodeBlock.js Adds wrap support and border-style normalization; removes hover handlers from copy button.
docs/src/App.js Wires the new docs route for /intelligence/data-pitfalls.
ai/system-prompt.md Documents the new bridge API in the system prompt reference.

Comment thread src/components/ai/dataPitfallsBridge.ts Outdated
Comment thread src/components/ai/dataPitfallsBridge.ts Outdated
emeeks added 2 commits June 16, 2026 10:49
Only add the "Semiotic render evidence" stage when rendered.evidence is non-nullish: change guard to options.rendered?.evidence != null in dataPitfallsBridge. Add a unit test verifying that a null/undefined rendered.evidence does not produce the evidence stage. Clarify comments about includeData behavior (omit raw rows from config/JSX stages; other stages may still summarize data) and update related docs examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /