fix: 全站链接/文案审计修复 + 下载代理 token 失效兜底 - #8
Conversation
- 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 分钟)稀释。
There was a problem hiding this comment.
💡 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".
| 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.', |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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 以上断点的空列
|
to fix felinics/Memoh#869 |
背景
对线上 memoh.ai(= 最新 main,gh-pages 哈希已核实)做了一次全站审计:Playwright 全路由 × 中英双语实爬 + 所有外链 HTTP 实测。本 PR 修复发现的全部代码层问题。
修复内容
站点(cadf0e4)
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 换新后此路径自动不再触发。
.github/workflows/deploy-download-worker.yml监听 main 上workers/**的改动,合并后兜底逻辑自动上线,不需要手动操作 Cloudflare;GITHUB_TOKEN来自 repo secretMEMOH_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 脚本)node --check通过 worker 语法