chore: 清理过时与冗余的代码注释#347
Draft
longsizhuo wants to merge 2 commits into
Draft
Conversation
- 删除 thread.tsx 中重复说明属性名/函数名的"是什么"注释(标识符已自解释) - 移除 DocsAssistant.tsx 的占位注释("其他需要的属性...")和重复 state 说明, 保留并精炼真正解释"为什么"需要 loader/pending 缓存的注释 - 删除 HotDocsTab.tsx、LinkCard.tsx 中纯标签 JSX 区段("加载状态/列表/标题"等) - 删除 ZoteroFeed.tsx 中误导性的 "Debug helpers (removed in production)" 残留标记 - 删除 assistant-modal.tsx 中 issue #285 任务引用,保留受控 state 的 WHY 说明 - 删除 generate-leaderboard.mjs 中已不适用的"历史:早期直连 Postgres"段落 保留所有解释 WHY 的踩坑记录、不变式、降级策略等有价值注释。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This reverts commit a5dc2c0.
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.
Summary
按项目注释规范全量审计源码,删除"重复说明 WHAT"的冗余注释、误导性残留标记和与 issue/PR 绑定的任务引用;保留所有解释 WHY 的踩坑记录、不变式与降级策略。
主要改动
app/components/assistant-ui/thread.tsx:删除ThreadProps内重复属性名的注释、各组件前"X 组件"式 header 注释、关于 Composer Viewport 重构的残留备注。app/components/DocsAssistant.tsx:移除占位注释(// 其他需要的属性...)和复述变量名的 state 注释;保留并精炼showSuggestionsLoader/pendingSuggestions的真正 WHY(与流式回复抢渲染、loader 解耦)。app/components/rank/HotDocsTab.tsx:删除纯 JSX 区段标签({/* 加载状态 */}等),条件本身已自解释。app/[locale]/feed/components/LinkCard.tsx:删除整卡可点击区域、卡片内容区、标题、分类 badge等 JSX 标签注释;保留referrerPolicy等踩坑说明。app/components/ZoteroFeed.tsx:删除误导性// Debug helpers (removed in production)残留标记。app/components/assistant-ui/assistant-modal.tsx:剥离issue #285任务引用,保留"受控 open 是为了让 X 按钮能主动关闭"的 WHY;精炼埋点条件注释。scripts/generate-leaderboard.mjs:删除已不适用的"早期直连 Postgres 5432"历史段落。Test plan
npx tsc --noEmit仅剩仓库既有的 tsconfigbaseUrl弃用 warning,无新增报错Generated by Claude Code