Skip to content

chore: fix build warnings and add e2e tests - #4286

Merged
KATO-Hiro merged 18 commits into
stagingfrom
#4285
Nov 3, 2026
Merged

KATO-Hiro merged 18 commits into
stagingfrom
#4285

Conversation

@KATO-Hiro

@KATO-Hiro KATO-Hiro commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

close #4285

Summary by CodeRabbit

  • 不具合修正
    • タスク、タグ、問題集、ユーザー情報などの画面で、データの更新が表示に反映されるよう改善しました。
    • 各種フォームの初期化と連動する値を調整し、表示や操作の安定性を高めました。
    • 暫定グレードのツールチップがキーボード操作で表示されることを確認しました。
  • ドキュメント
    • アクセシビリティ、コーディング規約、フォームやリアクティブな値の扱いに関するガイドを更新しました。
  • テスト
    • 管理者向けワークブック作成フォームの表示内容を確認するテストを追加しました。
  • 開発環境
    • チェックや lint で警告が検出された場合も失敗として扱うよう変更しました。

KATO-Hiro and others added 18 commits November 2, 2026 23:34
Plain `let x = data.x` copies only the initial value, so a reused page
component would keep showing stale data after a same-route navigation.
Clears 14 state_referenced_locally warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pass type/accept to createDroppable as getters like id, so its internal
effect re-reads them. Derive componentId, and mark the displayGrade seed
as an intentional initial value with untrack.
Clears 5 state_referenced_locally warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flowbite-svelte's Tooltip already sets tabIndex=0 on its trigger at
runtime (Popper.svelte), so keyboard users can still focus the icon
and open the tooltip. Clears the a11y_no_noninteractive_tabindex warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
superForm owns the form state after init, so its initial data and the
destructured superForm objects are read once on purpose; untrack makes
that explicit. Lookup-only data (workBook, tasksMapByIds) is derived.
Clears the last 10 state_referenced_locally warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
svelte-check and oxlint exit 0 on warnings by default, which let the
30 warnings fixed in this branch pile up unnoticed. Add
--fail-on-warnings to check and --deny-warnings to oxlint in lint and
the pre-commit hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oxlint does not lint .svelte files, so warnings such as no-explicit-any
in Svelte components passed CI while the same rule failed in .ts files.
Add --max-warnings 0 to eslint in lint and the pre-commit hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fold the phase checklists into decisions, rejected alternatives,
verification results, unchecked items, and the Codex cross-review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With --max-warnings 0, ESLint's "File ignored because of a matching
ignore pattern" warning for an explicitly passed file would block the
commit. Add --no-warn-ignored (found in the Codex cross-review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turn two manual checks from the warning fixes into E2E tests:
- the provisional-grade icon on /votes opens its tooltip on focus,
  which relies on flowbite-svelte making the trigger focusable;
- the admin workbook create form pre-fills authorId, isOfficial, and
  the curriculum type.
Seed a median (D3, from production) for the PENDING task zone2021_f so
the icon is shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Svelteのフォーム初期化と派生状態の定義を変更しました。暫定グレードの表示をテストし、checkとlintで警告を失敗扱いにする設定と開発ルールを追加しました。

Changes: Svelteのフォームとリアクティブ状態

Layer / File(s) Summary
フォームデータの初期化
docs/guides/agent-rules/svelte-runes.md, src/features/workbooks/components/shared/WorkBookForm.svelte, src/lib/components/AuthForm.svelte, src/routes/(admin)/account_transfer/+page.svelte, src/routes/workbooks/create/+page.svelte, src/routes/workbooks/edit/[slug]/+page.svelte, e2e/workbook_create.spec.ts
フォームデータをuntrack内で読み取る形に変更しました。ワークブック作成フォームのE2Eテストを追加しました。
派生状態の更新
src/lib/components/InputFieldWrapper.svelte, src/routes/(admin)/tags/*, src/routes/(admin)/tasks/[task_id]/+page.svelte, src/routes/(admin)/workbooks/order/_components/KanbanColumn.svelte, src/routes/problems/[slug]/+page.svelte, src/routes/users/[username]/+page.svelte, src/routes/workbooks/[slug]/+page.svelte, src/routes/workbooks/create/+page.svelte
各値を$derivedまたはgetterで定義し、参照元の現在値に追従するよう変更しました。

暫定グレードの表示とテスト

Layer / File(s) Summary
ツールチップ表示の検証
prisma/seed.ts, src/features/votes/components/VotableGrade.svelte, src/routes/votes/+page.svelte, docs/guides/agent-rules/accessibility.md, e2e/votes.spec.ts
暫定グレード用のデモ統計を追加しました。アイコンのフォーカスとツールチップ表示を検証するE2Eテストを追加し、表示コードと関連ルールを更新しました。

警告チェックの設定と開発ルール

Layer / File(s) Summary
警告を失敗扱いにする設定
package.json, lefthook.yml, AGENTS.md, docs/guides/agent-rules/coding-style.md
checkとlintで警告を失敗扱いにする設定を追加しました。警告への対応方針とrgの選択肢の記述を開発ルールに追加しました。

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Merge Risk: Low · up to 1c457

管理操作後に E2E テストが失敗する場合があり、Popover の指針はキーボード操作の不備につながります。影響は限定的ですが、対応を推奨します。

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@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 ac0a3f9 into staging Nov 3, 2026
6 checks passed
@KATO-Hiro
KATO-Hiro deleted the #4285 branch November 3, 2026 00:45

This branch was successfully deployed

1 active deployment
preview — 1c457c3e Deployed Nov 3, 2026 by KATO-Hiro via preview #9210
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.

chore: fix build warnings

1 participant