✨ feat(web): 添加生产网站图标 - #145
Merged
Merged
Conversation
背景:生产 Web 入口缺少显式 favicon,浏览器显示默认图标。 变更:接入由授权图像服务生成并缩放的 PNG/ICO 图标。 验证:npm run test -- --run(59 passed);npm run build 通过。 Refs #144
Owner
Author
|
阶段:D4 real |
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.
关联 Issue
Closes #144
结论
为生产 Web 前端提供显式 PNG/ICO 网站图标,浏览器标签不再显示默认地球图标。
范围 / 非范围
范围:frontend/index.html 图标引用与 frontend/public 图标资产。
非范围:API、WebSocket、后端、模型和域名路由。
实现与架构
图标由仓库外的授权图像生成服务按项目品牌约束生成,再缩放为 256px PNG 与多尺寸 ICO;前端只引用静态资产,不引入运行时依赖。
实验记录
阶段:D4 real
假设:图标生成服务可返回可用的项目图标源图。
环境:gpt-image-2 1K。
输入:方形、无文字、高对比 BabelFlux 抽象标记提示词。
命令:通过图像生成 API 生成并下载后使用 Pillow 缩放。
结果:返回 PNG 源图并生成 256px PNG、16/32/48/64/128/256 ICO。
结论:接受;生成源图不提交仓库,仅提交处理后的 favicon。
限制:图像生成质量与第三方服务可用性不构成运行时依赖。
验证
风险与回退
风险:浏览器缓存旧 favicon。静态资源使用稳定文件名并由发布后的 Nginx 提供。
回退:删除 HTML 中两条图标引用并回滚本提交,重新构建并发布上一版本。