Skip to content

fix(theme): correct marks and unavailable previews - #941

Open
huyanxius wants to merge 9 commits into
1024XEngineer:mainfrom
huyanxius:fix/theme-assets
Open

fix(theme): correct marks and unavailable previews#941
huyanxius wants to merge 9 commits into
1024XEngineer:mainfrom
huyanxius:fix/theme-assets

Conversation

@huyanxius

Copy link
Copy Markdown
Collaborator

修复主题发布后的标志缓存、导航亮线和预览图失败显示。

Why

固定 SVG 地址被生产缓存七天,旧浏览器可能保留黑色标志;导航浅色内阴影形成亮线。旧媒体域名返回 419 user disabled,预览台直接显示破图。

Changes

  • 页面标志改为随文字颜色显示的内联 SVG;favicon 更新版本地址。
  • 去掉导航顶部白色内阴影。
  • 原图加载失败显示占位提示;保留缩略图退回原图及换 URL 后重试。

Verification

  • vitest run src/shared/ui/asset-preview-card.test.tsx src/app/layout/app-header.test.tsx src/pages/account/index.test.tsx:71 项通过;新增的 2 项回归测试修复前失败、修复后通过。

  • npm run build:通过。

  • 改动文件 oxlintoxfmtgit diff --check:通过。

  • 本地浏览器:标志填色分别为 rgb(37,37,34) / rgb(232,232,232);导航 box-shadow: none;失败图片显示占位提示。

Scope

仅修复显示,不恢复旧存储账号或迁移历史图片;新空间配置、数据库和服务器均未修改。旧图仍需恢复存储访问后才能重新显示。

Related Issues

Closes #940

External marks can retain stale colors.

Add an inline mark with isolated masks.

The mark follows surrounding text.
Navigation retains external marks and a bright inset line.

Use inline marks and remove the inset shadow.

Navigation follows the page palette.
The panel loads a cached external mark.

Render the shared inline mark.

The mark inherits panel text color.
The default avatar loads a cached external mark.

Render the shared inline mark.

The avatar follows account text color.
The footer loads a cached external mark.

Render the shared inline mark.

The footer mark follows its text color.
The favicon URL has an immutable cache lifetime.

Version the updated favicon reference.

Browsers request the theme-aware asset.
Failed sources leave broken images in preview cards.

Show a status after the original image fails.

Thumbnail fallback and changed URLs remain usable.
Failed sources need explicit recovery coverage.

Exercise fallback and replacement URLs.

Regressions in failure handling are detected.
Default account marks now render inline.

Assert their decorative accessibility contract.

Existing account behavior remains covered.
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
windup Ready Ready Preview Sep 8, 2026 3:42pm UTC

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #941   +/-   ##
=======================================
  Coverage   91.27%   91.27%           
=======================================
  Files         193      193           
  Lines       13204    13204           
=======================================
  Hits        12052    12052           
  Misses       1152     1152           
Flag Coverage Δ
backend 91.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

已完整检查本 PR 的固定提交差异,重点覆盖主题标志替换、导航阴影、账号入口及预览图缩略图/原图失败回退与 URL 更新状态。未发现满足报告阈值的、由本 PR 引入且具有明确用户影响的正确性回归。

验证方面,git diff --check 通过;定向 Vitest 未能启动,因为工作区没有安装 frontend/node_modules,因此未执行测试断言。

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.

[Bug]: fix theme marks and unavailable preview presentation

1 participant