Skip to content

fix(theme): restore y2k skin interactions#1987

Merged
piorpua merged 1 commit intomainfrom
ringringlin/fix/y2k-skin-css-pr
Mar 31, 2026
Merged

fix(theme): restore y2k skin interactions#1987
piorpua merged 1 commit intomainfrom
ringringlin/fix/y2k-skin-css-pr

Conversation

@ringringlin
Copy link
Copy Markdown
Collaborator

Summary

  • narrow the Y2K popup and select popup height so long menus use internal scrolling again
  • remove modal and input wrapper overrides that were breaking default component interaction behavior
  • keep the Coconut Queen visual style while restoring scroll visibility for collapsed sidebars

Test plan

  • bun run lint
  • bun run format
  • bunx tsc --noEmit
  • bun run i18n:types
  • node scripts/check-i18n.js
  • bunx vitest run
  • Verify model/permission/agent dropdowns scroll internally under the Y2K skin
  • Verify modal action buttons remain reachable under the Y2K skin

@piorpua piorpua added the bot:reviewing Review in progress (mutex) label Mar 31, 2026
@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 31, 2026

Code Review:fix(theme): restore y2k skin interactions (#1987)

变更概述

本 PR 修复了 Y2K 主题皮肤下多个交互问题:将折叠侧边栏的滚动条从完全隐藏改为细滚动条(4px)以恢复滚动可见性;将 CSS 中脆弱的 [class*='sendbox'].guidContainer .guidInputCard 属性选择器替换为稳定的 .sendbox-panel.guid-input-card-shell 类名选择器;移除了破坏组件默认交互行为的 :focus-within 覆盖和全局 .arco-input-wrapper 样式;为下拉菜单和弹出框添加了 max-height + overflow-y: auto 以支持内部滚动。


方案评估

结论:✅ 方案合理

方案正确地将脆弱的 CSS 属性选择器替换为显式类名,在 TSX 组件上添加对应的 hook 类名,这是更可靠和可维护的做法。将输入框样式限定到 .settings-page-wrapper.settings-modal 范围内,避免全局覆盖影响其他区域(如聊天输入框),符合 CSS 作用域隔离原则。移除过度的 :focus-within 覆盖让组件恢复默认交互行为,思路清晰。


问题清单

未发现 CRITICAL、HIGH 或 MEDIUM 级别问题。

🔵 LOW — 未使用的 CSS hook 类名

文件src/renderer/components/chat/sendbox.tsx,第 692 行;src/renderer/pages/guid/components/GuidInputCard.tsx,第 90 行

问题代码

// sendbox.tsx
${isFileDragging ? 'b-dashed sendbox-panel--dragging' : ''}

// GuidInputCard.tsx
${isFileDragging ? 'border-dashed guid-input-card-shell--dragging' : ''}

问题说明sendbox-panel--draggingguid-input-card-shell--dragging 类名在当前 Y2K CSS 和其他样式文件中均无对应选择器。虽然不会造成功能问题,但属于未使用的代码。如果是为将来主题扩展预留的 hook,建议添加简短注释说明意图。


汇总

# 严重级别 文件 问题
1 🔵 LOW sendbox.tsx:692, GuidInputCard.tsx:90 未使用的 CSS hook 类名

结论

  • 批准合并 — 方案合理,改动精准地修复了目标问题,无阻塞性问题。CSS 选择器从脆弱的属性匹配迁移到稳定的类名选择器是正确的改进方向。

本报告由本地 pr-review skill 生成,包含完整项目上下文,无截断限制。

CONCLUSION: APPROVED
IS_CRITICAL_PATH: false
PR_NUMBER: 1987

@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 31, 2026

✅ 已自动 review,无阻塞性问题,正在触发自动合并。

@piorpua piorpua merged commit 8a97dc1 into main Mar 31, 2026
17 checks passed
@piorpua piorpua deleted the ringringlin/fix/y2k-skin-css-pr branch March 31, 2026 11:21
@piorpua piorpua added bot:done Auto-merged by bot and removed bot:reviewing Review in progress (mutex) labels Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:done Auto-merged by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants