Skip to content

Add an "Add a track" page for maintainer admins - #13165

Closed
iHiD wants to merge 16 commits into
mainfrom
admin-add-track
Closed

iHiD wants to merge 16 commits into
mainfrom
admin-add-track

Conversation

@iHiD

@iHiD iHiD commented Nov 26, 2026

Copy link
Copy Markdown
Member

This is PR 3 of 4 in a stack. Merge them in order: the access levels PR, then the admin section layout, then this PR ("Add a track"), then the Roles page.

What this changes for people

Maintainer admins can add a new track from /admin/tracks/new without a Rails console. They enter the track's slug, and the website queues a Sidekiq job to run Track::Create. Track::Create reads the track's repo, syncs its exercises and creates its forum category. This replaces the console step in the "Testing and activating a track" guide in https://github.com/exercism/maintenance/pull/21.

What changed

  • Admin::TracksController checks that the slug is lowercase letters, numbers and single hyphens, and that no track has it yet. It then calls Track::Create.defer(slug) and shows a message saying the track has been queued.
  • If the slug is already taken, the form says so and links to the existing track.
  • The page lists the five most recently added tracks with their status, so it's clear when the new track has been created.
  • "Add a track" appears in the Maintainer admin group of the sidebar.

Risks

  • The page doesn't check whether exercism/<slug> exists on GitHub. If the repo is missing, the job will fail and retry in Sidekiq, and the track will never appear in the list. A maintainer admin can't see Sidekiq, so they will have to ask an admin to look.
  • The new track's active flag comes from its config.json. If config.json marks the track as active, the track will go live as soon as the job finishes.

🤖 Generated with Claude Code

@iHiD
iHiD force-pushed the admin-add-track branch 2 times, most recently from 7582c68 to 91cff75 Compare November 26, 2026 07:10
@iHiD
iHiD added this pull request to stack #13169 November 26, 2026 07:15
iHiD and others added 11 commits November 26, 2026 16:52
Add a maintainer_admin role between admin and maintainer. Each level
now implies the ones below it. The staff role becomes a label only and
no longer gives access to anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the existing rule for inactive tracks. maintainer? now covers
maintainer admins and admins, so the separate admin check goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every page at /admin now shares one layout. The sidebar lists the pages
the current user can see, grouped under Admin, Maintainer admin and
Maintainer, and the /admin front page shows the same groups as cards.

The maintaining pages move into /admin. The old /maintaining URLs
redirect to their new ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The selected item's accent border sits on its start edge. Without
rounded corners on that side, the accent is a straight line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Take out the donors and Insiders pages, their routes, tests and their
entries in the admin sidebar and front page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…legend below the table

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le exercise list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Maintainer admins can now add a track from /admin/tracks/new by entering
its slug. The page checks the slug, queues Track::Create in Sidekiq, and
lists the most recently added tracks so it's clear when the new one has
been created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…jobs don't count

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iHiD and others added 5 commits November 26, 2026 17:01
…parse

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Admins can now see everyone with a role at /admin/roles, filter the
list by role, and give or take away each role. The page uses
User::AddRoles and User::RemoveRoles, so Discord, Insiders and analytics
are updated as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Role tags, the role select and the messages now use the same names as
the filter ("Maintainer admin"). The add-a-role column has a fixed width,
so the select is the same size on every row and the button stays inside
the table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A form above the roles table takes a handle and a role, so an admin can
give a role to someone who isn't in the table yet. If no user has the
handle, the page says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from admin-section to main November 26, 2026 08:30
@iHiD
iHiD requested a review from dem4ron as a code owner November 26, 2026 08:30
@iHiD iHiD closed this Nov 26, 2026
@iHiD
iHiD deleted the admin-add-track branch November 26, 2026 08:31
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.

1 participant