Skip to content

fix: 全站链接/文案审计修复 + 下载代理 token 失效兜底 - #8

Merged
chen-ran merged 4 commits into
felinics:mainfrom
qqqqqf-q:fix/landing-audit
Jul 29, 2026
Merged

fix: 全站链接/文案审计修复 + 下载代理 token 失效兜底#8
chen-ran merged 4 commits into
felinics:mainfrom
qqqqqf-q:fix/landing-audit

Conversation

@qqqqqf-q

@qqqqqf-q qqqqqf-q commented Jul 20, 2026

Copy link
Copy Markdown
Member

背景

对线上 memoh.ai(= 最新 main,gh-pages 哈希已核实)做了一次全站审计:Playwright 全路由 × 中英双语实爬 + 所有外链 HTTP 实测。本 PR 修复发现的全部代码层问题。

修复内容

站点(cadf0e4)

问题 现状(线上) 修复
TopBar Pricing 入口 /pricing 路由不存在,点击后正文完全空白(0 字符)+ HTTP 404 撤下入口,注释说明恢复时机(定价页上线时连同 nav.pricing 文案一起恢复)
footer X 链接 指向 x.com/memohai(404,非官方账号) 改为真实账号 x.com/memoh_ai(实测 200)
footer Privacy / Terms 两个链接都指向 memoh.ai 首页,纯占位 整列撤下,页面就绪后恢复
中文模式英文残留 导航 Pricing/Blogs、首页主按钮 Join waitlist、waitlist 页 Early access 等 6 处 全部翻译(博客/加入等候名单/抢先体验)
未知 URL 正文全白,title 停留在旧 meta 新增 NotFoundPage(双语、noindex)+ catch-all 路由
/download 无静态入口,GitHub Pages 返回 404 状态码(SEO 判死) create-spa-fallback.mjs 补 download 入口
全站 meta 还是上一代定位 "MemohAI - The Agent Orchestrator" index.html 与 fallback 脚本同步更新为当前定位

Worker(16bb069)

线上 /downloads/desktop/ 目前全部 502* —— Cloudflare Worker 里的 GITHUB_TOKEN 已失效(GitHub 返回 401 Bad credentials),manifest 和安装包都下不了,下载页按钮全部不可用。

本 PR 给 githubFetch 加兜底:token 被拒(401)或触限(403)时去掉 Authorization 匿名重试。公开仓库的 release 元数据匿名 API 即可读(已实测),匿名限流 60 次/时/IP 由已有的 5 分钟 release 缓存稀释。token 换新后此路径自动不再触发。

⚠️ 部署注意

  1. 合并即自动部署 worker:.github/workflows/deploy-download-worker.yml 监听 main 上 workers/** 的改动,合并后兜底逻辑自动上线,不需要手动操作 Cloudflare;
  2. 根治仍需轮换 token:worker 的 GITHUB_TOKEN 来自 repo secret MEMOH_GITHUB_TOKEN(workflow 部署时注入)。只需 repo admin 更新该 secret 再 re-run workflow,同样不需要 Cloudflare 权限。建议:无 scope、永不过期的 classic PAT(对公开仓库权限等同匿名,泄露无害);或建 GitHub App 用私钥换 installation token(私钥不过期、可吊销,最接近 npm trusted publisher 的机制)。

Test plan

  • pnpm build 通过(vue-tsc + vite + fallback 脚本)
  • 本地 serve dist,Playwright 复测 7 条路由 × zh/en:
    • /download:404 → 200;/pricing 与任意错误 URL:空白 → 正式 404 页(双语)
    • 中文导航显示「文档 博客」,无 Pricing;首页 CTA「加入等候名单」
    • footer:X → x.com/memoh_ai,Legal 列移除
  • node --check 通过 worker 语法
  • 合并后确认 gh-pages 部署产物含 download/index.html
  • wrangler deploy 后确认 https://memoh.ai/downloads/desktop/latest/manifest.json 恢复 200

qqqqqf-q added 2 commits July 20, 2026 08:19
- TopBar 撤下 Pricing 入口:/pricing 路由不存在,点击后正文空白
- footer X 链接改回真实账号 x.com/memoh_ai(原 x.com/memohai 为 404)
- footer 撤下 Privacy/Terms 占位链接(均指向首页,无实际页面)
- zh.json 补齐英文残留:博客/加入等候名单/抢先体验等 6 处
- 新增 404 页面与 catch-all 路由,替代原来的空白正文
- create-spa-fallback.mjs 补 /download 静态入口(此前线上返回 404 状态码)
- index.html 与 fallback 脚本的 meta 更新为当前产品定位
线上 GITHUB_TOKEN 过期导致 /downloads/desktop/* 全部 502(manifest 与
安装包均不可下载)。公开仓库的 release 元数据匿名 API 即可读,token 被
拒(401)或触限(403)时去掉 Authorization 重试一次,下载功能不再单点
依赖 token 有效性;匿名限流由 release 缓存(5 分钟)稀释。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16bb0691b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/create-spa-fallback.mjs Outdated
Comment on lines +12 to +13
description: 'Every agent gets its own computer with a desktop, filesystem, and network. Always on, always there.',
socialDescription: 'Every agent gets its own computer with a desktop, filesystem, and network. Always on, always there.',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align the generated home description with the localized SEO copy

For crawlers and link-preview clients that consume the generated HTML before Vue runs, these values describe an ordinary “computer,” while src/locales/en.json and HomePage.vue describe each agent as having a “cloud computer.” This makes the raw index.html, generated route pages, and hydrated home page publish inconsistent product claims despite the synchronization requirement immediately above; use the same wording as seo.description here and in the matching static metadata.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Confirmed and fixed in 083626b — home description now matches src/locales/en.json seo.description verbatim ("cloud computer" restored) in both index.html and this script. Also caught a related layout nit in the same pass (footer grid column count after the Legal column removal).

- home 描述补回 cloud computer,与 src/locales/en.json seo.description
  逐字一致(Codex review P2):爬虫/链接预览拿到的静态 HTML 与 SPA 水合后
  的 meta 不再发布不一致的产品描述
- Legal 列撤下后 footer 链接区只剩两列,grid 从 sm:grid-cols-3 改为固定
  两列,消除 sm 以上断点的空列
@chen-ran chen-ran self-assigned this Jul 29, 2026
@chen-ran

Copy link
Copy Markdown
Member

to fix felinics/Memoh#869

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.

2 participants