Commit graph

34 commits

Author SHA1 Message Date
Vadym Samoilenko
b7a1dc9fdf feat: OMG project dropdown + DevOps toolbar + ADO full fields
OMG page:
- Form now has "Fill from project" dropdown that auto-fills name/client/job#
  from any cc-dashboard project (projects loaded in parallel on mount)
- Job # placeholder updated to show numeric format

DevOps Work Items:
- Count "19" moved into the section heading next to "Work Items" title
- DataTable toolbar (separate row with count+filter) hidden via showToolbar=false
- DataTable: add showToolbar prop (default true) to control toolbar visibility

ADO sync:
- Fetch all fields from ADO API (fields=None) to capture custom fields
  including "OMG Deliverable Number" in fields_json
- Expose fields_json in AzureWorkItemOut schema for frontend inspection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:55:25 +01:00
Vadym Samoilenko
80c6b4b47e fix(ui): address code review findings
- ConfirmDialog: guard handleConfirm against AlertDialogAction :disabled bypass
- useDebounce: add { deep: true } so object (filter record) mutations trigger debounce
- useFocusTrap: defer focus restore by 150ms to not interrupt close animation
- KpiRow: migrate to ui/KpiCard (proper interface, tone, lucide icons, animated counter)
- ui/KpiCard: add optional `to` prop with RouterLink support
- Remove legacy dashboard/KpiCard.vue (replaced by ui/KpiCard)
- Fix pre-existing lint errors in TopBar and color.ts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 11:34:18 +01:00
Vadym Samoilenko
56a7ff06d6 fix(ui): lint and type-check fixes
Fix broken ESLint config (.eslintrc.cjs missing @rushstack patch, wrong
@typescript-eslint extend syntax). Remove unused imports and variables in
11 components/views. Fix invalid v-else placement in OmgView (move to
Tooltip wrapper instead of inner span).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:25:23 +01:00
Vadym Samoilenko
b8329904e8 refactor(ui): replace title attrs with Tooltip on interactive elements
Wrap 'Mark done', 'Edit project', 'Generate AI summary' buttons and inline-editable OMG spans with Tooltip component; replace priority dot title attr in KanbanCard; also adds focus-visible ring to 'Mark done' button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:20:54 +01:00
Vadym Samoilenko
ec6fb8c37b refactor(tasks): EmptyState, spacing rhythm, focus-visible
Replace inline 'Drop here' placeholder in KanbanColumn with EmptyState component, remove title attr in favour of aria-label on add-task button, add focus-visible ring.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:18:28 +01:00
Vadym Samoilenko
3e3826028c refactor(calendar): ConfirmDialog, Skeleton loading, Button/SegmentedControl toolbar
Replace window.confirm with ConfirmDialog for block delete, upgrade view/week-length toggles to SegmentedControl, swap inline SVG nav arrows for lucide ChevronLeft/Right with ghost icon Button, add focus-visible ring to planner toggle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:18:08 +01:00
Vadym Samoilenko
ba99a4dd65 refactor(devops): SegmentedControl, design tokens, ConfirmDialog, spacing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:12:48 +01:00
Vadym Samoilenko
e2f9f35362 refactor(dashboard): extract ProjectBreakdown and ToolUsageList
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:09:46 +01:00
Vadym Samoilenko
0a6ce6c3c4 refactor(dashboard): extract TimelineChart component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:09:43 +01:00
Vadym Samoilenko
4e9de2d3c3 refactor(dashboard): extract KpiRow with KpiCard components
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:09:41 +01:00
Vadym Samoilenko
be6d557622 refactor(dashboard): extract DateRangeFilter component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:09:38 +01:00
Vadym Samoilenko
8a31f46c88 fix(button): ensure icon size meets 40px touch target minimum 2026-05-13 11:06:55 +01:00
Vadym Samoilenko
58f2edadb3 fix(select): use focus-visible for keyboard-only ring 2026-05-13 11:06:28 +01:00
Vadym Samoilenko
823b41e28d feat(dialog): focus trap, autofocus on open, scrollable body 2026-05-13 11:06:19 +01:00
Vadym Samoilenko
2425e241c0 feat(datatable): typed sort, debounced filters, shared Button/Input, EmptyState 2026-05-13 11:06:17 +01:00
Vadym Samoilenko
34c40798be feat(ui): add SegmentedControl, KpiCard with animated counter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:03:33 +01:00
Vadym Samoilenko
d586e9474c feat(ui): add Calendar and DateRangePicker components 2026-05-13 11:01:51 +01:00
Vadym Samoilenko
b382ff640c feat(ui): add EmptyState and ConfirmDialog components 2026-05-13 11:00:14 +01:00
Vadym Samoilenko
f19e5122eb feat(ui): add Tooltip, Popover, Skeleton primitives (radix-vue) 2026-05-13 10:58:41 +01:00
Vadym Samoilenko
36118cb759 feat: replace Planka with in-app Kanban + add OMG page
- Remove Planka: docker-compose services, apache /board/ proxy, env vars, custom CSS dir
- Add Kanban board at /tasks: 4 columns (To Do / Doing / Testing / Done),
  native HTML5 drag-and-drop, card modal (TaskForm reuse), per-column "+" button
- Add 'testing' status to Task model validator and frontend union type
- Add GET /api/tasks/{id} endpoint (was missing, frontend already called it)
- Enrich DevOps clone: live-fetches description, AC, assignee, iteration,
  comments and attachments from ADO; renders as Markdown in task.notes
- Add /omg page: standalone project/client/job# registry with inline editing
  and create/edit/delete dialog; backed by new omg_entries table (migration 0008)
- Add omg router to main.py; add OMG + Tasks to sidebar and router
- Fix dead /planner link on Dashboard -> /tasks

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 14:09:36 +01:00
Vadym Samoilenko
7c15f884c1 fix: Planka admin user + branding CSS; project job_number edit form; report filename; devops title
- docker-compose: add DEFAULT_ADMIN_* passthrough + CUSTOM_UI_OVERRIDE_STYLESHEETS + mount planka-custom/
- planka-custom/planka.css: hide Planka logo/title/footer, override to orange theme matching CC Dashboard
- ProjectDetailView: inline edit form for display_name/client/job_number/repo_url via PATCH /api/projects/:id
- ReportsView: download filename uses report.period_date + report.type (report-2026-05-07-daily.md)
- AppLayout: add devops → 'Azure DevOps' title entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 13:49:00 +01:00
Vadym Samoilenko
09cfc0a89a feat: light theme redesign + DataTable with sort/filter/resize + bug fixes
- Sidebar: white background, orange gradient logo, orange active pill
- TopBar: glassmorphism (white/80 + backdrop-blur-xl)
- AppLayout: warm gradient background mesh
- DataTable: new reusable component with column sort, filter, resize
- DevopsView: rebuilt with DataTable; connection shows "all assigned work items"
- ADO work item URLs: use org-level URL (no project in path)
- CalendarBlock: planned blocks show task title instead of project name
- Reports export: replaced <a download> with fetch+blob to send JWT auth header
- Sidebar Tasks: fixed path /board/ (trailing slash for Apache ProxyPass)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 13:15:19 +01:00
Vadym Samoilenko
e401f9a60b feat(planka): add Planka kanban to docker-compose + wire UI
- docker-compose: add planka + planka-db services (port 1337, isolated volume)
- apache.conf: add ProxyPass /board/ → localhost:1337
- .env.example: add PLANKA_SECRET_KEY + PLANKA_BASE_URL
- Sidebar: rename Planner → Tasks, open /board in new tab via <a>
- Router: remove /planner route
- Delete PlannerView.vue, TaskList.vue, TaskCard.vue (Calendar keeps TaskForm)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 12:15:25 +01:00
Vadym Samoilenko
75c78635bc fix: planner crash — make Task.tags optional, guard task.tags?.length
Backend TaskOut doesn't include tags field; TaskCard.vue read
task.tags.length causing TypeError on undefined. Making tags optional
in the Task type and using optional chaining is the correct fix since
the tags feature is unused (always empty).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 12:01:39 +01:00
Vadym Samoilenko
afdb08f11a feat: remove AI assistant widget and all related backend
Deleted router, service (948 LOC), Vue widget, scheduler anomaly_scan
job, and App.vue integration. DB tables intentionally preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:59:56 +01:00
Vadym Samoilenko
0d8284a7d7 fix(sidebar): use text-white/60 instead of text-foreground/60
Sidebar is always dark regardless of app theme. text-foreground resolves
to dark color in light theme, making nav items invisible on dark sidebar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:28:16 +01:00
Vadym Samoilenko
4ff23500f3 fix(ui): calendar edit/delete, projects view toggle, planner mount race, devops inline form, reports overflow, sidebar contrast, dashboard interactivity
- Calendar: popover now shows Edit/Delete buttons for planned blocks; Edit pre-populates TaskForm; Delete calls deleteBlock API + removes from store. Sessions show read-only label. CalendarView handles ?date= query param from Dashboard chart click.
- Projects: grid/list view toggle with localStorage persistence
- Project detail: Daily Breakdown section (per-day hours + sessions, clickable → filtered view); always-visible 'All time' link; sessions not double-sliced (backend limit bumped 50→200); date-filtered view shows full summaries without line-clamp
- Planner: fixed mount race — onMounted now calls fetchForDate(today) instead of fetchAll()
- DevOps: inline connect form on /devops when not connected; form extracted to DevopsConnectForm.vue shared with Settings
- Reports: added break-words, pre-wrap and overflow-x: auto on prose pre/code blocks to prevent text overflow
- Sidebar: increased text contrast (text-foreground/60 for inactive items, text-foreground/40 for icons)
- Dashboard: KpiCard supports 'to' prop via RouterLink; Projects count + Top Project KPIs link to /projects; Projects list rows link to project detail; Hours by Day bars click → /calendar?date=

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 11:19:46 +01:00
Vadym Samoilenko
433512fc78 feat: task time slots, calendar block drag-to-move
- TaskForm: add start_time/end_time fields; on save emits optional
  block payload so PlannerView creates a PlannedBlock automatically
- PlannerView: handleSave accepts block param, calls createBlock after
  task creation when time is provided
- CalendarBlock: planned blocks with task_id get draggable="true" +
  @dragstart emitting blockDragStart event
- CalendarGrid: forward blockDragStart to useCalendarDnD
- useCalendarDnD: onBlockDragStart stores block_id + duration in
  dataTransfer; onDrop handles both move-existing-block and
  create-new-block paths

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 21:19:49 +01:00
Vadym Samoilenko
732e692c8a fix: implement 5-phase contract fixes, devops page, AI summaries, expanded assistant
Phase 1 — Contract bugs:
- Add progress_pct/budget_hours to ProjectHours schema and compute from ProjectBudget
- Add hours/pct to ToolUsage schema, compute in project_detail endpoint
- Fix ProjectDetailView to use correct nested data shape (data.project.*, data.sessions, etc.)
- Fix GenerateReportIn: rename field date → period_date; update reports router
- Fix tasks list date filter: use Query(alias='date') instead of positional arg
- Fix AzureIntegration/AzureWorkItem types: org→organization, id type, ado_id, sync_enabled
- Fix devops API payload and SettingsView to use organization field
- Fix TaskForm ADO work item selector to use wi.ado_id for display, wi.id for value
- Add light theme CSS variables in :root, keep dark in .dark class
- Remove hardcoded class='dark' from HTML, add theme persistence script
- TopBar: persist dark/light to localStorage on toggle
- DashboardView: switch monthly() → timeline() endpoint for charts
- DOW endpoint: add from/to date range filtering

Phase 2 — Planner:
- Add projects API endpoint and Pinia store
- Add project picker to TaskForm
- Fix ADO work item display (#ado_id not #id)

Phase 3 — Calendar:
- getWeekDays() accepts weekLength 5|7 parameter
- Calendar store: add weekLength ref, setWeekLength(), update fetchCurrentView range
- CalendarToolbar: add 5d/7d toggle buttons; fix dateLabel to use days[days.length-1]
- CalendarView: clicking session block navigates to project-detail/:id/:date
- project-detail route: add optional :date? param; ProjectDetailView filters by date
- DnD resize: send start_at alongside end_at (PlannedBlockIn requires both fields)

Phase 4 — AI session summaries:
- Add ai_title/ai_result columns to Session model
- Alembic migration 0006 for new columns
- New ai_session_summary service using Claude Haiku
- Session summarize endpoint: POST /api/dashboard/sessions/{id}/summarize
- Scheduler job: summarize sessions without ai_title every 10 minutes
- SessionOut schema: add ai_title/ai_result fields
- ProjectDetailView: show ai_title as primary, ai_result as subtitle; sparkle button to generate

Phase 5 — Expanded AI assistant:
- Add 14 new tools: list/create/update/delete/complete tasks, prioritize_day,
  schedule_task, auto_schedule_day, list_projects, list/delete manual entries,
  generate_report, search_sessions, list_work_items
- Import PlannedBlock and AzureWorkItem in assistant service
- Update SYSTEM_PROMPT to describe full agent capabilities
- Agentic loop: 5 → 10 rounds max
- AssistantWidget: add tool labels for all new tools, update quick hints

New files: DevopsView.vue, projects store/API, ai_session_summary.py, migration 0006

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 21:13:28 +01:00
Vadym Samoilenko
2b4fd5dee8 feat: premium redesign — cyan/teal design system + bug fixes
Design:
- Replace purple SaaS theme with operational dark navy (#0b1020) + cyan (#57c7ff)
- Satoshi + JetBrains Mono fonts via CSS @import
- KpiCard: hero variant for Total Hours, tabular-nums for all values
- Sidebar: cyan active state instead of amber, dimmer inactive icons
- Dashboard: skeleton loading states for all charts, polished empty states
- TopBar: cyan user avatar consistent with sidebar

Fixes:
- Live Feed: SSE URL was /api/events/stream (wrong) → /api/events; pass JWT as ?token= query param
- Dashboard: default preset changed to 'today' instead of '30d'
- index.html: Cache-Control: no-cache to prevent stale asset issues

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 20:08:44 +01:00
Vadym Samoilenko
162f4ba822 feat: AI assistant widget, design system upgrade via 21st-dev Magic
Backend:
- Add AI assistant service with gap detection, anomaly analysis, Anthropic tool_use streaming
- Add assistant router (chat SSE, history, flags CRUD, session categorization)
- Fix agentic loop: text+tool_use in single assistant message per Anthropic spec
- Migrate logging from stdlib to structlog in assistant modules
- Fix migration 0005: UUID type for ai_flags/assistant_messages FKs

Frontend:
- Fix vite base path → /cc-dashboard/static/ to match FastAPI StaticFiles mount
- Redesign Sidebar: gradient background, amber gradient active state, 44px touch targets, user avatar
- Redesign KpiCard: corner decorations, ring border, trend icon, baseline bar (21st.dev pattern)
- Redesign TopBar: backdrop-blur, sticky, gradient user avatar, sign-out button
- Improve AssistantWidget: fix setInterval leak, aria-labels, proper markdown block parser
- Fix AssistantWidget renderMarkdown: line-by-line parser for correct list/header nesting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 19:34:17 +01:00
Vadym Samoilenko
9495aebef1 fix: TypeScript errors in TaskForm/CalendarView/PlannerView, rebuild frontend
- TaskForm: change project_id/azure_work_item_id form state from null to undefined
- CalendarView/PlannerView: accept TaskCreatePayload | TaskUpdatePayload from @save emit
- Rebuild: web assets with AssistantWidget included

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 19:01:58 +01:00
Vadym Samoilenko
2533f4b046 feat: AI assistant chat widget + session categories + anomaly detection
- Migration 0005: sessions.category, manual_entries.category, ai_flags table, assistant_messages table
- AiFlag + AssistantMessage ORM models added to models.py
- src/services/assistant.py: gap detection (>30min gaps, low active/wall ratio, uncategorized sessions, long days), Anthropic tool_use loop with 7 tools (get_daily_summary, get_sessions, get_project_stats, detect_anomalies, create_manual_entry, set_session_category, get_unresolved_flags)
- src/routers/assistant.py: POST /api/assistant/chat (SSE streaming), GET/DELETE /history, GET /flags, POST /flags/scan, PATCH /flags/:id/resolve, PATCH /sessions/:id/category
- APScheduler: hourly anomaly scan for all users, persists AiFlag records
- AssistantWidget.vue: floating bottom-right chat panel, streaming SSE rendering, quick-hint chips, tool activity indicators, red badge for unresolved flags, markdown rendering, clear history

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 18:59:51 +01:00
Vadym Samoilenko
ff52d502b8 feat: add complete Vue 3 frontend in web/ directory
Full Vue 3 + Vite + TypeScript + Tailwind SPA replacing the vanilla JS static frontend.
Includes router, Pinia stores (auth/tasks/calendar/devops), axios API client with all
endpoints, UI components (Button/Card/Dialog/Badge/Input/etc), calendar grid with
lane-packing algorithm and DnD support, SSE live feed, and all 11 views.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 18:52:43 +01:00