From cfa4313f3734a0c69a71ad5b2fb2798cb17da190 Mon Sep 17 00:00:00 2001 From: NanaKay007 Date: Fri, 30 Jan 2026 22:09:27 -0800 Subject: [PATCH] Update docs for collapsible chat panel and persisted pending actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - system-design.md: Updated PendingAction schema with user_id, description, and expanded status enum; updated frontend architecture diagram to reflect collapsible chat panel - dev-tasks.md: Added completed tasks for collapsible chat panel, mobile-friendly layout, and MongoDB-backed pending actions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- dev-tasks.md | 3 +++ system-design.md | 17 +++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dev-tasks.md b/dev-tasks.md index 4bf410b..df3fb9c 100644 --- a/dev-tasks.md +++ b/dev-tasks.md @@ -21,6 +21,7 @@ - [x] Implement conversation storage and retrieval (PR #7) - [x] Persist user & tokens to MongoDB on OAuth callback via `UserRepository.upsert` - [x] Replace in-memory session store with MongoDB-backed `connect-mongo` for persistent sessions +- [x] Persist pending actions to MongoDB — replaced in-memory Map with `PendingActionRepository`, added `user_id`/`description` fields and `(user_id, status)` index (PR #36) ### LangChain Agent / Chat Service - [x] Integrate LangChain.js with ChatGoogleGenerativeAI (Gemini free tier) (PR #8) @@ -56,6 +57,8 @@ ### UX Improvements - [x] Approval modal shows human-readable event details instead of raw JSON and technical IDs - [x] Approve/reject decisions saved as conversation messages for chat history persistence +- [x] Collapsible chat assistant panel — chat is a slide-out side panel instead of a separate page, keeping the calendar always visible (PR #35) +- [x] Mobile-friendly layout — chat panel renders as full-screen overlay on mobile, nav collapses to icons, calendar toolbar wraps on narrow screens (PR #35) ### Testing - [ ] Unit tests for LangChain agent and tools diff --git a/system-design.md b/system-design.md index db1f172..f052bb2 100644 --- a/system-design.md +++ b/system-design.md @@ -7,10 +7,12 @@ │ Frontend (SPA) │ │ React / Next.js (static export) │ │ ┌───────────┐ ┌───────────┐ ┌────────────────────┐ │ -│ │ Auth View │ │ Calendar │ │ Chat Interface │ │ -│ │ │ │ Dashboard │ │ (HITL approval UI) │ │ -│ │ │ │ │ │ + Conversation │ │ -│ │ │ │ │ │ History Sidebar │ │ +│ │ Auth View │ │ Calendar │ │ Chat Panel │ │ +│ │ │ │ Dashboard │ │ (collapsible side │ │ +│ │ │ │ │ │ panel / mobile │ │ +│ │ │ │ │ │ full-screen │ │ +│ │ │ │ │ │ overlay, HITL │ │ +│ │ │ │ │ │ approval UI) │ │ │ └───────────┘ └───────────┘ └────────────────────┘ │ └────────────────────┬────────────────────────────────┘ │ HTTPS @@ -30,7 +32,8 @@ Google OAuth Google Calendar LangChain TS Agent │ ▼ MongoDB - (conversation memory) + (conversations, pending + actions, sessions) ``` ## Data Models @@ -72,10 +75,12 @@ Google OAuth Google Calendar LangChain TS Agent | Field | Type | Description | |----------------|--------|---------------------------------------------| | id | string | UUID primary key | +| user_id | string | FK → User | | conversation_id| string | FK → Conversation | | action_type | string | e.g. `create_event`, `delete_event`, `update_event` | | action_payload | JSON | Serialized action parameters | -| status | enum | `pending`, `approved`, `rejected` | +| description | string | Human-readable summary of the action | +| status | enum | `pending`, `approved`, `rejected`, `executed`, `failed` | | created_at | datetime | Timestamp | | resolved_at | datetime | When user approved/rejected |