Skip to content

refact: 更改验证逻辑,重构前端 - #3

Merged
Niapya merged 20 commits into
nuxtfrom
niapya/refact
Sep 11, 2026
Merged

Niapya merged 20 commits into
nuxtfrom
niapya/refact

Conversation

@Niapya

@Niapya Niapya commented Sep 11, 2026 •

Copy link
Copy Markdown
Member
  1. 我们增加了邮箱用户名的登录和注册,并添加了谷歌、GitHub 和 Cloudflare 的 OAuth 认证
  2. 我们正在重构 Chat 的前端部分

Summary by CodeRabbit

  • New Features
    • Added email/password registration, login, profile completion, email verification, and social account connections.
    • Added localized mobile navigation, updated branding, footer home link, and improved responsive header behavior.
    • Added chat session search, pagination, command palette, slash-command suggestions, message reactions, replies, attachments, and history loading.
    • Added pet status sidebar with hunger, affection, level, and cleanliness gauges.
    • Added customizable, persisted chat themes and expanded English and Chinese translations.
  • Bug Fixes
    • Improved Telegram account linking safeguards and session handling.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: e2ceb81d-99fb-4ab2-8adb-4216d0674928

📥 Commits

Reviewing files that changed from the base of the PR and between 7cfd911 and 058879c.

📒 Files selected for processing (2)
  • nuxt.config.ts
  • package.json
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 05b06541-5a4f-4ffb-bb63-bab70e549cab

📥 Commits

Reviewing files that changed from the base of the PR and between 1c70300 and 7cfd911.

⛔ Files ignored due to path filters (111)
  • bun.lock is excluded by !**/*.lock
  • public/assets/cloth/casual-slippers/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/casual-slippers/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/fuzzy-pajamas/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/fuzzy-pajamas/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/jk-uniform/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/jk-uniform/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/light-yukata/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/light-yukata/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/casual-slippers/emotional-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/casual-slippers/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/casual-slippers/front-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/casual-slippers/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/fuzzy-pajamas/emotional-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/fuzzy-pajamas/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/fuzzy-pajamas/front-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/fuzzy-pajamas/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/jk-uniform/emotional-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/jk-uniform/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/jk-uniform/front-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/jk-uniform/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/light-yukata/emotional-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/light-yukata/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/light-yukata/front-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/light-yukata/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/retro-knit-dress/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/white-hoodie/emotional-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/white-hoodie/front-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/winter-coat/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/no-bg/winter-coat/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/retro-knit-dress/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/white-hoodie/emotional-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/white-hoodie/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/white-hoodie/front-standing-v2.png is excluded by !**/*.png
  • public/assets/cloth/white-hoodie/front-standing.png is excluded by !**/*.png
  • public/assets/cloth/white-hoodie/three-quarter-standing.png is excluded by !**/*.png
  • public/assets/cloth/winter-coat/emotional-standing.png is excluded by !**/*.png
  • public/assets/cloth/winter-coat/front-standing.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-001-body1-hand-on-shoulder.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-002-body1-arms-crossed.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-010-body1-hand-near-face.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-011-body1-phone-to-ear-v2.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-011-body1-phone-to-ear.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-012-body1-side-profile-hand-on-back.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-013-body1-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-014-body1-seated-on-chair.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-015-body1-kneeling-turn-hand-raised.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-016-body1-standing-three-quarter-back-peace.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-017-body1-standing-wave-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-018-body1-standing-touch-collar-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-019-body1-standing-both-hands-chest.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-020-body1-standing-holding-hood-strings.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-021-body1-standing-raised-fist-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-022-body1-standing-holding-phone-near-face.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-023-body1-standing-hands-behind-head-arched.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-024-body1-standing-arms-crossed-side.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-026-body1-seated-cross-legged-hands-on-knee.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-027-body1-standing-dynamic-sweeping-arm.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-028-body1-crouching-seated-head-bowed.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-029-body1-holding-paper.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-03-body1-side-profile-hands-behind.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-030-body1-salute.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-031-body1-book-under-arm.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-04-body1-back-three-quarter.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-043-body2-hand-on-shoulder.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-05-body1-palm-up-gesture.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-057-body2-kneeling-turn-hand-raised.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-06-body1-raised-peace-sign.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-07-body1-back-three-quarter-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-08-body1-holding-paper.png is excluded by !**/*.png
  • public/assets/poses-no-bg/pose-09-body1-backpack-over-shoulder.png is excluded by !**/*.png
  • public/assets/poses/pose-001-body1-hand-on-shoulder.png is excluded by !**/*.png
  • public/assets/poses/pose-002-body1-arms-crossed.png is excluded by !**/*.png
  • public/assets/poses/pose-010-body1-hand-near-face.png is excluded by !**/*.png
  • public/assets/poses/pose-011-body1-phone-to-ear-v2.png is excluded by !**/*.png
  • public/assets/poses/pose-011-body1-phone-to-ear.png is excluded by !**/*.png
  • public/assets/poses/pose-012-body1-side-profile-hand-on-back.png is excluded by !**/*.png
  • public/assets/poses/pose-013-body1-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses/pose-014-body1-seated-on-chair.png is excluded by !**/*.png
  • public/assets/poses/pose-015-body1-kneeling-turn-hand-raised.png is excluded by !**/*.png
  • public/assets/poses/pose-016-body1-standing-three-quarter-back-peace.png is excluded by !**/*.png
  • public/assets/poses/pose-017-body1-standing-wave-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses/pose-018-body1-standing-touch-collar-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses/pose-019-body1-standing-both-hands-chest.png is excluded by !**/*.png
  • public/assets/poses/pose-020-body1-standing-holding-hood-strings.png is excluded by !**/*.png
  • public/assets/poses/pose-021-body1-standing-raised-fist-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses/pose-022-body1-standing-holding-phone-near-face.png is excluded by !**/*.png
  • public/assets/poses/pose-023-body1-standing-hands-behind-head-arched.png is excluded by !**/*.png
  • public/assets/poses/pose-024-body1-standing-arms-crossed-side.png is excluded by !**/*.png
  • public/assets/poses/pose-026-body1-seated-cross-legged-hands-on-knee.png is excluded by !**/*.png
  • public/assets/poses/pose-027-body1-standing-dynamic-sweeping-arm.png is excluded by !**/*.png
  • public/assets/poses/pose-028-body1-crouching-seated-head-bowed.png is excluded by !**/*.png
  • public/assets/poses/pose-029-body1-holding-paper.png is excluded by !**/*.png
  • public/assets/poses/pose-03-body1-side-profile-hands-behind.png is excluded by !**/*.png
  • public/assets/poses/pose-030-body1-salute.png is excluded by !**/*.png
  • public/assets/poses/pose-031-body1-book-under-arm.png is excluded by !**/*.png
  • public/assets/poses/pose-04-body1-back-three-quarter.png is excluded by !**/*.png
  • public/assets/poses/pose-043-body2-hand-on-shoulder.png is excluded by !**/*.png
  • public/assets/poses/pose-05-body1-palm-up-gesture.png is excluded by !**/*.png
  • public/assets/poses/pose-057-body2-kneeling-turn-hand-raised.png is excluded by !**/*.png
  • public/assets/poses/pose-06-body1-raised-peace-sign.png is excluded by !**/*.png
  • public/assets/poses/pose-07-body1-back-three-quarter-hand-on-hip.png is excluded by !**/*.png
  • public/assets/poses/pose-08-body1-holding-paper.png is excluded by !**/*.png
  • public/assets/poses/pose-09-body1-backpack-over-shoulder.png is excluded by !**/*.png
  • public/assets/site/navigation/about-luna-poster.png is excluded by !**/*.png
  • public/assets/site/navigation/explore-luna-poster-v2.png is excluded by !**/*.png
  • public/assets/site/navigation/explore-luna-poster-v3.png is excluded by !**/*.png
  • public/assets/site/navigation/explore-luna-poster.png is excluded by !**/*.png
  • public/assets/site/navigation/nav-poster-1.png is excluded by !**/*.png
  • public/assets/site/navigation/nav-poster-2.png is excluded by !**/*.png
  • public/favicon.ico is excluded by !**/*.ico
📒 Files selected for processing (109)
  • .env.example
  • .gitignore
  • .nuxtrc
  • AGENTS.md
  • README.md
  • app/assets/css/main.css
  • app/composables/useCursor.ts
  • app/composables/useSound.ts
  • layers/00.site/app/app.config.ts
  • layers/00.site/app/components/site/layout/AppLogo.vue
  • layers/00.site/app/components/site/layout/Footer.vue
  • layers/00.site/app/components/site/layout/Header.vue
  • layers/00.site/app/components/site/layout/MobileNavigationTabs.vue
  • layers/00.site/app/utils/navigation.ts
  • layers/00.site/i18n/locales/en-US.json
  • layers/00.site/i18n/locales/zh-CN.json
  • layers/00.site/nuxt.config.ts
  • layers/01.auth/app/auth.config.ts
  • layers/01.auth/app/components/auth/LoginPanel.vue
  • layers/01.auth/app/components/auth/ProfileCompletionPanel.vue
  • layers/01.auth/app/components/auth/RegistrationPanel.vue
  • layers/01.auth/app/components/auth/UserAccountConnections.vue
  • layers/01.auth/app/components/auth/UserPlatformConnections.vue
  • layers/01.auth/app/middleware/auth.ts
  • layers/01.auth/app/middleware/profile-completion.global.ts
  • layers/01.auth/app/pages/complete-profile.vue
  • layers/01.auth/app/pages/login.vue
  • layers/01.auth/app/pages/register.vue
  • layers/01.auth/app/pages/user.vue
  • layers/01.auth/app/utils/auth.ts
  • layers/01.auth/nuxt-better-auth.d.ts
  • layers/01.auth/nuxt.config.ts
  • layers/01.auth/server/api/account/auth-providers.get.ts
  • layers/01.auth/server/api/account/complete-profile.post.ts
  • layers/01.auth/server/api/account/platforms.get.ts
  • layers/01.auth/server/api/auth/[...all].ts
  • layers/01.auth/server/auth.config.ts
  • layers/01.auth/server/storage/kv.ts
  • layers/01.auth/server/utils/auth-base-url.ts
  • layers/01.auth/server/utils/auth-oauth.ts
  • layers/01.auth/server/utils/auth-telegram.ts
  • layers/01.auth/server/utils/auth.ts
  • layers/01.auth/server/utils/email.ts
  • layers/01.auth/server/utils/telegram-platform.ts
  • layers/01.auth/shared/schema/credentials.ts
  • layers/01.auth/shared/schema/profile.ts
  • layers/01.auth/shared/types/oauth.ts
  • layers/01.auth/shared/utils/username.ts
  • layers/01.auth/tests/auth-base-url.test.ts
  • layers/01.auth/tests/auth-telegram.test.ts
  • layers/01.auth/types/forms.ts
  • layers/06.chat/app/components/ChatCommandPalette.vue
  • layers/06.chat/app/components/ChatComposer.vue
  • layers/06.chat/app/components/ChatContentPanel.vue
  • layers/06.chat/app/components/ChatDashboardShell.vue
  • layers/06.chat/app/components/ChatLeftSidebar.vue
  • layers/06.chat/app/components/ChatMessageItem.vue
  • layers/06.chat/app/components/ChatMessageList.vue
  • layers/06.chat/app/components/ChatPetGauge.vue
  • layers/06.chat/app/components/ChatPetSidebar.vue
  • layers/06.chat/app/components/ChatPetViewport.vue
  • layers/06.chat/app/components/ChatPromptSlashMenu.vue
  • layers/06.chat/app/components/ChatSessionList.vue
  • layers/06.chat/app/components/ChatSessionsPanel.vue
  • layers/06.chat/app/components/ChatSidebarSearch.vue
  • layers/06.chat/app/components/ChatWorkspace.vue
  • layers/06.chat/app/composables/useChatNavigation.ts
  • layers/06.chat/app/composables/useChatShell.ts
  • layers/06.chat/app/composables/useChatTheme.ts
  • layers/06.chat/app/layouts/chat.vue
  • layers/06.chat/app/pages/chat/index.vue
  • layers/06.chat/app/pages/chat/memory.vue
  • layers/06.chat/app/pages/chat/pet.vue
  • layers/06.chat/app/pages/chat/plugins.vue
  • layers/06.chat/app/pages/chat/settings.vue
  • layers/06.chat/app/utils/chat-theme.ts
  • layers/06.chat/server/api/chat/sessions.get.ts
  • layers/06.chat/server/api/chat/sessions/[sessionId]/messages.get.ts
  • layers/06.chat/server/chat/auth.ts
  • layers/06.chat/server/chat/cursor.ts
  • layers/06.chat/server/chat/operations.ts
  • layers/06.chat/server/chat/projection.ts
  • layers/06.chat/shared/schema/input.ts
  • layers/06.chat/shared/types/chat.ts
  • layers/06.chat/tests/chat-cursor.test.ts
  • layers/06.chat/tests/chat-projection.test.ts
  • layers/06.chat/tests/chat-theme.test.ts
  • layers/06.chat/types/chat.ts
  • layers/07.bot/nuxt.config.ts
  • nuxt.config.ts
  • package.json
  • scripts/auth-generate.ts
  • server/db/migrations/sqlite/0002_shallow_argent.sql
  • server/db/migrations/sqlite/meta/0002_snapshot.json
  • server/db/migrations/sqlite/meta/_journal.json
  • server/db/schema/auth.gen.ts
  • server/db/schema/chat.ts
  • server/db/schema/columns.ts
  • server/db/schema/events.ts
  • server/db/schema/participants.ts
  • server/db/schema/platform-users.ts
  • server/db/schema/relations.ts
  • server/db/schema/sessions.ts
  • server/do/chat.ts
  • server/worker.ts
  • shared/types/cloudflare.d.ts
  • shared/types/worker-configuration.d.ts
  • skills-lock.json
  • wrangler.jsonc
💤 Files with no reviewable changes (12)
  • layers/01.auth/app/utils/auth.ts
  • scripts/auth-generate.ts
  • layers/00.site/nuxt.config.ts
  • layers/01.auth/app/middleware/auth.ts
  • layers/01.auth/server/api/auth/[...all].ts
  • layers/06.chat/app/components/ChatSessionsPanel.vue
  • layers/01.auth/server/storage/kv.ts
  • layers/07.bot/nuxt.config.ts
  • server/db/schema/auth.gen.ts
  • layers/06.chat/app/components/ChatContentPanel.vue
  • app/assets/css/main.css
  • layers/01.auth/server/utils/auth.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

This change migrates authentication to Nuxt Better Auth, adds profile and account flows, restructures chat pagination and UI, splits database schemas, updates site navigation, and configures Cloudflare Durable Objects.

Changes

Platform rollout

Layer / File(s) Summary
Site shell and project configuration
.env.example, AGENTS.md, README.md, app/..., layers/00.site/..., .nuxtrc, .gitignore
Updates local configuration, documentation, theme colors, cursor and sound behavior, navigation layout, responsive mobile navigation, and English and Chinese localization.
Database schema split and migration
server/db/migrations/..., server/db/schema/...
Adds chat event, session, participant, and platform-user tables with relations and indexes. Adds authentication username columns and migration metadata.
Better Auth server foundation
layers/01.auth/nuxt.config.ts, layers/01.auth/server/..., layers/01.auth/shared/..., layers/01.auth/tests/...
Configures Better Auth with email, OAuth, Telegram, username, verification-email, database-session, and account-linking behavior. Adds account APIs, validation contracts, Telegram claiming, and base-URL tests.
Auth pages and account UI
layers/01.auth/app/...
Adds login, registration, profile completion, account linking, platform connections, user-session handling, and global profile-completion routing.
Chat pagination contracts and APIs
layers/06.chat/server/..., layers/06.chat/shared/..., layers/06.chat/tests/...
Adds cursor encoding and validation, paginated session and message endpoints, sequence-aware projections, shared page types, and cursor tests.
Chat shell and workspace refactor
layers/06.chat/app/..., layers/06.chat/types/chat.ts
Adds shared chat state, theme persistence, dashboard sidebars, command palette, slash commands, virtualized messages, pet panels, responsive pages, and animated composer behavior.
Cloudflare runtime and deployment wiring
nuxt.config.ts, server/do/..., server/worker.ts, shared/types/..., package.json, wrangler.jsonc, skills-lock.json
Configures the Durable Object runtime, worker exports, Cloudflare bindings and generated types, development scripts, dependencies, skills, and compatibility metadata.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant LoginPanel
  participant BetterAuth
  participant ProfileAPI
  participant Database
  User->>LoginPanel: submit credentials or OAuth provider
  LoginPanel->>BetterAuth: signIn or signUp
  BetterAuth->>Database: persist account and session
  BetterAuth-->>LoginPanel: return authentication state
  LoginPanel->>ProfileAPI: complete profile
  ProfileAPI->>Database: update username and display name
  ProfileAPI-->>LoginPanel: return completion status
Loading
sequenceDiagram
  participant ChatWorkspace
  participant ChatMessageList
  participant SessionsAPI
  participant MessagesAPI
  participant ChatOperations
  ChatWorkspace->>SessionsAPI: request sessions with cursor
  SessionsAPI->>ChatOperations: listChatSessionsPage
  ChatOperations-->>SessionsAPI: return sessions and next cursor
  ChatWorkspace->>MessagesAPI: request messages with before cursor
  MessagesAPI->>ChatOperations: loadChatMessagesPage
  ChatOperations-->>MessagesAPI: return messages and next cursor
  MessagesAPI-->>ChatMessageList: render paginated messages
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Niapya
Niapya merged commit ba1727b into nuxt Sep 11, 2026
2 checks passed
Niapya added a commit that referenced this pull request Sep 14, 2026
* refact:  更改验证逻辑,重构前端 (#3)

* Hero组件优化设计

* 首页优化

* 首页显示优化

* 首页修改

* 首页重构

---------

Co-authored-by: Niapya <hackhtu@proton.me>
Co-authored-by: 奇量 <13633911+kuga123@user.noreply.gitee.com>
@Niapya
Niapya deleted the niapya/refact branch September 15, 2026 02:17
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