Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dev-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
17 changes: 11 additions & 6 deletions system-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,7 +32,8 @@ Google OAuth Google Calendar LangChain TS Agent
MongoDB
(conversation memory)
(conversations, pending
actions, sessions)
```

## Data Models
Expand Down Expand Up @@ -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 |

Expand Down