<%= turbo_frame_tag "currently_hacking" do %>
  <% if users&.any? %>
    <div class="currently-hacking-list max-h-[60vh] overflow-y-auto p-1 bg-elevated bg-dark">
      <div class="space-y-3">
        <% users.each do |user| %>
          <div class="flex flex-col space-y-1 p-1 rounded-lg bg-dark hover:bg-darkless transition-colors duration-200">
            <div class="flex items-center">
              <%= render "shared/user_mention", user: user, show: [:slack] %>
            </div>
            <% if active_projects[user.id].present? %>
              <div class="text-xs italic text-muted ml-2">
                working on <%= link_to h(active_projects[user.id].project_name), active_projects[user.id].repo_url, target: "_blank", class: "text-accent hover:text-cyan transition-colors" %>
                <%= link_to "🌌", visualize_git_url(active_projects[user.id].repo_url), target: "_blank", class: "ml-1" %>
              </div>
            <% end %>
            <% if user == current_user && user.github_username.blank? %>
              <div class="text-xs italic text-muted ml-6">
                <%= link_to "Link active projects", my_settings_path(anchor: "user_github_account"), target: "_blank", class: "text-accent hover:text-cyan transition-colors" %>
              </div>
            <% end %>
          </div>
        <% end %>
      </div>
    </div>
  <% else %>
    <div class="p-4 bg-elevated">
      <div class="text-center text-muted text-sm italic">No one is currently hacking :(</div>
    </div>
  <% end %>
<% end %>

