Skip to content

fix: 修复切换编辑记录时抽屉残留旧值 (#155) - #163

Merged
woncc merged 1 commit into
mainfrom
cursor/upstream-issue-155-33c61a242-20261105
Nov 5, 2026
Merged

woncc merged 1 commit into
mainfrom
cursor/upstream-issue-155-33c61a242-20261105

Conversation

@woncc

@woncc woncc commented Nov 5, 2026

Copy link
Copy Markdown

⚠️ 提交说明 / PR Notice

本 PR 由 Codex 辅助移植和验证,待独立审查;未代替维护者勾选人工确认。

🔗 关联任务 / Related Issue

Closes #155

上游:QuantumNous@33c61a2 (QuantumNous#7989)

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)
  • ✨ 新功能 (New feature)
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

📝 变更描述 / Description

编辑抽屉关闭后恢复明确默认值;API Key、兑换码用 null 表示无过期时间,模型用 0 表示无供应商,防止下条记录继承上一条值。继续复用现有 Sheet、DateTimePicker、Combobox 和表单组件。

仅移植上游 9 个文件,patch-id 一致:891123c48d2ca9f77d22848a8f9344e707ddbffd。保留 fork 行为,未改依赖锁文件。

📸 运行证明 / Proof of Work

从 web/ 执行(环境 GOMAXPROCS=2 RAYON_NUM_THREADS=2):

bun run test src/features/keys/components/__tests__/api-keys-mutate-drawer.test.tsx src/features/models/__tests__/metadata-editing.test.tsx src/features/redemption-codes/components/__tests__/redemptions-mutate-drawer.test.tsx --maxWorkers=1
bun run typecheck
bunx oxlint -c .oxlintrc.json src/features/keys/components/__tests__/api-keys-mutate-drawer.test.tsx src/features/keys/components/api-keys-mutate-drawer.tsx src/features/keys/lib/api-key-form.ts src/features/models/__tests__/metadata-editing.test.tsx src/features/models/components/drawers/model-mutate-drawer.tsx src/features/models/lib/model-form.ts src/features/redemption-codes/components/__tests__/redemptions-mutate-drawer.test.tsx src/features/redemption-codes/components/redemptions-mutate-drawer.tsx src/features/redemption-codes/lib/redemption-form.ts

最终 3 文件、27 测试通过;typecheck、限定文件 lint 退出码均为 0。固定基线加新增用例,以 -t 'does not copy a vendor|keeps an uncached key|keeps a non-expiring code' 筛选:3 失败、2 通过,证明旧值残留;修复后对应完整测试均通过。

bun run format:check 实际检查全前端:25 个既有范围外文件失败,本 PR 文件均未报告。未修范围外文件。首次修复前运行与应用补丁重叠,已作废为基线证据;上述固定基线重跑为有效证据。

验证限于 jsdom 交互及提交 payload,未做浏览器截图、生产构建、部署或线上验收。未涉及数据库、计费结算或后端认证控制变更。已查阅 OWASP Authentication、Session Management 与 ASVS 5.0.0;本次保护编辑记录的到期值隔离,不声明全系统 ASVS 合规。

✅ 提交前检查项 / Checklist

  • 人工确认: 待维护者独立审阅并确认
  • 非重复提交: fork 中按上游 SHA 查询,无已有开放 PR
  • 新功能关联 Issue: 不适用
  • 事前沟通: 不涉及方向性变更
  • 功能范围: 仅指定编辑抽屉修复
  • 非透传: 不涉及透传
  • 范围聚焦: 仅授权 9 文件
  • 本地验证: 命令和结果见上
  • 安全合规: 未添加敏感凭据;安全验证范围见上

@woncc
woncc merged commit a1f25c8 into main Nov 5, 2026
@woncc
woncc deleted the cursor/upstream-issue-155-33c61a242-20261105 branch December 2, 2026 15:32
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.

[上游/现在能解] 33c61a242 fix: prevent stale values when switching edit drawer records

1 participant