Repository navigation
fix: 修复切换编辑记录时抽屉残留旧值 (#155) - #163
Merged
Merged
Conversation
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.
本 PR 由 Codex 辅助移植和验证,待独立审查;未代替维护者勾选人工确认。
🔗 关联任务 / Related Issue
Closes #155
上游:QuantumNous@33c61a2 (QuantumNous#7989)
🚀 变更类型 / Type of change
📝 变更描述 / 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