From 2ee68c7ac276d9497234708ac29b6f4ebedb4259 Mon Sep 17 00:00:00 2001 From: mawkone Date: Fri, 12 Jun 2026 10:52:38 -0700 Subject: [PATCH] feat(preview): add interactive address bar and visual editing tools to preview header --- .../components/project/project-icon-rail.tsx | 279 +++++++++++++----- .../components/vibn-chat/chat-panel.tsx | 172 +++++++++-- 2 files changed, 340 insertions(+), 111 deletions(-) diff --git a/vibn-frontend/components/project/project-icon-rail.tsx b/vibn-frontend/components/project/project-icon-rail.tsx index 0f8a608d..ec9ca54e 100644 --- a/vibn-frontend/components/project/project-icon-rail.tsx +++ b/vibn-frontend/components/project/project-icon-rail.tsx @@ -91,7 +91,14 @@ export function ProjectIconRail({ workspace, projectId }: Props) { ); } -import { Monitor, Smartphone, RotateCw } from "lucide-react"; +import { + Monitor, + Smartphone, + RotateCw, + Wand2, + Palette, + Maximize2, +} from "lucide-react"; import { usePreviewToolbarStore } from "./preview-toolbar/preview-toolbar-state"; function PreviewDeviceToggles() { @@ -100,93 +107,207 @@ function PreviewDeviceToggles() { const triggerRefresh = usePreviewToolbarStore((s) => s.triggerRefresh); return ( -
- + + +
+ + + +
+ > + / + +
- - +
+ + + +
); } diff --git a/vibn-frontend/components/vibn-chat/chat-panel.tsx b/vibn-frontend/components/vibn-chat/chat-panel.tsx index edde4c45..1468c005 100644 --- a/vibn-frontend/components/vibn-chat/chat-panel.tsx +++ b/vibn-frontend/components/vibn-chat/chat-panel.tsx @@ -337,11 +337,11 @@ function renderMarkdown(text: string): string { const containerStyle = ` margin: 12px 0; - border: 1px solid #e8e4dc; + border: 1px solid #e4e4e7; border-radius: 8px; overflow: hidden; - background: #faf8f5; - box-shadow: 0 1px 3px rgba(1a,1a,1a,0.02); + background: #fafafa; + box-shadow: 0 1px 3px rgba(0,0,0,0.02); font-family: var(--font-ibm-plex-mono), SFMono-Regular, Consolas, monospace; ` .trim() @@ -352,11 +352,11 @@ function renderMarkdown(text: string): string { justify-content: space-between; align-items: center; padding: 6px 12px; - background: #f0ede8; - border-bottom: 1px solid #e8e4dc; + background: #f4f4f5; + border-bottom: 1px solid #e4e4e7; font-size: 0.68rem; font-weight: 600; - color: #6b6560; + color: #52525b; ` .trim() .replace(/\s+/g, " "); @@ -376,12 +376,12 @@ function renderMarkdown(text: string): string { const buttonStyle = ` background: #ffffff; - border: 1px solid #e8e4dc; + border: 1px solid #e4e4e7; border-radius: 4px; padding: 2px 6px; font-size: 0.65rem; cursor: pointer; - color: #6b6560; + color: #52525b; display: flex; align-items: center; gap: 4px; @@ -430,7 +430,7 @@ function renderMarkdown(text: string): string { .replace(/\*\*(.+?)\*\*/g, "$1") .replace( /`([^`]+)`/g, - '$1', + '$1', ) .replace( /^### (.+)$/gm, @@ -513,24 +513,26 @@ const MessageBubble = React.memo(function MessageBubble({ width: 24, height: 24, borderRadius: "50%", - background: "#1a1a1a", + background: "#f4f4f5", // Zinc-100 instead of black display: "flex", alignItems: "center", justifyContent: "center", marginRight: 8, flexShrink: 0, marginTop: 2, + border: "1px solid #e4e4e7", }} > - V + V. )} @@ -561,14 +563,13 @@ const MessageBubble = React.memo(function MessageBubble({ (!msg.timeline || msg.timeline.length === 0))) && (
+ {/* Fake Suggested Next Steps Chips (for design review) */} + {!sending && + messages.length > 0 && + messages[messages.length - 1].role === "assistant" && ( +
+ + + +
+ )}