Feature/uiux conversational editor - #1
Open
DhairyaOG wants to merge 3 commits into
Open
Conversation
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.
Pull Request Description
Title
feat: integrate Gemini 2.5 Flash conversational UI/UX editor with React Flow canvasOverview
This PR completely overhauls the UI/UX Agent generation pipeline by ripping out the legacy static array responses and replacing them with a highly dynamic, interactive Conversational Editor powered by Gemini 2.5 Flash and React Flow.
Key Architectural Changes:
Visual React Flow Engine:
UIRenderer.tsx) that translates Gemini's complex JSONcomponent_treelayout directly into an interactive canvas using@xyflow/react.-webkit-background-clip) to prevent React crashes on premium designs.Conversational Chat Proxy (
POST /api/generate):ChatSidebardirectly into a new FastAPI backend route to act as a secure proxy.current_speccontext directly back into Gemini's prompt, forcing it to modify the existing design rather than hallucinate a new one.Data Persistence & Orchestration:
_save_artifactso that data is not lost on page refresh.agentOrchestrator.js) with an explicitORDER BY created_at ASCrule. Downstream agents (Security, Compliance) are now guaranteed to inherit the latest conversational UI/UX edit as their core context payload.Resiliency:
DEMO_MODEfallback inuiux_agent.pyso that it returns a valid, visual React Flow error screen rather than crashing the canvas if an API key is missing.GEMINI_API_KEYis securely injected viaos.getenv()with absolutely zero hardcoded secrets.