Skip to content

feat: Calendar & Tasks UX/UI (Phase 7) - #211

Closed
seonghobae wants to merge 1 commit into
feature/phase6from
feature/phase7
Closed

feat: Calendar & Tasks UX/UI (Phase 7)#211
seonghobae wants to merge 1 commit into
feature/phase6from
feature/phase7

Conversation

@seonghobae

@seonghobae seonghobae commented May 23, 2026

Copy link
Copy Markdown
Contributor

Phase 7 UX/UI implementation for Calendar and Tasks matching Figma assets

Summary by CodeRabbit

Release Notes

  • New Features

    • Email account configuration management for SMTP, IMAP, POP3, and OAuth settings
    • WebDAV/CalDAV integration for calendar and task synchronization
    • Sender relationship tracking and automatic indexing
    • Pending email replies endpoint
    • Self-sent email knowledge extraction and memo creation
  • UI/UX Updates

    • Redesigned calendar interface with month view and navigation controls
    • Simplified tasks dashboard with Kanban board layout
    • Updated dashboard home overview with KPI cards and daily summary
    • Refined color palette and navigation responsiveness
  • Documentation

    • Added product architecture specification and roadmap
    • Self-hosted runner design documentation
    • Updated governance guidelines

Review Change Stack

@github-actions

github-actions Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

PR governance metadata gate is not ready for ce025d06d88dcc39729c4e65b5eda35ec2706e19:

  • 1 unresolved current review thread(s) remain.
  • Required check metadata could not be read: no required checks reported on the 'feature/phase7' branch.
  • Current-head CodeRabbit issue comment has blocking warning/failure evidence on ce025d0.

@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Failed to post review comments

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'version'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

This PR introduces tenant account configuration management, sender relationship ontology tracking, self-hosted runner infrastructure via WebSocket/WebDAV, knowledge extraction from self-sent emails, and refactored React layout components for calendar and task views, with comprehensive API tests, APM observability setup, and updated architecture documentation.

Changes

Backend: Tenant Configuration, Ontology, and Knowledge Services

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.tsx to 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.tsx and brand-related styling via globals.css color 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 ⚠️ Warning 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.

Comment thread backend/api/dav.py
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}")
Comment thread backend/api/dav.py
if request.method == "PUT":
# Simulate accepting .ics file
body = await request.body()
logger.info(f"DAV PUT received {len(body)} bytes at /{path}")
Comment thread backend/api/runner_ws.py
await ws.accept()
# In a real scenario, validate token against WorkspaceRunnerConfig
self.active_connections[token] = ws
logger.info(f"Runner connected with token {token}")
Comment thread backend/api/runner_ws.py
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';
Comment thread backend/api/accounts.py
@@ -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
@seonghobae
seonghobae changed the base branch from master to feature/phase6 May 23, 2026 14:07
@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by #214 which includes all Phase 6-10 commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants