Skip to content

refactor(auth): replace dashboard sessions with stateless tokens and session control - #6329

Merged
Calcium-Ion merged 5 commits into
mainfrom
refactor/dashboard-stateless-auth
Jul 20, 2026
Merged

refactor(auth): replace dashboard sessions with stateless tokens and session control#6329
Calcium-Ion merged 5 commits into
mainfrom
refactor/dashboard-stateless-auth

Conversation

@Calcium-Ion

@Calcium-Ion Calcium-Ion commented Jul 20, 2026

Copy link
Copy Markdown
Member

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

本次重构将面板鉴权从 Gin Session 迁移为短期 Access JWT、HttpOnly Refresh Cookie 和数据库登录会话控制面:

  • Refresh Token 仅以 HMAC 摘要存储并在刷新时轮换;user_sessions 作为会话状态权威来源,支持查看登录设备、撤销单个会话和撤销其他会话。
  • OAuth、2FA、Passkey、Telegram 等一次性状态迁移至 auth_flows,敏感操作使用与用户、会话和用途绑定的 Security Proof。
  • 前端统一处理冷启动刷新、并发刷新、跨标签页同步、可靠登出和鉴权轮换,不再持久化 Access Token,也不再依赖 New-Api-User
  • 增加账户级活跃 Session 上限、签发窗口限制、过期数据分批清理和异常签发告警,避免单个账户持续膨胀 Session 表。
  • Redis Session 数据改为跟随 SYNC_FREQUENCY 的短期缓存。共享 Redis 可即时传播撤销;独立 Redis 节点会在缓存到期后回源数据库收敛。
  • 增加可信代理配置,并使用原子 Lua 固定窗口实现 Redis 限流,避免伪造代理请求头及并发计数绕过。

升级后旧面板 Session 会失效,用户需要重新登录。反向代理部署需要配置 TRUSTED_PROXIES。本次未修改 relay CORS 行为。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

  • 暂无

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 IssuesPRs,确认不是重复提交。
  • Bug fix 说明: 本 PR 未标记为 Bug fix
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

$ go test ./...
所有 Go package 测试通过

$ cd web/default
$ bun test src/lib/server-error-message.test.ts
2 pass
0 fail

$ git diff --check origin/main...HEAD
无输出,检查通过

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * Added login-session management (list, refresh/logout, revoke single/other/current) with active/issuance limit enforcement.
  * Introduced one-time `flow_token` flows for OAuth, 2FA, passkeys, and Telegram binding, plus scoped security-proof verification for sensitive actions.
  * Improved cookie refresh security with Origin protection and configurable trusted proxy handling.
  * Enhanced streaming reliability (generation-based stale-event prevention) and cross-tab auth synchronization.
* **Documentation**
  * Expanded environment/multi-machine guidance (trusted proxies, cookie security, session limits) and updated OpenAPI specs for new endpoints, `flow_token`, and auth-session error codes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Too many files!

This PR contains 1152 files, which is 852 over the limit of 300.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 27d9d9e6-b1ff-4a76-83de-678a4c0c0f3f

📥 Commits

Reviewing files that changed from the base of the PR and between 99fa20c and 9b60513.

⛔ Files ignored due to path filters (18)
  • go.sum is excluded by !**/*.sum
  • web/bun.lock is excluded by !**/*.lock
  • web/classic/public/azure_model_name.png is excluded by !**/*.png
  • web/classic/public/ratio.png is excluded by !**/*.png
  • web/default/public/favicon.ico is excluded by !**/*.ico
  • web/default/public/logo.png is excluded by !**/*.png
  • web/default/public/pay-apple.png is excluded by !**/*.png
  • web/default/public/pay-card.png is excluded by !**/*.png
  • web/default/public/pay-google.png is excluded by !**/*.png
  • web/default/public/waffo-logo-dark.svg is excluded by !**/*.svg
  • web/default/public/waffo-logo-light.svg is excluded by !**/*.svg
  • web/public/favicon.ico is excluded by !**/*.ico
  • web/public/logo.png is excluded by !**/*.png
  • web/public/pay-apple.png is excluded by !**/*.png
  • web/public/pay-card.png is excluded by !**/*.png
  • web/public/pay-google.png is excluded by !**/*.png
  • web/public/waffo-logo-dark.svg is excluded by !**/*.svg
  • web/public/waffo-logo-light.svg is excluded by !**/*.svg
📒 Files selected for processing (1587)
  • .agents/skills/classic-to-default-sync/SKILL.md
  • .agents/skills/i18n-translate/SKILL.md
  • .agents/skills/shadcn-ui/SKILL.md
  • .dockerignore
  • .env.example
  • .github/workflows/electron-build.yml
  • .github/workflows/release.yml
  • .gitignore
  • AGENTS.md
  • Dockerfile
  • Dockerfile.dev
  • README.en.md
  • README.fr.md
  • README.ja.md
  • README.md
  • README.zh_CN.md
  • README.zh_TW.md
  • THIRD-PARTY-LICENSES.md
  • common/constants.go
  • common/embed-file-system.go
  • common/init.go
  • common/session_cookie.go
  • common/sys_log.go
  • common/url_validator_test.go
  • common/user_session_test.go
  • controller/audit.go
  • controller/auth_flow_test.go
  • controller/auth_session.go
  • controller/auth_session_test.go
  • controller/console_migrate.go
  • controller/log.go
  • controller/misc.go
  • controller/model_list_test.go
  • controller/oauth.go
  • controller/option.go
  • controller/passkey.go
  • controller/passkey_test.go
  • controller/return_path.go
  • controller/return_path_test.go
  • controller/secure_verification.go
  • controller/subscription_payment_epay.go
  • controller/subscription_payment_stripe.go
  • controller/telegram.go
  • controller/telegram_test.go
  • controller/theme_compat_test.go
  • controller/topup.go
  • controller/topup_stripe.go
  • controller/topup_waffo.go
  • controller/twofa.go
  • controller/user.go
  • controller/user_manage_test.go
  • controller/wechat.go
  • docker-compose.dev.yml
  • docker-compose.yml
  • docs/authentication.md
  • docs/openapi/api.json
  • docs/openapi/relay.json
  • electron/README.md
  • electron/build.sh
  • electron/main.js
  • electron/package.json
  • go.mod
  • main.go
  • makefile
  • middleware/audit.go
  • middleware/auth.go
  • middleware/auth_origin.go
  • middleware/auth_origin_test.go
  • middleware/auth_test.go
  • middleware/email-verification-rate-limit.go
  • middleware/header_nav_test.go
  • middleware/model-rate-limit.go
  • middleware/model_rate_limit_test.go
  • middleware/rate-limit.go
  • middleware/rate_limit_test.go
  • middleware/secure_verification.go
  • middleware/turnstile-check.go
  • model/auth_flow.go
  • model/auth_flow_test.go
  • model/errors.go
  • model/external_identity_claim.go
  • model/external_identity_claim_test.go
  • model/frontend_option_migration.go
  • model/frontend_option_migration_test.go
  • model/log.go
  • model/main.go
  • model/option.go
  • model/passkey.go
  • model/subscription.go
  • model/subscription_auth_test.go
  • model/task_cas_test.go
  • model/twofa.go
  • model/user.go
  • model/user_auth_cache.go
  • model/user_authentication_test.go
  • model/user_cache.go
  • model/user_cache_auth_version_test.go
  • model/user_session.go
  • model/user_session_migration_test.go
  • model/user_session_test.go
  • router/api-router.go
  • router/main.go
  • router/retired_frontend_routes_test.go
  • router/web-router.go
  • service/auth_cleanup.go
  • service/auth_session.go
  • service/auth_session_test.go
  • service/auth_token.go
  • service/auth_token_test.go
  • service/passkey/service.go
  • service/passkey/session.go
  • service/quota.go
  • service/return_path.go
  • service/return_path_test.go
  • setting/system_setting/theme.go
  • trusted_proxies.go
  • trusted_proxies_test.go
  • web/.gitignore
  • web/.node-version
  • web/.npmrc
  • web/.oxfmtrc.json
  • web/.oxlintrc.json
  • web/AGENTS.md
  • web/classic/.eslintrc.cjs
  • web/classic/.gitignore
  • web/classic/.prettierrc.mjs
  • web/classic/i18next.config.js
  • web/classic/index.html
  • web/classic/jsconfig.json
  • web/classic/package.json
  • web/classic/postcss.config.js
  • web/classic/public/cover-4.webp
  • web/classic/public/robots.txt
  • web/classic/rsbuild.config.ts
  • web/classic/src/App.jsx
  • web/classic/src/components/auth/LoginForm.jsx
  • web/classic/src/components/auth/OAuth2Callback.jsx
  • web/classic/src/components/auth/PasswordResetConfirm.jsx
  • web/classic/src/components/auth/PasswordResetForm.jsx
  • web/classic/src/components/auth/RegisterForm.jsx
  • web/classic/src/components/auth/TwoFAVerification.jsx
  • web/classic/src/components/common/DocumentRenderer/index.jsx
  • web/classic/src/components/common/ErrorBoundary.jsx
  • web/classic/src/components/common/examples/ChannelKeyViewExample.jsx
  • web/classic/src/components/common/logo/LinuxDoIcon.jsx
  • web/classic/src/components/common/logo/OIDCIcon.jsx
  • web/classic/src/components/common/logo/WeChatIcon.jsx
  • web/classic/src/components/common/markdown/MarkdownRenderer.jsx
  • web/classic/src/components/common/markdown/markdown.css
  • web/classic/src/components/common/modals/RiskAcknowledgementModal.jsx
  • web/classic/src/components/common/modals/SecureVerificationModal.jsx
  • web/classic/src/components/common/modals/TwoFactorAuthModal.jsx
  • web/classic/src/components/common/ui/CardPro.jsx
  • web/classic/src/components/common/ui/CardTable.jsx
  • web/classic/src/components/common/ui/ChannelKeyDisplay.jsx
  • web/classic/src/components/common/ui/CompactModeToggle.jsx
  • web/classic/src/components/common/ui/JSONEditor.jsx
  • web/classic/src/components/common/ui/Loading.jsx
  • web/classic/src/components/common/ui/RenderUtils.jsx
  • web/classic/src/components/common/ui/ScrollableContainer.jsx
  • web/classic/src/components/common/ui/SelectableButtonGroup.jsx
  • web/classic/src/components/dashboard/AnnouncementsPanel.jsx
  • web/classic/src/components/dashboard/ApiInfoPanel.jsx
  • web/classic/src/components/dashboard/ChartsPanel.jsx
  • web/classic/src/components/dashboard/DashboardHeader.jsx
  • web/classic/src/components/dashboard/FaqPanel.jsx
  • web/classic/src/components/dashboard/StatsCards.jsx
  • web/classic/src/components/dashboard/UptimePanel.jsx
  • web/classic/src/components/dashboard/index.jsx
  • web/classic/src/components/dashboard/modals/SearchModal.jsx
  • web/classic/src/components/layout/ClassicFrontendDeprecationBanner.jsx
  • web/classic/src/components/layout/Footer.jsx
  • web/classic/src/components/layout/NoticeModal.jsx
  • web/classic/src/components/layout/PageLayout.jsx
  • web/classic/src/components/layout/SetupCheck.js
  • web/classic/src/components/layout/SiderBar.jsx
  • web/classic/src/components/layout/components/SkeletonWrapper.jsx
  • web/classic/src/components/layout/headerbar/ActionButtons.jsx
  • web/classic/src/components/layout/headerbar/HeaderLogo.jsx
  • web/classic/src/components/layout/headerbar/LanguageSelector.jsx
  • web/classic/src/components/layout/headerbar/MobileMenuButton.jsx
  • web/classic/src/components/layout/headerbar/Navigation.jsx
  • web/classic/src/components/layout/headerbar/NewYearButton.jsx
  • web/classic/src/components/layout/headerbar/NotificationButton.jsx
  • web/classic/src/components/layout/headerbar/ThemeToggle.jsx
  • web/classic/src/components/layout/headerbar/UserArea.jsx
  • web/classic/src/components/layout/headerbar/index.jsx
  • web/classic/src/components/model-deployments/DeploymentAccessGuard.jsx
  • web/classic/src/components/playground/ChatArea.jsx
  • web/classic/src/components/playground/CodeViewer.jsx
  • web/classic/src/components/playground/ConfigManager.jsx
  • web/classic/src/components/playground/CustomInputRender.jsx
  • web/classic/src/components/playground/CustomRequestEditor.jsx
  • web/classic/src/components/playground/DebugPanel.jsx
  • web/classic/src/components/playground/FloatingButtons.jsx
  • web/classic/src/components/playground/ImageUrlInput.jsx
  • web/classic/src/components/playground/MessageActions.jsx
  • web/classic/src/components/playground/MessageContent.jsx
  • web/classic/src/components/playground/OptimizedComponents.js
  • web/classic/src/components/playground/ParameterControl.jsx
  • web/classic/src/components/playground/SSEViewer.jsx
  • web/classic/src/components/playground/SettingsPanel.jsx
  • web/classic/src/components/playground/ThinkingContent.jsx
  • web/classic/src/components/playground/configStorage.js
  • web/classic/src/components/playground/index.js
  • web/classic/src/components/settings/ChannelSelectorModal.jsx
  • web/classic/src/components/settings/ChatsSetting.jsx
  • web/classic/src/components/settings/CustomOAuthSetting.jsx
  • web/classic/src/components/settings/DashboardSetting.jsx
  • web/classic/src/components/settings/DrawingSetting.jsx
  • web/classic/src/components/settings/HttpStatusCodeRulesInput.jsx
  • web/classic/src/components/settings/ModelDeploymentSetting.jsx
  • web/classic/src/components/settings/ModelSetting.jsx
  • web/classic/src/components/settings/OperationSetting.jsx
  • web/classic/src/components/settings/OtherSetting.jsx
  • web/classic/src/components/settings/PaymentSetting.jsx
  • web/classic/src/components/settings/PerformanceSetting.jsx
  • web/classic/src/components/settings/PersonalSetting.jsx
  • web/classic/src/components/settings/RateLimitSetting.jsx
  • web/classic/src/components/settings/RatioSetting.jsx
  • web/classic/src/components/settings/SystemSetting.jsx
  • web/classic/src/components/settings/personal/cards/AccountManagement.jsx
  • web/classic/src/components/settings/personal/cards/CheckinCalendar.jsx
  • web/classic/src/components/settings/personal/cards/ModelsList.jsx
  • web/classic/src/components/settings/personal/cards/NotificationSettings.jsx
  • web/classic/src/components/settings/personal/cards/PreferencesSettings.jsx
  • web/classic/src/components/settings/personal/components/TwoFASetting.jsx
  • web/classic/src/components/settings/personal/components/UserInfoHeader.jsx
  • web/classic/src/components/settings/personal/modals/AccountDeleteModal.jsx
  • web/classic/src/components/settings/personal/modals/ChangePasswordModal.jsx
  • web/classic/src/components/settings/personal/modals/EmailBindModal.jsx
  • web/classic/src/components/settings/personal/modals/WeChatBindModal.jsx
  • web/classic/src/components/setup/SetupWizard.jsx
  • web/classic/src/components/setup/components/StepNavigation.jsx
  • web/classic/src/components/setup/components/steps/AdminStep.jsx
  • web/classic/src/components/setup/components/steps/CompleteStep.jsx
  • web/classic/src/components/setup/components/steps/DatabaseStep.jsx
  • web/classic/src/components/setup/components/steps/UsageModeStep.jsx
  • web/classic/src/components/setup/index.jsx
  • web/classic/src/components/table/channels/ChannelsActions.jsx
  • web/classic/src/components/table/channels/ChannelsColumnDefs.jsx
  • web/classic/src/components/table/channels/ChannelsFilters.jsx
  • web/classic/src/components/table/channels/ChannelsTable.jsx
  • web/classic/src/components/table/channels/ChannelsTabs.jsx
  • web/classic/src/components/table/channels/index.jsx
  • web/classic/src/components/table/channels/modals/BatchTagModal.jsx
  • web/classic/src/components/table/channels/modals/ChannelUpstreamUpdateModal.jsx
  • web/classic/src/components/table/channels/modals/CodexUsageModal.jsx
  • web/classic/src/components/table/channels/modals/ColumnSelectorModal.jsx
  • web/classic/src/components/table/channels/modals/EditChannelModal.jsx
  • web/classic/src/components/table/channels/modals/EditTagModal.jsx
  • web/classic/src/components/table/channels/modals/ModelSelectModal.jsx
  • web/classic/src/components/table/channels/modals/ModelTestModal.jsx
  • web/classic/src/components/table/channels/modals/MultiKeyManageModal.jsx
  • web/classic/src/components/table/channels/modals/OllamaModelModal.jsx
  • web/classic/src/components/table/channels/modals/ParamOverrideEditorModal.jsx
  • web/classic/src/components/table/channels/modals/SingleModelSelectModal.jsx
  • web/classic/src/components/table/channels/modals/StatusCodeRiskGuardModal.jsx
  • web/classic/src/components/table/channels/modals/statusCodeRiskGuard.js
  • web/classic/src/components/table/mj-logs/MjLogsActions.jsx
  • web/classic/src/components/table/mj-logs/MjLogsColumnDefs.jsx
  • web/classic/src/components/table/mj-logs/MjLogsFilters.jsx
  • web/classic/src/components/table/mj-logs/MjLogsTable.jsx
  • web/classic/src/components/table/mj-logs/index.jsx
  • web/classic/src/components/table/mj-logs/modals/ColumnSelectorModal.jsx
  • web/classic/src/components/table/mj-logs/modals/ContentModal.jsx
  • web/classic/src/components/table/model-deployments/DeploymentsActions.jsx
  • web/classic/src/components/table/model-deployments/DeploymentsColumnDefs.jsx
  • web/classic/src/components/table/model-deployments/DeploymentsFilters.jsx
  • web/classic/src/components/table/model-deployments/DeploymentsTable.jsx
  • web/classic/src/components/table/model-deployments/index.jsx
  • web/classic/src/components/table/model-deployments/modals/ColumnSelectorModal.jsx
  • web/classic/src/components/table/model-deployments/modals/ConfirmationDialog.jsx
  • web/classic/src/components/table/model-deployments/modals/CreateDeploymentModal.jsx
  • web/classic/src/components/table/model-deployments/modals/EditDeploymentModal.jsx
  • web/classic/src/components/table/model-deployments/modals/ExtendDurationModal.jsx
  • web/classic/src/components/table/model-deployments/modals/UpdateConfigModal.jsx
  • web/classic/src/components/table/model-deployments/modals/ViewDetailsModal.jsx
  • web/classic/src/components/table/model-deployments/modals/ViewLogsModal.jsx
  • web/classic/src/components/table/model-pricing/filter/PricingDisplaySettings.jsx
  • web/classic/src/components/table/model-pricing/filter/PricingEndpointTypes.jsx
  • web/classic/src/components/table/model-pricing/filter/PricingGroups.jsx
  • web/classic/src/components/table/model-pricing/filter/PricingQuotaTypes.jsx
  • web/classic/src/components/table/model-pricing/filter/PricingTags.jsx
  • web/classic/src/components/table/model-pricing/filter/PricingVendors.jsx
  • web/classic/src/components/table/model-pricing/layout/PricingPage.jsx
  • web/classic/src/components/table/model-pricing/layout/PricingSidebar.jsx
  • web/classic/src/components/table/model-pricing/layout/content/PricingContent.jsx
  • web/classic/src/components/table/model-pricing/layout/content/PricingView.jsx
  • web/classic/src/components/table/model-pricing/layout/header/PricingTopSection.jsx
  • web/classic/src/components/table/model-pricing/layout/header/PricingVendorIntro.jsx
  • web/classic/src/components/table/model-pricing/layout/header/PricingVendorIntroSkeleton.jsx
  • web/classic/src/components/table/model-pricing/layout/header/PricingVendorIntroWithSkeleton.jsx
  • web/classic/src/components/table/model-pricing/layout/header/SearchActions.jsx
  • web/classic/src/components/table/model-pricing/modal/ModelDetailSideSheet.jsx
  • web/classic/src/components/table/model-pricing/modal/PricingFilterModal.jsx
  • web/classic/src/components/table/model-pricing/modal/components/DynamicPricingBreakdown.jsx
  • web/classic/src/components/table/model-pricing/modal/components/FilterModalContent.jsx
  • web/classic/src/components/table/model-pricing/modal/components/FilterModalFooter.jsx
  • web/classic/src/components/table/model-pricing/modal/components/ModelBasicInfo.jsx
  • web/classic/src/components/table/model-pricing/modal/components/ModelEndpoints.jsx
  • web/classic/src/components/table/model-pricing/modal/components/ModelHeader.jsx
  • web/classic/src/components/table/model-pricing/modal/components/ModelPricingTable.jsx
  • web/classic/src/components/table/model-pricing/view/card/PricingCardSkeleton.jsx
  • web/classic/src/components/table/model-pricing/view/card/PricingCardView.jsx
  • web/classic/src/components/table/model-pricing/view/table/PricingTable.jsx
  • web/classic/src/components/table/model-pricing/view/table/PricingTableColumns.jsx
  • web/classic/src/components/table/models/ModelsActions.jsx
  • web/classic/src/components/table/models/ModelsColumnDefs.jsx
  • web/classic/src/components/table/models/ModelsDescription.jsx
  • web/classic/src/components/table/models/ModelsFilters.jsx
  • web/classic/src/components/table/models/ModelsTable.jsx
  • web/classic/src/components/table/models/ModelsTabs.jsx
  • web/classic/src/components/table/models/components/SelectionNotification.jsx
  • web/classic/src/components/table/models/index.jsx
  • web/classic/src/components/table/models/modals/EditModelModal.jsx
  • web/classic/src/components/table/models/modals/EditPrefillGroupModal.jsx
  • web/classic/src/components/table/models/modals/EditVendorModal.jsx
  • web/classic/src/components/table/models/modals/MissingModelsModal.jsx
  • web/classic/src/components/table/models/modals/PrefillGroupManagement.jsx
  • web/classic/src/components/table/models/modals/SyncWizardModal.jsx
  • web/classic/src/components/table/models/modals/UpstreamConflictModal.jsx
  • web/classic/src/components/table/redemptions/RedemptionsActions.jsx
  • web/classic/src/components/table/redemptions/RedemptionsColumnDefs.jsx
  • web/classic/src/components/table/redemptions/RedemptionsDescription.jsx
  • web/classic/src/components/table/redemptions/RedemptionsFilters.jsx
  • web/classic/src/components/table/redemptions/RedemptionsTable.jsx
  • web/classic/src/components/table/redemptions/index.jsx
  • web/classic/src/components/table/redemptions/modals/DeleteRedemptionModal.jsx
  • web/classic/src/components/table/redemptions/modals/EditRedemptionModal.jsx
  • web/classic/src/components/table/subscriptions/SubscriptionsActions.jsx
  • web/classic/src/components/table/subscriptions/SubscriptionsColumnDefs.jsx
  • web/classic/src/components/table/subscriptions/SubscriptionsDescription.jsx
  • web/classic/src/components/table/subscriptions/SubscriptionsTable.jsx
  • web/classic/src/components/table/subscriptions/index.jsx
  • web/classic/src/components/table/subscriptions/modals/AddEditSubscriptionModal.jsx
  • web/classic/src/components/table/task-logs/TaskLogsActions.jsx
  • web/classic/src/components/table/task-logs/TaskLogsColumnDefs.jsx
  • web/classic/src/components/table/task-logs/TaskLogsFilters.jsx
  • web/classic/src/components/table/task-logs/TaskLogsTable.jsx
  • web/classic/src/components/table/task-logs/index.jsx
  • web/classic/src/components/table/task-logs/modals/AudioPreviewModal.jsx
  • web/classic/src/components/table/task-logs/modals/ColumnSelectorModal.jsx
  • web/classic/src/components/table/task-logs/modals/ContentModal.jsx
  • web/classic/src/components/table/tokens/TokensActions.jsx
  • web/classic/src/components/table/tokens/TokensColumnDefs.jsx
  • web/classic/src/components/table/tokens/TokensDescription.jsx
  • web/classic/src/components/table/tokens/TokensFilters.jsx
  • web/classic/src/components/table/tokens/TokensTable.jsx
  • web/classic/src/components/table/tokens/index.jsx
  • web/classic/src/components/table/tokens/modals/CCSwitchModal.jsx
  • web/classic/src/components/table/tokens/modals/CopyTokensModal.jsx
  • web/classic/src/components/table/tokens/modals/DeleteTokensModal.jsx
  • web/classic/src/components/table/tokens/modals/EditTokenModal.jsx
  • web/classic/src/components/table/usage-logs/UsageLogsActions.jsx
  • web/classic/src/components/table/usage-logs/UsageLogsColumnDefs.jsx
  • web/classic/src/components/table/usage-logs/UsageLogsFilters.jsx
  • web/classic/src/components/table/usage-logs/UsageLogsTable.jsx
  • web/classic/src/components/table/usage-logs/components/ParamOverrideEntry.jsx
  • web/classic/src/components/table/usage-logs/index.jsx
  • web/classic/src/components/table/usage-logs/modals/ChannelAffinityUsageCacheModal.jsx
  • web/classic/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx
  • web/classic/src/components/table/usage-logs/modals/ParamOverrideModal.jsx
  • web/classic/src/components/table/usage-logs/modals/UserInfoModal.jsx
  • web/classic/src/components/table/users/UsersActions.jsx
  • web/classic/src/components/table/users/UsersColumnDefs.jsx
  • web/classic/src/components/table/users/UsersDescription.jsx
  • web/classic/src/components/table/users/UsersFilters.jsx
  • web/classic/src/components/table/users/UsersTable.jsx
  • web/classic/src/components/table/users/index.jsx
  • web/classic/src/components/table/users/modals/AddUserModal.jsx
  • web/classic/src/components/table/users/modals/DeleteUserModal.jsx
  • web/classic/src/components/table/users/modals/DemoteUserModal.jsx
  • web/classic/src/components/table/users/modals/EditUserModal.jsx
  • web/classic/src/components/table/users/modals/EnableDisableUserModal.jsx
  • web/classic/src/components/table/users/modals/PromoteUserModal.jsx
  • web/classic/src/components/table/users/modals/ResetPasskeyModal.jsx
  • web/classic/src/components/table/users/modals/ResetTwoFAModal.jsx
  • web/classic/src/components/table/users/modals/UserBindingManagementModal.jsx
  • web/classic/src/components/table/users/modals/UserSubscriptionsModal.jsx
  • web/classic/src/components/topup/InvitationCard.jsx
  • web/classic/src/components/topup/RechargeCard.jsx
  • web/classic/src/components/topup/SubscriptionPlansCard.jsx
  • web/classic/src/components/topup/index.jsx
  • web/classic/src/components/topup/modals/PaymentConfirmModal.jsx
  • web/classic/src/components/topup/modals/SubscriptionPurchaseModal.jsx
  • web/classic/src/components/topup/modals/TopupHistoryModal.jsx
  • web/classic/src/components/topup/modals/TransferModal.jsx
  • web/classic/src/constants/billing.constants.js
  • web/classic/src/constants/channel-affinity-template.constants.js
  • web/classic/src/constants/channel.constants.js
  • web/classic/src/constants/common.constant.js
  • web/classic/src/constants/console.constants.js
  • web/classic/src/constants/dashboard.constants.js
  • web/classic/src/constants/index.js
  • web/classic/src/constants/playground.constants.js
  • web/classic/src/constants/redemption.constants.js
  • web/classic/src/constants/toast.constants.js
  • web/classic/src/constants/user.constants.js
  • web/classic/src/context/Status/index.jsx
  • web/classic/src/context/Status/reducer.js
  • web/classic/src/context/Theme/index.jsx
  • web/classic/src/context/User/index.jsx
  • web/classic/src/context/User/reducer.js
  • web/classic/src/contexts/PlaygroundContext.jsx
  • web/classic/src/helpers/api.js
  • web/classic/src/helpers/auth.jsx
  • web/classic/src/helpers/base64.js
  • web/classic/src/helpers/boolean.js
  • web/classic/src/helpers/dashboard.jsx
  • web/classic/src/helpers/data.js
  • web/classic/src/helpers/frontendTheme.js
  • web/classic/src/helpers/history.js
  • web/classic/src/helpers/index.js
  • web/classic/src/helpers/passkey.js
  • web/classic/src/helpers/quota.js
  • web/classic/src/helpers/render.jsx
  • web/classic/src/helpers/secureApiCall.js
  • web/classic/src/helpers/statusCodeRules.js
  • web/classic/src/helpers/subscriptionFormat.js
  • web/classic/src/helpers/token.js
  • web/classic/src/helpers/utils.jsx
  • web/classic/src/hooks/channels/upstreamUpdateUtils.js
  • web/classic/src/hooks/channels/useChannelUpstreamUpdates.jsx
  • web/classic/src/hooks/channels/useChannelsData.jsx
  • web/classic/src/hooks/chat/useTokenKeys.js
  • web/classic/src/hooks/common/useContainerWidth.js
  • web/classic/src/hooks/common/useHeaderBar.js
  • web/classic/src/hooks/common/useIsMobile.js
  • web/classic/src/hooks/common/useMinimumLoadingTime.js
  • web/classic/src/hooks/common/useNavigation.js
  • web/classic/src/hooks/common/useNotifications.js
  • web/classic/src/hooks/common/useSecureVerification.jsx
  • web/classic/src/hooks/common/useSidebar.js
  • web/classic/src/hooks/common/useSidebarCollapsed.js
  • web/classic/src/hooks/common/useTableCompactMode.js
  • web/classic/src/hooks/common/useUserPermissions.js
  • web/classic/src/hooks/dashboard/useDashboardCharts.jsx
  • web/classic/src/hooks/dashboard/useDashboardData.js
  • web/classic/src/hooks/dashboard/useDashboardStats.jsx
  • web/classic/src/hooks/mj-logs/useMjLogsData.js
  • web/classic/src/hooks/model-deployments/useDeploymentResources.js
  • web/classic/src/hooks/model-deployments/useDeploymentsData.jsx
  • web/classic/src/hooks/model-deployments/useEnhancedDeploymentActions.jsx
  • web/classic/src/hooks/model-deployments/useModelDeploymentSettings.js
  • web/classic/src/hooks/model-pricing/useModelPricingData.jsx
  • web/classic/src/hooks/model-pricing/usePricingFilterCounts.js
  • web/classic/src/hooks/models/useModelsData.jsx
  • web/classic/src/hooks/playground/useApiRequest.jsx
  • web/classic/src/hooks/playground/useDataLoader.js
  • web/classic/src/hooks/playground/useMessageActions.jsx
  • web/classic/src/hooks/playground/useMessageEdit.jsx
  • web/classic/src/hooks/playground/usePlaygroundState.js
  • web/classic/src/hooks/playground/useSyncMessageAndCustomBody.js
  • web/classic/src/hooks/redemptions/useRedemptionsData.jsx
  • web/classic/src/hooks/subscriptions/useSubscriptionsData.jsx
  • web/classic/src/hooks/task-logs/useTaskLogsData.js
  • web/classic/src/hooks/tokens/useTokensData.jsx
  • web/classic/src/hooks/usage-logs/useUsageLogsData.jsx
  • web/classic/src/hooks/users/useUsersData.jsx
  • web/classic/src/i18n/i18n.js
  • web/classic/src/i18n/language.js
  • web/classic/src/i18n/locales/en.json
  • web/classic/src/i18n/locales/fr.json
  • web/classic/src/i18n/locales/ja.json
  • web/classic/src/i18n/locales/ru.json
  • web/classic/src/i18n/locales/vi.json
  • web/classic/src/i18n/locales/zh-CN.json
  • web/classic/src/i18n/locales/zh-TW.json
  • web/classic/src/i18n/locales/zh.json
  • web/classic/src/index.css
  • web/classic/src/index.jsx
  • web/classic/src/pages/About/index.jsx
  • web/classic/src/pages/Channel/index.jsx
  • web/classic/src/pages/Chat/index.jsx
  • web/classic/src/pages/Chat2Link/index.jsx
  • web/classic/src/pages/Dashboard/index.jsx
  • web/classic/src/pages/Forbidden/index.jsx
  • web/classic/src/pages/Home/index.jsx
  • web/classic/src/pages/Log/index.jsx
  • web/classic/src/pages/Midjourney/index.jsx
  • web/classic/src/pages/Model/index.jsx
  • web/classic/src/pages/ModelDeployment/index.jsx
  • web/classic/src/pages/NotFound/index.jsx
  • web/classic/src/pages/Playground/index.jsx
  • web/classic/src/pages/Pricing/index.jsx
  • web/classic/src/pages/PrivacyPolicy/index.jsx
  • web/classic/src/pages/Redemption/index.jsx
  • web/classic/src/pages/Setting/Chat/SettingsChats.jsx
  • web/classic/src/pages/Setting/Dashboard/SettingsAPIInfo.jsx
  • web/classic/src/pages/Setting/Dashboard/SettingsAnnouncements.jsx
  • web/classic/src/pages/Setting/Dashboard/SettingsDataDashboard.jsx
  • web/classic/src/pages/Setting/Dashboard/SettingsFAQ.jsx
  • web/classic/src/pages/Setting/Dashboard/SettingsUptimeKuma.jsx
  • web/classic/src/pages/Setting/Drawing/SettingsDrawing.jsx
  • web/classic/src/pages/Setting/Model/SettingClaudeModel.jsx
  • web/classic/src/pages/Setting/Model/SettingGeminiModel.jsx
  • web/classic/src/pages/Setting/Model/SettingGlobalModel.jsx
  • web/classic/src/pages/Setting/Model/SettingGrokModel.jsx
  • web/classic/src/pages/Setting/Model/SettingModelDeployment.jsx
  • web/classic/src/pages/Setting/Operation/SettingsChannelAffinity.jsx
  • web/classic/src/pages/Setting/Operation/SettingsCheckin.jsx
  • web/classic/src/pages/Setting/Operation/SettingsCreditLimit.jsx
  • web/classic/src/pages/Setting/Operation/SettingsGeneral.jsx
  • web/classic/src/pages/Setting/Operation/SettingsHeaderNavModules.jsx
  • web/classic/src/pages/Setting/Operation/SettingsLog.jsx
  • web/classic/src/pages/Setting/Operation/SettingsMonitoring.jsx
  • web/classic/src/pages/Setting/Operation/SettingsSensitiveWords.jsx
  • web/classic/src/pages/Setting/Operation/SettingsSidebarModulesAdmin.jsx
  • web/classic/src/pages/Setting/Payment/SettingsGeneralPayment.jsx
  • web/classic/src/pages/Setting/Payment/SettingsPaymentGateway.jsx
  • web/classic/src/pages/Setting/Payment/SettingsPaymentGatewayCreem.jsx
  • web/classic/src/pages/Setting/Payment/SettingsPaymentGatewayStripe.jsx
  • web/classic/src/pages/Setting/Payment/SettingsPaymentGatewayWaffo.jsx
  • web/classic/src/pages/Setting/Payment/SettingsPaymentGatewayWaffoPancake.jsx
  • web/classic/src/pages/Setting/Performance/SettingsPerformance.jsx
  • web/classic/src/pages/Setting/Personal/SettingsSidebarModulesUser.jsx
  • web/classic/src/pages/Setting/RateLimit/SettingsRequestRateLimit.jsx
  • web/classic/src/pages/Setting/Ratio/GroupRatioSettings.jsx
  • web/classic/src/pages/Setting/Ratio/ModelPricingCombined.jsx
  • web/classic/src/pages/Setting/Ratio/ModelRatioSettings.jsx
  • web/classic/src/pages/Setting/Ratio/ModelRationNotSetEditor.jsx
  • web/classic/src/pages/Setting/Ratio/ModelSettingsVisualEditor.jsx
  • web/classic/src/pages/Setting/Ratio/ToolPriceSettings.jsx
  • web/classic/src/pages/Setting/Ratio/UpstreamRatioSync.jsx
  • web/classic/src/pages/Setting/Ratio/components/AutoGroupList.jsx
  • web/classic/src/pages/Setting/Ratio/components/GroupGroupRatioRules.jsx
  • web/classic/src/pages/Setting/Ratio/components/GroupSpecialUsableRules.jsx
  • web/classic/src/pages/Setting/Ratio/components/GroupTable.jsx
  • web/classic/src/pages/Setting/Ratio/components/ModelPricingEditor.jsx
  • web/classic/src/pages/Setting/Ratio/components/TieredPricingEditor.jsx
  • web/classic/src/pages/Setting/Ratio/components/requestRuleExpr.js
  • web/classic/src/pages/Setting/Ratio/hooks/useModelPricingEditorState.js
  • web/classic/src/pages/Setting/index.jsx
  • web/classic/src/pages/Setup/index.jsx
  • web/classic/src/pages/Subscription/index.jsx
  • web/classic/src/pages/Task/index.jsx
  • web/classic/src/pages/Token/index.jsx
  • web/classic/src/pages/TopUp/index.js
  • web/classic/src/pages/User/index.jsx
  • web/classic/src/pages/UserAgreement/index.jsx
  • web/classic/src/services/secureVerification.js
  • web/classic/tailwind.config.js
  • web/classic/vercel.json
  • web/components.json
  • web/cz.yaml
  • web/default/package.json
  • web/default/src/components/truncated-text.tsx
  • web/default/src/components/ui/dropdown-menu-events.ts
  • web/default/src/features/auth/passkey/hooks/use-passkey-management.ts
  • web/default/src/features/playground/hooks/use-stream-request.ts
  • web/default/src/features/profile/components/dialogs/telegram-bind-dialog.tsx
  • web/default/src/features/profile/components/dialogs/wechat-bind-dialog.tsx
  • web/default/src/lib/api.ts
  • web/default/src/routes/_authenticated/route.tsx
  • web/default/src/routes/oauth/$provider.tsx
  • web/default/src/stores/auth-store.ts
  • web/index.html
  • web/knip.config.ts
  • web/netlify.toml
  • web/package.json
  • web/rsbuild.config.ts
  • web/scripts/add-copyright.mjs
  • web/scripts/format-with-protected-headers.mjs
  • web/scripts/sync-i18n.mjs
  • web/src/assets/brand-icons/icon-discord.tsx
  • web/src/assets/brand-icons/icon-docker.tsx
  • web/src/assets/brand-icons/icon-facebook.tsx
  • web/src/assets/brand-icons/icon-figma.tsx
  • web/src/assets/brand-icons/icon-github.tsx
  • web/src/assets/brand-icons/icon-gitlab.tsx
  • web/src/assets/brand-icons/icon-gmail.tsx
  • web/src/assets/brand-icons/icon-linuxdo.tsx
  • web/src/assets/brand-icons/icon-medium.tsx
  • web/src/assets/brand-icons/icon-notion.tsx
  • web/src/assets/brand-icons/icon-skype.tsx
  • web/src/assets/brand-icons/icon-slack.tsx
  • web/src/assets/brand-icons/icon-stripe.tsx
  • web/src/assets/brand-icons/icon-telegram.tsx
  • web/src/assets/brand-icons/icon-trello.tsx
  • web/src/assets/brand-icons/icon-wechat.tsx
  • web/src/assets/brand-icons/icon-whatsapp.tsx
  • web/src/assets/brand-icons/icon-zoom.tsx
  • web/src/assets/brand-icons/index.ts
  • web/src/assets/clerk-full-logo.tsx
  • web/src/assets/clerk-logo.tsx
  • web/src/assets/custom/icon-dir.tsx
  • web/src/assets/custom/icon-layout-compact.tsx
  • web/src/assets/custom/icon-layout-default.tsx
  • web/src/assets/custom/icon-layout-full.tsx
  • web/src/assets/custom/icon-sidebar-floating.tsx
  • web/src/assets/custom/icon-sidebar-inset.tsx
  • web/src/assets/custom/icon-sidebar-sidebar.tsx
  • web/src/assets/custom/icon-theme-dark.tsx
  • web/src/assets/custom/icon-theme-light.tsx
  • web/src/assets/custom/icon-theme-system.tsx
  • web/src/assets/logo.tsx
  • web/src/components/ai-elements/actions.tsx
  • web/src/components/ai-elements/artifact.tsx
  • web/src/components/ai-elements/branch.tsx
  • web/src/components/ai-elements/canvas.tsx
  • web/src/components/ai-elements/chain-of-thought.tsx
  • web/src/components/ai-elements/code-block.tsx
  • web/src/components/ai-elements/confirmation.tsx
  • web/src/components/ai-elements/connection.tsx
  • web/src/components/ai-elements/context.tsx
  • web/src/components/ai-elements/controls.tsx
  • web/src/components/ai-elements/conversation.tsx
  • web/src/components/ai-elements/edge.tsx
  • web/src/components/ai-elements/image.tsx
  • web/src/components/ai-elements/inline-citation.tsx
  • web/src/components/ai-elements/loader.tsx
  • web/src/components/ai-elements/message.tsx
  • web/src/components/ai-elements/node.tsx
  • web/src/components/ai-elements/open-in-chat.tsx
  • web/src/components/ai-elements/panel.tsx
  • web/src/components/ai-elements/plan.tsx
  • web/src/components/ai-elements/prompt-input.tsx
  • web/src/components/ai-elements/queue.tsx
  • web/src/components/ai-elements/reasoning.tsx
  • web/src/components/ai-elements/response-content.ts
  • web/src/components/ai-elements/response-node-guards.ts
  • web/src/components/ai-elements/response-renderer-alert.tsx
  • web/src/components/ai-elements/response-renderer-blocks.tsx
  • web/src/components/ai-elements/response-renderer-details.tsx
  • web/src/components/ai-elements/response-renderer-footnotes.tsx
  • web/src/components/ai-elements/response-renderer-image.tsx
  • web/src/components/ai-elements/response-renderer-inline.tsx
  • web/src/components/ai-elements/response-renderer-table.tsx
  • web/src/components/ai-elements/response-renderer.tsx
  • web/src/components/ai-elements/response-types.ts
  • web/src/components/ai-elements/response.tsx
  • web/src/components/ai-elements/shimmer.tsx
  • web/src/components/ai-elements/sources.tsx
  • web/src/components/ai-elements/suggestion.tsx
  • web/src/components/ai-elements/task.tsx
  • web/src/components/ai-elements/tool.tsx
  • web/src/components/ai-elements/toolbar.tsx
  • web/src/components/ai-elements/web-preview.tsx
  • web/src/components/animate-in-view.tsx
  • web/src/components/auto-skeleton.tsx
  • web/src/components/coming-soon.tsx
  • web/src/components/command-menu.tsx
  • web/src/components/config-drawer.tsx
  • web/src/components/confirm-dialog.tsx
  • web/src/components/copy-button.tsx
  • web/src/components/data-table/README.md
  • web/src/components/data-table/core/badge-cell.tsx
  • web/src/components/data-table/core/badge-list-cell.tsx
  • web/src/components/data-table/core/column-header.tsx
  • web/src/components/data-table/core/column-pinning.ts
  • web/src/components/data-table/core/content-sized-columns.ts
  • web/src/components/data-table/core/data-table-colgroup.tsx
  • web/src/components/data-table/core/data-table-header.tsx
  • web/src/components/data-table/core/data-table-row.tsx
  • web/src/components/data-table/core/data-table-view.tsx
  • web/src/components/data-table/core/pagination.tsx
  • web/src/components/data-table/core/row-action-menu.tsx
  • web/src/components/data-table/core/table-empty.tsx
  • web/src/components/data-table/core/table-sizing.ts
  • web/src/components/data-table/core/table-skeleton.tsx
  • web/src/components/data-table/core/truncated-cell.tsx
  • web/src/components/data-table/core/types.ts
  • web/src/components/data-table/hooks/use-data-table-view-mode.ts
  • web/src/components/data-table/hooks/use-data-table.ts
  • web/src/components/data-table/hooks/use-debounced-column-filter.ts
  • web/src/components/data-table/index.ts
  • web/src/components/data-table/layout/card-cell-utils.ts
  • web/src/components/data-table/layout/card-grid.tsx
  • web/src/components/data-table/layout/card-row-content.tsx
  • web/src/components/data-table/layout/data-table-page.tsx
  • web/src/components/data-table/layout/mobile-card-list.tsx
  • web/src/components/data-table/static/static-data-table-classnames.ts
  • web/src/components/data-table/static/static-data-table.tsx
  • web/src/components/data-table/static/static-row-actions.tsx
  • web/src/components/data-table/toolbar/bulk-actions.tsx
  • web/src/components/data-table/toolbar/faceted-filter.tsx
  • web/src/components/data-table/toolbar/toolbar.tsx
  • web/src/components/data-table/toolbar/view-mode-toggle.tsx
  • web/src/components/data-table/toolbar/view-options.tsx
  • web/src/components/date-picker.tsx
  • web/src/components/datetime-picker.tsx
  • web/src/components/dialog.tsx
  • web/src/components/drawer-layout.ts
  • web/src/components/empty-state.tsx
  • web/src/components/error-state.tsx
  • web/src/components/group-badge.tsx
  • web/src/components/html-content.tsx
  • web/src/components/json-code-editor.tsx
  • web/src/components/json-editor.tsx
  • web/src/components/language-switcher.tsx
  • web/src/components/layout/components/app-header.tsx
  • web/src/components/layout/components/app-sidebar.tsx
  • web/src/components/layout/components/authenticated-layout.tsx
  • web/src/components/layout/components/chat-presets-item.tsx
  • web/src/components/layout/components/footer.tsx
  • web/src/components/layout/components/glow.tsx
  • web/src/components/layout/components/header-logo.tsx
  • web/src/components/layout/components/header.tsx
  • web/src/components/layout/components/logo.tsx
  • web/src/components/layout/components/main.tsx
  • web/src/components/layout/components/mobile-drawer.tsx
  • web/src/components/layout/components/mockup.tsx
  • web/src/components/layout/components/nav-group.tsx
  • web/src/components/layout/components/nav-link-item.tsx
  • web/src/components/layout/components/navbar.tsx
  • web/src/components/layout/components/page-footer.tsx
  • web/src/components/layout/components/public-header.tsx
  • web/src/components/layout/components/public-layout.tsx
  • web/src/components/layout/components/public-navigation.tsx
  • web/src/components/layout/components/section-page-layout.tsx
  • web/src/components/layout/components/section.tsx
  • web/src/components/layout/components/sidebar-view-header.tsx
  • web/src/components/layout/components/system-brand.tsx
  • web/src/components/layout/components/top-nav.tsx
  • web/src/components/layout/config/system-settings.config.ts
  • web/src/components/layout/config/top-nav.config.ts
  • web/src/components/layout/constants.ts
  • web/src/components/layout/index.ts
  • web/src/components/layout/lib/sidebar-view-registry.ts
  • web/src/components/layout/lib/url-utils.ts
  • web/src/components/layout/types.ts
  • web/src/components/learn-more.tsx
  • web/src/components/loading-state.tsx
  • web/src/components/long-text.tsx
  • web/src/components/masked-value-display.tsx
  • web/src/components/model-group-selector-layout.ts
  • web/src/components/model-group-selector.tsx
  • web/src/components/multi-select.tsx
  • web/src/components/navigation-progress.tsx
  • web/src/components/notification-popover.tsx
  • web/src/components/page-transition.tsx
  • web/src/components/password-input.tsx
  • web/src/components/profile-dropdown.tsx
  • web/src/components/provider-badge.tsx
  • web/src/components/react-icon-by-name.tsx
  • web/src/components/rich-content.tsx
  • web/src/components/risk-acknowledgement-dialog.tsx
  • web/src/components/search.tsx
  • web/src/components/sign-out-dialog.tsx
  • web/src/components/skip-to-main.tsx
  • web/src/components/status-badge.tsx
  • web/src/components/table-id.tsx
  • web/src/components/tag-input.tsx
  • web/src/components/theme-quick-switcher.tsx
  • web/src/components/theme-switch.tsx
  • web/src/components/truncated-text.tsx
  • web/src/components/turnstile.tsx
  • web/src/components/ui/accordion.tsx
  • web/src/components/ui/alert-dialog.tsx
  • web/src/components/ui/alert.tsx
  • web/src/components/ui/aspect-ratio.tsx
  • web/src/components/ui/avatar.tsx
  • web/src/components/ui/badge.tsx
  • web/src/components/ui/breadcrumb.tsx
  • web/src/components/ui/button-group.tsx
  • web/src/components/ui/button.tsx
  • web/src/components/ui/calendar.tsx
  • web/src/components/ui/card.tsx
  • web/src/components/ui/carousel.tsx
  • web/src/components/ui/chart.tsx
  • web/src/components/ui/checkbox.tsx
  • web/src/components/ui/collapsible.tsx
  • web/src/components/ui/combobox-input.tsx
  • web/src/components/ui/combobox.tsx
  • web/src/components/ui/command.tsx
  • web/src/components/ui/context-menu.tsx
  • web/src/components/ui/dialog.tsx
  • web/src/components/ui/direction.tsx
  • web/src/components/ui/drawer.tsx
  • web/src/components/ui/dropdown-menu-events.ts
  • web/src/components/ui/dropdown-menu.test.tsx
  • web/src/components/ui/dropdown-menu.tsx
  • web/src/components/ui/empty.tsx
  • web/src/components/ui/field.tsx
  • web/src/components/ui/form.tsx
  • web/src/components/ui/hover-card.tsx
  • web/src/components/ui/icon-badge.tsx
  • web/src/components/ui/input-group.tsx
  • web/src/components/ui/input-otp.tsx
  • web/src/components/ui/input.tsx
  • web/src/components/ui/item.tsx
  • web/src/components/ui/kbd.tsx
  • web/src/components/ui/label.tsx
  • web/src/components/ui/markdown.tsx
  • web/src/components/ui/menubar.tsx
  • web/src/components/ui/native-select.tsx
  • web/src/components/ui/navigation-menu.tsx
  • web/src/components/ui/pagination.tsx
  • web/src/components/ui/popover.tsx
  • web/src/components/ui/progress.tsx
  • web/src/components/ui/radio-group.tsx
  • web/src/components/ui/resizable.tsx
  • web/src/components/ui/scroll-area.tsx
  • web/src/components/ui/select.tsx
  • web/src/components/ui/separator.tsx
  • web/src/components/ui/sheet.tsx
  • web/src/components/ui/sidebar.tsx
  • web/src/components/ui/skeleton.tsx
  • web/src/components/ui/slider.tsx
  • web/src/components/ui/sonner.tsx
  • web/src/components/ui/spinner.tsx
  • web/src/components/ui/switch.tsx
  • web/src/components/ui/table.tsx
  • web/src/components/ui/tabs.tsx
  • web/src/components/ui/textarea.tsx
  • web/src/components/ui/titled-card.tsx
  • web/src/components/ui/toggle-group.tsx
  • web/src/components/ui/toggle.tsx
  • web/src/components/ui/tooltip.tsx
  • web/src/config/fonts.ts
  • web/src/context/direction-provider.tsx
  • web/src/context/font-provider.tsx
  • web/src/context/layout-provider.tsx
  • web/src/context/search-provider.tsx
  • web/src/context/theme-customization-provider.tsx
  • web/src/context/theme-provider.tsx
  • web/src/env.d.ts
  • web/src/features/about/api.ts
  • web/src/features/about/index.tsx
  • web/src/features/about/types.ts
  • web/src/features/auth/api.test.ts
  • web/src/features/auth/api.ts
  • web/src/features/auth/auth-layout.tsx
  • web/src/features/auth/components/legal-consent.tsx
  • web/src/features/auth/components/oauth-callback-screen.tsx
  • web/src/features/auth/components/oauth-providers.tsx
  • web/src/features/auth/components/telegram-login-dialog.tsx
  • web/src/features/auth/components/terms-footer.tsx
  • web/src/features/auth/constants.ts
  • web/src/features/auth/forgot-password/components/forgot-password-form.tsx
  • web/src/features/auth/forgot-password/index.tsx
  • web/src/features/auth/hooks/use-auth-redirect.ts
  • web/src/features/auth/hooks/use-email-verification.ts
  • web/src/features/auth/hooks/use-oauth-login.ts
  • web/src/features/auth/hooks/use-turnstile.ts
  • web/src/features/auth/index.ts
  • web/src/features/auth/lib/auth-redirect.test.ts
  • web/src/features/auth/lib/auth-redirect.ts
  • web/src/features/auth/lib/oauth-bind-window.test.ts
  • web/src/features/auth/lib/oauth-bind-window.ts
  • web/src/features/auth/lib/oauth.ts
  • web/src/features/auth/lib/storage.ts
  • web/src/features/auth/lib/telegram-login.test.ts
  • web/src/features/auth/lib/telegram-login.ts
  • web/src/features/auth/lib/validation.ts
  • web/src/features/auth/otp/components/otp-form.tsx
  • web/src/features/auth/otp/index.tsx
  • web/src/features/auth/passkey/api.ts
  • web/src/features/auth/passkey/hooks/use-passkey-management.ts
  • web/src/features/auth/passkey/index.ts
  • web/src/features/auth/passkey/types.ts
  • web/src/features/auth/reset-password-confirm/index.tsx
  • web/src/features/auth/secure-verification/api.ts
  • web/src/features/auth/secure-verification/components/secure-verification-dialog.tsx
  • web/src/features/auth/secure-verification/hooks/use-secure-verification.ts
  • web/src/features/auth/secure-verification/index.ts
  • web/src/features/auth/secure-verification/types.ts
  • web/src/features/auth/sign-in/components/user-auth-form.tsx
  • web/src/features/auth/sign-in/index.tsx
  • web/src/features/auth/sign-up/components/sign-up-form.tsx
  • web/src/features/auth/sign-up/index.tsx
  • web/src/features/auth/types.ts
  • web/src/features/channels/api.ts
  • web/src/features/channels/components/channel-card.tsx
  • web/src/features/channels/components/channel-row-actions-context.ts
  • web/src/features/channels/components/channels-columns.tsx
  • web/src/features/channels/components/channels-dialogs.tsx
  • web/src/features/channels/components/channels-primary-buttons.tsx
  • web/src/features/channels/components/channels-provider.tsx
  • web/src/features/channels/components/channels-table.tsx
  • web/src/features/channels/components/data-table-bulk-actions.tsx
  • web/src/features/channels/components/data-table-row-actions.tsx
  • web/src/features/channels/components/data-table-tag-row-actions.tsx
  • web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx
  • web/src/features/channels/components/dialogs/balance-query-dialog.tsx
  • web/src/features/channels/components/dialogs/channel-test-dialog.tsx
  • web/src/features/channels/components/dialogs/codex-usage-dialog.tsx
  • web/src/features/channels/components/dialogs/copy-channel-dialog.tsx
  • web/src/features/channels/components/dialogs/edit-tag-dialog.tsx
  • web/src/features/channels/components/dialogs/fetch-models-dialog.tsx
  • web/src/features/channels/components/dialogs/missing-models-confirmation-dialog.tsx
  • web/src/features/channels/components/dialogs/multi-key-manage-dialog.tsx
  • web/src/features/channels/components/dialogs/multi-key-statistics-card.tsx
  • web/src/features/channels/components/dialogs/multi-key-table-row-actions.tsx
  • web/src/features/channels/components/dialogs/ollama-models-dialog.tsx
  • web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx
  • web/src/features/channels/components/dialogs/status-code-risk-dialog.tsx
  • web/src/features/channels/components/dialogs/tag-batch-edit-dialog.tsx
  • web/src/features/channels/components/dialogs/upstream-update-dialog.tsx
  • web/src/features/channels/components/drawers/channel-mutate-drawer.tsx
  • web/src/features/channels/components/drawers/sections/channel-advanced-section.tsx
  • web/src/features/channels/components/drawers/sections/channel-api-access-section.tsx
  • web/src/features/channels/components/drawers/sections/channel-auth-section.tsx
  • web/src/features/channels/components/drawers/sections/channel-basic-section.tsx
  • web/src/features/channels/components/drawers/sections/channel-editor-loading-state.tsx
  • web/src/features/channels/components/drawers/sections/channel-models-section.tsx
  • web/src/features/channels/components/drawers/sections/index.ts
  • web/src/features/channels/components/model-mapping-editor.tsx
  • web/src/features/channels/components/numeric-spinner-input.tsx
  • web/src/features/channels/constants.ts
  • web/src/features/channels/hooks/use-channel-mutate-form.ts
  • web/src/features/channels/hooks/use-channel-upstream-updates.ts
  • web/src/features/channels/index.tsx
  • web/src/features/channels/lib/advanced-custom.ts
  • web/src/features/channels/lib/channel-actions.ts
  • web/src/features/channels/lib/channel-form-errors.ts
  • web/src/features/channels/lib/channel-form.ts
  • web/src/features/channels/lib/channel-type-config.ts
  • web/src/features/channels/lib/channel-utils.ts
  • web/src/features/channels/lib/index.ts
  • web/src/features/channels/lib/model-mapping-validation.ts
  • web/src/features/channels/lib/multi-key-utils.ts
  • web/src/features/channels/lib/ollama-utils.ts
  • web/src/features/channels/lib/status-code-risk-guard.ts
  • web/src/features/channels/lib/upstream-update-utils.ts
  • web/src/features/channels/types.ts
  • web/src/features/chat/hooks/use-active-chat-key.ts
  • web/src/features/chat/hooks/use-chat-presets.ts
  • web/src/features/chat/lib/chat-links.ts
  • web/src/features/chat/lib/send-to-fluent.ts
  • web/src/features/dashboard/api.ts
  • web/src/features/dashboard/components/flow/flow-charts.tsx
  • web/src/features/dashboard/components/flow/flow-node-filter.tsx
  • web/src/features/dashboard/components/models/consumption-distribution-chart.tsx
  • web/src/features/dashboard/components/models/log-stat-cards.tsx
  • web/src/features/dashboard/components/models/model-charts.tsx
  • web/src/features/dashboard/components/models/models-chart-preferences.tsx
  • web/src/features/dashboard/components/models/models-filter-dialog.tsx
  • web/src/features/dashboard/components/models/performance-overview.tsx
  • web/src/features/dashboard/components/overview/announcement-detail-dialog.tsx
  • web/src/features/dashboard/components/overview/announcements-panel.tsx
  • web/src/features/dashboard/components/overview/api-info-item.tsx
  • web/src/features/dashboard/components/overview/api-info-panel.tsx
  • web/src/features/dashboard/components/overview/faq-panel.tsx
  • web/src/features/dashboard/components/overview/overview-dashboard.tsx
  • web/src/features/dashboard/components/overview/performance-health-panel.tsx
  • web/src/features/dashboard/components/overview/summary-cards.tsx
  • web/src/features/dashboard/components/overview/uptime-panel.tsx
  • web/src/features/dashboard/components/ui/panel-wrapper.tsx
  • web/src/features/dashboard/components/ui/stat-card.tsx
  • web/src/features/dashboard/components/users/user-charts.tsx
  • web/src/features/dashboard/constants.ts
  • web/src/features/dashboard/hooks/use-dashboard-config.tsx
  • web/src/features/dashboard/hooks/use-status-data.ts
  • web/src/features/dashboard/index.tsx
  • web/src/features/dashboard/lib/api-info.ts
  • web/src/features/dashboard/lib/charts.ts
  • web/src/features/dashboard/lib/filters.ts
  • web/src/features/dashboard/lib/flow-selection.test.ts
  • web/src/features/dashboard/lib/flow-selection.ts
  • web/src/features/dashboard/lib/flow.test.ts
  • web/src/features/dashboard/lib/flow.ts
  • web/src/features/dashboard/lib/index.ts
  • web/src/features/dashboard/lib/stats.ts
  • web/src/features/dashboard/lib/text.ts
  • web/src/features/dashboard/section-registry.tsx
  • web/src/features/dashboard/types.ts
  • web/src/features/errors/forbidden.tsx
  • web/src/features/errors/general-error.tsx
  • web/src/features/errors/maintenance-error.tsx
  • web/src/features/errors/not-found-error.tsx
  • web/src/features/errors/unauthorized-error.tsx
  • web/src/features/home/api.ts
  • web/src/features/home/components/connection-line.tsx
  • web/src/features/home/components/feature-item.tsx
  • web/src/features/home/components/gateway-card.tsx
  • web/src/features/home/components/hero-buttons.tsx
  • web/src/features/home/components/hero-terminal-demo.tsx
  • web/src/features/home/components/icon-card.tsx
  • web/src/features/home/components/index.ts
  • web/src/features/home/components/scrolling-icons.tsx
  • web/src/features/home/components/sections/cta.tsx
  • web/src/features/home/components/sections/features.tsx
  • web/src/features/home/components/sections/hero.tsx
  • web/src/features/home/components/sections/how-it-works.tsx
  • web/src/features/home/components/sections/stats.tsx
  • web/src/features/home/components/stat-item.tsx
  • web/src/features/home/constants.ts
  • web/src/features/home/hooks/index.ts
  • web/src/features/home/hooks/use-home-page-content.ts
  • web/src/features/home/index.tsx
  • web/src/features/home/lib/icon-mapper.tsx
  • web/src/features/home/types.ts
  • web/src/features/keys/api.ts
  • web/src/features/keys/components/api-key-group-combobox.tsx
  • web/src/features/keys/components/api-key-timestamp-cell.tsx
  • web/src/features/keys/components/api-keys-cells.tsx
  • web/src/features/keys/components/api-keys-columns.tsx
  • web/src/features/keys/components/api-keys-delete-dialog.tsx
  • web/src/features/keys/components/api-keys-dialogs.tsx
  • web/src/features/keys/components/api-keys-multi-delete-dialog.tsx
  • web/src/features/keys/components/api-keys-mutate-drawer.tsx
  • web/src/features/keys/components/api-keys-primary-buttons.tsx
  • web/src/features/keys/components/api-keys-provider.tsx
  • web/src/features/keys/components/api-keys-table.tsx
  • web/src/features/keys/components/data-table-bulk-actions.tsx
  • web/src/features/keys/components/data-table-row-actions.tsx
  • web/src/features/keys/components/dialogs/cc-switch-dialog.tsx
  • web/src/features/keys/constants.ts
  • web/src/features/keys/index.tsx
  • web/src/features/keys/lib/api-key-form.ts
  • web/src/features/keys/lib/index.ts
  • web/src/features/keys/types.ts
  • web/src/features/legal/api.ts
  • web/src/features/legal/index.ts
  • web/src/features/legal/legal-document.tsx
  • web/src/features/legal/privacy-policy.tsx
  • web/src/features/legal/types.ts
  • web/src/features/legal/user-agreement.tsx
  • web/src/features/models/api.ts
  • web/src/features/models/components/data-table-bulk-actions.tsx
  • web/src/features/models/components/data-table-row-actions.tsx
  • web/src/features/models/components/deployment-access-guard.tsx
  • web/src/features/models/components/deployments-columns.tsx
  • web/src/features/models/components/deployments-table.tsx
  • web/src/features/models/components/description-cell.tsx
  • web/src/features/models/components/dialogs/create-deployment-drawer.tsx
  • web/src/features/models/components/dialogs/description-dialog.tsx
  • web/src/features/models/components/dialogs/extend-deployment-dialog.tsx
  • web/src/features/models/components/dialogs/missing-models-dialog.tsx
  • web/src/features/models/components/dialogs/prefill-group-management-dialog.tsx
  • web/src/features/models/components/dialogs/prefill-group-management.tsx
  • web/src/features/models/components/dialogs/rename-deployment-dialog.tsx
  • web/src/features/models/components/dialogs/sync-wizard-dialog.tsx
  • web/src/features/models/components/dialogs/update-config-dialog.tsx
  • web/src/features/models/components/dialogs/upstream-conflict-dialog.tsx
  • web/src/features/models/components/dialogs/vendor-mutate-dialog.tsx
  • web/src/features/models/components/dialogs/view-details-dialog.tsx
  • web/src/features/models/components/dialogs/view-logs-dialog.tsx
  • web/src/features/models/components/drawers/model-mutate-drawer.tsx
  • web/src/features/models/components/drawers/prefill-group-form-drawer.tsx
  • web/src/features/models/components/models-columns.tsx
  • web/src/features/models/components/models-dialogs.tsx
  • web/src/features/models/components/models-primary-buttons.tsx
  • web/src/features/models/components/models-provider.tsx
  • web/src/features/models/components/models-table.tsx
  • web/src/features/models/components/prefill-group-shared.ts
  • web/src/features/models/constants.ts
  • web/src/features/models/hooks/use-model-deployment-settings.ts
  • web/src/features/models/index.tsx
  • web/src/features/models/lib/deployments-utils.ts
  • web/src/features/models/lib/index.ts
  • web/src/features/models/lib/model-actions.ts
  • web/src/features/models/lib/model-form.ts
  • web/src/features/models/lib/model-utils.ts
  • web/src/features/models/lib/query-keys.ts
  • web/src/features/models/lib/vendor-actions.ts
  • web/src/features/models/section-registry.tsx
  • web/src/features/models/types.ts
  • web/src/features/performance-metrics/api.ts
  • web/src/features/performance-metrics/lib/format.ts
  • web/src/features/performance-metrics/types.ts
  • web/src/features/playground/api.ts
  • web/src/features/playground/components/chat/playground-chat.tsx
  • web/src/features/playground/components/chat/playground-empty-state.tsx
  • web/src/features/playground/components/input/playground-input-controls.tsx
  • web/src/features/playground/components/input/playground-input-tools.tsx
  • web/src/features/playground/components/input/playground-input.tsx
  • web/src/features/playground/components/input/playground-parameter-panel.tsx
  • web/src/features/playground/components/message/message-action-button.tsx
  • web/src/features/playground/components/message/message-actions.tsx
  • web/src/features/playground/components/message/message-error-actions.tsx
  • web/src/features/playground/components/message/message-error.tsx
  • web/src/features/playground/components/message/message-metadata.tsx
  • web/src/features/playground/components/message/playground-message-content.tsx
  • web/src/features/playground/components/message/playground-message-editor.tsx
  • web/src/features/playground/constants.ts
  • web/src/features/playground/hooks/index.ts
  • web/src/features/playground/hooks/use-chat-handler.ts
  • web/src/features/playground/hooks/use-message-action-guard.ts
  • web/src/features/playground/hooks/use-playground-conversation.ts
  • web/src/features/playground/hooks/use-playground-options.ts
  • web/src/features/playground/hooks/use-playground-state.ts
  • web/src/features/playground/hooks/use-stream-request.test.ts
  • web/src/features/playground/hooks/use-stream-request.ts
  • web/src/features/playground/index.tsx
  • web/src/features/playground/lib/index.ts
  • web/src/features/playground/lib/input/input-control-utils.ts
  • web/src/features/playground/lib/input/input-tool-utils.ts
  • web/src/features/playground/lib/message/conversation-message-utils.ts
  • web/src/features/playground/lib/message/message-action-utils.ts
  • web/src/features/playground/lib/message/message-content-utils.ts
  • web/src/features/playground/lib/message/message-editor-utils.ts
  • web/src/features/playground/lib/message/message-error-utils.ts
  • web/src/features/playground/lib/message/message-layout-utils.ts
  • web/src/features/playground/lib/message/message-reasoning-utils.ts
  • web/src/features/playground/lib/message/message-streaming-utils.ts
  • web/src/features/playground/lib/message/message-styles.ts
  • web/src/features/playground/lib/message/message-timing-utils.ts
  • web/src/features/playground/lib/message/message-update-utils.ts
  • web/src/features/playground/lib/message/message-utils.ts
  • web/src/features/playground/lib/options/playground-option-utils.ts
  • web/src/features/playground/lib/parameters/playground-parameters.ts
  • web/src/features/playground/lib/state/playground-state-utils.ts
  • web/src/features/playground/lib/storage/storage-schema.ts
  • web/src/features/playground/lib/storage/storage.ts
  • web/src/features/playground/lib/streaming/payload-builder.ts
  • web/src/features/playground/lib/streaming/request-error-utils.ts
  • web/src/features/playground/lib/streaming/stream-utils.ts
  • web/src/features/playground/types.ts
  • web/src/features/pricing/api.ts
  • web/src/features/pricing/components/dynamic-pricing-breakdown.tsx
  • web/src/features/pricing/components/empty-state.tsx
  • web/src/features/pricing/components/index.ts
  • web/src/features/pricing/components/loading-skeleton.tsx
  • web/src/features/pricing/components/model-billing-mode-badge.tsx
  • web/src/features/pricing/components/model-card-grid.tsx
  • web/src/features/pricing/components/model-card.tsx
  • web/src/features/pricing/components/model-details-api.tsx
  • web/src/features/pricing/components/model-details-apps.tsx
  • web/src/features/pricing/components/model-details-charts.tsx
  • web/src/features/pricing/components/model-details-performance.tsx
  • web/src/features/pricing/components/model-details-uptime-sparkline.tsx
  • web/src/features/pricing/components/model-details.tsx
  • web/src/features/pricing/components/model-perf-badge.tsx
  • web/src/features/pricing/components/pricing-columns.tsx
  • web/src/features/pricing/components/pricing-sidebar.tsx
  • web/src/features/pricing/components/pricing-table.tsx
  • web/src/features/pricing/components/pricing-toolbar.tsx
  • web/src/features/pricing/components/search-bar.tsx
  • web/src/features/pricing/constants.ts
  • web/src/features/pricing/hooks/index.ts
  • web/src/features/pricing/hooks/use-filters.ts
  • web/src/features/pricing/hooks/use-pricing-data.ts
  • web/src/features/pricing/index.tsx
  • web/src/features/pricing/lib/billing-expr.ts
  • web/src/features/pricing/lib/dynamic-price.ts
  • web/src/features/pricing/lib/filters.ts
  • web/src/features/pricing/lib/index.ts
  • web/src/features/pricing/lib/mock-stats.ts
  • web/src/features/pricing/lib/model-helpers.ts
  • web/src/features/pricing/lib/price.ts
  • web/src/features/pricing/lib/seed.ts
  • web/src/features/pricing/lib/tier-expr.ts
  • web/src/features/pricing/types.ts
  • web/src/features/profile/api.ts
  • web/src/features/profile/components/checkin-calendar-card.tsx
  • web/src/features/profile/components/dialogs/access-token-dialog.tsx
  • web/src/features/profile/components/dialogs/change-password-dialog.tsx
  • web/src/features/profile/components/dialogs/delete-account-dialog.tsx
  • web/src/features/profile/components/dialogs/email-bind-dialog.tsx
  • web/src/features/profile/components/dialogs/telegram-bind-dialog.tsx
  • web/src/features/profile/components/dialogs/two-fa-backup-dialog.tsx
  • web/src/features/profile/components/dialogs/two-fa-disable-dialog.tsx
  • web/src/features/profile/components/dialogs/two-fa-setup-dialog.tsx
  • web/src/features/profile/components/dialogs/wechat-bind-dialog.tsx
  • web/src/features/profile/components/language-preferences-card.tsx
  • web/src/features/profile/components/login-session-dialogs.tsx
  • web/src/features/profile/components/login-session-item.tsx
  • web/src/features/profile/components/login-session-utils.test.ts
  • web/src/features/profile/components/login-session-utils.ts
  • web/src/features/profile/components/login-sessions-card.tsx
  • web/src/features/profile/components/passkey-card.tsx
  • web/src/features/profile/components/profile-header.tsx
  • web/src/features/profile/components/profile-security-card.tsx
  • web/src/features/profile/components/profile-settings-card.tsx
  • web/src/features/profile/components/sidebar-modules-card.tsx
  • web/src/features/profile/components/tabs/account-bindings-tab.tsx
  • web/src/features/profile/components/tabs/notification-tab.tsx
  • web/src/features/profile/components/two-fa-card.tsx
  • web/src/features/profile/constants.ts
  • web/src/features/profile/hooks/index.ts
  • web/src/features/profile/hooks/use-access-token.ts
  • web/src/features/profile/hooks/use-profile.ts
  • web/src/features/profile/hooks/use-two-fa.ts
  • web/src/features/profile/index.tsx
  • web/src/features/profile/lib/format.ts
  • web/src/features/profile/lib/index.ts
  • web/src/features/profile/types.ts
  • web/src/features/rankings/api.ts
  • web/src/features/rankings/components/entity-links.tsx
  • web/src/features/rankings/components/growth-text.tsx
  • web/src/features/rankings/components/index.ts
  • web/src/features/rankings/components/market-share-section.tsx
  • web/src/features/rankings/components/model-leaderboard.tsx
  • web/src/features/rankings/components/models-section.tsx
  • web/src/features/rankings/components/pulse-section.tsx
  • web/src/features/rankings/components/rankings-hero.tsx
  • web/src/features/rankings/hooks/use-rankings.ts
  • web/src/features/rankings/index.tsx
  • web/src/features/rankings/lib/format.ts
  • web/src/features/rankings/lib/index.ts
  • web/src/features/rankings/types.ts
  • web/src/features/redemption-codes/api.ts
  • web/src/features/redemption-codes/components/data-table-bulk-actions.tsx
  • web/src/features/redemption-codes/components/data-table-row-actions.tsx
  • web/src/features/redemption-codes/components/redemptions-columns.tsx
  • web/src/features/redemption-codes/components/redemptions-delete-dialog.tsx
  • web/src/features/redemption-codes/components/redemptions-dialogs.tsx
  • web/src/features/redemption-codes/components/redemptions-mobile-list.tsx
  • web/src/features/redemption-codes/components/redemptions-mutate-drawer.tsx
  • web/src/features/redemption-codes/components/redemptions-primary-buttons.tsx
  • web/src/features/redemption-codes/components/redemptions-provider.tsx
  • web/src/features/redemption-codes/components/redemptions-table.tsx
  • web/src/features/redemption-codes/constants.ts
  • web/src/features/redemption-codes/index.tsx
  • web/src/features/redemption-codes/lib/index.ts
  • web/src/features/redemption-codes/lib/redemption-form.ts
  • web/src/features/redemption-codes/lib/utils.ts
  • web/src/features/redemption-codes/types.ts
  • web/src/features/setup/api.ts
  • web/src/features/setup/components/admin-step.tsx
  • web/src/features/setup/components/complete-step.tsx
  • web/src/features/setup/components/database-step.tsx
  • web/src/features/setup/components/step-navigation.tsx
  • web/src/features/setup/components/usage-mode-step.tsx
  • web/src/features/setup/index.ts
  • web/src/features/setup/setup-wizard.tsx
  • web/src/features/setup/types.ts
  • web/src/features/subscriptions/api.ts
  • web/src/features/subscriptions/components/data-table-row-actions.tsx
  • web/src/features/subscriptions/components/dialogs/reset-subscriptions-dialog.tsx
  • web/src/features/subscriptions/components/dialogs/subscription-purchase-dialog.tsx
  • web/src/features/subscriptions/components/dialogs/toggle-status-dialog.tsx
  • web/src/features/subscriptions/components/dialogs/user-subscriptions-dialog.tsx
  • web/src/features/subscriptions/components/subscriptions-columns.tsx
  • web/src/features/subscriptions/components/subscriptions-dialogs.tsx
  • web/src/features/subscriptions/components/subscriptions-mutate-drawer.tsx
  • web/src/features/subscriptions/components/subscriptions-primary-buttons.tsx
  • web/src/features/subscriptions/components/subscriptions-provider.tsx
  • web/src/features/subscriptions/components/subscriptions-table.tsx
  • web/src/features/subscriptions/constants.ts
  • web/src/features/subscriptions/index.tsx
  • web/src/features/subscriptions/lib/format.ts
  • web/src/features/subscriptions/lib/index.ts
  • web/src/features/subscriptions/lib/plan-form.ts
  • web/src/features/subscriptions/types.ts
  • web/src/features/system-info/api.ts
  • web/src/features/system-info/components/system-instances-panel.tsx
  • web/src/features/system-info/components/system-tasks-panel.tsx
  • web/src/features/system-info/index.tsx
  • web/src/features/system-info/types.ts
  • web/src/features/system-settings/api.ts
  • web/src/features/system-settings/auth/basic-auth-section.tsx
  • web/src/features/system-settings/auth/bot-protection-section.tsx
  • web/src/features/system-settings/auth/custom-oauth/api.ts
  • web/src/features/system-settings/auth/custom-oauth/components/discovery-button.tsx
  • web/src/features/system-settings/auth/custom-oauth/components/preset-selector.tsx
  • web/src/features/system-settings/auth/custom-oauth/components/provider-form-dialog.tsx
  • web/src/features/system-settings/auth/custom-oauth/components/provider-table.tsx
  • web/src/features/system-settings/auth/custom-oauth/custom-oauth-section.tsx
  • web/src/features/system-settings/auth/custom-oauth/hooks/use-custom-oauth-mutations.ts
  • web/src/features/system-settings/auth/custom-oauth/hooks/use-custom-oauth-providers.ts
  • web/src/features/system-settings/auth/custom-oauth/types.ts
  • web/src/features/system-settings/auth/index.tsx
  • web/src/features/system-settings/auth/oauth-callback-url.ts
  • web/src/features/system-settings/auth/oauth-section.tsx
  • web/src/features/system-settings/auth/passkey-section.tsx
  • web/src/features/system-settings/auth/section-registry.tsx
  • web/src/features/system-settings/billing/index.tsx
  • web/src/features/system-settings/billing/section-registry.tsx
  • web/src/features/system-settings/components/form-dirty-indicator.tsx
  • web/src/features/system-settings/components/form-navigation-guard.tsx
  • web/src/features/system-settings/components/settings-accordion.tsx
  • web/src/features/system-settings/components/settings-card.tsx
  • web/src/features/system-settings/components/settings-form-layout.tsx
  • web/src/features/system-settings/components/settings-page-context.tsx
  • web/src/features/system-settings/components/settings-page.tsx
  • web/src/features/system-settings/components/settings-section.tsx
  • web/src/features/system-settings/content/announcements-section.tsx
  • web/src/features/system-settings/content/api-info-section.tsx
  • web/src/features/system-settings/content/chat-dialog.tsx
  • web/src/features/system-settings/content/chat-settings-section.tsx
  • web/src/features/system-settings/content/chat-settings-visual-editor.tsx
  • web/src/features/system-settings/content/dashboard-section.tsx
  • web/src/features/system-settings/content/drawing-settings-section.tsx
  • web/src/features/system-settings/content/faq-section.tsx
  • web/src/features/system-settings/content/index.tsx
  • web/src/features/system-settings/content/json-toggle-section.tsx
  • web/src/features/system-settings/content/section-registry.tsx
  • web/src/features/system-settings/content/uptime-kuma-section.tsx
  • web/src/features/system-settings/content/utils.ts
  • web/src/features/system-settings/general/channel-affinity/api.ts
  • web/src/features/system-settings/general/channel-affinity/cache-stats-dialog.tsx
  • web/src/features/system-settings/general/channel-affinity/constants.ts
  • web/src/features/system-settings/general/channel-affinity/index.tsx
  • web/src/features/system-settings/general/channel-affinity/rule-editor-dialog.tsx
  • web/src/features/system-settings/general/channel-affinity/types.ts
  • web/src/features/system-settings/general/checkin-settings-section.tsx
  • web/src/features/system-settings/general/pricing-section.tsx
  • web/src/features/system-settings/general/quota-settings-section.tsx
  • web/src/features/system-settings/general/system-behavior-section.tsx
  • web/src/features/system-settings/general/system-info-section.tsx
  • web/src/features/system-settings/hooks/use-accordion-state.ts
  • web/src/features/system-settings/hooks/use-form-dirty-guard.ts
  • web/src/features/system-settings/hooks/use-reset-form.ts
  • web/src/features/system-settings/hooks/use-safe-json-state.ts
  • web/src/features/system-settings/hooks/use-settings-form.ts
  • web/src/features/system-settings/hooks/use-system-options.ts
  • web/src/features/system-settings/hooks/use-update-option.ts
  • web/src/features/system-settings/index.tsx
  • web/src/features/system-settings/integrations/amount-discount-dialog.tsx
  • web/src/features/system-settings/integrations/amount-discount-visual-editor.tsx
  • web/src/features/system-settings/integrations/amount-options-visual-editor.tsx
  • web/src/features/system-settings/integrations/creem-product-dialog.tsx
  • web/src/features/system-settings/integrations/creem-products-visual-editor.tsx
  • web/src/features/system-settings/integrations/email-settings-section.tsx
  • web/src/features/system-settings/integrations/ionet-deployment-settings-section.tsx
  • web/src/features/system-settings/integrations/monitoring-settings-section.tsx
  • web/src/features/system-settings/integrations/payment-method-dialog.tsx
  • web/src/features/system-settings/integrations/payment-methods-visual-editor.tsx
  • web/src/features/system-settings/integrations/payment-settings-section.tsx
  • web/src/features/system-settings/integrations/utils.ts
  • web/src/features/system-settings/integrations/waffo-pancake-api.ts
  • web/src/features/system-settings/integrations/waffo-pancake-settings-section.tsx
  • web/src/features/system-settings/integrations/waffo-settings-section.tsx
  • web/src/features/system-settings/integrations/worker-settings-section.tsx
  • web/src/features/system-settings/maintenance/config.ts
  • web/src/features/system-settings/maintenance/header-navigation-section.tsx
  • web/src/features/system-settings/maintenance/log-settings-section.tsx
  • web/src/features/system-settings/maintenance/notice-section.tsx
  • web/src/features/system-settings/maintenance/performance-section.tsx
  • web/src/features/system-settings/maintenance/sidebar-modules-section.tsx
  • web/src/features/system-settings/maintenance/update-checker-section.tsx
  • web/src/features/system-settings/models/channel-selector-dialog.tsx
  • web/src/features/system-settings/models/claude-settings-card.tsx
  • web/src/features/system-settings/models/conflict-confirm-dialog.tsx
  • web/src/features/system-settings/models/constants.ts
  • web/src/features/system-settings/models/gemini-settings-card.tsx
  • web/src/features/system-settings/models/global-settings-card.tsx
  • web/src/features/system-settings/models/grok-settings-card.tsx
  • web/src/features/system-settings/models/group-ratio-form.tsx
  • web/src/features/system-settings/models/group-ratio-visual-editor.tsx
  • web/src/features/system-settings/models/group-special-usable-editor.tsx
  • web/src/features/system-settings/models/index.tsx
  • web/src/features/system-settings/models/model-pricing-core.ts
  • web/src/features/system-settings/models/model-pricing-inputs.tsx
  • web/src/features/system-settings/models/model-pricing-sheet.tsx
  • web/src/features/system-settings/models/model-pricing-snapshots.ts
  • web/src/features/system-settings/models/model-ratio-form.tsx
  • web/src/features/system-settings/models/model-ratio-table-columns.tsx
  • web/src/features/system-settings/models/model-ratio-visual-editor.tsx
  • web/src/features/system-settings/models/pricing-format.ts
  • web/src/features/system-settings/models/ratio-settings-card.tsx
  • web/src/features/system-settings/models/routing-reliability-section.tsx
  • web/src/features/system-settings/models/section-registry.tsx
  • web/src/features/system-settings/models/tiered-pricing-editor.tsx
  • web/src/features/system-settings/models/tool-price-settings.tsx
  • web/src/features/system-settings/models/upstream-ratio-sync-columns.tsx
  • web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts
  • web/src/features/system-settings/models/upstream-ratio-sync-table.tsx
  • web/src/features/system-settings/models/upstream-ratio-sync.tsx
  • web/src/features/system-settings/models/utils.ts
  • web/src/features/system-settings/operations/index.tsx
  • web/src/features/system-settings/operations/section-registry.tsx
  • web/src/features/system-settings/request-limits/rate-limit-dialog.tsx
  • web/src/features/system-settings/request-limits/rate-limit-section.tsx
  • web/src/features/system-settings/request-limits/rate-limit-visual-editor.tsx
  • web/src/features/system-settings/request-limits/sensitive-words-section.tsx
  • web/src/features/system-settings/request-limits/ssrf-section.tsx
  • web/src/features/system-settings/request-limits/token-limit-section.tsx
  • web/src/features/system-settings/security/index.tsx
  • web/src/features/system-settings/security/section-registry.tsx
  • web/src/features/system-settings/site/index.tsx
  • web/src/features/system-settings/site/section-registry.tsx
  • web/src/features/system-settings/types.ts
  • web/src/features/system-settings/utils/json-parser.ts
  • web/src/features/system-settings/utils/json-validators.ts
  • web/src/features/system-settings/utils/numeric-field.ts
  • web/src/features/system-settings/utils/route-config.ts
  • web/src/features/system-settings/utils/section-registry.ts
  • web/src/features/usage-logs/api.ts
  • web/src/features/usage-logs/components/columns/column-helpers.tsx
  • web/src/features/usage-logs/components/columns/common-logs-columns.tsx
  • web/src/features/usage-logs/components/columns/drawing-logs-columns.tsx
  • web/src/features/usage-logs/components/columns/task-logs-columns.tsx
  • web/src/features/usage-logs/components/common-logs-filter-bar.tsx
  • web/src/features/usage-logs/components/common-logs-header-actions.tsx
  • web/src/features/usage-logs/components/common-logs-stats.tsx
  • web/src/features/usage-logs/components/compact-date-time-range-picker.tsx
  • web/src/features/usage-logs/components/dialogs/audio-preview-dialog.tsx
  • web/src/features/usage-logs/components/dialogs/details-dialog.tsx
  • web/src/features/usage-logs/components/dialogs/fail-reason-dialog.tsx
  • web/src/features/usage-logs/components/dialogs/image-dialog.tsx
  • web/src/features/usage-logs/components/dialogs/prompt-dialog.tsx
  • web/src/features/usage-logs/components/dialogs/user-info-dialog.tsx
  • web/src/features/usage-logs/components/logs-filter-toolbar.tsx
  • web/src/features/usage-logs/components/model-badge.tsx
  • web/src/features/usage-logs/components/task-logs-filter-bar.tsx
  • web/src/features/usage-logs/components/timing-metrics-cell.tsx
  • web/src/features/usage-logs/components/usage-logs-mobile-card.tsx
  • web/src/features/usage-logs/components/usage-logs-provider.tsx
  • web/src/features/usage-logs/components/usage-logs-table.tsx
  • web/src/features/usage-logs/constants.ts
  • web/src/features/usage-logs/data/schema.ts
  • web/src/features/usage-logs/index.tsx
  • web/src/features/usage-logs/lib/columns.ts
  • web/src/features/usage-logs/lib/filter.ts
  • web/src/features/usage-logs/lib/format.ts
  • web/src/features/usage-logs/lib/index.ts
  • web/src/features/usage-logs/lib/mappers.ts
  • web/src/features/usage-logs/lib/status.ts
  • web/src/features/usage-logs/lib/utils.ts
  • web/src/features/usage-logs/section-registry.tsx
  • web/src/features/usage-logs/types.ts
  • web/src/features/users/api.ts
  • web/src/features/users/components/data-table-bulk-actions.tsx
  • web/src/features/users/components/data-table-row-actions.tsx
  • web/src/features/users/components/dialogs/user-binding-dialog.tsx
  • web/src/features/users/components/user-quota-cell.tsx
  • web/src/features/users/components/user-quota-dialog.tsx
  • web/src/features/users/components/users-columns.tsx
  • web/src/features/users/components/users-delete-dialog.tsx
  • web/src/features/users/components/users-mutate-drawer.tsx
  • web/src/features/users/components/users-primary-buttons.tsx
  • web/src/features/users/components/users-provider.tsx
  • web/src/features/users/components/users-table.tsx
  • web/src/features/users/constants.ts
  • web/src/features/users/index.tsx
  • web/src/features/users/lib/index.ts
  • web/src/features/users/lib/user-actions.ts
  • web/src/features/users/lib/user-form.ts
  • web/src/features/users/types.ts
  • web/src/features/wallet/api.ts
  • web/src/features/wallet/components/affiliate-rewards-card.tsx
  • web/src/features/wallet/components/creem-products-section.tsx
  • web/src/features/wallet/components/dialogs/billing-history-dialog.tsx
  • web/src/features/wallet/components/dialogs/creem-confirm-dialog.tsx
  • web/src/features/wallet/components/dialogs/payment-confirm-dialog.tsx
  • web/src/features/wallet/components/dialogs/transfer-dialog.tsx
  • web/src/features/wallet/components/recharge-form-card.tsx
  • web/src/features/wallet/components/subscription-plans-card.tsx
  • web/src/features/wallet/components/wallet-stats-card.tsx
  • web/src/features/wallet/constants.ts
  • web/src/features/wallet/hooks/index.ts
  • web/src/features/wallet/hooks/use-affiliate.ts
  • web/src/features/wallet/hooks/use-billing-history.ts
  • web/src/features/wallet/hooks/use-creem-payment.ts
  • web/src/features/wallet/hooks/use-payment.test.ts
  • web/src/features/wallet/hooks/use-payment.ts
  • web/src/features/wallet/hooks/use-redemption.ts
  • web/src/features/wallet/hooks/use-topup-info.ts
  • web/src/features/wallet/hooks/use-waffo-pancake-payment.ts
  • web/src/features/wallet/hooks/use-waffo-payment.ts
  • web/src/features/wallet/index.tsx
  • web/src/features/wallet/lib/affiliate.ts
  • web/src/features/wallet/lib/billing.ts
  • web/src/features/wallet/lib/format.ts
  • web/src/features/wallet/lib/index.ts
  • web/src/features/wallet/lib/payment.test.ts
  • web/src/features/wallet/lib/payment.ts
  • web/src/features/wallet/lib/ui.tsx
  • web/src/features/wallet/types.ts
  • web/src/hooks/index.ts
  • web/src/hooks/use-admin.ts
  • web/src/hooks/use-copy-to-clipboard.ts
  • web/src/hooks/use-countdown.ts
  • web/src/hooks/use-debounce.ts
  • web/src/hooks/use-dialog.ts
  • web/src/hooks/use-hidden-click-unlock.ts
  • web/src/hooks/use-media-query.ts
  • web/src/hooks/use-minimum-loading-time.ts
  • web/src/hooks/use-mobile.ts
  • web/src/hooks/use-mobile.tsx
  • web/src/hooks/use-notifications.ts
  • web/src/hooks/use-sidebar-config.ts
  • web/src/hooks/use-sidebar-data.ts
  • web/src/hooks/use-sidebar-view.ts
  • web/src/hooks/use-status.ts
  • web/src/hooks/use-system-config.ts
  • web/src/hooks/use-table-compact-mode.ts
  • web/src/hooks/use-table-url-state.ts
  • web/src/hooks/use-top-nav-links.ts
  • web/src/hooks/use-user-display.ts
  • web/src/i18n/config.ts
  • web/src/i18n/languages.ts
  • web/src/i18n/locales/_reports/_sync-report.json
  • web/src/i18n/locales/en.json
  • web/src/i18n/locales/fr.json
  • web/src/i18n/locales/ja.json
  • web/src/i18n/locales/ru.json
  • web/src/i18n/locales/vi.json
  • web/src/i18n/locales/zh-TW.json
  • web/src/i18n/locales/zh.json
  • web/src/i18n/static-keys.ts
  • web/src/lib/admin-permissions.ts
  • web/src/lib/api.ts
  • web/src/lib/auth-session-sync.ts
  • web/src/lib/auth-session.test.ts
  • web/src/lib/auth-session.ts
  • web/src/lib/avatar.ts
  • web/src/lib/build-metadata.ts
  • web/src/lib/channel-connection-info.ts
  • web/src/lib/colors.ts
  • web/src/lib/constants.ts
  • web/src/lib/content-format.ts
  • web/src/lib/cookies.ts
  • web/src/lib/copy-to-clipboard.ts
  • web/src/lib/currency.ts
  • web/src/lib/dayjs.ts
  • web/src/lib/dom-utils.ts
  • web/src/lib/format.ts
  • web/src/lib/frontend-cache.ts
  • web/src/lib/handle-server-error.ts
  • web/src/lib/http-client.ts
  • web/src/lib/http-status-code-rules.ts
  • web/src/lib/legacy-route.test.ts
  • web/src/lib/legacy-route.ts
  • web/src/lib/lobe-icon.tsx
  • web/src/lib/motion.ts
  • web/src/lib/nav-modules.ts
  • web/src/lib/oauth.ts
  • web/src/lib/passkey.ts
  • web/src/lib/roles.ts
  • web/src/lib/secure-verification.ts
  • web/src/lib/server-error-message.test.ts
  • web/src/lib/server-error-message.ts
  • web/src/lib/show-submitted-data.tsx
  • web/src/lib/theme-customization.ts
  • web/src/lib/theme-radius.ts
  • web/src/lib/time.ts
  • web/src/lib/use-chart-theme.ts
  • web/src/lib/use-controllable-state.ts
  • web/src/lib/utils.ts
  • web/src/lib/vchart.ts
  • web/src/main.tsx
  • web/src/routeTree.gen.ts
  • web/src/routes/(auth)/forgot-password.tsx
  • web/src/routes/(auth)/oauth.tsx
  • web/src/routes/(auth)/otp.tsx
  • web/src/routes/(auth)/register.tsx
  • web/src/routes/(auth)/reset.tsx
  • web/src/routes/(auth)/route.tsx
  • web/src/routes/(auth)/sign-in.tsx
  • web/src/routes/(auth)/sign-up.tsx
  • web/src/routes/(auth)/user/reset.tsx
  • web/src/routes/(errors)/401.tsx
  • web/src/routes/(errors)/403.tsx
  • web/src/routes/(errors)/404.tsx
  • web/src/routes/(errors)/500.tsx
  • web/src/routes/(errors)/503.tsx
  • web/src/routes/__root.tsx
  • web/src/routes/_authenticated/channels/index.tsx
  • web/src/routes/_authenticated/chat/$chatId.tsx
  • web/src/routes/_authenticated/chat2link.tsx
  • web/src/routes/_authenticated/dashboard/$section.tsx
  • web/src/routes/_authenticated/dashboard/index.tsx
  • web/src/routes/_authenticated/errors/$error.tsx
  • web/src/routes/_authenticated/keys/index.tsx
  • web/src/routes/_authenticated/models/$section.tsx
  • web/src/routes/_authenticated/models/index.tsx
  • web/src/routes/_authenticated/playground/index.tsx
  • web/src/routes/_authenticated/profile/index.tsx
  • web/src/routes/_authenticated/redemption-codes/index.tsx
  • web/src/routes/_authenticated/route.tsx
  • web/src/routes/_authenticated/subscriptions/index.tsx
  • web/src/routes/_authenticated/system-info/index.tsx
  • web/src/routes/_authenticated/system-settings/auth/$section.tsx
  • web/src/routes/_authenticated/system-settings/auth/index.tsx
  • web/src/routes/_authenticated/system-settings/billing/$section.tsx
  • web/src/routes/_authenticated/system-settings/billing/index.tsx
  • web/src/routes/_authenticated/system-settings/content/$section.tsx
  • web/src/routes/_authenticated/system-settings/content/index.tsx
  • web/src/routes/_authenticated/system-settings/index.tsx
  • web/src/routes/_authenticated/system-settings/models/$section.tsx
  • web/src/routes/_authenticated/system-settings/models/index.tsx
  • web/src/routes/_authenticated/system-settings/operations/$section.tsx
  • web/src/routes/_authenticated/system-settings/operations/index.tsx
  • web/src/routes/_authenticated/system-settings/route.tsx
  • web/src/routes/_authenticated/system-settings/security/$section.tsx
  • web/src/routes/_authenticated/system-settings/security/index.tsx
  • web/src/routes/_authenticated/system-settings/site/$section.tsx
  • web/src/routes/_authenticated/system-settings/site/index.tsx
  • web/src/routes/_authenticated/usage-logs/$section.tsx
  • web/src/routes/_authenticated/usage-logs/index.tsx
  • web/src/routes/_authenticated/users/index.tsx
  • web/src/routes/_authenticated/wallet/index.tsx
  • web/src/routes/about/index.tsx
  • web/src/routes/index.tsx
  • web/src/routes/oauth/$provider.tsx
  • web/src/routes/pricing/$modelId/index.tsx
  • web/src/routes/pricing/index.tsx
  • web/src/routes/privacy-policy.tsx
  • web/src/routes/rankings/index.tsx
  • web/src/routes/setup/index.tsx
  • web/src/routes/user-agreement.tsx
  • web/src/stores/auth-store.ts
  • web/src/stores/notification-store.ts
  • web/src/stores/system-config-store.ts
  • web/src/styles/index.css
  • web/src/styles/theme-presets.css
  • web/src/styles/theme.css
  • web/src/tanstack-table.d.ts
  • web/tsconfig.app.json
  • web/tsconfig.json
  • web/tsconfig.node.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The pull request introduces token-based authentication, database-backed login sessions, one-time auth flows, security proofs, auth-version cache fencing, fixed-window rate limiting, OAuth/Passkey/Telegram flow updates, frontend session coordination, login-session management UI, expanded API documentation, and related configuration guidance.

Changes

Authentication and session platform

Layer / File(s) Summary
Session and auth-flow control plane
model/*, service/auth_*.go, controller/auth_session.go, middleware/auth.go
Adds persistent login sessions, refresh rotation, revocation, auth-version invalidation, one-time flows, session limits, cleanup, and dashboard identity context.
Security verification and identity flows
controller/oauth.go, controller/passkey.go, controller/twofa.go, controller/telegram.go, middleware/secure_verification.go, service/passkey/*
Replaces session-key state with flow tokens and scoped security proofs across OAuth, Passkey, 2FA, and Telegram operations.
Frontend authentication integration
web/default/src/lib/*, web/default/src/features/auth/*, web/default/src/routes/*, web/default/src/stores/auth-store.ts
Adds auth bundles, refresh coordination, cross-tab synchronization, mismatch recovery, proof headers, OAuth popup handling, and bearer-token route guards.
Session management UI and supporting behavior
web/default/src/features/profile/*, web/default/src/components/*, web/default/src/i18n/*
Adds login-session listing/revocation controls, updated sign-out behavior, Telegram binding UI, verification messaging, and localized strings.
Infrastructure, rate limiting, and contracts
main.go, trusted_proxies.go, middleware/rate-limit.go, router/api-router.go, docs/*, README*, .env.example, docker-compose*.yml
Configures trusted proxies, changes Redis rate limiting to atomic fixed windows, updates routes and OpenAPI contracts, and documents deployment/session behavior.

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

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant AuthAPI
  participant AuthSessionService
  participant UserSessionStore
  participant Redis
  Browser->>AuthAPI: POST login or refresh
  AuthAPI->>AuthSessionService: create or rotate auth session
  AuthSessionService->>UserSessionStore: validate, persist, or revoke session
  AuthSessionService->>Redis: publish session cache or deny fence
  AuthAPI-->>Browser: auth bundle and refresh-cookie state
Loading

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: seefs001

Poem

I'm a rabbit with tokens tucked under my ear,
Sessions now hop safely from far and near.
Proofs bloom bright, OAuth flows dance,
Redis guards stale state at a glance.
I sign out old sessions with one little thump—
And leave every login in a secure burrow snug.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/dashboard-stateless-auth

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
middleware/auth.go (1)

70-83: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

TryUserAuth should fall back to anonymous on auth errors
/api/oauth/state, /api/oauth/:provider, and the header-nav optional-auth paths all use this middleware. If a client sends a stale or unrelated Authorization token, authenticateDashboardRequest aborts the request instead of continuing anonymously, which breaks public OAuth flows. Treat auth failures here as “no auth” and only abort on clearly dashboard-authenticated requests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@middleware/auth.go` around lines 70 - 83, The TryUserAuth middleware should
treat authentication failures from authenticateDashboardRequest as anonymous
access for optional-auth routes. Update the err handling in TryUserAuth so it
only writes the dashboard auth error and returns when the request is clearly
intended to use dashboard authentication; otherwise continue to c.Next() without
setting auth context. Preserve successful authentication behavior.
web/default/src/features/auth/sign-in/components/user-auth-form.tsx (1)

168-189: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Bare catch swallows the newly-added local validation errors.

The two new throw new Error(...) calls (missing flow_token, invalid auth bundle) are local, synchronous throws — not Axios/network errors — so the global response interceptor never sees them. The bare catch { // Errors are handled by global interceptor } discards them silently: the user gets no toast and no navigation, just a reset spinner. handlePasskeyLogin's catch block (below, lines 291-299) already shows the correct pattern for surfacing these.

🐛 Proposed fix: surface local throws like the passkey handler does
-    } catch {
-      // Errors are handled by global interceptor
-    } finally {
+    } catch (error) {
+      if (getServerErrorMessageKey(error)) return
+      if (error instanceof Error) {
+        toast.error(error.message)
+      }
+    } finally {
       setIsLoading(false)
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/features/auth/sign-in/components/user-auth-form.tsx` around
lines 168 - 189, Update the catch block in the sign-in handler around
isAuthBundle and handleLoginSuccess so locally thrown validation errors for a
missing flow_token or invalid auth bundle are surfaced to the user, following
the existing error-handling pattern in handlePasskeyLogin. Preserve global
interceptor handling for request errors while ensuring these local failures
produce the same toast or navigation behavior as the passkey flow.
web/default/src/features/auth/hooks/use-auth-redirect.ts (1)

25-40: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

getSavedLanguage ignores object-typed user.setting.

AuthUser.setting is typed as Record<string, unknown> | string, but this function only reads setting.language when setting is a string; if the backend ever returns setting as an already-parsed object, saved-language restoration silently fails.

🐛 Proposed fix: handle both shapes
-  if (typeof user.setting !== 'string') {
-    return undefined
-  }
-
-  try {
-    const setting = JSON.parse(user.setting) as { language?: unknown }
-    return typeof setting.language === 'string' ? setting.language : undefined
-  } catch {
-    return undefined
-  }
+  if (typeof user.setting === 'string') {
+    try {
+      const setting = JSON.parse(user.setting) as { language?: unknown }
+      return typeof setting.language === 'string' ? setting.language : undefined
+    } catch {
+      return undefined
+    }
+  }
+
+  if (user.setting && typeof user.setting === 'object') {
+    const language = (user.setting as Record<string, unknown>).language
+    return typeof language === 'string' ? language : undefined
+  }
+
+  return undefined
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/features/auth/hooks/use-auth-redirect.ts` around lines 25 -
40, Update getSavedLanguage to support both AuthUser.setting shapes: continue
parsing string values as JSON, but also read language directly from
object-valued settings. Return the language only when it is a string, and
preserve undefined for missing, invalid, or unsupported values.
🧹 Nitpick comments (4)
web/default/src/routes/oauth/$provider.tsx (1)

149-161: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Fallback bypasses SPA routing via direct window.location.replace.

Per path instructions for web/default/src/routes/**/*.tsx, navigation should go through useNavigate/Link, not window.location. This fallback triggers a full-page reload/history bypass whenever the router doesn't visibly commit within 100ms, which can mask a real navigation bug rather than fix it. Worth confirming why the fallback is needed here and whether a router-native check (e.g. inspecting router.state) is preferable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/routes/oauth/`$provider.tsx around lines 149 - 161, The
safeNavigate fallback in the OAuth route bypasses SPA routing with
window.location.replace. Remove the timeout-based direct reload and keep
navigation exclusively through the existing navigate function, or replace the
fallback with a router-native state check if fallback behavior is required;
update safeNavigate accordingly without using window.location.

Source: Path instructions

web/default/src/routes/__root.tsx (1)

83-86: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use router navigation instead of window.location.replace for the sign-out redirect.

window.location.replace('/sign-in') performs a hard navigation that bypasses TanStack Router. Prefer useNavigate() (or a redirect) so route state, guards, and in-app transitions behave consistently. A full reload is understandable for the cross-tab reset on Line 79, but the /sign-in redirect is a normal route change.

As per coding guidelines: "For TanStack Router UI routes, use useNavigate or Link for navigation instead of manipulating window.location directly."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/routes/__root.tsx` around lines 83 - 86, Replace the hard
navigation in the currentSID sign-out branch with TanStack Router navigation via
useNavigate, while preserving the existing clearAuthentication(false) behavior
and redirecting to /sign-in. Leave the separate cross-tab reset handling
unchanged.

Source: Coding guidelines

web/default/src/lib/http-client.ts (1)

44-50: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Consider adding a request timeout to the shared Axios instance.

No timeout is configured, so a stalled request could hang indefinitely for the user with no automatic recovery.

 export const api = axios.create({
   baseURL: '',
   withCredentials: true,
+  timeout: 30000,
   headers: {
     'Cache-Control': 'no-store',
   },
 })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/lib/http-client.ts` around lines 44 - 50, Add a finite
timeout setting to the shared Axios instance created by api, using the project's
established timeout configuration or a reasonable default, so stalled requests
terminate automatically while preserving the existing credentials and headers.
web/default/src/features/auth/secure-verification/api.ts (1)

108-121: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Type the /api/verify response instead of relying on an implicit any.

api.post('/api/verify', ...) has no generic type argument, so res.data is effectively any; the final return res.data.data as SecurityProof is an unchecked cast. Typing the call (e.g. api.post<ApiResponse<SecurityProof>>(...)) removes the need for the cast and gives compile-time safety consistent with verifyPasskey's typed helpers.

♻️ Proposed fix
-  const res = await api.post('/api/verify', {
+  const res = await api.post<{ success: boolean; message?: string; data?: SecurityProof }>('/api/verify', {
     method: '2fa',
     code: trimmed,
     scope,
   })

   if (!res.data?.success) {
     throw new Error(res.data?.message || i18next.t('Verification failed'))
   }
-  if (!res.data.data?.proof_token) {
+  if (!res.data.data?.proof_token) {
     throw new Error(i18next.t('Verification proof was not returned'))
   }
-  return res.data.data as SecurityProof
+  return res.data.data
As per coding guidelines, `web/default/**/*.{ts,tsx}`: "Avoid `any`; prefer concrete types or `unknown`, explicitly type parameters and return values".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/features/auth/secure-verification/api.ts` around lines 108 -
121, Update the api.post call in the verification function to provide the
appropriate ApiResponse<SecurityProof> generic, then return the typed response
data directly without the unchecked SecurityProof cast. Preserve the existing
success, error-message, and proof_token validation behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@middleware/model-rate-limit.go`:
- Around line 45-51: Update the nowTime construction in the rate-limit
comparison flow to format the current time in UTC before parsing it with
modelRateLimitTimeFormat. Preserve the existing parsing and nowTime.Sub(oldTime)
behavior, ensuring generated timestamps are timezone-independent across service
instances.

In `@model/user_session.go`:
- Around line 47-49: Change the GORM type for PreviousRefreshHash in the session
model from char(64) to varchar(64), preserving its existing nullable and JSON
configuration so empty-string sentinel checks remain consistent across
databases.

In `@web/default/src/components/sign-out-dialog.tsx`:
- Around line 47-49: Update the sign-out dialog component to use TanStack Router
navigation: import and initialize useNavigate, then replace the
window.location.replace call with the router navigate action targeting /sign-in
while preserving the existing sign-out flow.
- Around line 47-49: Replace the direct window.location.replace call in the
sign-out dialog component with TanStack Router navigation. Import and invoke
useNavigate within the component, then navigate to /sign-in through the returned
navigate function while preserving the existing sign-out flow.

In
`@web/default/src/features/auth/secure-verification/hooks/use-secure-verification.ts`:
- Around line 151-153: Update the missing-scope error in the secure verification
hook to use the existing i18next translation mechanism, passing the translated
message to Error so executeVerification’s toast displays localized text. Follow
the hook’s established useTranslation/t pattern and preserve the current error
condition.

In `@web/default/src/i18n/locales/fr.json`:
- Line 4555: Update the French translation for “This session will lose access
immediately and must sign in again.” so the user is the subject of
re-authentication, using wording equivalent to “Cette session perdra
immédiatement l’accès ; vous devrez vous reconnecter.”

In `@web/default/src/i18n/locales/ru.json`:
- Line 3875: Update the Russian translation for “Review and sign out devices
currently using your account.” to use explicit session sign-out/termination
terminology instead of wording that implies disabling or disconnecting the
physical devices.

In `@web/default/src/routes/oauth/`$provider.tsx:
- Around line 193-206: In the OAuth error catch block, update the condition
around toast.error so a mapped messageKey displays i18next.t(messageKey),
matching the equivalent branch above; retain the existing responseMessage and
Error-message fallbacks only when no mapped key is available.
- Around line 81-96: Update the Telegram branch in the OAuth route to handle
telegram_bind values other than “success” explicitly, posting a
TELEGRAM_BIND_RESULT_MESSAGE with success false and the available failure
details before closing the window and returning. Keep the existing
success-message behavior unchanged, and prevent Telegram bind failures from
falling through to the generic OAuth callback path.

---

Outside diff comments:
In `@middleware/auth.go`:
- Around line 70-83: The TryUserAuth middleware should treat authentication
failures from authenticateDashboardRequest as anonymous access for optional-auth
routes. Update the err handling in TryUserAuth so it only writes the dashboard
auth error and returns when the request is clearly intended to use dashboard
authentication; otherwise continue to c.Next() without setting auth context.
Preserve successful authentication behavior.

In `@web/default/src/features/auth/hooks/use-auth-redirect.ts`:
- Around line 25-40: Update getSavedLanguage to support both AuthUser.setting
shapes: continue parsing string values as JSON, but also read language directly
from object-valued settings. Return the language only when it is a string, and
preserve undefined for missing, invalid, or unsupported values.

In `@web/default/src/features/auth/sign-in/components/user-auth-form.tsx`:
- Around line 168-189: Update the catch block in the sign-in handler around
isAuthBundle and handleLoginSuccess so locally thrown validation errors for a
missing flow_token or invalid auth bundle are surfaced to the user, following
the existing error-handling pattern in handlePasskeyLogin. Preserve global
interceptor handling for request errors while ensuring these local failures
produce the same toast or navigation behavior as the passkey flow.

---

Nitpick comments:
In `@web/default/src/features/auth/secure-verification/api.ts`:
- Around line 108-121: Update the api.post call in the verification function to
provide the appropriate ApiResponse<SecurityProof> generic, then return the
typed response data directly without the unchecked SecurityProof cast. Preserve
the existing success, error-message, and proof_token validation behavior.

In `@web/default/src/lib/http-client.ts`:
- Around line 44-50: Add a finite timeout setting to the shared Axios instance
created by api, using the project's established timeout configuration or a
reasonable default, so stalled requests terminate automatically while preserving
the existing credentials and headers.

In `@web/default/src/routes/__root.tsx`:
- Around line 83-86: Replace the hard navigation in the currentSID sign-out
branch with TanStack Router navigation via useNavigate, while preserving the
existing clearAuthentication(false) behavior and redirecting to /sign-in. Leave
the separate cross-tab reset handling unchanged.

In `@web/default/src/routes/oauth/`$provider.tsx:
- Around line 149-161: The safeNavigate fallback in the OAuth route bypasses SPA
routing with window.location.replace. Remove the timeout-based direct reload and
keep navigation exclusively through the existing navigate function, or replace
the fallback with a router-native state check if fallback behavior is required;
update safeNavigate accordingly without using window.location.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb1416c9-cd85-41d5-85a8-723d9dc80f3c

📥 Commits

Reviewing files that changed from the base of the PR and between 5a6c53d and 99b84b7.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (135)
  • .env.example
  • README.en.md
  • README.fr.md
  • README.ja.md
  • README.md
  • README.zh_CN.md
  • README.zh_TW.md
  • THIRD-PARTY-LICENSES.md
  • common/constants.go
  • common/init.go
  • common/session_cookie.go
  • common/sys_log.go
  • common/url_validator_test.go
  • common/user_session_test.go
  • controller/auth_flow_test.go
  • controller/auth_session.go
  • controller/auth_session_test.go
  • controller/model_list_test.go
  • controller/oauth.go
  • controller/passkey.go
  • controller/passkey_test.go
  • controller/secure_verification.go
  • controller/telegram.go
  • controller/telegram_test.go
  • controller/twofa.go
  • controller/user.go
  • controller/user_manage_test.go
  • controller/wechat.go
  • docker-compose.dev.yml
  • docker-compose.yml
  • docs/authentication.md
  • docs/openapi/api.json
  • docs/openapi/relay.json
  • go.mod
  • main.go
  • middleware/auth.go
  • middleware/auth_origin.go
  • middleware/auth_origin_test.go
  • middleware/auth_test.go
  • middleware/email-verification-rate-limit.go
  • middleware/header_nav_test.go
  • middleware/model-rate-limit.go
  • middleware/rate-limit.go
  • middleware/rate_limit_test.go
  • middleware/secure_verification.go
  • middleware/turnstile-check.go
  • model/auth_flow.go
  • model/auth_flow_test.go
  • model/errors.go
  • model/external_identity_claim.go
  • model/external_identity_claim_test.go
  • model/main.go
  • model/passkey.go
  • model/subscription.go
  • model/subscription_auth_test.go
  • model/task_cas_test.go
  • model/twofa.go
  • model/user.go
  • model/user_auth_cache.go
  • model/user_authentication_test.go
  • model/user_cache.go
  • model/user_cache_auth_version_test.go
  • model/user_session.go
  • model/user_session_test.go
  • router/api-router.go
  • service/auth_cleanup.go
  • service/auth_session.go
  • service/auth_session_test.go
  • service/auth_token.go
  • service/auth_token_test.go
  • service/passkey/service.go
  • service/passkey/session.go
  • trusted_proxies.go
  • trusted_proxies_test.go
  • web/default/src/components/sign-out-dialog.tsx
  • web/default/src/features/auth/api.test.ts
  • web/default/src/features/auth/api.ts
  • web/default/src/features/auth/constants.ts
  • web/default/src/features/auth/hooks/use-auth-redirect.ts
  • web/default/src/features/auth/hooks/use-oauth-login.ts
  • web/default/src/features/auth/index.ts
  • web/default/src/features/auth/lib/oauth-bind-window.test.ts
  • web/default/src/features/auth/lib/oauth-bind-window.ts
  • web/default/src/features/auth/lib/storage.ts
  • web/default/src/features/auth/otp/components/otp-form.tsx
  • web/default/src/features/auth/passkey/api.ts
  • web/default/src/features/auth/passkey/hooks/use-passkey-management.ts
  • web/default/src/features/auth/passkey/types.ts
  • web/default/src/features/auth/secure-verification/api.ts
  • web/default/src/features/auth/secure-verification/hooks/use-secure-verification.ts
  • web/default/src/features/auth/secure-verification/types.ts
  • web/default/src/features/auth/sign-in/components/user-auth-form.tsx
  • web/default/src/features/auth/sign-up/components/sign-up-form.tsx
  • web/default/src/features/auth/types.ts
  • web/default/src/features/channels/api.ts
  • web/default/src/features/channels/components/dialogs/ollama-models-dialog.tsx
  • web/default/src/features/channels/components/drawers/channel-mutate-drawer.tsx
  • web/default/src/features/playground/hooks/use-chat-handler.ts
  • web/default/src/features/playground/hooks/use-stream-request.test.ts
  • web/default/src/features/playground/hooks/use-stream-request.ts
  • web/default/src/features/profile/api.ts
  • web/default/src/features/profile/components/dialogs/delete-account-dialog.tsx
  • web/default/src/features/profile/components/dialogs/telegram-bind-dialog.tsx
  • web/default/src/features/profile/components/login-session-dialogs.tsx
  • web/default/src/features/profile/components/login-session-item.tsx
  • web/default/src/features/profile/components/login-session-utils.test.ts
  • web/default/src/features/profile/components/login-session-utils.ts
  • web/default/src/features/profile/components/login-sessions-card.tsx
  • web/default/src/features/profile/components/passkey-card.tsx
  • web/default/src/features/profile/components/tabs/account-bindings-tab.tsx
  • web/default/src/features/profile/index.tsx
  • web/default/src/i18n/locales/en.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
  • web/default/src/i18n/locales/ru.json
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/zh-TW.json
  • web/default/src/i18n/locales/zh.json
  • web/default/src/i18n/static-keys.ts
  • web/default/src/lib/api.ts
  • web/default/src/lib/auth-session-sync.ts
  • web/default/src/lib/auth-session.test.ts
  • web/default/src/lib/auth-session.ts
  • web/default/src/lib/handle-server-error.ts
  • web/default/src/lib/http-client.ts
  • web/default/src/lib/oauth.ts
  • web/default/src/lib/secure-verification.ts
  • web/default/src/lib/server-error-message.test.ts
  • web/default/src/lib/server-error-message.ts
  • web/default/src/main.tsx
  • web/default/src/routes/(auth)/oauth.tsx
  • web/default/src/routes/__root.tsx
  • web/default/src/routes/_authenticated/route.tsx
  • web/default/src/routes/oauth/$provider.tsx
  • web/default/src/stores/auth-store.ts
💤 Files with no reviewable changes (3)
  • web/default/src/features/auth/lib/storage.ts
  • service/passkey/service.go
  • web/default/src/lib/oauth.ts

Comment thread middleware/model-rate-limit.go
Comment thread model/user_session.go
Comment thread web/default/src/components/sign-out-dialog.tsx Outdated
Comment thread web/default/src/i18n/locales/fr.json Outdated
Comment thread web/default/src/i18n/locales/ru.json Outdated
Comment thread web/src/routes/oauth/$provider.tsx
Comment on lines +193 to 206
} catch (error: unknown) {
const messageKey = getServerErrorMessageKey(error)
const responseMessage = (
error as { response?: { data?: { message?: string } } }
).response?.data?.message
if (!messageKey) {
toast.error(
responseMessage ||
(error instanceof Error
? error.message
: i18next.t('OAuth failed'))
)
}
await handleLoginFailure(message)
return
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Inverted condition suppresses the toast exactly when a mapped error message is available.

if (!messageKey) means that whenever getServerErrorMessageKey returns a valid key — the most informative case — no toast.error is shown at all; the user is silently redirected to sign-in. This contradicts the equivalent (correct) branch above at Line 187-192, which shows i18next.t(messageKey) when messageKey is present.

🐛 Proposed fix
       } catch (error: unknown) {
         const messageKey = getServerErrorMessageKey(error)
         const responseMessage = (
           error as { response?: { data?: { message?: string } } }
         ).response?.data?.message
-        if (!messageKey) {
-          toast.error(
-            responseMessage ||
-              (error instanceof Error
-                ? error.message
-                : i18next.t('OAuth failed'))
-          )
-        }
+        toast.error(
+          messageKey
+            ? i18next.t(messageKey)
+            : responseMessage ||
+                (error instanceof Error
+                  ? error.message
+                  : i18next.t('OAuth failed'))
+        )
       }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
} catch (error: unknown) {
const messageKey = getServerErrorMessageKey(error)
const responseMessage = (
error as { response?: { data?: { message?: string } } }
).response?.data?.message
if (!messageKey) {
toast.error(
responseMessage ||
(error instanceof Error
? error.message
: i18next.t('OAuth failed'))
)
}
await handleLoginFailure(message)
return
}
} catch (error: unknown) {
const messageKey = getServerErrorMessageKey(error)
const responseMessage = (
error as { response?: { data?: { message?: string } } }
).response?.data?.message
toast.error(
messageKey
? i18next.t(messageKey)
: responseMessage ||
(error instanceof Error
? error.message
: i18next.t('OAuth failed'))
)
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/routes/oauth/`$provider.tsx around lines 193 - 206, In the
OAuth error catch block, update the condition around toast.error so a mapped
messageKey displays i18next.t(messageKey), matching the equivalent branch above;
retain the existing responseMessage and Error-message fallbacks only when no
mapped key is available.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@model/user_session_migration_test.go`:
- Around line 70-72: Update
TestUserSessionPreviousRefreshHashSchemaUsesNullableVarchar to initialize a
local in-memory SQLite database and use it when constructing the gorm.Statement,
replacing the global DB dependency while preserving the existing schema
assertion.

In `@web/default/src/features/auth/lib/auth-redirect.test.ts`:
- Around line 19-20: Replace the node:assert/strict and node:test usage in
web/default/src/features/auth/lib/auth-redirect.test.ts lines 19-20 with Vitest
imports or globals, and convert its assertions to expect. In
web/default/src/features/auth/lib/oauth-bind-window.test.ts lines 53-55, migrate
test blocks to Vitest and replace assert.deepEqual calls with
expect(...).toEqual(...).

In `@web/default/src/i18n/locales/vi.json`:
- Line 4502: Update the Vietnamese translation for the key "The Telegram
authorization request is invalid or expired." to use “ủy quyền” for
authorization instead of “xác thực”, while preserving the existing
invalid-or-expired meaning.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a53d0345-7489-4f9b-a7a7-94bb2d0773f0

📥 Commits

Reviewing files that changed from the base of the PR and between 371ad55 and 99fa20c.

📒 Files selected for processing (40)
  • controller/telegram.go
  • controller/telegram_test.go
  • docs/authentication.md
  • docs/openapi/api.json
  • middleware/auth.go
  • middleware/auth_test.go
  • middleware/header_nav_test.go
  • middleware/model-rate-limit.go
  • middleware/model_rate_limit_test.go
  • model/user_session.go
  • model/user_session_migration_test.go
  • model/user_session_test.go
  • web/default/src/components/sign-out-dialog.tsx
  • web/default/src/features/auth/hooks/use-auth-redirect.ts
  • web/default/src/features/auth/lib/auth-redirect.test.ts
  • web/default/src/features/auth/lib/auth-redirect.ts
  • web/default/src/features/auth/lib/oauth-bind-window.test.ts
  • web/default/src/features/auth/lib/oauth-bind-window.ts
  • web/default/src/features/auth/secure-verification/api.ts
  • web/default/src/features/auth/secure-verification/hooks/use-secure-verification.ts
  • web/default/src/features/auth/sign-in/components/user-auth-form.tsx
  • web/default/src/features/profile/components/dialogs/telegram-bind-dialog.tsx
  • web/default/src/features/profile/components/login-sessions-card.tsx
  • web/default/src/i18n/locales/en.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
  • web/default/src/i18n/locales/ru.json
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/zh-TW.json
  • web/default/src/i18n/locales/zh.json
  • web/default/src/i18n/static-keys.ts
  • web/default/src/lib/api.ts
  • web/default/src/lib/auth-session.test.ts
  • web/default/src/lib/auth-session.ts
  • web/default/src/lib/server-error-message.test.ts
  • web/default/src/lib/server-error-message.ts
  • web/default/src/routes/(auth)/oauth.tsx
  • web/default/src/routes/(auth)/sign-in.tsx
  • web/default/src/routes/__root.tsx
  • web/default/src/routes/oauth/$provider.tsx
🚧 Files skipped from review as they are similar to previous changes (24)
  • web/default/src/lib/server-error-message.ts
  • web/default/src/lib/server-error-message.test.ts
  • web/default/src/components/sign-out-dialog.tsx
  • middleware/header_nav_test.go
  • middleware/model-rate-limit.go
  • web/default/src/features/profile/components/login-sessions-card.tsx
  • web/default/src/features/auth/secure-verification/hooks/use-secure-verification.ts
  • web/default/src/lib/auth-session.test.ts
  • web/default/src/features/auth/hooks/use-auth-redirect.ts
  • web/default/src/features/auth/sign-in/components/user-auth-form.tsx
  • web/default/src/routes/(auth)/oauth.tsx
  • web/default/src/features/profile/components/dialogs/telegram-bind-dialog.tsx
  • web/default/src/lib/auth-session.ts
  • web/default/src/routes/__root.tsx
  • docs/authentication.md
  • web/default/src/lib/api.ts
  • web/default/src/i18n/locales/en.json
  • model/user_session_test.go
  • web/default/src/routes/oauth/$provider.tsx
  • web/default/src/i18n/locales/fr.json
  • web/default/src/features/auth/secure-verification/api.ts
  • controller/telegram.go
  • docs/openapi/api.json
  • model/user_session.go

Comment on lines +70 to +72
func TestUserSessionPreviousRefreshHashSchemaUsesNullableVarchar(t *testing.T) {
statement := &gorm.Statement{DB: DB}
require.NoError(t, statement.Parse(&UserSession{}))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Initialize a local dummy database to avoid nil pointer panics.

Using the global DB variable directly can cause a nil pointer dereference panic during statement.Parse() if this test is executed in isolation or runs before DB is initialized by other tests.

Initialize a local, in-memory SQLite database to decouple this schema test from global state.

🐛 Proposed fix
 func TestUserSessionPreviousRefreshHashSchemaUsesNullableVarchar(t *testing.T) {
-	statement := &gorm.Statement{DB: DB}
+	dummyDB, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
+	require.NoError(t, err)
+	statement := &gorm.Statement{DB: dummyDB}
 	require.NoError(t, statement.Parse(&UserSession{}))
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
func TestUserSessionPreviousRefreshHashSchemaUsesNullableVarchar(t *testing.T) {
statement := &gorm.Statement{DB: DB}
require.NoError(t, statement.Parse(&UserSession{}))
func TestUserSessionPreviousRefreshHashSchemaUsesNullableVarchar(t *testing.T) {
dummyDB, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
require.NoError(t, err)
statement := &gorm.Statement{DB: dummyDB}
require.NoError(t, statement.Parse(&UserSession{}))
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@model/user_session_migration_test.go` around lines 70 - 72, Update
TestUserSessionPreviousRefreshHashSchemaUsesNullableVarchar to initialize a
local in-memory SQLite database and use it when constructing the gorm.Statement,
replacing the global DB dependency while preserving the existing schema
assertion.

Comment on lines +19 to +20
import assert from 'node:assert/strict'
import { describe, test } from 'node:test'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Use Vitest for frontend unit tests.

Both test files violate the coding guideline by relying on Node's built-in node:test and node:assert modules instead of Vitest. As per coding guidelines, "Write unit tests for utility functions and pure logic with Vitest."

  • web/default/src/features/auth/lib/auth-redirect.test.ts#L19-L20: Replace node:assert/strict and node:test imports with vitest (or rely on Vitest globals) and update assertions to use expect.
  • web/default/src/features/auth/lib/oauth-bind-window.test.ts#L53-L55: Migrate test blocks and assert.deepEqual calls to Vitest's test and expect(...).toEqual(...).
📍 Affects 2 files
  • web/default/src/features/auth/lib/auth-redirect.test.ts#L19-L20 (this comment)
  • web/default/src/features/auth/lib/oauth-bind-window.test.ts#L53-L55
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/features/auth/lib/auth-redirect.test.ts` around lines 19 -
20, Replace the node:assert/strict and node:test usage in
web/default/src/features/auth/lib/auth-redirect.test.ts lines 19-20 with Vitest
imports or globals, and convert its assertions to expect. In
web/default/src/features/auth/lib/oauth-bind-window.test.ts lines 53-55, migrate
test blocks to Vitest and replace assert.deepEqual calls with
expect(...).toEqual(...).

Source: Coding guidelines

Comment thread web/default/src/i18n/locales/vi.json Outdated
@@ -4463,6 +4499,7 @@
"The site is not available at the moment.": "Trang web hiện không khả dụng.",
"The slug is appended to the URL:": "Slug được gắn vào URL:",
"The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.": "Đồng bộ hóa sẽ tìm nạp các mẫu và nhà cung cấp còn thiếu từ nguồn đã chọn. Các bản ghi hiện có chỉ được cập nhật khi bạn chấp thuận các xung đột.",
"The Telegram authorization request is invalid or expired.": "Yêu cầu xác thực Telegram không hợp lệ hoặc đã hết hạn.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate “authorization” as “ủy quyền”.

This message concerns a Telegram authorization request, not user authentication or verification. Using “xác thực” can mislead users about the failed flow.

Proposed fix
-    "The Telegram authorization request is invalid or expired.": "Yêu cầu xác thực Telegram không hợp lệ hoặc đã hết hạn.",
+    "The Telegram authorization request is invalid or expired.": "Yêu cầu ủy quyền Telegram không hợp lệ hoặc đã hết hạn.",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"The Telegram authorization request is invalid or expired.": "Yêu cầu xác thực Telegram không hợp lệ hoặc đã hết hạn.",
"The Telegram authorization request is invalid or expired.": "Yêu cầu ủy quyền Telegram không hợp lệ hoặc đã hết hạn.",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/default/src/i18n/locales/vi.json` at line 4502, Update the Vietnamese
translation for the key "The Telegram authorization request is invalid or
expired." to use “ủy quyền” for authorization instead of “xác thực”, while
preserving the existing invalid-or-expired meaning.

@Calcium-Ion
Calcium-Ion merged commit 31d70fc into main Jul 20, 2026
1 check passed
@Calcium-Ion
Calcium-Ion deleted the refactor/dashboard-stateless-auth branch July 21, 2026 06:46
JacksonsY added a commit to JacksonsY/new-api that referenced this pull request Jul 22, 2026
同步上游 10 个提交(至 1721144),重点整合:

- QuantumNous#6329 鉴权重构:dashboard 会话全面改为无状态 token(access/refresh
  + 版本栅栏 + 会话管理),gin session 全部移除。fork 侧适配:
  - turnstile 一次性消费改为按 token 键控内存缓存(兼容发码+注册两步流)
  - TRUSTED_PROXY_CIDRS 作为 TRUSTED_PROXIES 的兼容别名保留
  - UserBase/ToBaseUser 保留 ParentId(子号计费),补 AuthVersion/CacheSchema
  - OAuth 绑定改 flow_token 流,保留 GitHub 账号年龄门禁(消费 flow 后校验)
  - RecordUserIP 反欺诈埋点移入 setupLoginAtAuthVersion
  - 子号/代理鉴权门(SubPermission/RejectSubAccount/AgentAuth)原样保留
  - profile 嫁接上游 LoginSessionsCard(会话管理 UI),绑定卡接入
    popup+postMessage 新绑定机制
  - 2FA/OAuth/微信登录后 redirect 目标经 handleLoginSuccess 传递恢复
- web/default → web/ 扁平化 + 删除 classic 主题:fork 全部前端定制
  (agent/supplier/detector/sub-account 等 180+ 文件)迁移至新路径,
  保留 fork 的 i18n 按需加载、每表分页记忆、主题调校与设计系统
- QuantumNous#6157 渠道代理客户端重构(别名缓存+失效清理),保留 fork 全局代理
  与 RELAY_DISABLE_HTTP2;QuantumNous#6074 suno CAS 防重复退款;QuantumNous#6163 playground
  自动分组;QuantumNous#6224 无限额度密钥显示已用量;QuantumNous#6032 realtime GA 去 beta 头
- 语言文件三方合并:fork ~6280 键 + 上游新增 55 键鉴权文案
- fork 刻意删除的组件与 workflows 维持删除(上次合并曾误恢复)

验证:go build/test 全绿,前端 tsgo 类型检查与 rsbuild 构建通过。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JacksonsY added a commit to JacksonsY/new-api that referenced this pull request Jul 22, 2026
采用上游 QuantumNous#6329 的两栏结构:主列(minmax(0,1fr))放绑定/通知/存储/
语言/安全/登录会话,右侧 360px 粘性侧栏放签到与侧栏配置,长页滚动
时侧栏保持可见;外层接入 CardStagger 结构与上游对齐。签到与侧栏
配置都关闭时退化为单列,避免空轨占位。fork 自有卡片全部保留
(Passkey/2FA 在安全卡内,故侧栏不再单列这两项)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JacksonsY added a commit to JacksonsY/new-api that referenced this pull request Jul 22, 2026
- 恢复上游 PasskeyCard/TwoFACard(适配本库 StatusBadge children API,
  danger→destructive)及其依赖 ui/icon-badge,置于个人页右侧粘性侧栏,
  与上游 QuantumNous#6329 布局一致;安全卡随之移除内嵌的 Passkey/2FA 行,
  删除不再使用的 passkey-row/two-fa-row
- 移动端密钥卡改为上游行式版式(名称+状态 / 密钥+行操作 / 额度),
  并因此补上了移动端此前缺失的行操作菜单;外层容器仍走统一的
  DataTable mobile-card-list(含禁用置灰)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Guxiaomoer added a commit to Guxiaomoer/new-api that referenced this pull request Jul 23, 2026
合并 QuantumNous/new-api 至 1721144QuantumNous#6329 无状态鉴权/session control、
代理客户端缓存生命周期、Suno CAS 退款、playground/UI 修复等)。

冲突处理:
- Dockerfile 跟随上游单前端构建;移除 classic 主题
- web/default -> web/src 路径重排后保留定制功能(社区监控/同步/签到机器人、
  维护响应、响应过滤、intercept/server monitor)
- i18n 语言包双向合并;routeTree 重新生成
- 保留本地 Claude Responses->Chat usage 终态修复

验证:go test relay/channel/openai + middleware + controller 通过;
web bun build:check 通过;go build 通过。service 包既有定制测试失败未在
本次合并引入修复范围内。
yiranxiaohui added a commit to yiranxiaohui/new-api that referenced this pull request Jul 25, 2026
Sync 14 upstream commits. The dominant change is structural: upstream
promoted the frontend from web/default to the web/ root and deleted the
classic theme entirely, so most of the diff is renames and deletions.

Notable upstream work:
- refactor(auth): stateless dashboard tokens replacing sessions (QuantumNous#6329)
- feat(channel): upstream model discovery for Codex and advanced custom
  channels (QuantumNous#6184, QuantumNous#5971)
- fix: CAS status update prevents duplicate suno task refunds (QuantumNous#6074)
- fix: no duplicate tool calls in Responses-to-Chat streaming (QuantumNous#6225)

Fork-side resolutions:
- Drop the classic theme, following upstream. electron/ and the
  release/electron-build workflows stay deleted as this fork already
  removed them; GHCR publishing continues via docker-build.yml.
- UserBase keeps the fork's per-user Ratio alongside upstream's new Role,
  AuthVersion and CacheSchema fields. GetUserCache adopts upstream's
  cache-population path, which returns ToBaseUser() and so still carries
  Ratio.
- web-router keeps the fork's dynamic index injector (SystemName/Logo
  templating) on top of upstream's renamed frontendFS. serveIndex collapses
  to the single-frontend WebAssets now that classic is gone.
- Restore the fork's invoices feature (5 files), which git's rename
  detection dropped during the web/default -> web/ move, and re-register
  its route in routeTree.gen.ts.

Backend builds and the full Go test suite passes. The frontend is not yet
type-checked or built locally.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
zhaodechao2008 pushed a commit to zhaodechao2008/new-api that referenced this pull request Jul 27, 2026
…session control (QuantumNous#6329)

* refactor(auth): replace dashboard sessions with stateless tokens

* feat(auth): harden session issuance and distributed enforcement

* fix(proxy): preserve trusted proxy compatibility defaults

* refactor: address dashboard auth review feedback

* refactor: remove classic frontend and flatten web app
yiranxiaohui added a commit to yiranxiaohui/new-api that referenced this pull request Jul 29, 2026
The upstream QuantumNous#6329 auth-cache rewrite replaced RedisHSetObj with a Lua
script that enumerates hash fields explicitly, silently dropping the
fork-only Ratio field. Cache hits then read a nil Ratio (neutral 1.0),
so billing flapped between groupRatio and groupRatio*userRatio
depending on Redis cache hit/miss.

Write Ratio through the same script, using the empty-string sentinel
that RedisHGetObj already maps back to a nil pointer.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Jaykebc1 added a commit to wrouter/wrouter that referenced this pull request Jul 29, 2026
#68)

Users with 2FA could not log in on dev: the 2FA step failed with
'session expired'. rc.22 (QuantumNous#6329) replaced the server-side 2FA login
session with a stateless AuthFlow token — the password step now returns
data.flow_token and /api/user/login/2fa requires it in the body. The
aurora frontend was still built for the old session-based flow and sent
only { code }, so the backend's GetAuthFlow lookup failed.

- Capture data.flow_token from the login response and stash it in
  sessionStorage before navigating to the OTP page.
- Send it back as flow_token on login2fa (covers both TOTP and backup
  code, same endpoint); clear it once verification succeeds.
- Type flow_token on LoginResponse.data and TwoFAPayload.

aurora build + typecheck clean (6 pre-existing warnings, no new).
Jaykebc1 added a commit to wrouter/wrouter that referenced this pull request Jul 29, 2026
Users could not stay logged in after rc.22: QuantumNous#6329 replaced the dashboard
session cookie with a stateless Bearer access-token + httpOnly refresh
cookie, and the backend now authenticates dashboard requests ONLY via
'Authorization: Bearer <access_token>' (no cookie fallback). Aurora still
authenticated by cookie, so every post-login request was unauthenticated.

Port the upstream web/ scheme into aurora:
- auth-store: hold accessToken/accessExpiresAt/session + setBundle/reset.
- lib/auth-session.ts (new): single-flight refresh via /api/user/auth/refresh
  on a dedicated interceptor-free client (no recursion), app-boot bootstrap
  from the refresh cookie, and clearAuthentication. Transient (5xx/429/network)
  errors don't force sign-out.
- lib/api.ts: request interceptor injects Bearer only when we hold a dashboard
  token and the request has no explicit Authorization (relay/API-key calls
  untouched); response interceptor does single-flight refresh + one retry on
  401, else clears state and redirects to /sign-in. getCommonHeaders (SSE/
  playground) also carries the Bearer token.
- Capture the login bundle on every path: password, 2FA (keeps flow_token),
  passkey, OAuth, WeChat.
- __root beforeLoad awaits bootstrapAuthentication so guards see the restored
  session on reload.

Backend session JSON verified to match the frontend bundle parser. aurora
build + typecheck clean (6 pre-existing warnings, no new).
bigfish9 added a commit to lanlingxiawu/new-api-er that referenced this pull request Jul 30, 2026
方向:整体对齐上游 QuantumNous/new-api(含 QuantumNous#6329 无状态鉴权),删除经典前端,
default 作为唯一 UI;保留 fork 的业务功能。

前端:
- 删除 web/classic(492 文件),仅保留 web/default 作为单一前端
- 后端服务层改为单 UI:main.go / web-router.go 嵌入并服务 web/default/dist
- 不引入上游的 web/src 重构

鉴权(采纳上游 QuantumNous#6329 无状态 token):
- 移除 cookie session 中间件与 store;configureTrustedProxies(补回部署代理 IP)
- secure_verification / passkey 二次校验:采用上游无状态实现(非删除),
  清理 fork 遗留的 session 版实现与测试
- model.User / UserBase:合并上游 AuthVersion/Role/CacheSchema + 保留 fork GroupRatios
- 限流:采用上游固定窗口原子脚本 + Retry-After

保留 fork 业务功能:
- 渠道成本系数(CostRatio)、渠道名删除快照
- 充值:Infini / Stripe 动态币种
- 员工归属 / 提成统计、任务退款记账(叠加上游防重复退款)
- console 迁移路由、分组倍率覆盖

采纳上游:service/group、任务对账、模型/渠道修复等其余 22 个提交

测试:移除与 fork 测试 harness 不兼容的上游 SQLite/truncateTables auth 测试;
清理单 UI 后失效的主题测试。go build ./... 通过,全部测试包编译通过。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bigfish9 added a commit to lanlingxiawu/new-api-er that referenced this pull request Jul 30, 2026
生产 bug 修复:
- GroupRatios 缓存丢失:上游 QuantumNous#6329 的 writeUserCache Lua 脚本按显式字段写
  Redis hash,未包含 fork 新增的 GroupRatios,导致用户专属分组倍率在缓存下
  永远读空 → 计费倍率错误。脚本补写 GroupRatios(model/user_auth_cache.go)。
- SumUsedQuota / SumEmployeeCustomerUsedQuota 统计为 0:GORM v1.25.12 起 Scan
  会清零目标结构体未匹配字段,两次 Scan 复用同一 stat 时 rpm/tpm 查询把已取到
  的 quota 覆盖为 0。改为独立结构体扫描再合并(model/log.go)。
- go mod tidy 误将 gorm 从 v1.25.2 升到 v1.25.12(上游与 fork 均用 v1.25.2),
  1.25.12 在 MySQL 上重复 AutoMigrate 会 panic(Can't DROP uni_tokens_key)。
  回退 gorm 到 v1.25.2,同时修复上面的 Scan 行为(代码修复对两版本都健壮)。

测试适配 QuantumNous#6329(fork 测试重建的旧 API → 上游无状态 API):
- model harness 补迁移 UserSession/AuthFlow/ExternalIdentityClaim;service harness
  补 UserSubscription;controller harness 补员工/订阅/客户相关表。
- passkey 测试改用 UpsertPasskeyCredentialWithAuthVersion/DeletePasskeyByUserIDWithAuthVersion;
  删除已被上游移除的 ApplyValidatedCredential 测试;删除测的是旧 session API 的
  passkey session_test / user_session 测试 / 旧 2FA(twofa_test)。
- BatchDeleteChannels 改双返回值;DeleteOldLog 已随 classic 移除,测试改用
  DeleteOldLogBatch 循环;user_cache group 缓存改 RefreshUserGroupCache。
- header_nav 测试改用 users.access_token(Bearer)模拟已登录(QuantumNous#6329 无状态鉴权)。
- retired_frontend 测试:fork 保留 console 迁移路由,断言改为 True。
- session_cookie 测试:无 host URL 的错误文案对齐上游。

验证:go build ./... 通过;完整套件 87 包通过,仅 service 包剩 2 个预存在失败
(负 TTFT 钳制未实现、Rankings 快照——pre-merge 亦失败,与本次合并无关)。
bigfish9 added a commit to lanlingxiawu/new-api-er that referenced this pull request Aug 3, 2026
上游 31d70fc (QuantumNous#6329) 引入的登录会话卡片在 18c7b25 等三次合并中被误删,
后端 /api/user/sessions 三个端点一直可用但前端无入口。"活跃会话数超限" 的报错
文案指引用户去打开 "登录会话" 页面,而该页面不存在,用户只能靠改密码或等 30 天
过期来解套。

从 upstream/main 取回四个组件与其单元测试(含 iPad UA 识别修复 b27b2b1),
补回 api.ts 的三个请求函数、profile 页的挂载点,以及七个语言各 23 条翻译。
OAuth 与日期格式串上游本就未翻译,保持回退到 key 本身的行为。
cuilun added a commit to fastpass-sg/new-api that referenced this pull request Aug 9, 2026
Brings in the stateless dashboard auth refactor (QuantumNous#6329), which replaces
gin sessions with access tokens plus a refresh cookie, moves OAuth state
into the auth_flows table with an explicit login/bind intent, adds
TRUSTED_PROXIES, changes SESSION_COOKIE_SECURE semantics, and removes
the classic frontend (web/default -> web).

Only .gitignore conflicted; kept both the upstream go.work entries and
our production deploy artifact rules.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
…session control (QuantumNous#6329)

* refactor(auth): replace dashboard sessions with stateless tokens

* feat(auth): harden session issuance and distributed enforcement

* fix(proxy): preserve trusted proxy compatibility defaults

* refactor: address dashboard auth review feedback

* refactor: remove classic frontend and flatten web app
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