feat(style-pack): rework UI + 模板新建 + 清理 PR #429 遗留死代码#435
Merged
Conversation
added 3 commits
May 14, 2026 14:59
UI: - 「原文」改成标题旁的 pill 切换器,与 builtin 卡分离 - builtin 卡片按 light → structured → formal 排序,followed by imported 包 - 「+ 新建风格包」tile 固定在网格末位 - imported 卡片右上角换成红色 trash 删除按钮(builtin 显示装饰 sparkle 图标,无 delete) - builtin 卡片背景做灰底处理;编辑按钮 disabled,"只读" - 编辑按钮挪到底部,紧接「导出」右边 后端: - 新增 IPC create_style_pack_from_template / persistence.create_from_template,「+」走这条路径直接落盘 - 编辑面板出场加 modal-backdrop-out / modal-drawer-out 两个 keyframe 清理: - 删除 Settings.tsx 里 PR #429 留下的"润色 System Prompt 已迁移"死告示卡 - 删除 11 个相关 i18n key 跨 5 种语言 - 删除卡片上的「轮换 ON/OFF」按钮 + 编辑面板里同款 + metaStatus item - BusyAction 移除 'toggling' 变体 - 删除 BUILTIN 选中态与 active 共用 highlight 的 bug - SavedToast 统一替换 inline notice/error banner
预留风格包市场的 HTTP API + IPC 契约 + DTO + 鉴权/缓存/安全策略。 IPC stub 未实装;后端 endpoint 选型 + 服务端工程化待定。
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
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.
User description
Summary
PR #429 (Cooper-X-Oak) 引入的 style pack store v1 在用户视角下有多处 UX 问题。这个 PR 系统化重做交互:
UI 重构(Style.tsx)
模板创建路径(后端)
persistence.rs::StylePackStore::create_from_template—— 给「+」按钮一个非 ZIP 的纯模板新建入口create_style_pack_from_template,前端createStylePackFromTemplatewrapper编辑面板动画
ol-modal-backdrop-out+ol-modal-drawer-out两个出场 keyframeeditorClosingstate + 200ms 卸载延迟,关闭时背景模糊平滑淡出视觉一致性
rgba(15,17,22,0.32)+blur(8px) saturate(140%))规划文档
docs/style-pack-marketplace.md:风格包市场 v1 完整 spec(HTTP API、IPC 契约、DTO、鉴权、缓存、安全、TODO 列表、决策记录)Test plan
PR Type
Enhancement, Bug fix, Tests, Documentation
Description
Add blank-template style pack creation
Refresh Style page pack management UI
Wire template creation through IPC
StylePackStoreUpdate locales, docs, tests, versions
Diagram Walkthrough
File Walkthrough
7 files
Add style pack template command handlerRegister new style pack commandPersist packs created from templateAdd IPC wrapper for template creationRemove obsolete style prompt noticeRework style pack manager interactionsAdd modal enter and exit animations6 files
Remove migrated style prompt copyRemove migrated style prompt copyRemove migrated style prompt copyRemove migrated style prompt copyRemove migrated style prompt copyAdd marketplace planning document3 files
Bump app version for releaseBump Tauri package versionBump desktop app version1 files
Restore button cursor affordance1 files
Expand style preference coverage