Skip to content

#41 Don't Allow Editing of Past Cycles#42

Merged
b-at-neu merged 2 commits intodevfrom
copilot/disable-editing-past-cycles
Feb 24, 2026
Merged

#41 Don't Allow Editing of Past Cycles#42
b-at-neu merged 2 commits intodevfrom
copilot/disable-editing-past-cycles

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 24, 2026

Past (inactive) cycles in the cycle archive should be view-only. Currently, approve/reject buttons and the "Remove PDF" action are accessible on any cycle regardless of active status.

Changes

  • NominationsManager — added readOnly prop; when true, hides select-all checkbox, per-row checkboxes, bulk approve/reject buttons, and per-row approve/reject action buttons
  • AdminDashboard — added readOnly prop; when true, hides the destructive "Remove PDF" button and its associated hint text (PDF viewing remains available)
  • CycleDashboard — passes readOnly={!cycle.isActive} to both components, gating all mutations behind active-cycle status
// Past cycle → fully read-only; active cycle → fully editable
<NominationsManager nominations={nominations} settings={defaultSettings} readOnly={!cycle.isActive} />
<AdminDashboard applications={applications} getApplicationDetails={getApplicationDetails} settings={defaultSettings} readOnly={!cycle.isActive} />

SettingsForm already received readOnly unconditionally on this page, so settings were already protected.

Original prompt

This section details on the original issue you should resolve

<issue_title>Don't allow editing of past cycles</issue_title>
<issue_description>None of the information of previous cycles should be editable. This includes approving and rejecting the nominations. Those buttons should either not exist or be disabled and not do anything. The history of cycles page is just for viewing and should not allow manipulation of any data</issue_description>

<agent_instructions>Ticket #41</agent_instructions>

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

  • Fixes b-at-neu/senate-path#41

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
senate-path Ready Ready Preview, Comment Feb 24, 2026 5:44am

Co-authored-by: b-at-neu <144247685+b-at-neu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix editing of past cycles by disabling buttons #41 Don't Allow Editing of Past Cycles Feb 24, 2026
@b-at-neu b-at-neu marked this pull request as ready for review February 24, 2026 06:25
@b-at-neu b-at-neu merged commit 174a44c into dev Feb 24, 2026
2 checks passed
@b-at-neu b-at-neu deleted the copilot/disable-editing-past-cycles branch February 24, 2026 06:25
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.

Don't allow editing of past cycles

2 participants