feat: planning step, widget height fix, hide templates#67
feat: planning step, widget height fix, hide templates#67GeneralJerel merged 11 commits intomainfrom
Conversation
Add a "Visualization Quality Standards" section to steer the model toward using Three.js (via import map) for 3D content instead of CSS transform hacks or Canvas 2D projection. Documents available ES module libraries (three, gsap, d3, chart.js), enforces type="module" script tags, and sets a polished quality bar for generated visualizations.
Remove template library drawer, template chips, template tools registration, and template-related agent state fields. Component files are kept in the codebase for future re-enablement. Closes #59
…ance fix: add visualization quality guidance to agent prompt
- Add Demos button to header and DemoGallery drawer with category filter - Send demo prompt to CopilotChat via appendMessage on "Try it" click - Rename SaveTemplateOverlay → ExportOverlay, drop unused description prop - Remove dead iframe preview code from DemoCard, remove unused html field - Fix trailing blank line in agent system prompt - Update chat suggestion from BFS/DFS to 3D Plane Controls - Add clipboard write error handling in ExportOverlay
Add a plan_visualization tool that the agent must call before any visualization tool (widgetRenderer, pieChart, barChart). This gives users transparency into the agent's approach and improves output quality by forcing structured thinking before code generation.
…mpts - Break feedback loop in iframe height measurement by collapsing the content container before reading scrollHeight, so viewport-relative children don't inflate the measurement - Remove +8 padding from height setter that compounded each cycle - Replace "binary search" suggestion with "car axle" visualization
Hide templates feature from UI
Keep planning step additions, adopt staging's quality standards and removed templates. Combine car axle prompt with staging's 3D plane prompt.
Demo gallery preserved on feat/demo-gallery branch for future work.
feat: add planning step before visualization generation
PR Review: feat: planning step, widget height fix, hide templates+580 / -88 across 16 files Issues1. File not renamed after component rename 2. Demo gallery is dead code on 3. Potential visual flash in height measurement content.style.height = '0';
content.style.overflow = 'hidden';
var h = content.scrollHeight;
content.style.height = '';
content.style.overflow = '';A safer approach might be to clone the node offscreen or use a separate measurement element that doesn't trigger layout shifts on the visible content. 4. Snake_case prop in React component Looks Good
SummaryThe substantive changes (planning step, height fix, template hiding) are solid. Main concerns:
|
…easurement - Rename save-template-overlay.tsx to export-overlay.tsx to match component name - Remove unused demo-gallery components (preserved on feat/demo-gallery branch) - Fix widget height measurement using offscreen clone instead of collapsing visible DOM, preventing potential ResizeObserver infinite loops - Use camelCase keyElements prop in PlanCard (remap from snake_case at call site) - Update chat disclaimer to be relevant to visualization demo
Review — ready to merge with one note+165 / -88 across 12 files. TypeScript compiles clean, no stale imports. What's in the PR
Note: orphaned template files still on diskThese files are no longer imported but still exist in the tree:
Not blocking — they'll be addressed when the demo gallery feature lands on this same PR. Optional improvements (non-blocking)
Looks good
|
Summary
plan_visualizationbackend tool that the agent must call before any visualization tool (widgetRenderer, pieChart, barChart). Renders as a collapsiblePlanCardin chat, giving users transparency into the agent's approach before code generation starts.+8padding that compounded each resize cycle.Test plan
Closes #62, closes #64
🤖 Generated with Claude Code