Skip to content

Fix/issue 577 app shell router boundaries - #592

Merged
hmjn023 merged 3 commits into
developfrom
fix/issue-577-app-shell-router-boundaries
Jul 9, 2026
Merged

hmjn023 merged 3 commits into
developfrom
fix/issue-577-app-shell-router-boundaries

Conversation

@hmjn023

@hmjn023 hmjn023 commented Jul 9, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • 開発環境での HTTPS/ローカル証明書対応を強化し、起動時の体験が改善しました。
    • 開発時の RPC リクエスト処理を Vite 開発サーバ上で扱えるように拡張しました。
  • Bug Fixes
    • 一部の削除/監視時のエラーログ出力を整理し、状況把握がしやすくなりました。
  • Tests
    • モックの構成やジョブ結果の検証を調整し、テストの安定性を向上しました。

@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a440940b-1734-438a-b7fa-e98ced64122d

📥 Commits

Reviewing files that changed from the base of the PR and between 6d6c6f1 and 7ea9389.

📒 Files selected for processing (1)
  • apps/server/vite.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/server/vite.config.ts

📝 Walkthrough

Walkthrough

apps/server に vite-plugin-mkcert を追加し、vite.config.ts へ実行時モジュールロードと oRPC 用開発ミドルウェアを追加。あわせて複数ファイルで import 順序、ログ呼び出し、テストモック、型定義の表記が整えられています。

Changes

Vite dev サーバ拡張

Layer / File(s) Summary
実行時ロード基盤
apps/server/package.json, apps/server/vite.config.ts
vite-plugin-mkcert を追加し、runtimeImport と serverModuleUrl でサーバモジュールを動的ロードする基盤を追加。
oRPC ミドルウェアと設定更新
apps/server/vite.config.ts
bypassSecFetchDestPlugin を整理し、devOrpcNodeMiddlewarePlugin と Vite 設定の HMR、plugins、external、SSR 設定を更新。

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

整形変更

Layer / File(s) Summary
サーバ側の import とログ整形
apps/server/src/application/services/media-source-service.ts, apps/server/src/infrastructure/ai/rust-ai-client.ts, apps/server/src/infrastructure/jobs/file-watcher-manager.ts
import 順序と logger/asyncPool 呼び出しの表記が整えられています。
テストと UI 型定義の整形
apps/server/src/tests/unit/application/services/maintenance-service.test.ts, apps/server/src/tests/unit/infrastructure/jobs/job-worker.test.ts, apps/tauri/src/components/media/media-sidebar/media-sidebar-content.tsx, packages/ui/src/media-sidebar-content.tsx, packages/ui/src/media-sidebar.tsx
モック定義、import 配置、関数型、createSignal 初期化の表記が整えられています。
core と ui の表現整形
packages/core/src/domain/search/logic.ts, packages/ui/src/hooks/use-manager-page.ts
返却オブジェクトやコード区切りの表現が整えられています。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant ViteDevServer
  participant devOrpcNodeMiddlewarePlugin
  participant bootstrap
  participant RPCHandler

  Browser->>ViteDevServer: /api/rpc リクエスト
  ViteDevServer->>devOrpcNodeMiddlewarePlugin: ミドルウェア実行
  devOrpcNodeMiddlewarePlugin->>bootstrap: bootstrap() 呼び出し
  devOrpcNodeMiddlewarePlugin->>RPCHandler: handler.handle 呼び出し
  RPCHandler-->>devOrpcNodeMiddlewarePlugin: matched 結果
  alt matched が true
    devOrpcNodeMiddlewarePlugin-->>Browser: RPC 応答
  else matched が false
    devOrpcNodeMiddlewarePlugin->>ViteDevServer: next()
  end
Loading

Possibly related PRs

  • hmjn023/solid-imager#556: media-source-service.ts の deleteSourceServer で扱う CCIP ベクター削除失敗時のログ呼び出しが同じ箇所です。
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning 変更内容はVite開発サーバー設定やmkcert導入が中心で、app shellのrouter boundaries変更を示す内容ではありません。 実際の主要変更に合わせて、例:「Vite開発サーバーにRPCミドルウェアとmkcertを追加」など具体的な内容に修正してください。
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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/issue-577-app-shell-router-boundaries

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@apps/server/vite.config.ts`:
- Around line 61-75: The RPC middleware in the Vite config should use a strict
path boundary check so it matches only the intended /api/rpc route and not
prefixes like /api/rpcfoo. Update the request guard in the middleware around
handler.handle to verify the next path segment boundary, and when handler.handle
returns unmatched, explicitly send a 404 response instead of calling next() so
it behaves consistently with rpc.$.ts. Use the existing bootstrap and
handler.handle flow as the entry point for the fix.
🪄 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: CHILL

Plan: Pro Plus

Run ID: 33d408e8-3474-4d07-8876-3a7774ef00b6

📥 Commits

Reviewing files that changed from the base of the PR and between e3fbfac and 6d6c6f1.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • apps/server/package.json
  • apps/server/src/application/services/media-source-service.ts
  • apps/server/src/infrastructure/ai/rust-ai-client.ts
  • apps/server/src/infrastructure/jobs/file-watcher-manager.ts
  • apps/server/src/tests/unit/application/services/maintenance-service.test.ts
  • apps/server/src/tests/unit/infrastructure/jobs/job-worker.test.ts
  • apps/server/vite.config.ts
  • apps/tauri/src/components/media/media-sidebar/media-sidebar-content.tsx
  • packages/core/src/domain/search/logic.ts
  • packages/ui/src/hooks/use-manager-page.ts
  • packages/ui/src/media-sidebar-content.tsx
  • packages/ui/src/media-sidebar.tsx
💤 Files with no reviewable changes (1)
  • packages/ui/src/hooks/use-manager-page.ts

Comment thread apps/server/vite.config.ts Outdated
@hmjn023
hmjn023 merged commit a604b10 into develop Jul 9, 2026
1 check passed
@hmjn023
hmjn023 deleted the fix/issue-577-app-shell-router-boundaries branch July 9, 2026 14:45
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