<commit_before><% title = t "head.title.records.index", profile_name: @user_entity.name, username: @user_entity.username %>
<% description = meta_description t("head.meta.description.records.index", profile_name: @user_entity.name, username: @user_entity.username) %>
<% image_url = @user_entity.avatar_url %>
<% set_meta_tags(title: title, description: description, og: { description: description, image: image_url }, twitter: { description: description, image: image_url }, reverse: true, prefix: false) %>

<%= render "partial_layouts/default", page_category: "record-list" do %>
  <%= render ProfileHeaderComponent.new(user_entity: @user_entity, current_user: current_user) %>

  <div class="container-fluid">
    <div class="row">
      <div class="col-12 col-lg-9">
        <div class="mb-3">
          <% @record_entities.each do |record_entity| %>
            <div class="py-3 u-underline">
              <div class="mb-3">
                <%= render RecordHeaderComponent.new(user_entity: @user_entity, record_entity: record_entity) %>
              </div>

              <% if record_entity.itemable_type == "episode_record" %>
                <%= render EpisodeRecordContentComponent.new(
                    user_entity: @user_entity,
                    work_entity: record_entity.work,
                    episode_entity: record_entity.itemable.episode,
                    record_entity: record_entity,
                    episode_record_entity: record_entity.itemable
                ) %>
              <% elsif record_entity.itemable_type == "work_record" %>
                <%= render WorkRecordContentComponent.new(
                    user_entity: @user_entity,
                    work_entity: record_entity.work,
                    record_entity: record_entity,
                    work_record_entity: record_entity.itemable
                ) %>
              <% end %>
            </div>
          <% end %>
        </div>

        <%= render PaginationComponent.new(page_info_entity: @page_info_entity, resources_path: current_path_with_query) %>
      </div><commit_msg>Display empty component when records do not exist<commit_after><% title = t "head.title.records.index", profile_name: @user_entity.name, username: @user_entity.username %>
<% description = meta_description t("head.meta.description.records.index", profile_name: @user_entity.name, username: @user_entity.username) %>
<% image_url = @user_entity.avatar_url %>
<% set_meta_tags(title: title, description: description, og: { description: description, image: image_url }, twitter: { description: description, image: image_url }, reverse: true, prefix: false) %>

<%= render "partial_layouts/default", page_category: "record-list" do %>
  <%= render ProfileHeaderComponent.new(user_entity: @user_entity, current_user: current_user) %>

  <div class="container-fluid">
    <div class="row">
      <div class="col-12 col-lg-9">
        <div class="mb-3">
          <% if @record_entities.present? %>
            <% @record_entities.each do |record_entity| %>
              <div class="py-3 u-underline">
                <div class="mb-3">
                  <%= render RecordHeaderComponent.new(user_entity: @user_entity, record_entity: record_entity) %>
                </div>

                <% if record_entity.itemable_type == "episode_record" %>
                  <%= render EpisodeRecordContentComponent.new(
                      user_entity: @user_entity,
                      work_entity: record_entity.work,
                      episode_entity: record_entity.itemable.episode,
                      record_entity: record_entity,
                      episode_record_entity: record_entity.itemable
                  ) %>
                <% elsif record_entity.itemable_type == "work_record" %>
                  <%= render WorkRecordContentComponent.new(
                      user_entity: @user_entity,
                      work_entity: record_entity.work,
                      record_entity: record_entity,
                      work_record_entity: record_entity.itemable
                  ) %>
                <% end %>
              </div>
            <% end %>
          <% else %>
            <%= render EmptyComponent.new(text: t("messages._empty.no_records")) %>
          <% end %>
        </div>

        <%= render PaginationComponent.new(page_info_entity: @page_info_entity, resources_path: current_path_with_query) %>
      </div>
{'fraction_non_alphanumeric': 0.1188118811881188, 'fraction_numerical': 0.0027002700270027003, 'mean_word_length': 2.344620015048909, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5610452', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1182, 'n_words': 225}