Skip to content

refactor(thread-chat): 引入语义化样式 token,重构样式插件 - #75

Merged
hifizz merged 3 commits into
mainfrom
refactor/style-tokens
Sep 3, 2026
Merged

refactor(thread-chat): 引入语义化样式 token,重构样式插件#75
hifizz merged 3 commits into
mainfrom
refactor/style-tokens

Conversation

@hifizz

@hifizz hifizz commented Sep 3, 2026

Copy link
Copy Markdown
Owner

变更摘要

  • 将 thread-chat 手写样式拆分为 primitive、semantic、contextual 与派生色 token 层,并保留 styles/tokens.css 作为单一入口。
  • 将区块样式、深度配色、动态高亮与 z-index 迁移到语义 token,清理旧 token、区块内颜色字面量和 color-mix()
  • 将 Markdown 正文排版迁移到 .tc-prose,保留 .md-body 的文本锚点 DOM 契约,并加入基于容器宽度的排版档位。
  • 对迁移涉及的非偶数字号按约定取整;必须保留的亚像素值已用 tc-review 说明。
  • 新增并完成 refactor-thread-chat-style-tokens OpenSpec 变更,更新 CLAUDE.md 中的样式约定。

验证

  • pnpm typecheck:通过
  • pnpm lint:通过,0 error;保留 2 个既有 warning
  • pnpm build:通过
  • pnpm openspec:validate:通过,30/30
  • git diff --check:通过
  • 样式迁移扫描:通过(旧 token、token 目录外颜色字面量/color-mix()、裸 z-index、CSS 中 .md-body 排版选择器均无命中;Gate 3 harness 测试页颜色按 OpenSpec 记录豁免)
  • 变更 TS/TSX 的 Prettier 检查:通过

已知 warning / 限制

  • app/layout.tsxGeist 未使用(既有 ESLint warning,本次未修改)。
  • lib/auth/session-recovery.ts:内部页面使用 window.location.href(既有 Next.js ESLint warning,本次未修改)。
  • 仓库没有统一测试框架;本次依据项目规范使用 typecheck、lint、production build、OpenSpec strict validation 与静态迁移扫描验证。
  • .commandcode/ 为本地工具配置,未包含在提交和 PR 中。

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
thread-chatbot Error Error Sep 3, 2026 11:50am UTC

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 0cb429bb-46da-42bf-b118-c6d311b76be5


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hifizz hifizz changed the title refactor(thread-chat): 引入语义化样式 token refactor(thread-chat): 引入语义化样式 token,重构样式插件 Sep 3, 2026
@hifizz
hifizz merged commit 6269e04 into main Sep 3, 2026
3 of 4 checks passed
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.

1 participant