Skip to content

fix: alert-info always displayed#2613

Merged
takaishi merged 1 commit intomainfrom
fix-proposal-page
Aug 31, 2025
Merged

fix: alert-info always displayed#2613
takaishi merged 1 commit intomainfrom
fix-proposal-page

Conversation

@takaishi
Copy link
Contributor

No description provided.

@gitops-for-cloudnativedays gitops-for-cloudnativedays bot added the reviewapps Build ReviewApp environment automatically if this label is granted label Aug 31, 2025
@claude
Copy link

claude bot commented Aug 31, 2025

Claude finished @takaishi's task —— View job


コードレビュー結果

このPull Requestをレビューしました。以下がフィードバックです:

レビュータスク

  • 変更されたファイルを読み込んで変更内容を理解する
  • コード品質とベストプラクティスをレビューする
  • 潜在的なバグや問題をチェックする
  • パフォーマンスとセキュリティの観点から確認する
  • テストカバレッジについて確認する
  • フィードバックをコメントに投稿する

1. 修正内容の理解

このPRは、app/views/proposals/show.html.erbにおいて、alert-infoのdiv要素が常に表示されてしまう問題を修正しています。

変更前:

<div class="alert alert-info %> show">
  <% if @conference.cfp_result_visible %>
    <%= link_to 'CFPは終了しました。採択結果はこちら', talks_path %>
  <% end %>
</div>

変更後:

<% if @conference.cfp_result_visible %>
  <div class="alert alert-info">
    <%= link_to 'CFPは終了しました。採択結果はこちら', talks_path %>
  </div>
<% end %>

2. 問題点の詳細

元のコードには以下の問題がありました:

  • <div class="alert alert-info %> show"> という無効なHTMLクラス構文がありました(%> が誤って含まれていた)
  • div要素が条件分岐の外側にあったため、@conference.cfp_result_visibleがfalseでも空のalert-infoボックスが表示されていました

3. 評価

✅ コード品質とベストプラクティス

  • 修正は適切で、ERBの条件分岐が正しく適用されています
  • HTMLの構文エラーが修正されています

✅ 潜在的なバグ

  • 修正により、CFP結果が非表示の場合にalertボックスが正しく非表示になります
  • 新たなバグは導入されていません

✅ パフォーマンス

  • この変更によるパフォーマンスへの影響はありません

✅ セキュリティ

  • セキュリティ上の懸念はありません

✅ テストカバレッジ

  • 既存のテスト(spec/requests/proposals/proposals_show_spec.rb)が、この条件分岐をカバーしています
  • includes_link_to_talksnot_includes_link_to_talksのshared examplesが、修正された動作を正しく検証します

4. 総評

このPRは、明らかなバグを適切に修正しており、承認を推奨します。修正は最小限で、既存のテストによってカバーされているため、安全にマージできます。

gitops-for-cloudnativedays bot added a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Aug 31, 2025
commit: cloudnativedaysjp/dreamkast@25bfa26
action URL: https://github.com/cloudnativedaysjp/dreamkast/actions/runs/17356619245

Co-authored-by: gitops-for-cloudnativedays[bot] <113280573+gitops-for-cloudnativedays[bot]@users.noreply.github.com>
@github-actions
Copy link

@github-actions
Copy link

Simplecov Report

Covered Threshold
64.36% 60%

@takaishi takaishi marked this pull request as ready for review August 31, 2025 12:13
@takaishi takaishi merged commit 3bc0b47 into main Aug 31, 2025
11 checks passed
@takaishi takaishi deleted the fix-proposal-page branch August 31, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewapps Build ReviewApp environment automatically if this label is granted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant