Skip to content

fix(server): align TanStack router context - #639

Merged
hmjn023 merged 1 commit into
developfrom
fix/ssr-router-context
Jul 23, 2026
Merged

fix(server): align TanStack router context#639
hmjn023 merged 1 commit into
developfrom
fix/ssr-router-context

Conversation

@hmjn023

@hmjn023 hmjn023 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

概要

TanStack Start と Solid Router の解決バージョン差で発生していた SSR の router context エラーと、server route の型エラーを解消します。

変更内容

  • server と shared UI の Solid Router を Start と互換の 1.170.16 に固定
  • getRouter を同期的に router を返す実装へ修正
  • route loader/API handler の明示的な型付けを追加
  • Indexion skills を追加し、vite-plus skill link を整理

検証

  • bun typecheck
  • bun --filter @solid-imager/server lint
  • bun --filter @solid-imager/server build
  • agent-browser による production SSR 確認

Summary by CodeRabbit

  • ドキュメント

    • プロジェクトの調査、ドキュメント分析、リファクタリング、仕様駆動開発、Wiki管理などの手順を追加しました。
    • コードとドキュメントの差分確認、依存関係の把握、検索・分割・検証の方法を整理しました。
  • 改善

    • サーバールートの型情報とパラメータ処理を整理し、ルート関連の開発時エラーを検出しやすくしました。
    • メディア関連ページで、現在のURLパラメータをより適切に利用できるよう改善しました。

@hmjn023
hmjn023 merged commit d1cef6a into develop Jul 23, 2026
@hmjn023
hmjn023 deleted the fix/ssr-router-context branch July 23, 2026 13:12
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b06fb0fa-924b-4de4-a4eb-41d9760acf67

📥 Commits

Reviewing files that changed from the base of the PR and between aa4f02d and ddedc4a.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (27)
  • .agents/skills/indexion-agent-orient/SKILL.md
  • .agents/skills/indexion-documentation/SKILL.md
  • .agents/skills/indexion-identity/SKILL.md
  • .agents/skills/indexion-kgf/SKILL.md
  • .agents/skills/indexion-readme/SKILL.md
  • .agents/skills/indexion-refactor/SKILL.md
  • .agents/skills/indexion-sdd/SKILL.md
  • .agents/skills/indexion-segment/SKILL.md
  • .agents/skills/indexion-wiki/SKILL.md
  • .agents/skills/vite-plus
  • apps/server/package.json
  • apps/server/src/infrastructure/router/route-types.ts
  • apps/server/src/router.tsx
  • apps/server/src/routes/api/rpc.$.ts
  • apps/server/src/routes/api/sources.$mediaSourceId.$mediaId.ts
  • apps/server/src/routes/api/sources.$mediaSourceId.dump.ts
  • apps/server/src/routes/api/sources.$mediaSourceId.import-lancedb.ts
  • apps/server/src/routes/api/sources.$mediaSourceId.import.ts
  • apps/server/src/routes/api/sources.$mediaSourceId.thumbnail.$mediaId.ts
  • apps/server/src/routes/config.tsx
  • apps/server/src/routes/manager.tsx
  • apps/server/src/routes/search.tsx
  • apps/server/src/routes/sources/$mediaSourceId/$mediaId/index.tsx
  • apps/server/src/routes/sources/$mediaSourceId/index.tsx
  • apps/server/src/routes/sources/index.tsx
  • apps/server/src/tanstack-start-server-route.d.ts
  • packages/ui/package.json

📝 Walkthrough

Walkthrough

Indexion の各種エージェント運用スキル文書を追加し、サーバールーターの非同期初期化、ルートコンテキスト型、API・ローダーの型注釈、メディア詳細のパラメータ取得を更新する。

Changes

Indexion スキル文書

Layer / File(s) Summary
オリエンテーションと分析ワークフロー
.agents/skills/indexion-agent-orient/SKILL.md, .agents/skills/indexion-documentation/SKILL.md
オリエンテーション生成、ドキュメント網羅率、ドリフト検出、依存関係可視化の手順を追加する。
識別、KGF、リファクタリング手順
.agents/skills/indexion-identity/SKILL.md, .agents/skills/indexion-kgf/SKILL.md, .agents/skills/indexion-refactor/SKILL.md
名前と内容の監査、KGF デバッグ、重複排除と再検証の手順を追加する。
README と Wiki の運用手順
.agents/skills/indexion-readme/SKILL.md, .agents/skills/indexion-wiki/SKILL.md
README の生成・検証、Wiki の更新、検査、インデックス構築、監査手順を追加する。
SDD とドキュメント分割
.agents/skills/indexion-sdd/SKILL.md, .agents/skills/indexion-segment/SKILL.md
仕様草案、実装ゲート、整合性検証、E2E 手順、ドキュメント分割の利用方法を追加する。

サーバールーター型と初期化

Layer / File(s) Summary
ルートコンテキストとハンドラー契約
apps/server/src/infrastructure/router/route-types.ts, apps/server/src/tanstack-start-server-route.d.ts, apps/server/package.json, packages/ui/package.json
ローダー・API ハンドラーのコンテキスト型と HTTP メソッド別ハンドラー型を追加し、ルーター依存を更新する。
ルーター初期化と現在パラメータ
apps/server/src/router.tsx, apps/server/src/routes/sources/$mediaSourceId/$mediaId/index.tsx
サーバー初期化を非同期開始へ変更し、ルーター型を同期戻り値に合わせ、画面のパラメータ取得を更新する。
ローダーと API ルートへの型適用
apps/server/src/routes/api/*, apps/server/src/routes/config.tsx, apps/server/src/routes/manager.tsx, apps/server/src/routes/search.tsx, apps/server/src/routes/sources/*
各ローダーと API ハンドラーにルートコンテキスト型を適用し、メディア・ソース識別子の型を明示する。

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

Possibly related PRs

  • hmjn023/solid-imager#598: getRouter の初期化処理とルーター型の同一コード領域を変更している。
  • hmjn023/solid-imager#609: メディア詳細画面と関連 API のパラメータ処理に重複する変更がある。
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ssr-router-context

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
apps/server/package.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

packages/ui/package.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

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.

1 participant