Feature request: Visual live preview and visual-edit mode for AI Code Assist (lovable.dev style) #1 #183385
Replies: 2 comments
|
Maintainer / Technical Response This is a strong and well-articulated request, and you are correctly identifying a gap between conversational AI assistance and productized visual workflows like lovable.dev. From a technical and product standpoint, what you’re proposing is feasible, but it requires GitHub AI Code Assist to cross several architectural boundaries that lovable.dev was designed around from day one. Below is a breakdown of feasibility, implementation approach, and constraints.
lovable.dev controls: The runtime (sandboxed Vite/Next environment) The preview server (HMR-enabled) The DOM ↔ source mapping layer The AI proposal lifecycle (preview → diff → commit) GitHub AI Code Assist, today: Operates primarily on static diffs Is repo-hosted, not runtime-hosted Lacks a persistent, sandboxed preview environment per suggestion Treats UI edits as code-first, not visual-first So this is not just a UI feature — it is a workflow and infrastructure shift.
Your acceptance criteria are reasonable and align with modern tooling. A viable architecture would look like this: A. Live Preview (Right Pane) Spin up an ephemeral preview runtime per proposal: Vite / Next.js dev server Sandboxed iframe Environment variable stripping / secret masking Use HMR or fast refresh to sync AI-generated patches instantly B. Visual Edit Mode DOM inspection overlay (similar to Storybook + Playwright Inspector) DOM → JSX mapping via: Source maps AST correlation (ts-morph / recast) Limit scope initially: Text content Inline styles / CSS classes Layout primitives (margin, padding, flex/grid) Each visual action generates: A named proposal A readable AST-based diff A reversible patch
Your requested workflow maps cleanly to a proposal-based model: Left pane: Timeline of AI suggestions + visual edits Each entry = immutable proposal Buttons: Preview | View Diff | Apply | Revert Right pane: Always-live preview Switch proposals instantly Inspect/edit UI elements visually Each proposal: Lives on a temporary branch Has an audit log Can be promoted to a PR This aligns well with GitHub’s existing PR and Checks model.
You correctly call this out as a risk. Minimum safeguards would include: Iframe sandboxing (no top-level navigation) No access to repo secrets Network egress restrictions Explicit allowlist for preview commands Clear “preview-only” execution mode Without this, GitHub cannot safely offer live previews across arbitrary repos.
Rather than full lovable.dev parity immediately, a staged rollout would make sense: Phase 1: Read-only live preview per PR / suggestion. No visual editing yet. Phase 2: Simple visual edits (text, spacing, colors). AST-backed diffs only. Phase 3: Full WYSIWYG-style editing. Proposal history + branching. Designer/PM-friendly access. |
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
General
Body
Summary
It would be highly beneficial if GitHub AI Code Assist provided features closely matching lovable.dev:
Inspiration
The lovable.dev workflow combines:
Motivation / Use Cases
Acceptance Criteria
Implementation Notes
Risks & Open Questions
Labels
All reactions