feat(refactor): premium zed-style chat UI, collapsible reasoning, and comprehensive strict type sweeps

This commit is contained in:
2026-05-21 17:05:42 -07:00
parent 180aa9b311
commit 8049a7f1ab
35 changed files with 5144 additions and 5789 deletions

View File

@@ -0,0 +1,21 @@
# Diagnosis: Why the Plan / PRD Didn't Update in the UI
I investigated why the PRD and Tasks did not appear in your Plan UI after the AI said it updated them.
Here is exactly what happened:
### 1. Why the PRD text didn't update
- The UI's "Product Spec" tab specifically looks for a single document stored in your database under a hardcoded ID called `prd_spec`.
- Because the AI doesn't have a tool specifically named `update_prd_spec`, it used the generic `plan_vision_set` tool. It saved your new PRD text into the `plan.vision` field (the "Objective" box) instead of the `prd_spec` document.
- **The Fix:** I can either add a new AI tool specifically for updating the PRD document, or we can adjust the UI to read from the correct field.
### 2. Why the Tasks didn't show up immediately
- The AI correctly executed `plan_task_add` for both tasks (`[US1]` and `[US2]`). I queried the Postgres database, and **both tasks are successfully saved in your project's plan.**
- However, the Plan UI uses aggressive caching (`revalidateOnFocus: false`). When the AI finishes running its background tools, the UI doesn't know the database changed.
- You simply need to **refresh the page**, and then click on the **Delegate** tab. You will see both `[US1]` and `[US2]` waiting in the queue!
### How we can fix this permanently when you return:
1. **Real-time UI:** We can add a simple `router.refresh()` or WebSocket trigger so the Plan tab instantly updates when the AI adds a task.
2. **Dedicated PRD Tool:** I can add an `update_prd_document` tool to the AI so it knows exactly where to save Product Specifications.
Let me know which you want to tackle first when you're back!

View File

@@ -0,0 +1,46 @@
# Vibn Product Roadmap & To-Do List
This document tracks the immediate next steps for the Vibn UI and project management features.
## 1. Complete the "Plan" UI
*Status: Pending*
The Plan UI needs to be the central hub where founders and AI agents collaborate on the product roadmap, user stories, and architecture.
**Key Tasks:**
- **Visual Design:** Implement the UI for viewing and editing the PRD (Product Requirements Document).
- **Agent Integration:** Ensure the `Atlas` (PRD) and `PM` (Product Manager) agents can seamlessly update the plan and reflect changes in the UI in real-time.
- **Task Management:** Build out the interface for tracking actionable tasks (e.g., KanBan or List view) that the `Coder` agent can pick up and execute.
- **Database Sync:** Ensure all UI interactions correctly read/write to the `phase_data` or `plan` JSON structure in the Postgres database.
## 2. Build the "Messages/Inbox" UI
*Status: Pending*
Projects need a dedicated "Messages" tab to act as a unified inbox for all external communications, specifically emails sent by the AI or the platform.
**Key Tasks:**
- **Email History Table:** Create a Postgres table (e.g., `project_messages`) to log every email sent via the new Mailgun integration. The schema should include: `project_id`, `to`, `subject`, `body_text`, `body_html`, `sent_at`, and `status`.
- **Backend Logging:** Update the `app/api/mcp/route.ts` `email.send` tool to insert a record into this new table immediately after a successful Mailgun dispatch.
- **UI Implementation:** Build a clean Inbox UI within the Project Dashboard.
- List view of all sent/received messages.
- Detail view to read the actual email content (rendering the compiled HTML/MJML safely).
- *(Future)* Webhook integration with Mailgun to receive replies and log them in this same UI.
## 3. Implement System-Wide Real-Time UI Updates
*Status: Pending*
**Key Tasks:**
- Implement the Postgres `LISTEN/NOTIFY` event bus (as defined in `REALTIME_UPDATES.md`).
- Build the Next.js Server-Sent Events (SSE) `/api/projects/[projectId]/stream` route.
- Wrap the Project layout with a `useProjectStream` hook so SWR automatically re-fetches when the background AI modifies the database (e.g., checking off tasks, editing the PRD).
## 4. Integrate Open-Source Analytics (Umami)
*Status: Pending*
Every project deployed by Vibn should automatically have privacy-first analytics injected and visible to the founder.
**Key Tasks:**
- **Infrastructure:** Deploy Umami via Coolify using Docker Compose (backed by the existing Postgres DB).
- **Automation:** Build a backend integration so when an AI ships a project, Vibn programmatically calls the Umami API to generate a unique `Website ID` for that project.
- **Code Injection:** Ensure the AI agent automatically injects the Umami `<script>` tag with the correct ID into the project's root `layout.tsx`.
- **UI Dashboard:** Add an "Analytics" tab to the project workspace that surfaces the Umami traffic metrics natively inside Vibn.