Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

What is the goal of this PR and why is this important?

Enable unauthenticated visitors to access the dashboard at the root URL, seeing curated content marked for public viewing. Previously, visitors were immediately redirected to login.

How did you approach the change?

Database & Models

  • Added visitor_featured boolean column to workshops, resources, stories, community_news, and events tables
  • Added corresponding visitor_featured scope to all five models

Authentication & Routing

  • Modified ApplicationController to allow public access to dashboard#index via public_page? check
  • Changed unauthenticated_root route from login page to dashboard
  • Dashboard controller now selects scope dynamically: visitor_featured for visitors, featured for authenticated users

UI & Forms

  • Navbar shows "Log in" button for visitors instead of user avatar
  • Added "Visitor Featured?" checkbox to admin forms for all content types
  • Updated strong parameters in 5 controllers to permit visitor_featured

Example controller logic:

def index
  featured_scope = user_signed_in? ? :featured : :visitor_featured
  @workshops = Workshop.includes(...).send(featured_scope).published.decorate
  # Similar for resources, stories, community_news, events
end

Anything else to add?

After merging, run rails db:migrate and mark initial content with "Visitor Featured?" checkbox to populate the public dashboard.

Original prompt

This section details on the original issue you should resolve

<issue_title>Visitor-facing dashboard</issue_title>
<issue_description>- Visitor status for Workshops, etc on Dashboard
</issue_description>

<agent_instructions>change the default landing page to be the dashboard index for visitors (no current_user) and users.

visitors should see preselected items in each section (another boolean on those forms, just like the featured functionality)

visitors should see a "Log in" button in top right instead of the avatar</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 20, 2026 01:03
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
…olumns

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Copilot AI changed the title [WIP] Update visitor-facing dashboard for workshops and login button Implement visitor-facing dashboard with visitor_featured content filtering Jan 20, 2026
Copilot AI requested a review from maebeale January 20, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visitor-facing dashboard

2 participants