fix: brainstorm infinite loop, ghost cursor, embedding ::vector cast, semantic search, billing stats, usage meter accordion
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
- Fix useBrainstormSocket: stable guestId via useRef, remove setState in cleanup - Fix GhostCursor: direct DOM manipulation via refs, no useState re-renders - Fix all SQL embedding queries: add ::vector cast on text columns - Fix embedding truncation to 15000 chars (under 8192 token limit) - Fix NoteEmbedding INSERT: remove non-existent updatedAt column - Fix billing page: show all quota stats in grid instead of single metric - Fix usage meter: accordion expand/collapse, per-feature detail - Fix semantic search: rebuild 103 note embeddings, ::vector cast on vectorSearch - Fix brainstorm expand/manual-idea/create: ::vector cast on embedding SQL
This commit is contained in:
@@ -14,7 +14,7 @@ export const authConfig = {
|
||||
authorized({ auth, request: { nextUrl } }) {
|
||||
const isLoggedIn = !!auth?.user;
|
||||
const isAdmin = (auth?.user as any)?.role === 'ADMIN';
|
||||
const isDashboardPage = nextUrl.pathname === '/' ||
|
||||
const isDashboardPage = nextUrl.pathname === '/home' ||
|
||||
nextUrl.pathname.startsWith('/reminders') ||
|
||||
nextUrl.pathname.startsWith('/archive') ||
|
||||
nextUrl.pathname.startsWith('/trash') ||
|
||||
@@ -24,8 +24,14 @@ export const authConfig = {
|
||||
nextUrl.pathname.startsWith('/chat') ||
|
||||
nextUrl.pathname.startsWith('/canvas') ||
|
||||
nextUrl.pathname.startsWith('/notebooks') ||
|
||||
nextUrl.pathname.startsWith('/note/');
|
||||
nextUrl.pathname.startsWith('/note/') ||
|
||||
nextUrl.pathname.startsWith('/brainstorm');
|
||||
const isAdminPage = nextUrl.pathname.startsWith('/admin');
|
||||
const isPublicPage = nextUrl.pathname === '/' ||
|
||||
nextUrl.pathname === '/login' ||
|
||||
nextUrl.pathname === '/register' ||
|
||||
nextUrl.pathname === '/forgot-password' ||
|
||||
nextUrl.pathname.startsWith('/reset-password');
|
||||
|
||||
if (isAdminPage) {
|
||||
return isLoggedIn && isAdmin;
|
||||
@@ -34,9 +40,12 @@ export const authConfig = {
|
||||
if (isDashboardPage) {
|
||||
if (isLoggedIn) return true;
|
||||
return false;
|
||||
} else if (isLoggedIn && (nextUrl.pathname === '/login' || nextUrl.pathname === '/register')) {
|
||||
return Response.redirect(new URL('/', nextUrl));
|
||||
}
|
||||
|
||||
if (isLoggedIn && (nextUrl.pathname === '/login' || nextUrl.pathname === '/register')) {
|
||||
return Response.redirect(new URL('/home', nextUrl));
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
async jwt({ token, user }) {
|
||||
|
||||
Reference in New Issue
Block a user