fix: resolve TypeScript type errors for nullable fields (CI auto-fix for PR #370)#373
Closed
github-actions[bot] wants to merge 1 commit intodevfrom
Closed
fix: resolve TypeScript type errors for nullable fields (CI auto-fix for PR #370)#373github-actions[bot] wants to merge 1 commit intodevfrom
github-actions[bot] wants to merge 1 commit intodevfrom
Conversation
Fixed: - src/actions/users.ts: Add ?? undefined for dailyQuota and other nullable limit fields when calling createUser/updateUser - src/repository/user.ts: Convert null to undefined for string fields that don't accept null - src/app/.../user-form.tsx: Add ?? undefined for dailyQuota in addUser/editUser calls - src/app/.../key-edit-section.tsx: Update onChange prop type to support both single field and batch updates - src/app/.../user-edit-section.tsx: Update onChange prop type and emitChange function to support batch updates - src/app/.../unified-edit-dialog.tsx: Update onChange wrapper to pass typed parameters - src/app/.../limit-rule-picker.tsx: Fixed import order (auto-fix by linter) Root cause: Recent commit (caa6c01) added batch update support for daily limit fields to avoid race conditions, but the onChange type signatures weren't updated to support the new pattern of passing an object instead of (field, value) parameters. CI Run: https://github.com/ding113/claude-code-hub/actions/runs/20366261694 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
CI Auto-Fix
Original PR: #370
Failed CI Run: Non-Main Branch CI/CD
Root Cause
Recent commit
caa6c01added batch update support for daily limit fields to avoid race conditions. The code changed from:However, the
onChange/emitChangetype signatures weren't updated to support the new batch update pattern.Fixes Applied
src/actions/users.ts?? undefinedfordailyQuotaand other nullable limit fields increateUser/updateUsercallssrc/repository/user.tsnulltoundefinedfor string fields that don't acceptnullsrc/app/.../user-form.tsx?? undefinedfordailyQuotainaddUser/editUsercallssrc/app/.../key-edit-section.tsxonChangeprop type to support both single field(field, value)and batch(updates)patternssrc/app/.../user-edit-section.tsxonChangeprop type andemitChangefunction to support batch updatessrc/app/.../unified-edit-dialog.tsxonChangewrapper to pass typed parameterssrc/app/.../limit-rule-picker.tsxVerification
bun run typecheckpassesbun run lintpassesTechnical Details
The fix updates the
onChangeprop type from:To an overloaded signature that supports both patterns:
This maintains backward compatibility with existing single-field calls while properly supporting the new batch update pattern.
Auto-generated by Claude AI