Skip to content

fix(frontend): correct global search result routes - #250

Open
iamjazon wants to merge 1 commit into
linux-do:masterfrom
iamjazon:fix/search-result-routes
Open

iamjazon wants to merge 1 commit into
linux-do:masterfrom
iamjazon:fix/search-result-routes

Conversation

@iamjazon

@iamjazon iamjazon commented Sep 4, 2026

Copy link
Copy Markdown

例行检查

  • 我已阅读并理解 贡献者公约
  • 我已阅读并同意 贡献者许可协议 (CLA),确认我的贡献将根据项目的 Apache2.0 许可证进行许可
  • 我知晓如果此 PR 并不做出实质性更改,或可被认为是为了PR被合并而提交PR的,则可能不会被合并

变更内容

  • 修正全局搜索中“通知设置”“安全设置”和“积分配置”的目标路由。
  • 添加覆盖三个搜索结果的回归测试,并在现有前端构建工作流中执行测试。
  • 复用现有依赖链中的 jiti 运行 TypeScript 测试,兼容 CI 的 Node.js 20 环境。

变更原因

搜索数据仍保留页面调整前的目标:管理员选择“积分配置”会进入不存在的 /admin/user_pay 并返回 404;“通知设置”和“安全设置”则都会落到设置总览,而不是对应页面。

根因是静态搜索路由表未随页面拆分和重命名同步。回归用例在修复前 3/3 失败,修复后 3/3 通过。

验证

  • pnpm test
  • pnpm lint
  • tsc --noEmit
  • pnpm build
  • Node.js 20.19.5 下运行回归测试:3/3 通过

@yyg-max
yyg-max requested a review from chenyme September 18, 2026 08:46
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

此 PR 长期无活动,将在 14 天后自动关闭。如需继续讨论请回复

@github-actions github-actions Bot added the Stale label Oct 3, 2026
Comment thread frontend/package.json
"start": "next start -p 3010",
"lint": "eslint"
"lint": "eslint",
"test": "jiti lib/utils/search-data.test.ts"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

这里只运行一个 test.ts
test 名称容易让别人误会成自动运行目录下全部 test.ts
建议改一下

@github-actions github-actions Bot removed the Stale label Oct 6, 2026
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.

3 participants