fix: Correct OAuth localhost/127.0.0.1 config and fix grapheme counting for Bluesky posts

- Fixed OAuth client configuration to properly use localhost for client_id and 127.0.0.1 for redirect_uris per RFC 8252 and ATproto spec
- Added proper grapheme counting using RichText API instead of character length
- Fixed thread splitting to account for link suffix and thread indicators in grapheme limits
- Added GOOGLE_EMBEDDING_DIMENSIONS env var to all env files
- Added clear-nodes.ts utility script for database management
- Added galaxy node detail page route

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-09 18:26:39 +00:00
parent 4b3da74f79
commit 9aa9035d78
14 changed files with 453 additions and 102 deletions

View File

@@ -1,7 +1,7 @@
'use client';
import { useState, useEffect } from 'react';
import { Menu, Avatar, UnstyledButton, Group, Text } from '@mantine/core';
import { Menu, Avatar, NavLink, ActionIcon } from '@mantine/core';
import { useRouter } from 'next/navigation';
interface UserProfile {
@@ -11,7 +11,7 @@ interface UserProfile {
avatar: string | null;
}
export function UserMenu() {
export function UserMenu({ showLabel = false }: { showLabel?: boolean } = {}) {
const router = useRouter();
const [profile, setProfile] = useState<UserProfile | null>(null);
const [loading, setLoading] = useState(true);
@@ -43,10 +43,30 @@ export function UserMenu() {
};
if (loading || !profile) {
return (
<Avatar radius="xl" size="md" color="gray">
?
</Avatar>
return showLabel ? (
<NavLink
label="Profile"
leftSection={
<Avatar radius="xl" size={20} color="gray">
?
</Avatar>
}
variant="filled"
color="blue"
styles={{
root: {
borderRadius: '8px',
fontWeight: 400,
},
}}
disabled
/>
) : (
<ActionIcon variant="subtle" color="gray" size={40} radius="md">
<Avatar radius="xl" size={24} color="gray">
?
</Avatar>
</ActionIcon>
);
}
@@ -65,29 +85,49 @@ export function UserMenu() {
return (
<Menu shadow="md" width={200} position="bottom-end">
<Menu.Target>
<UnstyledButton>
<Group gap="xs">
{showLabel ? (
<NavLink
label="Profile"
leftSection={
<Avatar
src={profile.avatar}
alt={displayText}
radius="xl"
size={20}
>
{initials}
</Avatar>
}
variant="filled"
color="blue"
styles={{
root: {
borderRadius: '8px',
fontWeight: 400,
},
}}
/>
) : (
<ActionIcon variant="subtle" color="gray" size={40} radius="md">
<Avatar
src={profile.avatar}
alt={displayText}
radius="xl"
size="md"
style={{ cursor: 'pointer' }}
size={24}
>
{initials}
</Avatar>
</Group>
</UnstyledButton>
</ActionIcon>
)}
</Menu.Target>
<Menu.Dropdown>
<Menu.Label>
<Text size="xs" fw={600}>
{displayText}
</Text>
<Text size="xs" c="dimmed">
{displayText}
<br />
<span style={{ color: 'var(--mantine-color-dimmed)', fontSize: '0.75rem' }}>
@{profile.handle}
</Text>
</span>
</Menu.Label>
<Menu.Divider />
<Menu.Item onClick={handleLogout} c="red">