Repository: leouofa/BookWrite
Pull request #5: adding devise styling
Author: login: leouofa
Created: 2025-03-23T04:37:48Z | Merged: 2025-03-23T04:40:11Z



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Introduces a user interface for resending confirmation instructions with built-in error feedback.
  - Adds email notifications for account confirmation, password modifications, email updates, and account unlocking, each featuring personalized greetings and action links.
  - Implements fully responsive pages for password resets, registrations, logins, and account edits to enhance navigation and usability.
  - Provides a reusable error display component and shared links for a consistent authentication experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb
new file mode 100644
index 0000000..b12dd0c
--- /dev/null
+++ b/app/views/devise/confirmations/new.html.erb
@@ -0,0 +1,16 @@
+<h2>Resend confirmation instructions</h2>
+
+<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
+  <%= render "devise/shared/error_messages", resource: resource %>
+
+  <div class="field">
+    <%= f.label :email %><br />
+    <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit "Resend confirmation instructions" %>
+  </div>
+<% end %>
+
+<%= render "devise/shared/links" %>
diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb
new file mode 100644
index 0000000..dc55f64
--- /dev/null
+++ b/app/views/devise/mailer/confirmation_instructions.html.erb
@@ -0,0 +1,5 @@
+<p>Welcome <%= @email %>!</p>
+
+<p>You can confirm your account email through the link below:</p>
+
+<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
diff --git a/app/views/devise/mailer/email_changed.html.erb b/app/views/devise/mailer/email_changed.html.erb
new file mode 100644
index 0000000..32f4ba8
--- /dev/null
+++ b/app/views/devise/mailer/email_changed.html.erb
@@ -0,0 +1,7 @@
+<p>Hello <%= @email %>!</p>
+
+<% if @resource.try(:unconfirmed_email?) %>
+  <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
+<% else %>
+  <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
+<% end %>
diff --git a/app/views/devise/mailer/password_change.html.erb b/app/views/devise/mailer/password_change.html.erb
new file mode 100644
index 0000000..b41daf4
--- /dev/null
+++ b/app/views/devise/mailer/password_change.html.erb
@@ -0,0 +1,3 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>We're contacting you to notify you that your password has been changed.</p>
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb
new file mode 100644
index 0000000..f667dc1
--- /dev/null
+++ b/app/views/devise/mailer/reset_password_instructions.html.erb
@@ -0,0 +1,8 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>Someone has requested a link to change your password. You can do this through the link below.</p>
+
+<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
+
+<p>If you didn't request this, please ignore this email.</p>
+<p>Your password won't change until you access the link above and create a new one.</p>
diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb
new file mode 100644
index 0000000..41e148b
--- /dev/null
+++ b/app/views/devise/mailer/unlock_instructions.html.erb
@@ -0,0 +1,7 @@
+<p>Hello <%= @resource.email %>!</p>
+
+<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
+
+<p>Click the link below to unlock your account:</p>
+
+<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb
new file mode 100644
index 0000000..35cf5b1
--- /dev/null
+++ b/app/views/devise/passwords/edit.html.erb
@@ -0,0 +1,57 @@
+<div class="min-h-screen flex flex-col justify-center py-12 sm:px-6 lg:px-8 bg-gray-50">
+  <div class="sm:mx-auto sm:w-full sm:max-w-md">
+    <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
+      Change your password
+    </h2>
+    <p class="mt-2 text-center text-sm text-gray-600">
+      Create a new secure password for your account
+    </p>
+  </div>
+
+  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
+    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
+      <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "space-y-6" }) do |f| %>
+        <%= render "devise/shared/error_messages", resource: resource %>
+        <%= f.hidden_field :reset_password_token %>
+
+        <div>
+          <%= f.label :password, "New password", class: "block text-sm font-medium text-gray-700" %>
+          <% if @minimum_password_length %>
+            <span class="text-xs text-gray-500">(<%= @minimum_password_length %> characters minimum)</span>
+          <% end %>
+          <div class="mt-1">
+            <%= f.password_field :password, autofocus: true, autocomplete: "new-password", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+          </div>
+        </div>
+
+        <div>
+          <%= f.label :password_confirmation, "Confirm new password", class: "block text-sm font-medium text-gray-700" %>
+          <div class="mt-1">
+            <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+          </div>
+        </div>
+
+        <div>
+          <%= f.submit "Change my password", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
+        </div>
+      <% end %>
+
+      <div class="mt-6">
+        <div class="relative">
+          <div class="absolute inset-0 flex items-center">
+            <div class="w-full border-t border-gray-300"></div>
+          </div>
+          <div class="relative flex justify-center text-sm">
+            <span class="px-2 bg-white text-gray-500">
+              Or go back to
+            </span>
+          </div>
+        </div>
+
+        <div class="mt-6">
+          <%= render "devise/shared/links" %>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
new file mode 100644
index 0000000..a4fa926
--- /dev/null
+++ b/app/views/devise/passwords/new.html.erb
@@ -0,0 +1,46 @@
+<div class="min-h-screen flex flex-col justify-center py-12 sm:px-6 lg:px-8 bg-gray-50">
+  <div class="sm:mx-auto sm:w-full sm:max-w-md">
+    <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
+      Forgot your password?
+    </h2>
+    <p class="mt-2 text-center text-sm text-gray-600">
+      Enter your email address and we'll send you instructions to reset your password.
+    </p>
+  </div>
+
+  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
+    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
+      <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: "space-y-6" }) do |f| %>
+        <%= render "devise/shared/error_messages", resource: resource %>
+
+        <div>
+          <%= f.label :email, class: "block text-sm font-medium text-gray-700" %>
+          <div class="mt-1">
+            <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+          </div>
+        </div>
+
+        <div>
+          <%= f.submit "Send reset instructions", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
+        </div>
+      <% end %>
+
+      <div class="mt-6">
+        <div class="relative">
+          <div class="absolute inset-0 flex items-center">
+            <div class="w-full border-t border-gray-300"></div>
+          </div>
+          <div class="relative flex justify-center text-sm">
+            <span class="px-2 bg-white text-gray-500">
+              Or go back to
+            </span>
+          </div>
+        </div>
+
+        <div class="mt-6">
+          <%= render "devise/shared/links" %>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb
new file mode 100644
index 0000000..b82e336
--- /dev/null
+++ b/app/views/devise/registrations/edit.html.erb
@@ -0,0 +1,43 @@
+<h2>Edit <%= resource_name.to_s.humanize %></h2>
+
+<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
+  <%= render "devise/shared/error_messages", resource: resource %>
+
+  <div class="field">
+    <%= f.label :email %><br />
+    <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
+  </div>
+
+  <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
+    <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
+  <% end %>
+
+  <div class="field">
+    <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
+    <%= f.password_field :password, autocomplete: "new-password" %>
+    <% if @minimum_password_length %>
+      <br />
+      <em><%= @minimum_password_length %> characters minimum</em>
+    <% end %>
+  </div>
+
+  <div class="field">
+    <%= f.label :password_confirmation %><br />
+    <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
+  </div>
+
+  <div class="field">
+    <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
+    <%= f.password_field :current_password, autocomplete: "current-password" %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit "Update" %>
+  </div>
+<% end %>
+
+<h3>Cancel my account</h3>
+
+<div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div>
+
+<%= link_to "Back", :back %>
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
new file mode 100644
index 0000000..35289c9
--- /dev/null
+++ b/app/views/devise/registrations/new.html.erb
@@ -0,0 +1,60 @@
+<div class="min-h-screen flex flex-col justify-center py-12 sm:px-6 lg:px-8 bg-gray-50">
+  <div class="sm:mx-auto sm:w-full sm:max-w-md">
+    <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
+      Create your account
+    </h2>
+  </div>
+
+  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
+    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
+      <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "space-y-6" }) do |f| %>
+        <%= render "devise/shared/error_messages", resource: resource %>
+
+        <div>
+          <%= f.label :email, class: "block text-sm font-medium text-gray-700" %>
+          <div class="mt-1">
+            <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+          </div>
+        </div>
+
+        <div>
+          <%= f.label :password, class: "block text-sm font-medium text-gray-700" %>
+          <% if @minimum_password_length %>
+          <span class="text-xs text-gray-500">(<%= @minimum_password_length %> characters minimum)</span>
+          <% end %>
+          <div class="mt-1">
+            <%= f.password_field :password, autocomplete: "new-password", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+          </div>
+        </div>
+
+        <div>
+          <%= f.label :password_confirmation, class: "block text-sm font-medium text-gray-700" %>
+          <div class="mt-1">
+            <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+          </div>
+        </div>
+
+        <div>
+          <%= f.submit "Sign up", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
+        </div>
+      <% end %>
+
+      <div class="mt-6">
+        <div class="relative">
+          <div class="absolute inset-0 flex items-center">
+            <div class="w-full border-t border-gray-300"></div>
+          </div>
+          <div class="relative flex justify-center text-sm">
+            <span class="px-2 bg-white text-gray-500">
+              Already have an account?
+            </span>
+          </div>
+        </div>
+
+        <div class="mt-6">
+          <%= render "devise/shared/links" %>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
new file mode 100644
index 0000000..b4dc11e
--- /dev/null
+++ b/app/views/devise/sessions/new.html.erb
@@ -0,0 +1,55 @@
+<div class="min-h-screen flex flex-col justify-center py-12 sm:px-6 lg:px-8 bg-gray-50">
+  <div class="sm:mx-auto sm:w-full sm:max-w-md">
+    <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
+      Log in to your account
+    </h2>
+  </div>
+
+  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
+    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
+      <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "space-y-6" }) do |f| %>
+        <div>
+          <%= f.label :email, class: "block text-sm font-medium text-gray-700" %>
+          <div class="mt-1">
+            <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+          </div>
+        </div>
+
+        <div>
+          <%= f.label :password, class: "block text-sm font-medium text-gray-700" %>
+          <div class="mt-1">
+            <%= f.password_field :password, autocomplete: "current-password", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+          </div>
+        </div>
+
+        <% if devise_mapping.rememberable? %>
+          <div class="flex items-center">
+            <%= f.check_box :remember_me, class: "h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" %>
+            <%= f.label :remember_me, class: "ml-2 block text-sm text-gray-900" %>
+          </div>
+        <% end %>
+
+        <div>
+          <%= f.submit "Log in", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
+        </div>
+      <% end %>
+
+      <div class="mt-6">
+        <div class="relative">
+          <div class="absolute inset-0 flex items-center">
+            <div class="w-full border-t border-gray-300"></div>
+          </div>
+          <div class="relative flex justify-center text-sm">
+            <span class="px-2 bg-white text-gray-500">
+              Or continue with
+            </span>
+          </div>
+        </div>
+
+        <div class="mt-6">
+          <%= render "devise/shared/links" %>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
diff --git a/app/views/devise/shared/_error_messages.html.erb b/app/views/devise/shared/_error_messages.html.erb
new file mode 100644
index 0000000..33b543d
--- /dev/null
+++ b/app/views/devise/shared/_error_messages.html.erb
@@ -0,0 +1,27 @@
+<% if resource.errors.any? %>
+  <div class="rounded-md bg-red-50 p-4 mb-6" id="error_explanation" data-turbo-cache="false">
+    <div class="flex">
+      <div class="flex-shrink-0">
+        <!-- Heroicon name: solid/x-circle -->
+        <svg class="h-5 w-5 text-red-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
+          <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" />
+        </svg>
+      </div>
+      <div class="ml-3">
+        <h3 class="text-sm font-medium text-red-800">
+          <%= I18n.t("errors.messages.not_saved",
+                 count: resource.errors.count,
+                 resource: resource.class.model_name.human.downcase)
+           %>
+        </h3>
+        <div class="mt-2 text-sm text-red-700">
+          <ul class="list-disc pl-5 space-y-1">
+            <% resource.errors.full_messages.each do |message| %>
+              <li><%= message %></li>
+            <% end %>
+          </ul>
+        </div>
+      </div>
+    </div>
+  </div>
+<% end %>
diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb
new file mode 100644
index 0000000..170880f
--- /dev/null
+++ b/app/views/devise/shared/_links.html.erb
@@ -0,0 +1,27 @@
+<div class="flex flex-col space-y-3">
+  <%- if controller_name != 'sessions' %>
+    <%= link_to "Log in", new_session_path(resource_name), class: "text-sm font-medium text-indigo-600 hover:text-indigo-500 text-center" %>
+  <% end %>
+
+  <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
+    <%= link_to "Sign up", new_registration_path(resource_name), class: "text-sm font-medium text-indigo-600 hover:text-indigo-500 text-center" %>
+  <% end %>
+
+  <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
+    <%= link_to "Forgot your password?", new_password_path(resource_name), class: "text-sm font-medium text-indigo-600 hover:text-indigo-500 text-center" %>
+  <% end %>
+
+  <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
+    <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name), class: "text-sm font-medium text-indigo-600 hover:text-indigo-500 text-center" %>
+  <% end %>
+
+  <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
+    <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name), class: "text-sm font-medium text-indigo-600 hover:text-indigo-500 text-center" %>
+  <% end %>
+
+  <%- if devise_mapping.omniauthable? %>
+    <%- resource_class.omniauth_providers.each do |provider| %>
+      <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false }, class: "w-full flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
+    <% end %>
+  <% end %>
+</div>
diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb
new file mode 100644
index 0000000..ffc34de
--- /dev/null
+++ b/app/views/devise/unlocks/new.html.erb
@@ -0,0 +1,16 @@
+<h2>Resend unlock instructions</h2>
+
+<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
+  <%= render "devise/shared/error_messages", resource: resource %>
+
+  <div class="field">
+    <%= f.label :email %><br />
+    <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit "Resend unlock instructions" %>
+  </div>
+<% end %>
+
+<%= render "devise/shared/links" %>


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 4**

<details>
<summary>🧹 Nitpick comments (19)</summary><blockquote>

<details>
<summary>app/views/devise/mailer/password_change.html.erb (1)</summary><blockquote>

`1-3`: **Clean implementation with appropriate personalization.**

The email template correctly uses `@resource.email` for personalization and provides a clear notification about the password change.


Consider adding instructions on what to do if the user didn't initiate this password change, as this would enhance security. For example:

```diff
<p>Hello <%= @resource.email %>!</p>

<p>We're contacting you to notify you that your password has been changed.</p>
+
+<p>If you did not request this change, please contact support immediately.</p>
```

</blockquote></details>
<details>
<summary>app/views/devise/mailer/unlock_instructions.html.erb (1)</summary><blockquote>

`1-7`: **Well-structured unlock instructions with clear call-to-action.**

The template provides clear information about the account lock and includes an appropriate action link using the correct parameters (`@resource` and `@token`).


Consider adding some security advice to help prevent future lockouts:

```diff
<p>Hello <%= @resource.email %>!</p>

<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>

<p>Click the link below to unlock your account:</p>

<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
+
+<p>For security reasons, please ensure you're using a strong, unique password for your account.</p>
```

</blockquote></details>
<details>
<summary>app/views/devise/mailer/email_changed.html.erb (1)</summary><blockquote>

`3-7`: **Well-implemented conditional messaging based on email confirmation state.**

The template correctly handles both scenarios (pending confirmation and completed change) using the `try(:unconfirmed_email?)` approach for safe method checking.


Consider adding security advice for unauthorized changes:

```diff
<% if @resource.try(:unconfirmed_email?) %>
  <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
<% else %>
  <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
<% end %>
+
+<p>If you did not request this change, please contact support immediately or secure your account.</p>
```

</blockquote></details>
<details>
<summary>app/views/devise/mailer/confirmation_instructions.html.erb (1)</summary><blockquote>

`3-5`: **Confirmation link implemented correctly.**

The template properly constructs the confirmation URL with the necessary parameters (`@resource` and `@token`).


Consider adding a time limit note if the confirmation token expires:

```diff
<p>You can confirm your account email through the link below:</p>

<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
+
+<p>This link will expire in 24 hours.</p>
```

Note: Update the expiration time according to your actual configuration.

</blockquote></details>
<details>
<summary>app/views/devise/unlocks/new.html.erb (2)</summary><blockquote>

`6-9`: **Add consistent styling to input fields**

The input field styling doesn't match the Tailwind CSS classes used in other Devise templates (like the password edit page).

```diff
-  <div class="field">
-    <%= f.label :email %><br />
-    <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
+  <div>
+    <%= f.label :email, class: "block text-sm font-medium text-gray-700" %>
+    <div class="mt-1">
+      <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+    </div>
   </div>
```

---

`11-13`: **Add consistent styling to submit button**

The submit button lacks the Tailwind CSS styling applied to buttons in other Devise templates.

```diff
-  <div class="actions">
-    <%= f.submit "Resend unlock instructions" %>
+  <div>
+    <%= f.submit "Resend unlock instructions", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
   </div>
```

</blockquote></details>
<details>
<summary>app/views/devise/shared/_links.html.erb (1)</summary><blockquote>

`22-25`: **Consider consistent color scheme for buttons and links**

The links use an indigo color scheme while the OmniAuth buttons use a gray/white scheme. For visual consistency, consider matching the color schemes:

```diff
-      <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false }, class: "w-full flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
+      <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false }, class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
```

</blockquote></details>
<details>
<summary>app/views/devise/mailer/reset_password_instructions.html.erb (1)</summary><blockquote>

`1-8`: **Enhance email template with proper HTML structure and email-safe styling**

Email clients have varying levels of HTML and CSS support. Consider adding proper HTML structure and inline styles for better compatibility:

```diff
+<!DOCTYPE html>
+<html>
+<head>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <title>Reset password instructions</title>
+</head>
+<body style="font-family: Arial, sans-serif; line-height: 1.5; color: #333333; padding: 20px;">
+<div style="max-width: 600px; margin: 0 auto;">
-<p>Hello <%= @resource.email %>!</p>
+<p style="font-size: 16px;">Hello <%= @resource.email %>!</p>

-<p>Someone has requested a link to change your password. You can do this through the link below.</p>
+<p style="font-size: 16px;">Someone has requested a link to change your password. You can do this through the link below.</p>

-<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
+<p style="margin: 25px 0;">
+  <%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token), style: "display: inline-block; background-color: #4f46e5; color: #ffffff; text-decoration: none; padding: 10px 20px; border-radius: 4px; font-weight: bold;" %>
+</p>

-<p>If you didn't request this, please ignore this email.</p>
-<p>Your password won't change until you access the link above and create a new one.</p>
+<p style="font-size: 14px; color: #666666;">If you didn't request this, please ignore this email.</p>
+<p style="font-size: 14px; color: #666666;">Your password won't change until you access the link above and create a new one.</p>
+</div>
+</body>
+</html>
```

</blockquote></details>
<details>
<summary>app/views/devise/passwords/edit.html.erb (1)</summary><blockquote>

`17-24`: **Consider adding aria-describedby for improved accessibility**

For better accessibility, consider connecting the password field with its requirements description using aria-describedby:

```diff
-          <% if @minimum_password_length %>
-            <span class="text-xs text-gray-500">(<%= @minimum_password_length %> characters minimum)</span>
+          <% if @minimum_password_length %>
+            <span id="password-requirements" class="text-xs text-gray-500">(<%= @minimum_password_length %> characters minimum)</span>
           <% end %>
           <div class="mt-1">
-            <%= f.password_field :password, autofocus: true, autocomplete: "new-password", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+            <%= f.password_field :password, autofocus: true, autocomplete: "new-password", aria_describedby: (@minimum_password_length ? "password-requirements" : nil), class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
           </div>
```

This helps screen readers associate the descriptive text with the input field.

</blockquote></details>
<details>
<summary>app/views/devise/confirmations/new.html.erb (1)</summary><blockquote>

`16-16`: **Consider adding a separator before links**

For consistency with the other templates, consider adding a visual separator and explanatory text before the shared links, similar to how it's done in the password reset and registration pages.


```diff
-<%= render "devise/shared/links" %>
+<div class="mt-6">
+  <div class="relative">
+    <div class="absolute inset-0 flex items-center">
+      <div class="w-full border-t border-gray-300"></div>
+    </div>
+    <div class="relative flex justify-center text-sm">
+      <span class="px-2 bg-white text-gray-500">
+        Or go back to
+      </span>
+    </div>
+  </div>
+
+  <div class="mt-6">
+    <%= render "devise/shared/links" %>
+  </div>
+</div>
```

</blockquote></details>
<details>
<summary>app/views/devise/shared/_error_messages.html.erb (2)</summary><blockquote>

`5-8`: **Add text alternative for SVG icon**

While the SVG has `aria-hidden="true"` which is good for accessibility, there should be a text alternative for screen readers. Consider adding an associated text description or an appropriate ARIA label.


```diff
-        <!-- Heroicon name: solid/x-circle -->
-        <svg class="h-5 w-5 text-red-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
+        <!-- Heroicon name: solid/x-circle -->
+        <svg class="h-5 w-5 text-red-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
           <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" />
         </svg>
+        <span class="sr-only">Error</span>
```

This ensures users of assistive technologies will understand the purpose of the icon.

---

`2-2`: **Add role="alert" for better accessibility**

For better screen reader support, add the `role="alert"` attribute to the error container to ensure assistive technologies announce the errors properly.


```diff
-  <div class="rounded-md bg-red-50 p-4 mb-6" id="error_explanation" data-turbo-cache="false">
+  <div class="rounded-md bg-red-50 p-4 mb-6" id="error_explanation" data-turbo-cache="false" role="alert">
```

</blockquote></details>
<details>
<summary>app/views/devise/registrations/new.html.erb (2)</summary><blockquote>

`25-27`: **Add placeholder text to password field**

Consider adding a placeholder to the password field to provide additional guidance to users about the password requirements, enhancing usability.


```diff
-            <%= f.password_field :password, autocomplete: "new-password", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
+            <%= f.password_field :password, autocomplete: "new-password", placeholder: "#{@minimum_password_length} characters minimum", class: "appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
```

---

`20-24`: **Make minimum password length requirements more prominent**

The current minimum password length notice is styled with small, light gray text which may be difficult for some users to see. Consider making it more prominent or integrating it better with the label.


```diff
-          <%= f.label :password, class: "block text-sm font-medium text-gray-700" %>
-          <% if @minimum_password_length %>
-          <span class="text-xs text-gray-500">(<%= @minimum_password_length %> characters minimum)</span>
-          <% end %>
+          <div class="flex justify-between">
+            <%= f.label :password, class: "block text-sm font-medium text-gray-700" %>
+            <% if @minimum_password_length %>
+            <span class="text-sm text-gray-600">(<%= @minimum_password_length %> characters minimum)</span>
+            <% end %>
+          </div>
```

</blockquote></details>
<details>
<summary>app/views/devise/passwords/new.html.erb (1)</summary><blockquote>

`23-25`: **Consider adding a loading state to the submit button**

For better user experience, consider adding a loading state to the submit button to prevent multiple submissions and provide visual feedback during form submission.


```diff
-          <%= f.submit "Send reset instructions", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
+          <%= f.submit "Send reset instructions", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", data: { disable_with: '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> Sending...' } %>
```

This will help prevent users from submitting the form multiple times and provide visual feedback that their request is being processed.

</blockquote></details>
<details>
<summary>app/views/devise/sessions/new.html.erb (1)</summary><blockquote>

`10-35`: **Consider adding error message handling.**

The form doesn't appear to include error message rendering which could be important for validation feedback. Consider adding the error messages partial as you've done in the registration edit view.

```diff
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
+  <%= render "devise/shared/error_messages", resource: resource %>
  <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "space-y-6" }) do |f| %>
```

</blockquote></details>
<details>
<summary>app/views/devise/registrations/edit.html.erb (3)</summary><blockquote>

`1-44`: **Consider applying consistent styling with the login page.**

While the form functionality is correct, the styling is inconsistent with the login page which uses Tailwind CSS classes. Consider applying similar styling for a unified user experience across all Devise views.


Here's an example of how you might style the update button consistently with the login page:

```diff
-  <div class="actions">
-    <%= f.submit "Update" %>
-  </div>
+  <div>
+    <%= f.submit "Update", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
+  </div>
```

---

`41-41`: **Update the button_to styling for account cancellation.**

The "Cancel my account" button could benefit from styling that makes it visually distinct as a destructive action.

```diff
-<div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div>
+<div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete, class: "py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %></div>
```

---

`43-43`: **Style the back link for consistency.**

The back link should match the styling pattern used elsewhere in the authentication views.

```diff
-<%= link_to "Back", :back %>
+<%= link_to "Back", :back, class: "text-sm text-indigo-600 hover:text-indigo-500" %>
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 2d9234cd0ba0205ba3f6a062529d4a72998be455 and 3c353f38491c476178a75f9a1b21b1ea43a58fa4.

</details>

<details>
<summary>📒 Files selected for processing (14)</summary>

* `app/views/devise/confirmations/new.html.erb` (1 hunks)
* `app/views/devise/mailer/confirmation_instructions.html.erb` (1 hunks)
* `app/views/devise/mailer/email_changed.html.erb` (1 hunks)
* `app/views/devise/mailer/password_change.html.erb` (1 hunks)
* `app/views/devise/mailer/reset_password_instructions.html.erb` (1 hunks)
* `app/views/devise/mailer/unlock_instructions.html.erb` (1 hunks)
* `app/views/devise/passwords/edit.html.erb` (1 hunks)
* `app/views/devise/passwords/new.html.erb` (1 hunks)
* `app/views/devise/registrations/edit.html.erb` (1 hunks)
* `app/views/devise/registrations/new.html.erb` (1 hunks)
* `app/views/devise/sessions/new.html.erb` (1 hunks)
* `app/views/devise/shared/_error_messages.html.erb` (1 hunks)
* `app/views/devise/shared/_links.html.erb` (1 hunks)
* `app/views/devise/unlocks/new.html.erb` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (6)</summary><blockquote>

<details>
<summary>app/views/devise/shared/_links.html.erb (1)</summary>

`1-27`: **Well-structured partial with conditional links**

The links partial is well-implemented with proper conditional rendering based on the current controller and Devise mapping capabilities. The styling is consistent and the code is organized.

</details>
<details>
<summary>app/views/devise/passwords/edit.html.erb (1)</summary>

`1-57`: **Well-structured template with responsive design**

This password reset template is well-implemented with proper semantic HTML structure, responsive Tailwind CSS classes, and good user experience considerations. The form layout, error handling, and navigation options are all appropriately designed.

</details>
<details>
<summary>app/views/devise/passwords/new.html.erb (1)</summary>

`13-13`: <details>
<summary>❓ Verification inconclusive</summary>

**Add CSRF protection meta tag**

For better security in your forms, ensure you have a CSRF protection meta tag in your application layout or add the authenticity token explicitly to your form.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if CSRF protection is included in the application layout
grep -r "csrf-meta" app/views/layouts/*.html.erb
```

Length of output: 92

---



</details>

**Security: CSRF Protection Verification Required**

Automated checks using a grep for "csrf-meta" did not return any results in the layout files. Please manually verify that your primary application layout (typically at `app/views/layouts/application.html.erb`) includes the CSRF protection meta tag (usually via `<%= csrf_meta_tags %>`) or that your forms explicitly include the authenticity token. If the CSRF tag is present by another mechanism, confirm its proper integration; otherwise, add the meta tag to ensure robust security.

</details>
<details>
<summary>app/views/devise/sessions/new.html.erb (2)</summary>

`1-56`: **Well-structured login form with Tailwind CSS styling.**

The template provides a clean, responsive login interface with appropriate form fields, labels, and styling. The use of Tailwind CSS classes creates a professional appearance with good spacing and visual hierarchy.

---

`25-30`: **Good implementation of conditional "remember me" functionality.**

The code properly checks if the Devise mapping supports rememberable functionality before rendering the checkbox, which is a best practice.

</details>
<details>
<summary>app/views/devise/registrations/edit.html.erb (1)</summary>

`3-37`: **Good implementation of the edit profile form with error handling.**

The form properly handles different Devise functionalities including confirmable checking, minimum password length display, and comprehensive field validation.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-23T04:41:22Z

Review comments:
diff_hunk: @@ -0,0 +1,7 @@
+<p>Hello <%= @email %>!</p>
path: app/views/devise/mailer/email_changed.html.erb
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Inconsistent variable usage for personalization.**

This template uses `@email` for the greeting, while other templates like `password_change.html.erb` use `@resource.email`.

For consistency, consider using the same variable across all email templates:

```diff
-<p>Hello <%= @email %>!</p>
+<p>Hello <%= @resource.email %>!</p>
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
<p>Hello <%= @resource.email %>!</p>
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-23T04:41:21Z
author_association: NONE
diff_hunk: @@ -0,0 +1,5 @@
+<p>Welcome <%= @email %>!</p>
path: app/views/devise/mailer/confirmation_instructions.html.erb
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Inconsistent variable usage for personalization.**

This template uses `@email` for the greeting, while some other templates like `password_change.html.erb` use `@resource.email`.

For consistency, consider using the same variable across all email templates:

```diff
-<p>Welcome <%= @email %>!</p>
+<p>Welcome <%= @resource.email %>!</p>
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
<p>Welcome <%= @resource.email %>!</p>
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-23T04:41:21Z
author_association: NONE
diff_hunk: @@ -0,0 +1,16 @@
+<h2>Resend unlock instructions</h2>
+
+<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
+  <%= render "devise/shared/error_messages", resource: resource %>
+
+  <div class="field">
+    <%= f.label :email %><br />
+    <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit "Resend unlock instructions" %>
+  </div>
+<% end %>
+
+<%= render "devise/shared/links" %>
path: app/views/devise/unlocks/new.html.erb
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Consider adding a consistent page layout**

This template lacks the consistent styling and layout present in other Devise templates (like the password edit page). Consider wrapping the content in container elements with appropriate Tailwind CSS classes for a consistent look and feel across all authentication pages.

```diff
+<div class="min-h-screen flex flex-col justify-center py-12 sm:px-6 lg:px-8 bg-gray-50">
+  <div class="sm:mx-auto sm:w-full sm:max-w-md">
     <h2>Resend unlock instructions</h2>
+  </div>

+  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
+    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
       <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
         <%= render "devise/shared/error_messages", resource: resource %>

         <div class="field">
           <%= f.label :email %><br />
           <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
         </div>

         <div class="actions">
           <%= f.submit "Resend unlock instructions" %>
         </div>
       <% end %>

       <%= render "devise/shared/links" %>
+    </div>
+  </div>
+</div>
```



<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
<div class="min-h-screen flex flex-col justify-center py-12 sm:px-6 lg:px-8 bg-gray-50">
  <div class="sm:mx-auto sm:w-full sm:max-w-md">
    <h2>Resend unlock instructions</h2>
  </div>

  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
      <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
        <%= render "devise/shared/error_messages", resource: resource %>

        <div class="field">
          <%= f.label :email %><br />
          <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
        </div>

        <div class="actions">
          <%= f.submit "Resend unlock instructions" %>
        </div>
      <% end %>

      <%= render "devise/shared/links" %>
    </div>
  </div>
</div>
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-23T04:41:21Z
author_association: NONE
diff_hunk: @@ -0,0 +1,16 @@
+<h2>Resend confirmation instructions</h2>
+
+<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
+  <%= render "devise/shared/error_messages", resource: resource %>
+
+  <div class="field">
+    <%= f.label :email %><br />
+    <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
+  </div>
+
+  <div class="actions">
+    <%= f.submit "Resend confirmation instructions" %>
+  </div>
+<% end %>
+
+<%= render "devise/shared/links" %>
path: app/views/devise/confirmations/new.html.erb
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Inconsistent styling with other Devise templates**

This confirmation page lacks the Tailwind CSS styling that's present in the other Devise templates (like registrations/new.html.erb and passwords/new.html.erb). For a consistent user experience, consider applying similar styling to match the design of the other pages.


```diff
-<h2>Resend confirmation instructions</h2>
-
-<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
+<div class="min-h-screen flex flex-col justify-center py-12 sm:px-6 lg:px-8 bg-gray-50">
+  <div class="sm:mx-auto sm:w-full sm:max-w-md">
+    <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
+      Resend confirmation instructions
+    </h2>
+    <p class="mt-2 text-center text-sm text-gray-600">
+      Enter your email address to receive confirmation instructions.
+    </p>
+  </div>
+
+  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
+    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
+      <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: "space-y-6" }) do |f| %>
```

Similarly, apply Tailwind classes to the form fields and submit button following the pattern in the other templates.


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
<div class="min-h-screen flex flex-col justify-center py-12 sm:px-6 lg:px-8 bg-gray-50">
  <div class="sm:mx-auto sm:w-full sm:max-w-md">
    <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
      Resend confirmation instructions
    </h2>
    <p class="mt-2 text-center text-sm text-gray-600">
      Enter your email address to receive confirmation instructions.
    </p>
  </div>

  <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
      <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: "space-y-6" }) do |f| %>
        <%= render "devise/shared/error_messages", resource: resource %>

        <div class="field">
          <%= f.label :email, class: "block text-sm font-medium text-gray-700" %><br />
          <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), class: "mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" %>
        </div>

        <div class="actions">
          <%= f.submit "Resend confirmation instructions", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700" %>
        </div>
      <% end %>
      <%= render "devise/shared/links" %>
    </div>
  </div>
</div>
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-23T04:41:21Z
author_association: NONE

PR comments:
user: login: bito-code-review[bot]
created_at: 2025-03-23T04:37:55Z
body: ### Repository not enabled for automatic review ###

The Bito agent is set up, but this repository is not enabled for automatic code reviews. To review this pull request, type `/review` in a comment and save it.

You can enable automatic reviews in the agent setup <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at leonid@macron1.io.

<details>
<summary>

### Bito Usage Guide ###

</summary>

**Commands**

Type the following command in the pull request comment and save the comment.

- `/review` - Manually triggers a full AI review.

Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.

**Configuration**
This repository uses `Default Agent` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at leonid@macron1.io.

**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-03-23T04:37:56Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

This pull request introduces multiple new HTML templates for a Devise-based authentication system. The changes add view files for confirmation resends, password resets and edits, sign-up and account editing, login sessions, and unlock instructions. Additionally, new mailer templates are provided for sending confirmation instructions, reset password instructions, email change, password change, and unlock instructions. Two new partials are also included for rendering error messages and shared authentication links. Each template adopts a responsive layout with forms and conditional content based on resource state.

## Changes

| File(s) | Change Summary |
|---------|----------------|
| `app/views/devise/confirmations/new.html.erb` | Adds a new template for resending confirmation instructions with a form for email input and shared links rendering. |
| `app/views/devise/mailer/{confirmation_instructions, email_changed, password_change, reset_password_instructions, unlock_instructions}.html.erb` | Introduces new mailer templates that generate emails for confirmation instructions, email change notifications, password changes, password reset instructions, and account unlock instructions. |
| `app/views/devise/passwords/{edit, new}.html.erb` | Adds new templates for editing passwords and requesting password reset instructions with responsive layouts and error handling. |
| `app/views/devise/registrations/{edit, new}.html.erb` | Provides new templates for editing and creating user registrations, including forms with error messages, conditional displays, and account cancellation options. |
| `app/views/devise/sessions/new.html.erb` | Introduces a new login form template featuring email, password inputs, a remember me checkbox, and alternative navigation links. |
| `app/views/devise/shared/{_error_messages, _links}.html.erb` | Adds new partials for displaying validation error messages and rendering shared authentication navigation links. |
| `app/views/devise/unlocks/new.html.erb` | Adds a new template for resending unlock instructions with an email input form and shared links rendering. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant U as User
    participant B as Browser
    participant CC as Confirmations Controller
    participant M as Mailer
    U->>B: Open "Resend Confirmation" page
    B->>CC: Render confirmation form (new.html.erb)
    U->>B: Submit email via form
    B->>CC: POST to confirmation_path
    CC->>M: Process and send confirmation instructions
    M-->>U: Deliver confirmation email
```

```mermaid
sequenceDiagram
    participant U as User
    participant B as Browser
    participant PC as Passwords Controller
    participant M as Mailer
    U->>B: Open "Forgot Password" page
    B->>PC: Render reset form (new.html.erb in passwords/)
    U->>B: Submit email via form
    B->>PC: POST email to password_path
    PC->>M: Trigger reset instructions email
    M-->>U: Deliver reset instructions email
```

```mermaid
sequenceDiagram
    participant U as User
    participant B as Browser
    participant UC as Unlock Controller
    participant M as Mailer
    U->>B: Open "Resend Unlock" page
    B->>UC: Render unlock form (new.html.erb in unlocks/)
    U->>B: Submit email via form
    B->>UC: POST email for unlock instructions
    UC->>M: Process and send unlock instructions email
    M-->>U: Deliver unlock instructions email
```

## Poem

> I’m a rabbit hopping through a code-filled glen,  
> New views sprout like carrots again and again.  
> Forms and mails sing a curious tune,  
> Guiding users from morning until noon.  
> With each change, I dance in digital delight! 🐇✨

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS5pateBiKQlEpCUiJcsiw6IGActjMApRcAKwGAKqIoZBW+Nj4AGZoRvrG4FBk9Mk4BMRkyjT0TKzsXLz8wqLiUjLyTEpUqupaOukmUHCoqJh5hKTkVMUKZRickFQA7h5BzGgU8nIKTSpqmtq6YIYZpgZo3NwA9K4kU4hHLm5HTBhJ8BTz4vgYF+RTGrC4zBYalAIcAwAIhBBgAxGDIABBACSBSG1Dos1YC3kuQYsEwpEQRihkHekAAEtAALIAGUgNGY3AsiMg9yskAABu9Pt9fv8mZBMTISGQUOMKIpsAwkUl8HxcLB3BRpNkFHcHk94C8BZ4KCLnq96SRqNhZQL0JAACIkVwxPLS8bwBjUFVYW40AAemhg0spJGptJoAoYFmwSmQaG5uqaAvstvEjkp7u4+u4+AtuSl7m4aFIGkgMNwkDw8B8AC9pEbxY8Y9QUMhBkUkdhEL4Y+4maXmAB9Utc6UWbi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SEkhjDlxWA4FQaZkhDU5INTqeKxh/AagCpwBwEIprFxbgfsMyeL5/N6xAfsMKBmzPUXhvAvenCXiWueECmPAiFapll2MaxUowsZ6lxWalklRd7KsrPqtI8zjHmQcVts83aWBsS6F86tBIZARcZgMjqEcH7OHbDm05RBJ+IUbAAU6PSSfMNzt3mo053g4XBmnIk2lQyaQr2AO3IZmY/5asx+tpKZ2thoDYpZne/ulksTXgo1ptSw3UCmgYxt9vRC3qNt043vR2uboJ64vtsJ8p899bg6BdgqZd67lnGug78HZJ74kd8HKfN4Dprdu7ndh77Og96EsnISt7gDxE0fvbz7qurnKqH1NPBPUl/ErwAXdHvpnUtAyUSwaV4KeWR+mXpvGfGH+KGjg5iseyZgk5y0uhtzTgjQoSXIKfQ8x02+ssULBGOFhT555X6ALLsAlVFjDhQWE3RLpUi5CCARAYgKFu5VGyexL+bcRFvkTVbiMXgpVA/mFzaz0sGq6hYtOZlTIANC4U4Z5hcyDyBJi2hZFiFEXywMDYi/EbMqzV8JS8aO0LSPnkQ4an8QoF/dPNf0YTxRkiNLFJBeXvx4cPA/rQHuVFNr7gqe7fXbGzxW6/BRuTbdtrbVQoYIHagTbtgt33Qj5Xul5VvsyESYkZ9u53CVMP2O5CptguwLIJ/y2rMRd2SIUoGwHGBcBpgRTJYA0E7LNB1gbQLYIYE6CjB3IMMMFq2FlC3Q6A+ndtONFCFODIAAAZgYCpCwgqQpIKkLE4AAWAAJwicGAeQgAOwAA2ETqULE5oBShYQJIAULQAicBAAAJmaEiddQeQ1IWgDCBicUgeQ5IQYHCGeCYsShRADEIehnB4h8ofQEAA= -->

<!-- internal state end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=leouofa/BookWrite&utm_content=5):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE