Commit graph

29 commits

Author SHA1 Message Date
Vadym Samoilenko
96e6f4ee14 feat: replace local auth with Azure AD SSO (MSAL PKCE)
- New POST /api/auth/microsoft endpoint validates Azure ID token via JWKS
- Removed POST /api/auth/login and /change-password
- Added azure_oid + nullable password_hash to users (migration 0007)
- Auto-provisions all @oliver.agency accounts on first SSO login
- Case-insensitive email matching links existing vadymsamoilenko@ account
- DEV_AUTH_BYPASS flag for local development without MSAL
- Frontend: MSAL loginPopup replaces email/password form
- Added scripts/grant_admin.py for role management

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 10:43:19 +01:00
Vadym Samoilenko
dc50dd1d3b fix: chart bars visible + logout 405 + deploy static assets
- Dashboard charts: use pixel heights (not %) and items-end so bars align
  to bottom correctly and are visible at proper scale
- logout(): remove non-existent POST /api/auth/logout call; JWT is stateless,
  client-side token clear is sufficient
- Include rebuilt src/static/ assets so server serves updated frontend bundle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 21:39:28 +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
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
3e48a789fc fix: guard tool.pct against undefined before toFixed 2026-05-06 19:51:23 +01:00
Vadym Samoilenko
d791cda770 fix: auth store sends JSON body instead of form-urlencoded (backend expects LoginRequest JSON) 2026-05-06 19:50:03 +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
474e35c0ea feat: dashboard preset filters (Today/7d/30d), live feed loads today sessions on mount 2026-03-26 15:33:52 +00:00
Vadym Samoilenko
dd92268e80 fix: setup script quoting (HOOK_CMD paths), quoted heredoc, proper JSON connection test 2026-03-26 15:29:17 +00:00
Vadym Samoilenko
015c5efbbd fix: try underscore variant when dash-slug path not found on disk 2026-03-26 15:23:03 +00:00
Vadym Samoilenko
dd902ebb61 fix: repo path resolution via slug+ROOT_PATH, add trailing slash to repo URL 2026-03-26 15:21:43 +00:00
Vadym Samoilenko
4e950a2a67 feat: auto-detect repo URL from git remote, fix project slug (full path not last segment) 2026-03-26 15:19:40 +00:00
Vadym Samoilenko
46db7476a3 fix: timeline chart linear scale, date filter on daily chart, null-safe chart init 2026-03-26 15:16:12 +00:00
Vadym Samoilenko
0ee3c3fbd9 fix: filter collector to only scan projects under CC_ROOT_PATH 2026-03-26 15:09:49 +00:00
Vadym Samoilenko
4d69a4ac64 feat: project metadata fields (client, job#, repo) with inline editing + time calc audit 2026-03-26 15:08:14 +00:00
Vadym Samoilenko
9ebe5a92fa fix: filter invalid timestamps in timeline chart to prevent Chart.js crash 2026-03-26 14:50:28 +00:00
Vadym Samoilenko
7f8048dcee fix: accept HTTP 422 as valid connection (key works, empty body rejected); remove curl preview 2026-03-26 14:43:03 +00:00
Vadym Samoilenko
6b2f811ee5 fix: use heredoc temp file for Python settings update — avoid quote conflicts in bash 2026-03-26 14:37:56 +00:00
Vadym Samoilenko
d7198fdc59 fix: don't rebuild DOM while modal is open — reload table only on close 2026-03-26 14:34:40 +00:00
Vadym Samoilenko
99f1ff6bec fix: escape bash ${VAR} in JS template literal — use array join instead 2026-03-26 14:31:30 +00:00
Vadym Samoilenko
0c7a7b8082 feat: logout button, revoke/delete keys, setup script download
- Sidebar: Add Sign Out button below user info
- Keys API: split revoke (PATCH /{id}/revoke) and delete (DELETE /{id})
- Keys page: Revoke + Delete buttons per key; delete removes from DB
- New key flow: after creation show download setup script step
  - Script embeds API key, asks for projects root folder
  - Downloads cc-collector.py, merges Claude Code hook into settings.json
  - Tests connection and reports result

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 14:05:14 +00:00
Vadym Samoilenko
354aec0995 style: brighter text colors — white primary, lighter muted 2026-03-26 13:59:55 +00:00
Vadym Samoilenko
b7b49110da fix: login page width 100% to center within flex #app container 2026-03-26 13:59:14 +00:00
Vadym Samoilenko
805566f1e5 redesign: premium dark UI — Montserrat, black + #FFC407
- Full CSS redesign: OLED black (#0a0a0a), #FFC407 accent, Montserrat 400–900
- Bold high-contrast typography (900 weight values, -0.04em tracking)
- No glassmorphism — flat sharp surfaces with subtle borders
- KPI cards: 2px yellow top accent bar on hover + lift shadow
- Login: centered card with yellow top bar + subtle grid bg pattern
- Modals: yellow top accent line
- Active nav: solid yellow bg, black text
- Buttons: yellow CTA with glow, ghost with yellow hover
- Badges: pill with yellow tint
- Favicon: dark card with yellow CC

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:51:18 +00:00
Vadym Samoilenko
b90e335f2b feat: apply glassmorphism design system from Oliver dashboard
- Full CSS rewrite: deep dark bg (#060714), glass cards with backdrop-filter,
  Fira Sans/Code fonts, indigo/violet accent palette replacing yellow
- Add animated orb background to index.html
- Update favicon to indigo gradient
- Wrap admin/settings forms in <form> tags with autocomplete attributes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:43:36 +00:00
Vadym Samoilenko
436a089e63 fix: wrap login in form tag, remove QUIC for SSE endpoint
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:22:48 +00:00
Vadym Samoilenko
db4a431910 fix: set CC_BASE before api.js loads to fix login 404
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:14:00 +00:00
Vadym Samoilenko
7b30880d44 Initial commit — CC Dashboard v1.0
Multi-tenant Claude Code monitoring dashboard.
FastAPI + PostgreSQL + Docker + SSE real-time updates.
Montserrat font, black/#FFC407 color scheme.
Apache reverse proxy config at /cc-dashboard/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 12:54:47 +00:00