Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review: fix token refresh persistence, event key matching, error handling
Adam Eivy8a639e088863
diff --git a/client/src/components/calendar/ConfigTab.jsx b/client/src/components/calendar/ConfigTab.jsxindex 4f3f3e1c4a..cd4a03699f 100644--- a/client/src/components/calendar/ConfigTab.jsx+++ b/client/src/components/calendar/ConfigTab.jsx@@ -79,9 +79,9 @@ export default function ConfigTab({ accounts, setAccounts }) {const googleAccount = accounts.find(a => a.type === 'google-calendar');const email = googleAccount?.email || '';const result = await api.runGoogleAutoConfig(email).catch(() => null);- if (!result || result.status === 'error') {+ if (!result || result.error) {setAutoConfigStep('login');- return toast.error(result?.errors?.[0] || 'Automated setup failed. Try manual setup instead.');+ return toast.error(result?.error || 'Automated setup failed. Try manual setup instead.');}if (result.status === 'partial') {toast('Setup partially completed. Some steps may need manual attention.', { icon: '⚠️' });diff --git a/server/services/dailyReview.js b/server/services/dailyReview.jsindex 9997ecb317..fb0dc47a84 100644--- a/server/services/dailyReview.js+++ b/server/services/dailyReview.js@@ -92,7 +92,7 @@ export async function getDailyReview(date) {totalEvents: enrichedEvents.length,confirmed: Object.values(existing.confirmations).filter(c => c.happened).length,skipped: Object.values(existing.confirmations).filter(c => c.happened === false).length,- unreviewed: enrichedEvents.filter(e => !existing.confirmations[e.id]).length+ unreviewed: enrichedEvents.filter(e => !existing.confirmations[e.id || e.externalId]).length},updatedAt: existing.updatedAt};diff --git a/server/services/googleAuth.js b/server/services/googleAuth.jsindex 42864bf112..4026fbcfd4 100644--- a/server/services/googleAuth.js+++ b/server/services/googleAuth.js@@ -81,6 +81,14 @@ export async function handleCallback(code) {await saveTokens(tokens);oAuth2Client = client;oAuth2Client.setCredentials(tokens);++ // Attach refresh listener so refreshed tokens are persisted+ oAuth2Client.on('tokens', async (newTokens) => {+ const existing = (await getTokens()) || {};+ await saveTokens({ ...existing, ...newTokens });+ console.log('📅 Google OAuth tokens refreshed');+ });+console.log('📅 Google OAuth callback processed, tokens stored');return { success: true };}@@ -98,7 +106,7 @@ export async function getAuthenticatedClient() {// Listen for token refreshoAuth2Client.on('tokens', async (newTokens) => {- const existing = await getTokens();+ const existing = (await getTokens()) || {};await saveTokens({ ...existing, ...newTokens });console.log('📅 Google OAuth tokens refreshed');});