Commit Graph

111 Commits

Author SHA1 Message Date
aaa3f51592 Adopt Stackless UI: warm palette, sidebar, project tab bar with Design tab
- Add Google Fonts (Newsreader/Outfit/IBM Plex Mono) + warm beige CSS palette
- New VIBNSidebar: Stackless-style 220px sidebar with project list + user footer
- New ProjectShell: project header with name/status/progress% + tab bar
- Tabs: Atlas → PRD → Design → Build → Deploy → Settings
- New /prd page: section-by-section progress view
- New /build page: locked until PRD complete
- Projects list page: Stackless-style row layout
- Simplify overview page to just render AtlasChat

Made-with: Cursor
2026-03-02 16:01:33 -08:00
7ba3b9563e refactor: move all design controls below scaffold render
Theme swatches removed from inside scaffold components. Theme state
lifted to SurfaceSection which passes themeColor down as a prop.

Controls bar below the scaffold now has three rows:
  1. Library tabs (shadcn / Mantine / HeroUI / Tremor etc.)
  2. Color theme swatches — only shown when the active library has
     theme variants (shadcn: 8, Mantine: 6, HeroUI: 5, Tremor: 5,
     DaisyUI: 12, HeroUI marketing: 6)
  3. Description + tags + Docs link + Lock in button

Scaffold renders cleanly with no UI chrome inside it.

Made-with: Cursor
2026-03-02 14:06:53 -08:00
16766f587d feat: full palette themes for DaisyUI and HeroUI marketing scaffolds
DaisyUI scaffold now has 12 named themes (Dark, Light, Cupcake, Bee,
Synthwave, Cyberpunk, Retro, Dracula, Night, Forest, Coffee, Winter).
Each theme changes the page background, card bg, text, borders, and
primary color — swatch shows a split circle of bg+primary so you can
preview the full palette at a glance.

HeroUI marketing scaffold has 6 prebuilt themes (Purple, Blue, Teal,
Rose, Dark, Modern) matching heroui.com/themes.

ThemeColor type now supports optional bg/cardBg/textColor/borderColor/
mutedText fields for full-page dark/light palette overrides.

Made-with: Cursor
2026-03-02 13:58:02 -08:00
817fe3a1a4 refactor: move design controls below scaffold preview
Made-with: Cursor
2026-03-02 13:50:15 -08:00
b3462a31a7 feat: color theme swatches inside web app scaffolds
Each web app scaffold (shadcn, Mantine, HeroUI, Tremor) now shows
a row of color swatches in the header. Clicking a swatch updates the
primary color across the entire scaffold — sidebar active state,
buttons, bar chart, badges, toggles, and status indicators all update
live. shadcn has 8 themes (Neutral/Blue/Green/Orange/Red/Rose/Violet/
Yellow), Mantine has 6, HeroUI has 5, Tremor has 5.

Made-with: Cursor
2026-03-02 13:28:58 -08:00
086047d177 feat: interactive page nav inside web app scaffolds
Each web app scaffold (shadcn, Mantine, HeroUI, Tremor) now has
clickable sidebar nav between Dashboard, Users, and Settings pages.
Dashboard shows stat cards + bar chart + activity feed. Users shows
a full data table with roles, status badges, and invite controls.
Settings shows form inputs and notification toggles — all styled to
each library's visual language.

Made-with: Cursor
2026-03-02 13:22:24 -08:00
54248887f1 feat: design page scaffold previews with library toggle
Each surface now shows a realistic scaffold preview in a browser chrome
frame. Tab bar at the top toggles between library options (shadcn,
DaisyUI, HeroUI, Mantine, Aceternity, etc.) — the scaffold updates
instantly to show that library's visual language. Lock in confirms
the choice. Scaffolds cover all 6 surfaces × their library options.

Made-with: Cursor
2026-03-02 12:47:10 -08:00
7cf4f2ef78 feat: design page - left nav for surface selection, main area for theme picker
Made-with: Cursor
2026-03-02 12:36:40 -08:00
ea54440be7 refactor: simplify project nav to AI Chat (overview) + Design only
- AI Chat nav item now routes to /overview instead of /v_ai_chat
- Removed Plan, Docs, Tech, Journey nav items
- Deleted old v_ai_chat page
- Cleaned up unused imports and route detection logic

Made-with: Cursor
2026-03-02 12:29:32 -08:00
7be66f60b7 fix: qualify table references in design-surfaces SQL to resolve ambiguous column error
Made-with: Cursor
2026-03-01 21:30:12 -08:00
62731af91f feat: design surfaces page with two-phase theme picker
Phase 1: user picks which surfaces their product needs (Web App,
Marketing Site, Admin, Mobile, Email, Docs). Phase 2: per-surface
horizontal card gallery with mini visual previews of each UI library.
Lock in confirms the choice; locked themes are saved to DB and shown
to the AI coder. Surfaces and themes stored in fs_projects.data.

Made-with: Cursor
2026-03-01 21:14:20 -08:00
287bc96fac feat: design packages page — pick UI library per Turborepo app
Replaces the old design page with a per-app package selector. Fetches
real apps/ from the project's Gitea repo and lets users assign a UI
library (shadcn, DaisyUI, HeroUI, Mantine, Headless UI, or Tailwind
only) independently per app. Selections saved to fs_projects.data.designPackages.

Made-with: Cursor
2026-03-01 20:33:39 -08:00
c842a4b75b fix: clean up chat UI layout and align theme to neutral white
- Replace beige background with clean neutral white (matches Grok aesthetic)
- Remove hardcoded hex colors in thread.tsx - use CSS variables throughout
- Remove scroll-to-bottom button that showed incorrectly after auto-send
- Chat container now integrates visually with the page instead of floating

Made-with: Cursor
2026-03-01 20:21:39 -08:00
a2bde95222 feat: apply Grok-style minimalist UI to Atlas chat
Clean pill composer with inverted send button, plain assistant messages
(no bubble), centered welcome+composer when thread is empty, and Grok
color palette (#fdfdfd/#141414 backgrounds, ring borders).

Made-with: Cursor
2026-03-01 20:14:15 -08:00
86504c4c55 fix: ThreadPrimitive.FollowupSuggestions → Suggestions, autoSend → send
Made-with: Cursor
2026-03-01 20:02:57 -08:00
9bec2e9b17 feat: replace AtlasChat with assistant-ui Thread component
- Install @assistant-ui/react and @assistant-ui/react-markdown
- components/assistant-ui/thread.tsx — full Thread UI with primitives
- components/assistant-ui/markdown-text.tsx — GFM markdown renderer
- AtlasChat.tsx — useLocalRuntime adapter calling existing atlas-chat API

Gives proper markdown rendering, branch switching, copy/retry actions,
cancel button during streaming, and a polished thread experience.

Made-with: Cursor
2026-03-01 16:39:35 -08:00
296324f424 refactor: simplify overview page — header above chat, remove widget grid
Move project name/badges/Refresh/Open IDE above the agent chat panel.
Remove stats, code repo, deployment, PRs, issues, resources sections.

Made-with: Cursor
2026-03-01 16:01:35 -08:00
26a11412b5 feat: add Atlas discovery chat UI and API route
- components/AtlasChat.tsx — conversational PRD discovery UI (violet theme)
- app/api/projects/[projectId]/atlas-chat/route.ts — proxy + DB persistence
- overview/page.tsx — show Atlas for new projects, Orchestrator once PRD done

Made-with: Cursor
2026-03-01 15:56:32 -08:00
35675b7d86 fix: stop prisma from dropping custom tables on every deploy
entrypoint.sh: removed --accept-data-loss from prisma db push.
That flag was silently dropping fs_users, fs_projects etc. on every
container restart, wiping all user/project data. Made the push
non-fatal so a schema mismatch doesn't block startup.

create/route.ts: fixed same broken ON CONFLICT expression as
authOptions.ts — replaced with explicit SELECT + INSERT/UPDATE
to reliably upsert fs_users before inserting the project.

Made-with: Cursor
2026-02-27 19:15:55 -08:00
8c3486dd58 feat: persistent AI memory — chat history + knowledge store
agent-chat/route.ts:
- Loads conversation history from chat_conversations before each turn
- Passes history + knowledge context to agent runner
- Saves returned history back to chat_conversations after each turn
- Saves AI-generated memory updates to fs_knowledge_items

knowledge/route.ts (new):
- GET  /api/projects/[id]/knowledge — list all knowledge items
- POST /api/projects/[id]/knowledge — add/update item by key
- DELETE /api/projects/[id]/knowledge?id=xxx — remove item

OrchestratorChat.tsx:
- Added "Saved to memory" label for save_memory tool calls

Made-with: Cursor
2026-02-27 18:55:41 -08:00
a893d95387 fix: reliable fs_users upsert on sign-in
ON CONFLICT expression matching was silently failing due to a mismatch
between the query expression and the index definition (::text cast).
Replaced with an explicit SELECT-then-INSERT-or-UPDATE pattern.

Made-with: Cursor
2026-02-27 18:24:47 -08:00
b2b3424b05 fix: clean up orchestrator chat UX
- Tool call names now show human-readable labels ("Dispatched agent"
  instead of "spawn_agent"), deduped if called multiple times
- Model label only shown when a real value is returned; "unknown"
  and null are suppressed; model names shortened (GLM-5, Gemini)

Made-with: Cursor
2026-02-27 18:15:50 -08:00
fe89087cc5 fix: correct auth import path in agent-chat route
Was importing from @/lib/auth (which doesn't exist); correct path
is @/lib/auth/authOptions — this caused the Turbopack build to fail.

Made-with: Cursor
2026-02-27 18:09:22 -08:00
8d95a74cc6 add orchestrator chat to project overview
- OrchestratorChat component with Lovable-style UI (suggestion chips, reasoning panel, tool call badges)
- /api/projects/[projectId]/agent-chat proxy route to agent runner
- Injects project context (repo, vision, deployment URL) into session
- AGENT_RUNNER_URL wired to agents.vibnai.com

Made-with: Cursor
2026-02-27 18:06:02 -08:00
c9ef2379ec fix: upsert fs_users before inserting fs_projects to satisfy FK constraint
Made-with: Cursor
2026-02-27 13:36:25 -08:00
ef7a88e913 migrate: replace Firebase with PostgreSQL across core routes
- chat-context.ts: session history now from fs_sessions
- /api/sessions: reads from fs_sessions (NextAuth session auth)
- /api/github/connect: NextAuth session + stores in fs_users.data
- /api/user/api-key: NextAuth session + stores in fs_users.data
- /api/projects/[id]/vision: PATCH to fs_projects JSONB
- /api/projects/[id]/knowledge/items: reads from fs_knowledge_items
- /api/projects/[id]/knowledge/import-ai-chat: uses pg createKnowledgeItem
- lib/server/knowledge.ts: fully rewritten to use PostgreSQL
- entrypoint.sh: add fs_knowledge_items and chat_conversations tables

Made-with: Cursor
2026-02-27 13:25:38 -08:00
3ce10dc45b fix: remove SSL for internal Docker DB connections — fixes 500 on projects API
Made-with: Cursor
2026-02-27 13:01:57 -08:00
0625943cc1 fix: remove SSL from internal DB connection in entrypoint
Made-with: Cursor
2026-02-27 12:51:50 -08:00
cb0ece541f fix: ensure fs_ app tables created on every startup via node/pg
Made-with: Cursor
2026-02-27 12:48:02 -08:00
d8ead667d0 fix: create fs_user on sign-in, fix projects fetch
Made-with: Cursor
2026-02-27 12:39:25 -08:00
17056ea00c fix: restore auth fixes — next-auth prisma adapter, serverExternalPackages, prisma db push on start
Made-with: Cursor
2026-02-27 12:30:52 -08:00
8e6406232d fix: pass GOOGLE_API_KEY to Cloud Run workspace services
Without this, Theia's startup script could not configure Gemini AI
features or write the correct settings.json (dark theme, API key).
New workspaces now receive GOOGLE_API_KEY from the vibn-frontend env.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 11:50:55 -08:00
6eaa6d64ac feat: add Code OS project-info prompt template to scaffold
Adds .prompts/project-info.prompttemplate to the Turborepo scaffold so
every new user project gets a customized context file loaded by the Code
OS agent — including build commands, workspace structure, and shared
package import paths with the project's actual slug injected.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 17:27:34 -08:00
91f579dbc5 fix: add pnpm-workspace.yaml, .node-version, remove npm workspaces from scaffold
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 16:55:49 -08:00
8587644a62 feat: turborepo monorepo scaffold and provisioning
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 16:44:37 -08:00
e22f5e379f chore: remove test file 2026-02-22 00:36:35 +00:00
1154592ab8 test: add test file 2026-02-22 00:35:43 +00:00
b42edbe681 fix: handle Cloud Run 409 by linking to existing service; show provisioning spinner not failure
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 17:31:01 -08:00
f4ab70822c fix: handle Gitea 409 on project create by linking to existing repo
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 17:16:24 -08:00
aeedc76a18 fix: correct authOptions import path in prewarm route
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 16:26:43 -08:00
1ff58049c0 feat: pass GITEA_TOKEN to IDE containers + prewarm on project list load
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 16:13:09 -08:00
97df21883b fix: remove name field from Cloud Run create body (v2 API requires empty)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 15:59:12 -08:00
c68152d999 fix: base64-encode SA key to survive Docker ARG special chars
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 15:48:41 -08:00
68f844ce52 fix: use service account key for Cloud Run workspace provisioning
GCE metadata tokens lack the cloud-platform OAuth scope, causing 403
PERMISSION_DENIED when creating Cloud Run services. Use an explicit JWT
from GOOGLE_SERVICE_ACCOUNT_KEY env var when present, with ADC as fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 15:45:51 -08:00
aa2f5dbc3a feat: add Provision IDE button for projects without a workspace
- POST /api/projects/[id]/workspace: provisions a Cloud Run Theia service
  on demand and saves the URL to the project record
- overview/page.tsx: shows 'Provision IDE' button when theiaWorkspaceUrl
  is null, 'Open IDE' link once provisioned
- Also fixes log spam: retired Firebase session tracking endpoint (410 Gone)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 15:36:18 -08:00
81cca70542 fix: retire legacy Firebase session tracking endpoint
Returns 410 Gone instead of crashing with adminDb.collection errors.
Was flooding logs with TypeError on every call from the old Cursor extension.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 15:26:12 -08:00
783700a7db feat: add proper marketing footer with privacy/terms links
- marketing/components/footer.tsx: multi-column footer with product,
  resources, and legal columns — Privacy Policy clearly linked on homepage
  (satisfies Google OAuth consent screen requirement)
- Replaces thin single-line footer in layout.tsx

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 15:16:53 -08:00
85a355334a feat: add privacy policy and terms of service pages
- /privacy — BC PIPA/PIPEDA compliant privacy policy
- /terms — Terms of service governed by BC law
- Footer updated with Privacy, Terms, and Contact links

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 15:06:49 -08:00
e7f33211b9 feat: migrate Gemini from Vertex AI to Google AI Studio API key
- gemini-client.ts: replaces Vertex AI REST + service account auth with
  direct generativelanguage.googleapis.com calls using GOOGLE_API_KEY.
  Removes all Firebase credential setup code.
- summarize/route.ts: same migration, simplified to a single fetch call.
- No longer depends on gen-lang-client-0980079410 GCP project for AI calls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 14:35:44 -08:00
106d9c5ff1 feat: switch workspace provisioning from Coolify to Cloud Run
- lib/cloud-run-workspace.ts: provisions per-project Theia workspaces as
  Cloud Run services (theia-{slug}), scales to zero when idle, starts in
  ~5-15s from cached image
- create/route.ts: imports cloud-run-workspace instead of coolify-workspace
- Image: northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest
- Includes prewarmWorkspace() for near-zero perceived load time on login

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 14:01:02 -08:00