- Eliminate N+1 lazy queries in activity, documents, and workflows endpoints using joinedload/selectinload
- Aggregate dashboard KPI counts into a single SQL query to reduce remote DB roundtrips
- Increase DB pool size to 10 with max_overflow of 20 to prevent connection starvation
- Add in-flight GET request deduplication in frontend API client
- Remove blocking /auth/me call on login to enable instant navigation
- Cache workspace data in localStorage to eliminate sequential loading waterfalls
- Implement session caching and skeleton shimmer states in Dashboard UI
fix: eliminate N+1 queries on knowledge list/search endpoints
- Fetch listKnowledge + listDocuments in parallel (Promise.all)
instead of two serial requests — halves initial load time
- All three filters (document, type, status) now client-side —
changing a dropdown is instant, no network round-trip
- Background poll uses silent refresh (no spinner flash every 3s)
- Removed stale typeFilter/statusFilter deps from load callback
fix: auto-commit used workspace_id as committed_by (FK violation)
commits.committed_by is a FK to users, not workspaces.
The complete node was passing state.workspace_id, causing:
ForeignKeyViolation: Key (committed_by)=(<workspace_uuid>)
is not present in table users
Fix: look up workspace.created_by and use that as committed_by
for auto-approved system commits.
- Replace avatar badge in topbar with sun/moon theme toggle button
- Light mode: same blue-dark family shifted lighter (#1e2535 bg),
not a jarring white theme
- Sharper text: primary #f5f6f7, secondary #b0b8c4, muted #727d8a
- font-weight: 420 on body for better stroke thickness on dark bg
- Toggle animates with subtle rotate+scale on hover
fix: activity filter shows all event types per doc; knowledge filter persists on back
backend/app/api/activity.py:
- proposal_created/approved/rejected/archived events now include filename
by walking proposal -> knowledge_item -> document_version relationship
- commit_created events now include filename by walking
commit -> proposal -> knowledge_item -> document_version
- Selecting a document in the activity dropdown now shows ALL events
for that document (workflow, upload, proposals, commits) not just
workflow/upload events
frontend/src/pages/Knowledge.jsx:
- docFilter persisted to sessionStorage so navigating to a knowledge
item detail page and pressing Back restores the selected document
instead of resetting to All documents