Skip to content

Comments

Auto-fix CI failures for PR #370#376

Merged
ding113 merged 1 commit intodevfrom
claude-fix-pr-370-20366972438
Dec 19, 2025
Merged

Auto-fix CI failures for PR #370#376
ding113 merged 1 commit intodevfrom
claude-fix-pr-370-20366972438

Conversation

@github-actions
Copy link
Contributor

CI Auto-Fix

Original PR: #370
Failed CI Run: PR Build Check

Fixes Applied

File Fix Type
src/types/user.ts Updated UpdateUserData interface to allow null for quota fields Type definition
src/repository/user.ts Updated UpdateDbData interface to allow null for string quota fields and limitConcurrentSessions Type definition
src/actions/users.ts Updated addUser and editUser function signatures to accept null for dailyQuota Function signature
src/actions/users.ts Added ?? undefined for dailyQuota in createUser calls Null coalescing
src/app/.../key-edit-section.tsx Updated onChange prop type to support overloaded signature for batch updates Interface fix
src/app/.../user-edit-section.tsx Updated onChange type and emitChange to handle batch updates Interface fix
src/app/.../unified-edit-dialog.tsx Fixed onChange wrapper with proper type casting Type casting
src/app/.../limit-rule-picker.tsx Auto-fixed import order (lint) Import sorting

Root Cause

The TypeScript errors occurred because:

  1. Quota fields (dailyQuota, limit5hUsd, etc.) were being set to null to clear limits, but type definitions only allowed number | undefined
  2. The onChange prop was being called with both single-field (field, value) and batch update ({...}) patterns, but the type only supported the single-field pattern

Verification

  • bun run typecheck passes
  • bun run lint passes
  • No logic changes made - only type definition fixes

Auto-generated by Claude AI

Fixed issues:
- Updated UpdateUserData type to allow null for quota fields (dailyQuota, limit5hUsd, limitWeeklyUsd, limitMonthlyUsd, limitConcurrentSessions)
- Updated UpdateDbData interface to accept null for string quota fields
- Updated addUser and editUser function signatures to accept null for dailyQuota
- Fixed onChange prop type in KeyEditSection and UserEditSection to use overloaded signature supporting both single-field and batch updates
- Updated emitChange helper to properly handle both call patterns
- Fixed onChange wrapper in UnifiedEditDialog with proper type casting

These changes ensure null values can be properly passed through the type system when clearing quota limits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ding113 ding113 merged commit d5991c1 into dev Dec 19, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in Claude Code Hub Roadmap Dec 19, 2025
@ding113 ding113 deleted the claude-fix-pr-370-20366972438 branch December 19, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant