-
Notifications
You must be signed in to change notification settings - Fork 157
refactor: align UI with shadcn and clear audit findings #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AmintaCCCP
wants to merge
72
commits into
main
Choose a base branch
from
refactor/shadcn-audit-zero-warnings
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
12b8f13
refactor: align UI with shadcn and clear audit findings
9ad52f4
style: finish shadcn semantic color cleanup
dfbaa15
fix: address CodeRabbit review findings
8cca95a
fix: close second-round review findings
603f0bd
fix: use semantic card background token
a36e99f
fix: resolve final CodeRabbit findings
879a607
fix: address remaining review findings
c4460ef
fix: close remaining accessibility findings
e2711be
fix: resolve latest CodeRabbit findings
5b88c1b
fix: address latest UI review findings
1a78030
fix: polish remaining component findings
1cfc512
fix: resolve latest accessibility review findings
7770c6d
fix: close latest UI review findings
3a42fc6
fix: close latest review findings
8f9a544
fix: close final CodeRabbit findings
1a04720
fix: close latest UI review findings
2de4162
fix: close latest accessibility findings
3544acf
fix: close latest component review findings
ff639df
fix: close latest shared control findings
1a91b5d
fix: close latest review findings
57ee771
fix: close latest MCP and discovery findings
a5175b9
fix: close latest accessibility and layout findings
debbaa4
fix: close latest review findings
4e23650
fix: close latest accessibility and state findings
cd5f693
fix: close coderabbit accessibility findings
4926cde
fix: close latest functional accessibility findings
b2c21c9
fix: close latest interaction and theme findings
38302c1
fix: finish final coderabbit findings
8520fc1
fix: close final accessibility and interaction findings
f98f47f
fix: close latest review findings
7c6d537
fix: address follow-up review findings
8bfc616
fix: polish follow-up review findings
e7f7a4e
fix: announce categorization failures
7ddbeb5
fix: close review accessibility findings
9de6d1e
fix: tighten final review controls
4ff8079
fix: harden bundle and navigation checks
b00f5f8
fix: compact repository list controls
2207a44
fix: align UI with official shadcn visual baseline
9abec18
fix: address follow-up review findings
03ef497
fix: close follow-up review findings
c483b4e
fix: address round 32 review findings
d5782bd
fix: stop stepper repeat at bounds
a00503a
fix: address round 34 review findings
c475f85
fix: address round 35 review findings
aeeb3aa
fix: address round 36 review findings
b3630d5
fix: refine shadcn visual consistency
3aa76c7
fix: refine shadcn visual interactions
c085fe5
fix: polish remaining shadcn UI feedback
f2ff824
fix: align scroll containers and hide idle scrollbar
f8a3520
fix: expose release source toggle state
bb0ca3d
fix: finalize populated UI layout verification
4c6dc44
fix: address final coderabbit findings
154e011
fix: close remaining audit findings
3ce5437
fix: polish remaining accessible controls
b3878d2
fix: resolve final audit accessibility findings
3f0ddff
docs: reconcile final test count
82553cd
fix: close final audit findings
b4d7f85
fix: finish remaining review findings
6a02187
fix: close remaining audit comments
825b906
fix: close remaining review findings
206f8f8
fix: resolve remaining review findings
5fd466c
fix: resolve remaining review findings
9634d38
fix: resolve remaining review findings
f5c0201
fix: polish final review findings
a42ec53
fix: close remaining audit findings
9ed3594
fix: close remaining audit findings
81cbdf6
fix: close remaining review findings
cb49bbf
fix: resolve final audit findings
62345f4
fix: resolve final review findings
66a95a0
fix: preserve gist content cache
85c891f
fix: close final review findings
cb6c1ae
fix: finish final review polish
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # 审计与质量门禁摘要 | ||
|
|
||
| ## 代码与类型审计 | ||
|
|
||
| 本轮改造将前端呈现层统一到 **shadcn/ui 风格组件与 Radix Primitives**,并清理共享原语的 Fast Refresh 非组件导出、未使用 Hook 依赖、测试文件隐式依赖和 GraphQL 响应隐式类型。`src/services/githubListsApi.ts` 的改动仅限于 GraphQL wire 类型、nullable `nodes`/`description` 的安全归一化和内部请求签名清理;网络请求语义、store、同步流程、AI 分析、仓库动作和权限逻辑均保持不变。 | ||
|
|
||
| CodeRabbit 首轮报告中的共享 Button 变体、粘连 Tailwind token、重复 dark-mode 类、nullable GraphQL nodes、`tailwindcss-animate` 注册、语义色 alpha placeholder、border token、Slider thumb accessible name、Tooltip Portal、Dialog 标题、Select accessible labeling、ConfirmDialog 双触发、RadioGroup accessible name、DropdownMenu 语义 role 以及冗余 outside-click 逻辑均已核对并修复。ReleaseTimeline、RepositoryEditModal、CategoryPanel、WebDAVPanel、DiscoveryView、SearchBar 和全局 legacy CSS 的剩余 findings 也已完成收尾。 | ||
|
|
||
| ## 设计系统与无障碍审计 | ||
|
|
||
| 全局主题使用 shadcn 默认语义变量:`background`、`foreground`、`card`、`popover`、`primary`、`secondary`、`muted`、`accent`、`destructive`、`border`、`input`、`ring` 和 `radius`。主操作使用 `primary/primary-foreground`,中性工具栏和 icon-only 控件使用 `ghost`,次级预设使用 `outline`;空状态刷新按钮、缓存状态和深色模式文本均已检查实际背景下的对比度。 | ||
|
|
||
| Radix Dialog、AlertDialog、Select、DropdownMenu、Tooltip、Slider、RadioGroup、Checkbox、Switch、Tabs 和 Popover 均使用共享封装。ReadmeModal 与 ForkTimeline 的 native select 仅作为既有 DOM/change 兼容层并从辅助技术树隐藏,用户可见控件由 Radix 渲染;测试已改为验证真实的 combobox/option 用户路径。RepositoryCard 的菜单测试已改用 `menuitem` 语义,并以 userEvent 验证 pointer、keyboard、card whitespace、outside pointer 和 Escape 行为。 | ||
|
|
||
| ## 安全审计 | ||
|
|
||
| `npm audit --omit=dev --audit-level=high` 报告 `found 0 vulnerabilities`。仓库没有使用 `react-router-dom`,未使用依赖及其传递漏洞来源已移除,没有执行破坏性路由升级。 | ||
|
|
||
| ## UI 与交互走查 | ||
|
|
||
| 生产预览已走查仓库页、设置页、AI 配置页、新增 AI 表单、WebDAV 空状态、备份恢复面板、主题共享控件、导航 active 状态和 AI 搜索空查询 disabled 状态。Radix Select 打开与切换、Checkbox 展开默认提示词、Textarea、Switch checked 状态、取消表单、空状态恢复、仓库操作菜单和 README 语言切换均已回归验证。测试专用的 jsdom Pointer Capture 与 `scrollIntoView` no-op polyfill 只位于 `src/test/setup.ts`,不进入生产代码路径。 | ||
|
|
||
| ## 最终质量门禁 | ||
|
|
||
| | 检查项 | 结果 | | ||
| |---|---| | ||
| | `npm run lint` | 通过,0 errors、0 warnings | | ||
| | `npx tsc -b` | 通过,无 TypeScript 诊断 | | ||
| | `npm run test:run` | 通过,31 个测试文件、329 个测试全部通过;无 React/Radix act、Unhandled 或 Warning 输出 | | ||
| | `npm run build` | 通过;legacy 入口 2,781.01 kB;独立 checker 实测 2,715.84 KiB,低于 3,000 KiB hard budget,无 chunk warning | | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| | `git diff --check` | 通过 | | ||
| | `npm audit --omit=dev --audit-level=high` | `found 0 vulnerabilities` | | ||
| | ReadmeModal + RepositoryCard 定向回归 | 通过,13/13;无测试 warning | | ||
| | SliderInput + StepperInput 交互回归 | 通过,3/3;pointer/keyboard 与 keyboard-click 语义均验证,无 warning | | ||
|
|
||
| ## 交付与审查状态 | ||
|
|
||
| 首轮 CodeRabbit findings 已全部修复并通过上述质量门禁。第二次 `@coderabbitai full review` 报告的 2 个 outside-diff findings 已修复:SubscriptionRepoCard 的确认取消 Star 按钮已使用 destructive 语义色,ForkTimeline 的 page-size 与 target-branch SelectTrigger 已关联可见 label。最终 full review 又发现 SubscriptionRepoCard 卡片容器仍使用 `bg-white`,现已改为 `bg-card` 并清理重复 dark token。最后一轮 lint、tsc、326 个测试、build、diff check 与安全审计均通过。最终 full review 随后报告 11 个 actionable comments:CategoryEditModal/GistEditorModal 表单标注、GistView 清除按钮、Modal/DialogDescription 策略、ReadmeModal 关闭按钮、RepositoryEditModal 保留名校验、RepositoryList/SearchDemo ghost 变体、AIConfig/Backend/AlertDialog/StepperInput 无障碍或键盘行为,以及 ui-walkthrough Slider 证据和 vite bundle budget nitpick;这些 findings 已全部修复并完成针对性回归。Modal/SettingsPanel/ReadmeModal 使用明确的 Dialog description policy,表单和 Radix 控件均补齐 label/id,`none` sentinel 已受保护,StepperInput 已支持 keyboard click,Slider pointer/keyboard 证据已记录,bundle hard budget 已由独立 checker 和 CI step 执行。 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # 最终浏览器验证 | ||
|
|
||
| 验证时间:2026-08-21。 | ||
|
|
||
| 生产预览地址:`http://127.0.0.1:4173/`。 | ||
|
|
||
| 页面标题正确:`GitHub Stars Manager - AI-Powered Repository Management`。 | ||
|
|
||
| 登录壳层正常渲染,包含中文/英文切换、主题切换、GitHub Personal Access Token 输入框、连接按钮和创建 token 外链。 | ||
|
|
||
| 控制台检查结果:入口模块加载、React root 创建、应用渲染、store hydration 均成功;后端不可用时正确进入 local-only 模式;未发现 React、Radix 或资源加载错误。 | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.