Conversation
- TaskTable: restore SvelteMap for contestTableMaps and taskIndicesMap (svelte/prefer-svelte-reactivity requires SvelteMap in $state/$derived contexts) - KanbanBoard: re-apply resolve() with path/search split to satisfy no-navigation-without-resolve - AuthForm: add eslint-disable comment for alternativeHref (union type prevents resolve()) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughSvelte コンポーネント3つで型の変更とリント対応を実施。TaskTable.svelte では Map をリアクティブな SvelteMap に切り替え、AuthForm.svelte と KanbanBoard.svelte で ESLint・TypeScript の警告コメントを追加。 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/features/tasks/components/contest-table/TaskTable.svelte (2)
68-80: 🧹 Nitpick | 🔵 Trivial戻り値の型注釈を
SvelteMapに更新することを推奨関数内で
SvelteMapを生成・返却していますが、戻り値の型はMap<string, ProviderData>のままです。SvelteMapはMapを継承しているため動作上の問題はありませんが、型の一貫性のため更新を検討してください。♻️ 型注釈の修正案
- function prepareContestTablesMap(providers: ContestTableProvider[]): Map<string, ProviderData> { + function prepareContestTablesMap(providers: ContestTableProvider[]): SvelteMap<string, ProviderData> {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/features/tasks/components/contest-table/TaskTable.svelte` around lines 68 - 80, The function prepareContestTablesMap currently returns a Map<string, ProviderData> but constructs and returns a SvelteMap<string, ProviderData>; update the function signature to return SvelteMap<string, ProviderData> to keep types consistent. Locate prepareContestTablesMap (uses ContestTableProvider, ProviderData and calls prepareContestTable) and change its declared return type accordingly; ensure any callers expecting Map handle SvelteMap or update their types if necessary.
149-162: 🧹 Nitpick | 🔵 Trivial
taskResultsMapの型注釈も同様に要確認
reduceのアキュムレータの型がMap<ContestTaskPairKey, TaskResult>ですが、初期値としてSvelteMapを渡しています。一貫性のため修正を推奨します。♻️ 型注釈の修正案
let taskResultsMap = $derived.by(() => { return taskResults.reduce( - (map: Map<ContestTaskPairKey, TaskResult>, taskResult: TaskResult) => { + (map: SvelteMap<ContestTaskPairKey, TaskResult>, taskResult: TaskResult) => {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/features/tasks/components/contest-table/TaskTable.svelte` around lines 149 - 162, The reduce accumulator is typed as Map<ContestTaskPairKey, TaskResult> but the initial value is a SvelteMap; update the types so they match by changing the reducer's accumulator type to SvelteMap<ContestTaskPairKey, TaskResult> (or alternatively replace the initial value with a plain Map) so taskResultsMap, the taskResults.reduce call, and the SvelteMap usage are consistent with TaskResult and createContestTaskPairKey.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/lib/components/AuthForm.svelte`:
- Around line 227-228: Remove the inline ESLint disable and update the anchor to
call resolve() directly in the href instead of using the precomputed
alternativeHref; specifically, in AuthForm.svelte replace the anchor using the
ESLint suppression and href={alternativeHref} with an anchor using
href={resolve(alternativePageLink)} (or the appropriate page link variable used
to compute alternativeHref) so the svelte/no-navigation-without-resolve rule is
satisfied and the suppression can be deleted.
In `@src/routes/`(admin)/workbooks/order/_components/KanbanBoard.svelte:
- Around line 63-64: 現在の `@ts-expect-error` は型安全性を隠しており RouteId/params と PageState
の整合性を壊しているため、resolve/replaceState 呼び出しを型安全に揃えて updatedUrl.hash と state
を保持するよう修正してください: updatedUrl を使って直接 replaceState(resolve(...) +
updatedUrl.search, {}) とするのではなく、$page.route.id と $page.params を利用して resolve
の引数を型に合う形で組み立て、第二引数に $page.state(PageState 型)を渡して state を保持し、最後に updatedUrl.hash
も復元するよう replaceState 呼び出しを置き換えてください(参照箇所: resolve, replaceState, updatedUrl,
updatedUrl.hash, $page.route.id, $page.params, $page.state, PageState)。
---
Outside diff comments:
In `@src/features/tasks/components/contest-table/TaskTable.svelte`:
- Around line 68-80: The function prepareContestTablesMap currently returns a
Map<string, ProviderData> but constructs and returns a SvelteMap<string,
ProviderData>; update the function signature to return SvelteMap<string,
ProviderData> to keep types consistent. Locate prepareContestTablesMap (uses
ContestTableProvider, ProviderData and calls prepareContestTable) and change its
declared return type accordingly; ensure any callers expecting Map handle
SvelteMap or update their types if necessary.
- Around line 149-162: The reduce accumulator is typed as
Map<ContestTaskPairKey, TaskResult> but the initial value is a SvelteMap; update
the types so they match by changing the reducer's accumulator type to
SvelteMap<ContestTaskPairKey, TaskResult> (or alternatively replace the initial
value with a plain Map) so taskResultsMap, the taskResults.reduce call, and the
SvelteMap usage are consistent with TaskResult and createContestTaskPairKey.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5f0cc831-e91c-4de2-b192-78ae663c13a6
📒 Files selected for processing (3)
src/features/tasks/components/contest-table/TaskTable.sveltesrc/lib/components/AuthForm.sveltesrc/routes/(admin)/workbooks/order/_components/KanbanBoard.svelte
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
close #2345
Summary by CodeRabbit
リリースノート