Skip to content

fix: Sources・Search・Source Mediaをモバイル対応 (#585) - #607

Merged
hmjn023 merged 2 commits into
developfrom
fix/issue-585-mobile-sources-search
Jul 16, 2026
Merged

fix: Sources・Search・Source Mediaをモバイル対応 (#585)#607
hmjn023 merged 2 commits into
developfrom
fix/issue-585-mobile-sources-search

Conversation

@hmjn023

@hmjn023 hmjn023 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

概要

Sources、Search、Source Media を 320px 幅から操作可能なレスポンシブレイアウトへ調整します。

変更内容

  • Sources のカード・CRUD・同期操作を狭幅向けに再配置
  • Search / Source Media のモバイルフィルターを draft + Apply/Cancel に変更
  • Escape / 閉じるで未適用条件を破棄し、SSE更新中も入力・フォーカスを保持
  • Source Media の操作メニュー、44px操作領域、safe area、0件選択時の解除導線を追加
  • コンテナ幅ベースのメディアグリッドと横溢れ対策
  • responsive / SSE回帰E2Eを追加・拡張

検証

  • bun --filter @solid-imager/ui typecheck
  • bun --filter @solid-imager/ui test
  • bun --filter @solid-imager/server lint
  • focused Biome check / git diff --check
  • responsive E2E(dev / production)— 各 16 passed, 4 mobile-only skipped

備考

apps/server 単独 typecheck は、生成済み #route-tree がない既知の環境要因で失敗します。production E2Eのビルド・実行は成功しています。

Fixes #585

Summary by CodeRabbit

  • 新機能

    • モバイル向け検索フィルターをダイアログで利用できるようになりました。
    • 条件の確認・クリア・適用、入力内容とフォーカスの保持に対応しました。
    • メディアの一括選択・操作をモバイル画面でも使いやすくしました。
  • 改善

    • 検索、ソース、メディア画面のレイアウトを調整し、横方向のはみ出しを防止しました。
    • ボタンや操作領域の視認性、タッチ操作性、レスポンシブ表示を改善しました。
    • リアルタイム更新後も検索条件や表示状態が維持されます。

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@hmjn023, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 reviews.

How do review limits work?

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

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 67cfe91d-cd30-4046-9b92-fb1dfab8d79f

📥 Commits

Reviewing files that changed from the base of the PR and between dc4baf5 and 3d94175.

📒 Files selected for processing (5)
  • apps/server/src/tests/e2e/search-realtime-preservation.responsive.spec.ts
  • apps/server/src/tests/e2e/sources-source-media.responsive.spec.ts
  • packages/ui/src/mobile-search-filter-dialog.tsx
  • packages/ui/src/pro-search-dialog.tsx
  • packages/ui/src/search-control-panel.tsx
📝 Walkthrough

Walkthrough

モバイル検索フィルターを独立ダイアログ化し、検索状態のドラフト編集・適用・クリアを追加しました。Sources、ソースメディア、メディアグリッドのレスポンシブ表示と一括操作を更新し、関連するE2E検証を拡張しています。

Changes

モバイル検索フィルターと状態管理

Layer / File(s) Summary
フィルター状態とダイアログ
packages/ui/src/mobile-search-filter-dialog.tsx, packages/ui/src/search-control-panel.tsx, packages/ui/src/screens/search-screen.tsx
検索状態をローカルドラフトとして編集し、条件表示、クリア、適用、ベクトル検索時の適用制御を追加しました。
プリセット状態の注入対応
packages/ui/src/preset-manager.tsx
プリセットの保存・読込・クリアが、注入された検索状態と更新関数を利用できるよう変更しました。

メディア操作と一括選択連携

Layer / File(s) Summary
メディア操作メニューの再構成
packages/ui/src/media-list-actions.tsx, packages/ui/src/source-media-page.tsx
モバイル操作ダイアログをメタデータ操作向けに変更し、フィルター起動を画面側へ委譲しました。
一括選択ツールバー
packages/ui/src/screens/source-media-screen.tsx, apps/server/src/routes/sources/.../source-media-page.tsx
選択モード中はツールバーを表示し、選択数が0の場合は実行ボタンを無効化するよう変更しました。

レスポンシブ画面と操作レイアウト

Layer / File(s) Summary
Sources・カード・メディアグリッド
packages/ui/src/screens/sources-screen.tsx, packages/ui/src/source-card.tsx, packages/ui/src/source-media-grid.tsx
カード操作、グリッド列数、間隔、幅制約、ロードセンチネル、画面内操作のレイアウトを更新しました。
モバイル検索ボタン
apps/server/src/routes/search.tsx, apps/tauri/src/routes/search.tsx
モバイルフィルターボタンのサイズ、境界色、文字色、ホバー背景を変更しました。

レスポンシブE2E検証

Layer / File(s) Summary
検索・リアルタイム更新
apps/server/src/tests/e2e/search.responsive.spec.ts, apps/server/src/tests/e2e/search-realtime-preservation.responsive.spec.ts
フィルターダイアログの条件表示、入力保持、フォーカス保持、適用・クリア、SSE後の結果数増加を検証するよう拡張しました。
Sources・ソースメディア操作
apps/server/src/tests/e2e/sources-source-media.responsive.spec.ts
タッチターゲット、水平オーバーフロー、カード操作、フィルター、復元、一括選択、ツールバー状態を検証する新規テストを追加しました。

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

  • hmjn023/solid-imager issue 582 — Search・Source Mediaのモバイルダイアログ、タッチターゲット、safe area、オーバーフロー対応が直接関連します。

Possibly related PRs

  • hmjn023/solid-imager#595 — 同じ検索レスポンシブE2Eテストのフィルター・ダイアログ検証を変更しています。
  • hmjn023/solid-imager#602 — SSE更新中のダイアログ、入力値、フォーカス保持に関する同じテスト領域を扱っています。

Sequence Diagram(s)

sequenceDiagram
  participant MobileFilterButton
  participant SourceMediaScreen
  participant MobileSearchFilterDialog
  participant searchState
  MobileFilterButton->>SourceMediaScreen: フィルターを開く
  SourceMediaScreen->>MobileSearchFilterDialog: open=true
  MobileSearchFilterDialog->>searchState: draftを適用
  MobileSearchFilterDialog-->>SourceMediaScreen: ダイアログを閉じる
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルはモバイル対応という主要変更を簡潔に示しており、変更内容と整合しています。
Linked Issues check ✅ Passed #585 の要件である Sources/Search/Source Media のモバイル対応、フィルター導線統一、safe area対応、E2E強化を満たしています。
Out of Scope Changes check ✅ Passed 変更はモバイル対応の範囲に収まっており、明確な無関係な追加変更は見当たりません。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-585-mobile-sources-search

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.

@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: 5

🤖 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/src/tests/e2e/search-realtime-preservation.responsive.spec.ts`:
- Around line 96-108: Replace the DOM-based initialMediaCount in the responsive
search test with the authoritative total-result count, ensuring the initial
search has completed before reading it. Update the polling logic that compares
against initialMediaCount so it uses total results rather than rendered
[data-media-id] cards, preserving correct behavior with virtualization.

In `@apps/server/src/tests/e2e/sources-source-media.responsive.spec.ts`:
- Around line 18-22: Update expectTouchTarget to validate both dimensions of the
bounding box: preserve the existing minimum height assertion and add an
equivalent assertion requiring the width to be at least 44px.

In `@packages/ui/src/mobile-search-filter-dialog.tsx`:
- Around line 142-157: Update the draft initialization and handleApply flow to
incorporate the controlled selectedSource prop instead of relying only on the
internal searchState. When applying, propagate the draft’s selected source
through onSelectSource and keep the external source and draft synchronized
before invoking onSearch and closing the dialog.
- Around line 86-98: Update the label-building logic around the mode branch so
labels are added only when a search condition is configured: in pro mode, append
the detailed-condition label only when state.advancedCondition is set, and
otherwise append nothing; in the non-pro path, append the similar-source label
only when state.similarityAnchorMediaId is set. Preserve the existing
configured-label text and return behavior.

In `@packages/ui/src/search-control-panel.tsx`:
- Around line 186-195: Update the ProSearchDialog integration in the search
control panel so its internal search action does not bypass the outer Apply flow
or invoke handleApply. Make ProSearchDialog’s onSearch optional; when omitted,
treat its Search action as completion that only closes the internal dialog,
while preserving the existing onSearch behavior when provided.
🪄 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: 4f53533f-d6cc-493c-824e-c276275ce5b1

📥 Commits

Reviewing files that changed from the base of the PR and between cd8a507 and dc4baf5.

📒 Files selected for processing (16)
  • apps/server/src/routes/search.tsx
  • apps/server/src/routes/sources/$mediaSourceId/components/source-media-page.tsx
  • apps/server/src/tests/e2e/search-realtime-preservation.responsive.spec.ts
  • apps/server/src/tests/e2e/search.responsive.spec.ts
  • apps/server/src/tests/e2e/sources-source-media.responsive.spec.ts
  • apps/tauri/src/routes/search.tsx
  • packages/ui/src/media-list-actions.tsx
  • packages/ui/src/mobile-search-filter-dialog.tsx
  • packages/ui/src/preset-manager.tsx
  • packages/ui/src/screens/search-screen.tsx
  • packages/ui/src/screens/source-media-screen.tsx
  • packages/ui/src/screens/sources-screen.tsx
  • packages/ui/src/search-control-panel.tsx
  • packages/ui/src/source-card.tsx
  • packages/ui/src/source-media-grid.tsx
  • packages/ui/src/source-media-page.tsx

Comment thread apps/server/src/tests/e2e/search-realtime-preservation.responsive.spec.ts Outdated
Comment thread apps/server/src/tests/e2e/sources-source-media.responsive.spec.ts
Comment thread packages/ui/src/mobile-search-filter-dialog.tsx
Comment thread packages/ui/src/mobile-search-filter-dialog.tsx
Comment thread packages/ui/src/search-control-panel.tsx
@hmjn023
hmjn023 merged commit 9396d6a into develop Jul 16, 2026
1 check passed
@hmjn023
hmjn023 deleted the fix/issue-585-mobile-sources-search branch July 16, 2026 15:38
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