Skip to content

feat: Settings page, Notion OAuth integration, and dark mode fixes#32

Open
emmanuelkb wants to merge 2 commits intomainfrom
feature/eowusu/settings-page-and-fixes
Open

feat: Settings page, Notion OAuth integration, and dark mode fixes#32
emmanuelkb wants to merge 2 commits intomainfrom
feature/eowusu/settings-page-and-fixes

Conversation

@emmanuelkb
Copy link
Copy Markdown
Collaborator

Summary

  • Settings page: Profile editing (display name), theme picker (light/dark/system), and account deletion with cascade cleanup
  • Notion OAuth integration: Users can connect their own Notion workspaces via OAuth. Documents are fetched, deduplicated, chunked, and embedded with workspace-level tagging. RAG queries are scoped to the user's connected workspaces.
  • Dark mode: Fixed admin page styling and duplicate /api prefix in API calls
  • Workspace management: Connect/disconnect/manual sync from Settings, real workspace data in sidebar with sync status indicators, background ingestion with status polling

Key changes

  • New models: NotionWorkspace, NotionConnection with encrypted token storage
  • New router: /api/notion/ (connect, callback, list workspaces, sync, disconnect)
  • RAG pipeline now filters ChromaDB queries by user's connected workspace_ids
  • Notion document deduplication (database rows fetched as both pages and rows)
  • Updated .env.example with Notion OAuth and encryption config

Test plan

  • Sign in with Google, verify redirect
  • Go to Settings > Connect Notion workspace, complete OAuth flow
  • Verify workspace appears in sidebar and Settings with sync status
  • Ask a question in chat, verify sources come from connected workspace
  • Disconnect workspace, verify data cleanup
  • Test dark mode across all pages

🤖 Generated with Claude Code

@emmanuelkb emmanuelkb requested a review from RutvikNK March 25, 2026 13:52
- Notion public OAuth flow (connect/disconnect via Settings page)
- NotionWorkspace and NotionConnection DB models with encrypted token storage
- Background ingestion: fetch, deduplicate, chunk, and embed with workspace_id tagging
- RAG queries scoped to user's connected workspaces via ChromaDB where filter
- Sidebar shows real connected workspaces with sync status
- Settings page: connect, disconnect, manual sync with status polling
- Deduplicate Notion documents (database rows fetched as both pages and rows)
- ChromaManager: add delete_by_workspace for cleanup on disconnect/re-sync
- Update .env.example with Notion OAuth and encryption config
@emmanuelkb emmanuelkb force-pushed the feature/eowusu/settings-page-and-fixes branch from 5406739 to c8dc776 Compare March 28, 2026 09:00
…leanup

- Add workspace filtering to BM25 search (post-filter by metadata)
- Pass where filter through HybridRetriever to both ChromaDB and BM25
- Fix polling useEffect to use useRef and poll immediately after 2s
- Lazy-init Fernet encryption to avoid crash on missing env var
- Add __init__.py to src/Notion/ subdirs for proper package resolution
- Remove emoji from chroma_manager, add trailing newlines
- Make sidebar workspace cards navigate to Settings page
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.

1 participant