Skip to content

fix(auth): align SchemaShape type with sveltekit-superforms to resolve pnpm check errors#3703

Merged
KATO-Hiro merged 3 commits into
stagingfrom
#3702
Jun 20, 2026
Merged

fix(auth): align SchemaShape type with sveltekit-superforms to resolve pnpm check errors#3703
KATO-Hiro merged 3 commits into
stagingfrom
#3702

Conversation

@KATO-Hiro

@KATO-Hiro KATO-Hiro commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

close #3702

Summary by CodeRabbit

リリースノート

  • Refactor
    • 認証フォームの内部型構造を最適化し、フォーム処理の一貫性を向上させました。

KATO-Hiro and others added 2 commits June 20, 2026 12:08
…e pnpm check errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… note

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@KATO-Hiro, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 19 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 28fac1b2-d5bb-4c16-b138-e550cb2d7eeb

📥 Commits

Reviewing files that changed from the base of the PR and between abac128 and ed8d469.

📒 Files selected for processing (1)
  • src/test/lib/utils/auth_forms.test.ts
📝 Walkthrough

Walkthrough

SchemaShape 型エイリアスを Record<string, unknown> から再帰的 index-signature 型 { [K in string]: SchemaShape } に変更し、sveltekit-superforms の型と整合させた。合わせて、基底フォームの username/password shape ノードを { type: 'string' } から {} に変更。

Changes

SchemaShape 型互換修正

Layer / File(s) Summary
SchemaShape 型定義と shape ノード修正
src/lib/types/auth_forms.ts, src/lib/utils/auth_forms.ts
SchemaShape を再帰的 index-signature 型に変更(循環参照エラー回避のコメント付き)。username/password の shape ノードを { type: 'string' } から {} に統一し、schemaShape の説明コメントを追加。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • AtCoder-NoviSteps/AtCoderNoviSteps#2453: 同じく auth_forms.ts のスキーマ/shape ロジックを修正しており、"No shape could be created for schema" 問題への対処として直接関連する。

Poem

🔄 型の迷宮、ぐるりと回る
Record では循環が邪魔をして
再帰の index-signature、すっきり解決
{} でノードを静かに空にして
pnpm check よ、もう怒らないで 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルはSchemaShape型のsveltekit-superformsへの整合化とpnpmチェックエラー解決という、変更セットの主要な目的を明確に要約しています。
Linked Issues check ✅ Passed PR は#3702で指摘されたpnpmチェック失敗の根本原因(SchemaShape型の不整合)を解決し、反復的な失敗を防ぐという目標を達成しています。
Out of Scope Changes check ✅ Passed すべての変更(型定義の整合化とshape定義の修正)は、pnpmチェックエラー解決という#3702の目標に直結しており、スコープ外の変更はありません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch #3702

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/utils/auth_forms.ts`:
- Around line 167-171: The test expectations in auth_forms.test.ts (around lines
203-211) still expect the old shape format with { type: 'string' } for primitive
fields, but the code in auth_forms.ts has been updated to use empty objects {}
for primitive shape nodes (username and password). Update the test expectations
in auth_forms.test.ts to match the new specification by replacing { type:
'string' } with {} for all primitive field assertions to align with the updated
shape definition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 63a60071-10f3-4c41-aace-80368a582ec1

📥 Commits

Reviewing files that changed from the base of the PR and between d58af37 and abac128.

📒 Files selected for processing (2)
  • src/lib/types/auth_forms.ts
  • src/lib/utils/auth_forms.ts

Comment thread src/lib/utils/auth_forms.ts
…hape values

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@KATO-Hiro KATO-Hiro left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KATO-Hiro KATO-Hiro merged commit f5c694d into staging Jun 20, 2026
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3702 branch June 20, 2026 12:31
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.

[bug] pnpm check の errorsを修正しましょう

1 participant