Repository navigation
feat(web): 「已发布新版本」提示换成品牌色的版本更新卡片(#444) - #445
Merged
Merged
Conversation
- 原来复用 toast.warning:琥珀色三角像报错,「刷新」只是一行小字链接,中文描述折行剩孤字 - 新卡片:品牌色榫卯图标(榫头滑进卯眼,减弱动效时不动)、新旧版本号、实心「立即刷新」+「稍后」 - ui 的 toast 加通用插槽 toast.custom:自定义卡片仍走同一个视口,和别的 toast 排队、可滑动关闭 - version.json 的 version 只用来显示,判据仍是 buildId;懒加载失败那条路现取一次,取不到就不显示版本行 - 不自动刷新、不自动消失两条约束不变;E2E 改断言新卡片,并补「没有 version 字段」一条 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- fetchServed 的超时改成手写 AbortController:老浏览器没有 AbortSignal.timeout,抛错被 catch 吞掉后新版检测会整个静默失效 - 顶边渐变改用 --primary-ink:裸 --primary 在深色下不提亮,和卡片其余部分对不上 - 错误页「分片取不到」那一支的标题 / 按钮跟卡片统一成「新版本已就绪 / 立即刷新」,删掉没人用的旧 key - E2E 补懒加载失败那条路两条:现取到的版本号显示出来 · version.json 取不到照样弹、没有版本行(去掉现取后第一条当场红) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JerryGo2026
pushed a commit
to JerryGo2026/fastapi-react-admin
that referenced
this pull request
Nov 24, 2026
Environments 页面里一串 github-pages 部署失败,实查有三种原因: - E2E 超时:近几次耗时 21~29 分钟,yile2020#445 撞上 30 分钟上限 → 放到 40 - 连着合 PR 时 concurrency 取消前一个 main 运行,pages job 因 always() 照跑,没有 E2E 报告就在下载那步报错 → 改 !cancelled(),整个 run 被取消时跳过; E2E 自己超时不算 run 被取消,文档站照发 - upload-pages-artifact 刚 finalized,deploy-pages 约 1 秒后查 artifact 列表, 偶发 Found 0/1 → `No artifacts named "github-pages"`(#1033、#1053) → 部署前先轮询列表,最多等 60 秒,等不到仍交给 deploy-pages Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #444
改了什么
前端检测到新版本时弹的那条提示,从通用的
toast.warning换成一张专门的版本更新卡片(apps/web/src/components/update-notice.tsx):prefers-reduced-motion下不动),顶边一道品牌色渐变,颜色全走--primary,跟着主题色偏好变v1.1.3 → v1.2.0(新版本号取自version.json的version);拿不到、或者版本号没变(同版本重新构建)时不显示这一行实现要点
packages/ui的 toast 加了一个通用插槽toast.custom(render, { timeout }),并导出ToastTitle/ToastDescription,供读屏关联标题和描述。自定义卡片仍然走同一个视口,和别的 toast 排队、可以滑动关闭、进出场动画一致。ui 层不涉及业务buildId,version只拿来显示。懒加载失败那条路手里没有版本号,会现取一次version.json(5 秒超时),取不到照样弹timeout: 0)-error.tsx里的同名提示这次没动(issue 里标的是可选)验证
pnpm e2e tests/new-version.spec.ts:3 条通过(新卡片、版本号、点「稍后」后卡片消失;没有version字段时不显示版本行;开发期 404 不弹)pnpm typecheck --force·pnpm lint·pnpm i18n:check·pnpm arch:check·pnpm ctx:check全部通过不在本次范围内
桌面端的「新版本已下载,重启更新」(
DesktopUpdatePrompt)还是toast.info,以后可以换成同一张卡片。🤖 Generated with Claude Code