アプリ全体の余白を狭め、ボタンの配置を変更 - #183
Conversation
|
Warning Review limit reached
Next review available in: 24 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (21)
📝 WalkthroughWalkthroughタスク生成完了時のTurbo Stream通知と状態更新を追加しました。タスク生成中の画面にポーリングを追加しました。タスク操作画面、状況画面、共通レイアウト、ホーム画面の表示を更新しました。法的文書の表記を統一しました。 Changes通知とタスク生成完了フロー
タスク操作画面
状況入力と確認画面
共通レイアウトと法的文書
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant GenerateTasksJob
participant TurboStreamsChannel
participant TaskGenerationController
participant ApplicationLayout
participant SharedFlash
GenerateTasksJob->>TurboStreamsChannel: 生成完了状態と成功通知を配信
TaskGenerationController->>TaskGenerationController: 一定間隔後にTurbo replace遷移
TurboStreamsChannel->>ApplicationLayout: flash_messagesへ通知を追加
ApplicationLayout->>SharedFlash: 共有フラッシュを描画
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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: 4
🤖 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 `@app/jobs/generate_tasks_job.rb`:
- Around line 46-51: Update the task-generation flow around situation.completed!
so task creation and completion remain inside a transaction, but move the
Turbo::StreamsChannel.broadcast_append_to success notification to execute only
after that transaction commits successfully. Preserve the existing success
message and failure handling.
In `@app/views/shared/_flash.html.erb`:
- Around line 2-6: Update app/views/shared/_flash.html.erb lines 2-6 to remove
absolute positioning, top-20, right-20, and fixed width from each flash message,
replacing the width with w-full. Update app/views/layouts/application.html.erb
lines 43-46 so the flash_messages container is a fixed vertical flex container
with gap and w-[min(300px,calc(100vw-2rem))], allowing messages to stack without
overlap and fit narrow screens.
In `@app/views/situations/new.html.erb`:
- Around line 121-124: In the explanatory paragraph within the new situation
view, update the Japanese typo “なりたか” to “なりたいか” while leaving the surrounding
wording unchanged.
In `@app/views/tasks/_create_form.html.erb`:
- Around line 14-20: Update the submit button in the task creation form with
aria-label="タスクを作成" and the cancel button with aria-label="作成をキャンセル"; add
aria-hidden="true" to each button’s i icon so screen readers announce only the
accessible action names.
🪄 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: 1b5e2dd6-2769-4b09-aa7b-dc052a4a03fd
📒 Files selected for processing (17)
app/jobs/generate_tasks_job.rbapp/views/layouts/application.html.erbapp/views/positions/edit.html.erbapp/views/shared/_flash.html.erbapp/views/shared/_footer.html.erbapp/views/shared/_header_menu.html.erbapp/views/situations/_review_modal.html.erbapp/views/situations/completions/show.html.erbapp/views/situations/index.html.erbapp/views/situations/new.html.erbapp/views/situations/show.html.erbapp/views/tasks/_code_block.html.erbapp/views/tasks/_create_form.html.erbapp/views/tasks/_list.html.erbapp/views/tasks/index.html.erbapp/views/terms/show.html.erbspec/jobs/generate_tasks_job_spec.rb
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
app/views/situations/index.html.erb (2)
9-10: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winカードリンクに明示的なフォーカス表示を追加してください。
link_toがフォーカス可能ですが、現在の状態表現はhover:のみです。キーボード操作時にカード全体の現在位置を確認できない可能性があります。link_toにblockとfocus-visible:ring-*またはfocus-visible:outline-*を追加してください。修正例
- <%= link_to situation_path(situation.id) do %> + <%= link_to situation_path(situation.id), + class: "block rounded-2xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-calm-blue focus-visible:ring-offset-2" do %>🤖 Prompt for 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. In `@app/views/situations/index.html.erb` around lines 9 - 10, カード全体のリンクをキーボード操作でも識別できるよう、situations のカードを生成する link_to に block と focus-visible のリングまたはアウトライン用クラスを追加してください。既存の hover 表現とカードのレイアウトは維持してください。
10-10: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win余白削減の方針とカードの余白値を合わせてください。
m-5とsm:p-8はカードの外側と内側の余白を広げます。特にsm:p-8は画面幅が広い場合に2remの内側余白になります。余白を狭める目的なら、承認済みデザイン値までm-*とp-*を下げてください。PR objectivesの「アプリ全体の余白を狭める」という目的に基づく指摘です。
🤖 Prompt for 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. In `@app/views/situations/index.html.erb` at line 10, カード要素の余白クラスを、承認済みデザイン値に合わせて縮小してください。特に外側余白のm-5と、広い画面で内側余白を2remにするsm:p-8を適切な低いm-*/p-*値へ更新し、カードの他のスタイルは維持してください。
🤖 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.
Outside diff comments:
In `@app/views/situations/index.html.erb`:
- Around line 9-10: カード全体のリンクをキーボード操作でも識別できるよう、situations のカードを生成する link_to に
block と focus-visible のリングまたはアウトライン用クラスを追加してください。既存の hover
表現とカードのレイアウトは維持してください。
- Line 10:
カード要素の余白クラスを、承認済みデザイン値に合わせて縮小してください。特に外側余白のm-5と、広い画面で内側余白を2remにするsm:p-8を適切な低いm-*/p-*値へ更新し、カードの他のスタイルは維持してください。
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: be70420f-bac4-420e-962b-efe588ac828b
⛔ Files ignored due to path filters (1)
app/assets/images/top_logo.pngis excluded by!**/*.png
📒 Files selected for processing (10)
app/assets/tailwind/application.cssapp/views/home/index.html.erbapp/views/layouts/application.html.erbapp/views/positions/edit.html.erbapp/views/shared/_footer.html.erbapp/views/shared/_header_menu.html.erbapp/views/situations/index.html.erbapp/views/situations/new.html.erbapp/views/situations/show.html.erbapp/views/tasks/_list.html.erb
🚧 Files skipped from review as they are similar to previous changes (7)
- app/views/situations/show.html.erb
- app/views/tasks/_list.html.erb
- app/views/positions/edit.html.erb
- app/views/shared/_header_menu.html.erb
- app/views/shared/_footer.html.erb
- app/views/situations/new.html.erb
- app/views/layouts/application.html.erb
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
spec/jobs/generate_tasks_job_spec.rb (1)
20-25: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win通知のコミット境界をテストで固定してください。
この expectation は引数だけを検証します。通知が
ActiveRecord::Base.transactionのコミット前に実行されてもテストは成功します。ロールバック時に
broadcast_append_toが呼ばれないことと、成功時にコミット後に呼ばれることを検証するテストを追加してください。RSpec の外側のトランザクションが実際のコミット境界を隠していないことも確認してください。🤖 Prompt for 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. In `@spec/jobs/generate_tasks_job_spec.rb` around lines 20 - 25, Update the generate task job specs around the Turbo::StreamsChannel.broadcast_append_to expectation to verify transaction timing: assert no broadcast occurs when the ActiveRecord::Base.transaction rolls back, and assert the broadcast occurs only after a successful commit. Ensure the spec setup does not wrap the example in an outer transaction that masks the real commit boundary.
🤖 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 `@app/jobs/generate_tasks_job.rb`:
- Around line 42-54: Update the post-completion notification flow in the job
method containing situation.completed! so exceptions from the
Turbo::StreamsChannel broadcasts do not invoke situation&.failed!. Keep the
committed situation in its completed state, and handle notification retries or
failure logging after completed! without rolling back the successful status.
- Around line 49-54: Update the GenerateTasksJob completion flow and the
situation tasks page so completion notifications are not lost before
turbo_stream_from `@situation` subscribes; add a completion-state recheck,
polling, or persisted notification, and add a system test that reproduces job
completion before subscription and verifies the user still receives the
completion result.
In `@app/views/layouts/application.html.erb`:
- Around line 23-25: Update the image_tag alt text within the root_path link to
clearly identify the destination and brand, such as “ReNovo ホーム,” replacing the
current “メニューロゴ” value while leaving the surrounding link unchanged.
---
Nitpick comments:
In `@spec/jobs/generate_tasks_job_spec.rb`:
- Around line 20-25: Update the generate task job specs around the
Turbo::StreamsChannel.broadcast_append_to expectation to verify transaction
timing: assert no broadcast occurs when the ActiveRecord::Base.transaction rolls
back, and assert the broadcast occurs only after a successful commit. Ensure the
spec setup does not wrap the example in an outer transaction that masks the real
commit boundary.
🪄 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: e6f51b31-3f98-4a40-97df-754e2dd0027e
⛔ Files ignored due to path filters (1)
app/assets/images/top_logo.pngis excluded by!**/*.png
📒 Files selected for processing (21)
app/assets/tailwind/application.cssapp/javascript/controllers/flash_controller.jsapp/jobs/generate_tasks_job.rbapp/views/home/index.html.erbapp/views/layouts/application.html.erbapp/views/positions/edit.html.erbapp/views/privacy/show.html.erbapp/views/shared/_flash.html.erbapp/views/shared/_footer.html.erbapp/views/shared/_header_menu.html.erbapp/views/situations/_review_modal.html.erbapp/views/situations/completions/show.html.erbapp/views/situations/index.html.erbapp/views/situations/new.html.erbapp/views/situations/show.html.erbapp/views/tasks/_code_block.html.erbapp/views/tasks/_create_form.html.erbapp/views/tasks/_list.html.erbapp/views/tasks/index.html.erbapp/views/terms/show.html.erbspec/jobs/generate_tasks_job_spec.rb
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@app/javascript/controllers/task_generation_controller.js`:
- Around line 9-12: Update connect() so a failed Turbo.visit schedules another
identical visit after this.intervalValue, preserving the current replace action.
Do not use the retry timer for successful visits, and rely on the existing Turbo
visit behavior because the installed Turbo version provides no success/failure
events.
In `@app/views/home/index.html.erb`:
- Line 16: 装飾用のプラスアイコンである<i class="fa-solid
fa-plus"></i>にaria-hidden="true"を追加し、「新しくふりかえる」リンクの可読名から支援技術に不要な情報を除外してください。Googleアイコンと同じ属性設定に揃えてください。
In `@spec/system/task_generation_spec.rb`:
- Around line 17-25: Increase the have_content wait timeout in the task
generation system spec from 5 to 10 seconds after situation.completed!, so the
assertion accommodates task_generation_controller.js refreshing after its
connection delay.
🪄 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: b8edadd0-0094-4604-921a-1d20aac1ec40
⛔ Files ignored due to path filters (1)
app/assets/images/top_logo.pngis excluded by!**/*.png
📒 Files selected for processing (7)
app/javascript/controllers/task_generation_controller.jsapp/jobs/generate_tasks_job.rbapp/views/home/index.html.erbapp/views/layouts/application.html.erbapp/views/shared/_flash.html.erbapp/views/tasks/_generating.html.erbspec/system/task_generation_spec.rb
🚧 Files skipped from review as they are similar to previous changes (3)
- app/views/shared/_flash.html.erb
- app/views/layouts/application.html.erb
- app/jobs/generate_tasks_job.rb
42b8e7b to
32402c7
Compare
Issue
概要
446日目の進捗会より、デザインをモダンにするため余白を少なくするようにする。
Summary by CodeRabbit
新機能
改善
文言変更