-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Conversation
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.
Contributor
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.
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/toDataPitfallsChainutilities (and exported types) to generate adatapitfallschain payload from a chart component + props. - Added unit tests covering default stage generation, optional rendered artifacts, and
includeData: falseconfig 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. |
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.
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.
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
datapitfallsanalysis 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:
toDataPitfallsChainandbuildDataPitfallsBridgeutilities insemiotic/aito generate a dependency-free input chain for thedatapitfallstool, 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.README.md,ai/system-prompt.md) with usage instructions and description of the new Data Pitfalls bridge function. [1] [2]Documentation site updates:
UI and styling improvements:
CodeBlockcomponent to support line wrapping and more robust border styling, making code samples more readable and visually consistent. [1] [2] [3] [4]Sidebarcomponent's border styling for better theme compatibility.