feat: Calendar & Tasks UX/UI (Phase 7) - #211
Conversation
|
PR governance metadata gate is not ready for
|
|
Caution Review failedFailed to post review comments Note
|
| Layer / File(s) | Summary |
|---|---|
Database model for sender relationships backend/db/models.py |
SenderRelationship ORM model maps sender relationships with user/sender email/relationship type and confidence score, includes composite unique constraint on (user_id, sender_email). |
Tenant accounts configuration API backend/api/accounts.py |
GET/PUT endpoints under /api/accounts/config manage TenantConfig with SMTP/IMAP/POP3/OAuth settings; update model forbids extra fields; response model masks secrets as boolean has_* flags. |
Sender relationship ontology API backend/api/ontology.py |
GET/POST endpoints under /api/ontology/relationships retrieve and upsert SenderRelationship records with confidence scores for authenticated users. |
Email pending replies endpoint backend/api/emails.py |
New GET /pending-replies filters email threads where sender matches user's SMTP identity, groups by thread, orders by recency, supports configurable limits. |
Knowledge extraction and calendar sync services backend/services/knowledge_extractor.py, backend/services/calendar_sync.py |
extract_knowledge_from_self_sent creates TicketTasks from self-sent emails; generate_ics_from_task produces CalDAV VTODO strings with status mapping and optional due dates. |
Threading service subject-based matching backend/services/threading_service.py |
Adds fallback path to find existing threads by matching subject (after stripping re/fwd prefixes) before UUID generation. |
API tests and mocking infrastructure backend/tests/test_accounts_api.py, backend/tests/test_ontology_api.py, backend/tests/test_emails_api.py, backend/tests/test_calendar_sync.py, backend/tests/test_knowledge_extractor.py, backend/tests/test_dav_api.py |
Comprehensive test coverage using mocked DB sessions, verifying GET/PUT account config, GET/POST relationships, pending replies filtering, ICS generation, knowledge extraction persistence, and DAV OPTIONS/PROPFIND/PUT methods. |
Main router integration backend/main.py |
Registers ontology, runner_ws, dav, and accounts routers with appropriate auth dependencies on private APIs. |
Self-Hosted Runner: WebSocket, WebDAV, and Agent CLI
| Layer / File(s) | Summary |
|---|---|
WebSocket runner connection management backend/api/runner_ws.py |
ConnectionManager tracks active WebSocket connections by token; /ws/runner/{token} endpoint connects, receives instructions, sends acknowledgments, and cleans up on disconnect. |
WebDAV/CalDAV endpoint skeleton backend/api/dav.py |
Catch-all /dav handler supports OPTIONS (DAV headers), PROPFIND (XML multistatus payload), PUT (file upload returning 201), and returns 501 for unsupported methods. |
Runner agent CLI backend/runner/agent.py |
Async agent connects to WebSocket endpoint via token, performs handshake, enters instruction-receive/acknowledgment-send loop with exception handling and command-line entrypoint. |
Frontend Layout Refactoring, Styling, and Infrastructure
| Layer / File(s) | Summary |
|---|---|
Calendar and tasks layout components frontend/src/components/CalendarLayout.tsx, frontend/src/components/TasksLayout.tsx |
Reusable layout components: CalendarLayout renders three-column calendar UI with sidebar list, month grid, and event detail panel; TasksLayout renders kanban board with columns, task cards showing tags/due dates/assignees, and header controls. |
Simplified page wrappers frontend/src/app/calendar/page.tsx, frontend/src/app/tasks/page.tsx |
Refactored pages reduce to minimal wrappers importing and rendering CalendarLayout and TasksLayout, removing prior inline UI and API loading logic. |
Dashboard layout and home workspace redesign frontend/src/components/DashboardLayout.tsx, frontend/src/components/WorkspaceHome.tsx |
DashboardLayout removes sidebar, adjusts primary nav breakpoint to lg; WorkspaceHome replaces search-driven dashboard with static KPI/summary layout containing greeting, task/conflict sections, and email/calendar action buttons. |
Global theme color palette frontend/src/app/globals.css |
Updates --naruon-slate, --naruon-bg, and --naruon-surface custom properties with new hex values; derived theme tokens propagate changes throughout light theme. |
APM observability infrastructure docker-compose.apm.yml, prometheus.yml |
Adds Prometheus (v2.51.1, port 9090) and Jaeger (v1.55, OTLP on 4317/4318) services; Prometheus scrapes naruon-backend at host.docker.internal:8000 every 15s. |
Architecture and governance documentation docs/architecture/naruon-product-spec.md, docs/architecture/self-hosted-runner-design.md, AGENTS.md, README.md |
Adds product spec covering target architecture, access control, AI features, UX requirements, and observability; runner design doc outlines connectivity model and components; updates AGENTS.md with anti-pattern documentation requirements; extends README with planned ontology and WebDAV features. |
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
- Seongho-Bae/naruon#176: Both PRs modify
frontend/src/components/DashboardLayout.tsxto adjust layout structure and navigation breakpoints. - Seongho-Bae/naruon#202: Both PRs edit
frontend/src/components/DashboardLayout.tsx, with overlapping changes to sidebar and header navigation rendering. - Seongho-Bae/naruon#134: Both PRs update
frontend/src/components/DashboardLayout.tsxand brand-related styling viaglobals.csscolor tokens.
🐰 A tenant configures their email,
The ontology graphs sender trails,
WebSocket runner echoes "ack,"
CalDAV stores the memo tracks,
While dashboards await their tales. ✨
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 7.14% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title 'feat: Calendar & Tasks UX/UI (Phase 7)' accurately reflects the primary changes in the PR, which include new Calendar and Tasks UI components, simplified page layouts, and styling updates. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feature/phase7
Comment @coderabbitai help to get the list of available commands and usage tips.
| In the future, this will parse XML namespaces and bridge | ||
| Naruon's Tasks and Events into DAV compliant responses. | ||
| """ | ||
| logger.info(f"DAV Request: {request.method} /{path}") |
| if request.method == "PUT": | ||
| # Simulate accepting .ics file | ||
| body = await request.body() | ||
| logger.info(f"DAV PUT received {len(body)} bytes at /{path}") |
| await ws.accept() | ||
| # In a real scenario, validate token against WorkspaceRunnerConfig | ||
| self.active_connections[token] = ws | ||
| logger.info(f"Runner connected with token {token}") |
| def disconnect(self, token: str): | ||
| if token in self.active_connections: | ||
| del self.active_connections[token] | ||
| logger.info(f"Runner disconnected: {token}") |
| "use client"; | ||
|
|
||
| import { useState } from 'react'; | ||
| import { ChevronLeft, ChevronRight, Settings, Plus, Users, Video, Paperclip, Clock, CalendarDays, CheckCircle2, X } from 'lucide-react'; |
| @@ -0,0 +1,112 @@ | |||
| from fastapi import APIRouter, Depends, HTTPException | |||
| @@ -0,0 +1,34 @@ | |||
| import logging | |||
| from sqlalchemy.ext.asyncio import AsyncSession | |||
| from sqlalchemy import select | |||
| @@ -0,0 +1,22 @@ | |||
| import pytest | |||
| @@ -0,0 +1,22 @@ | |||
| import pytest | |||
| from httpx import AsyncClient | |||
| @@ -0,0 +1,35 @@ | |||
| import pytest | |||
| from db.models import Email, TicketTask | |||
|
Superseded by #214 which includes all Phase 6-10 commits. |
Phase 7 UX/UI implementation for Calendar and Tasks matching Figma assets
Summary by CodeRabbit
Release Notes
New Features
UI/UX Updates
Documentation