Skip to content

refactor(home): 电路风格首页与登录后兑换码购买引导 - #11

Merged
yang-yang9 merged 2 commits into
devfrom
feat/homepage-identity-mr
Nov 2, 2026
Merged

yang-yang9 merged 2 commits into
devfrom
feat/homepage-identity-mr

Conversation

@yang-yang9

Copy link
Copy Markdown

⚠️ 提交说明 / PR Notice

本 MR 由 Codex(AI)辅助完成。正文按实际改动与验证记录精简;人工复核待合并前完成。

🔗 关联任务 / Related Issue

项目所有者已在本次会话确认首页改版及购买入口范围。本 fork 未启用 Issues,无关联 Issue。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)
  • ✨ 新功能 (New feature)
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

📝 变更描述 / Description

默认首页改为电路空间视觉,模型节点选择与请求示例联动,支持动画暂停、减少动态效果、暗色及移动端。保留自定义首页、文档链接和 New API / QuantumNous 标识。

登录后显示兑换码购买及钱包兑换入口,复用钱包现有 GET /api/user/topup/info 配置。访客不请求充值信息;退出登录、链接无效、兑换关闭或接口失败时隐藏购买引导,HTTP 500 不触发全站错误页跳转。

复用现有 Glow、Card、Button、CopyButton 及钱包 API;首页只组合导航说明,不复制钱包支付表单。仅修改 15 个前端文件,后端及支付配置无改动。

📸 运行证明 / Proof of Work

在 web/ 执行:

  • bun run test src/coverage-tests/features/home --reporter=dot:20 个测试文件、165 个用例通过,覆盖协议选择、复制、登录/退出、延迟响应、配置更新及 HTTP 500。
  • bun run typecheck:1,929 个文件、2 个项目无类型错误。
  • VITE_REACT_APP_SERVER_URL=http://127.0.0.1:4180 bun run build:生产构建通过。
  • 对涉及的 7 个 TS/TSX 文件执行 oxlint:0 错误;保留版权头的格式检查及 git diff --check 通过。全量 lint 仍有其他文件的既有错误。

Chromium 验证桌面 1440px、手机 390px:访客 0 个购买入口、0 次充值接口请求;登录用户 2 个入口共用配置链接、1 次请求。兑换关闭和 HTTP 500 时入口隐藏且保留首页,页面无横向溢出或运行时错误。

截图:桌面 / 手机。截图使用浏览器隔离的登录状态和示例购买链接,未修改实际配置。

✅ 提交前检查项 / Checklist

  • 人工确认: 待项目所有者在合并前复核正文与效果。
  • 非重复提交: 已查询本 fork 的现有 PR,无首页改版重复提交;Issues 未启用。
  • 新功能关联 Issue: 不适用,本次重构已有首页与购买/兑换导航。
  • 事前沟通: 项目所有者已在会话中确认设计、实现和购买入口范围。
  • 功能范围: 聚焦首页界面与导航。
  • 非透传: 未修改转发行为。
  • 范围聚焦: 仅含首页相关前端改动。
  • 本地验证: 实际命令及观察结果见上。
  • 安全合规: 代码无敏感凭据;复用既有鉴权接口。

@yang-yang9
yang-yang9 merged commit 0efe6ec into dev Nov 2, 2026
37 checks passed
yang-yang9 pushed a commit that referenced this pull request Nov 14, 2026
Merged 44 upstream commits from origin/main into dev, rebased onto the
current origin/dev tip (includes PR #11 homepage identity work). An
earlier local attempt had merged into a stale dev chain that missed the
pushed homepage commits; this merge is the correct one.

Conflict resolution (14 files):
- Dockerfile: kept dev's ARG VERSION fallback, adopted main's
  MoeForge/moejs build path (go.mod is MoeForge on both sides)
- controller/relay.go: kept dev's service.IncrementChannelError and
  added main's requestplugin.Stopped else-if branch
- i18n/keys.go: union of dev's channel notify keys and main's new
  MsgChannelNotifyScheduledSubject
- model/request_policy.go: kept dev's superset case list
- web/package.json: dev's test/e2e scripts and deps + main's newer
  versions (@rsbuild/core 2.2.0, @types/react 19.2.18, jsdom ^30)
- web/bun.lock: regenerated via bun install
- 7 locale JSONs: key union (323 dev-side keys kept incl. homepage,
  450 main keys added, shared keys take main's value)
- web/src/routeTree.gen.ts: kept deleted (gitignored, routes:gen CI
  step regenerates it)

Dev customizations preserved (audited):
- image-gen embed page (option.go 13 hits, sidebar-data 4,
  sidebar-config 2)
- channel error notifications (Channel error alert in
  request-policies/channel-health-section.tsx; consecutive_error/
  error_rate/latest_error keys in backend yaml)
- in-panel system update + rollback (update-checker-section 33 hits)
- dev-created files intact: system_update.go, update_check.go,
  feishu_notify.go, qqbot_notify.go, channel_error_counter.go,
  notify-limit.go, scripts/version.sh
- CI: backend-tests.yml still without -race; routes:gen step intact;
  bun 1.4.4 consistent across workflows
- homepage identity work from PR #11 auto-merged (immersive landing,
  home-immersive.css, locale keys)

Main features adopted:
- provider/request plugins + community marketplace (QuantumNous#8271)
- task plugins at vendors' own /v1 paths (QuantumNous#8117)
- MoeForge moego v0.1.0-alpha.3 (no-AVX SIGILL fix), streaming reads
- doubao-seedream-5-5-261028, Gemini Omni 1.2 Flash on Vertex
- DeepSeek search/crawl options, developer->system role mapping,
  Responses reasoning backfill
- epay RSA signing, HOST env, HTTP/2 health checks (opt-in)
- security: Redis auth cache integrity, 2FA lockout reset,
  DOMPurify 3.4.17, go-jose 4.1.6, password validation improvements
- pricing change review before save; frontend deps upgrade (QuantumNous#6999)

Fork test fixes for upstream API changes:
- middleware/coverage_test.go: gjson import aliased to
  MoeForge/moego/ojson (drop-in)
- controller/coverage_test.go: getVertexArrayKeys now returns
  (keys, indices, err)
- setting/sensitive_test.go deleted (upstream retired the sensitive
  word check; replaced by request-policy blocked keywords + migration)
- web coverage-tests: dropped PASSWORD_MAX_LENGTH assertion (removed
  by QuantumNous#6928), dropped getModeVariant tests (export removed)

Verification:
- go build ./... passes (GOPROXY=goproxy.cn)
- relaykit and tokenkit standalone builds + vet pass (GOWORK=off)
- go vet ./... clean in all three modules
- bun install succeeds; bun run typecheck: zero errors (2,013 files)
- bun run i18n:check: all t() keys exist and translated

Co-Authored-By: Claude Code <noreply@anthropic.com>
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