Conversation
…encryption and management
…nse queue for Gmail notifications
…, services, and UI components
|
Greetings, @ali-ahnaf. Thy scroll hath arrived unblemished — the runes align and no conflict bars the path. The council shall now convene over its contents, weighing each incantation by candlelight. Tarry a while, brave adventurer; we shall investigate and return to thee with our verdict. |
|
The quest is sealed, @ali-ahnaf! Thy incantations have been woven into the main path. The realm grows stronger for thy contribution — accept the gratitude of this humble keeper of the codex. May thy commits forever merge cleanly, brave adventurer 💰 |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (76)
📝 WalkthroughWalkthroughThis PR migrates AI-powered transaction parsing from server-side OpenAI services to client-side OpenRouter usage with per-user, E2E-encrypted API keys. It introduces a pending Gmail expense review queue replacing server-side AI extraction, adds a dashboard balance-adjustment feature, removes prompt/wizard server routes, and updates documentation. ChangesOpenRouter AI Migration and Pending Expense Queue
Net Yield Balance Adjustment
Documentation Updates
Estimated code review effort: 4 (Complex) | ~75 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant AiSettingsPage
participant DekSession
participant OpenRouterAPI
participant ProfileApi
participant PendingExpenseDetailModal
User->>AiSettingsPage: enter OpenRouter API key
AiSettingsPage->>DekSession: get unlocked DEK
AiSettingsPage->>AiSettingsPage: encryptKey(apiKey, DEK)
AiSettingsPage->>ProfileApi: setAiCredential(userId, encrypted payload)
ProfileApi-->>AiSettingsPage: AiCredentialStatusDto
User->>PendingExpenseDetailModal: click "Parse With AI"
PendingExpenseDetailModal->>ProfileApi: getAiCredentialStatus(userId)
PendingExpenseDetailModal->>DekSession: decryptKey(keyCiphertext, keyIv, DEK)
PendingExpenseDetailModal->>OpenRouterAPI: extractTransactionFromEmail(email, tags)
OpenRouterAPI-->>PendingExpenseDetailModal: ParsedEmailDto or null
PendingExpenseDetailModal->>ProfileApi: createTransaction(parsed)
PendingExpenseDetailModal->>ProfileApi: deletePendingExpense(id)
sequenceDiagram
participant GmailPushMessage
participant GmailService
participant PendingGmailExpenseService
participant PushService
participant Dashboard
GmailPushMessage->>GmailService: handleMessage(watcherMatch)
GmailService->>PendingGmailExpenseService: enqueue(userId, gmailMessageId, vaultId, guidanceHint)
GmailService->>PushService: send "Pending expense to review"
PushService-->>Dashboard: notification
Dashboard->>PendingGmailExpenseService: list(userId)
PendingGmailExpenseService-->>Dashboard: PendingGmailExpenseDto[]
Possibly related issues
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary by CodeRabbit