Skip to content

Remove program status from org-wide UI#1993

Open
maebeale wants to merge 1 commit into
mainfrom
maebeale/remove-org-status-columns
Open

Remove program status from org-wide UI#1993
maebeale wants to merge 1 commit into
mainfrom
maebeale/remove-org-status-columns

Conversation

@maebeale

@maebeale maebeale commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 removes a misleading admin column/field + one orphaned model method; no data changes

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

How did you approach the change?

  • Removed the admin-only "Program" column from the org index.
  • Removed the now-orphaned Organization.program_statuses_by_id bulk classifier (only the index used it).
  • Removed the "Program status" badge/label block from the org edit form's Affiliations section (kept the date fields).
  • Left the DB organization_status (Active/Inactive/…) search filter untouched — it's a real persisted field, not the program status.
  • program_status / program_status_badge are unchanged and still used in event context (event dashboard, onboarding, scholarships).

Anything else to add?

Copilot AI review requested due to automatic review settings July 15, 2026 04:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

# already-loaded affiliations so a profile can classify many events without an
# N+1. No facilitator affiliation starting before the date => :new; an earlier
# one still active on the date => :ongoing; all earlier ones ended => :reinstated.
def facilitator_status_as_of(date)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Deliberately computed in-memory (over the already-loaded affiliations) rather than reusing the DB-backed Organization#facilitator_status_on, so classifying a paginated page of ~9 events doesn't fire 2 queries per event. Same classification rule, just no N+1.

title: event.title,
data: { turbo_frame: "_top" },
class: "inline-flex items-center rounded-full text-xs font-medium border px-2.5 py-0.5 #{OrganizationDecorator.program_status_classes(status)}" do %>
<%= status.to_s.titleize %> · <%= event.abbreviation.presence || event.title.truncate(24) %>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Falls back to a truncated title when abbreviation is blank so existing events still render a sensible chip. Chips are gated behind manage? to keep program status admin-only, matching how it was treated on the old index column.

@maebeale maebeale force-pushed the maebeale/remove-org-status-columns branch from 06ca55a to 7fb2709 Compare July 15, 2026 04:51
Copilot AI review requested due to automatic review settings July 15, 2026 04:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale marked this pull request as ready for review July 15, 2026 04:53
New/Reinstate/Ongoing can only be determined relative to a specific event, so
showing it as a global org attribute was misleading. Per-event program status is
surfaced on the org profile in a separate PR (event abbreviations, #1995).

- Drop the admin-only "Program" column from the org index.
- Drop the now-orphaned Organization.program_statuses_by_id bulk classifier.
- Drop the "Program status" block from the org edit form's Affiliations section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 15, 2026 05:06
@maebeale maebeale force-pushed the maebeale/remove-org-status-columns branch from 7fb2709 to c1bb63c Compare July 15, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale changed the title Move org program status out of org-wide UI into event context Remove program status from org-wide UI Jul 15, 2026
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.

2 participants