Auto-fix CI failures for PR #370: resolve null-to-undefined type errors#375
Closed
github-actions[bot] wants to merge 1 commit intodevfrom
Closed
Auto-fix CI failures for PR #370: resolve null-to-undefined type errors#375github-actions[bot] wants to merge 1 commit intodevfrom
github-actions[bot] wants to merge 1 commit intodevfrom
Conversation
Fixed type errors where 'number | null | undefined' was not assignable to 'number | undefined'. Applied nullish coalescing (?? undefined) to convert null to undefined for the following fields: - src/actions/users.ts: dailyQuota, limit5hUsd, limitWeeklyUsd, limitMonthlyUsd, limitTotalUsd, limitConcurrentSessions in addUser, createUserOnly, and editUser functions - src/app/[locale]/dashboard/_components/user/forms/user-form.tsx: dailyQuota in editUser and addUser calls - src/repository/user.ts: dailyLimitUsd, limit5hUsd, limitWeeklyUsd, limitMonthlyUsd - changed null to undefined to match interface types CI Run: https://github.com/ding113/claude-code-hub/actions/runs/20366971654 🤖 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
Fixes Applied
src/actions/users.ts:366?? undefinedtodailyQuotainaddUsersrc/actions/users.ts:548?? undefinedtodailyQuotaincreateUserOnlysrc/actions/users.ts:701-706?? undefinedto limit fields ineditUsersrc/app/.../user-form.tsx:121,139?? undefinedtodailyQuotasrc/repository/user.ts:160-172nulltoundefinedfor limit fieldsRoot Cause
The type error occurred because fields like
dailyQuotacould benumber | null | undefined, but the target types only acceptnumber | undefined. This fix applies the nullish coalescing operator (?? undefined) to convertnulltoundefined, which is consistent with the existing pattern used for other limit fields in the codebase.Not Auto-Fixable
The following errors require human review:
key-edit-section.tsx:175,216onChange, but function signature expects 2 args. The comment says "Batch update to avoid race condition" - fixing this could introduce race conditions.user-edit-section.tsx:216,246These batch update calls were introduced in commit
caa6c01and require a design decision on how to properly support batch updates without race conditions.Verification
bun run typecheck- reduces errors from 14+ to 4 (only the batch update signature mismatches remain)Auto-generated by Claude AI