Repository navigation
feat(atlas): end-of-semester PM close-out with program-lead sign-off - #364
Merged
Merged
Conversation
PMs get an emailed private link to a pre-filled close-out form (description, tech, topics, repo/demo links, screenshots, this term's contributors, program lead). The token only writes the request's draft. The chosen program lead (or a super admin) signs off from Approvals; only then are the whitelisted fields, the term's contributors and screenshots written and status set to complete. - 008_closeout_requests: upload_requests gains kind/term/program_lead/draft (lazy DDL kept in step; rollback refuses while close-out rows exist) - lib/closeout.ts: pure coerce/validate/diff/canApprove/cleanProgramLeads + tests - /admin/closeout: pick a term, see PM + email + status, send/resend links; PMs with no email are listed with the link to copy - /admin/closeout/<token>: old -> new per field, contributors diff, keep-images picker, approve / send back with a note (emails the PM) - Settings: program leads editor; leads never in the public settings payload - Screenshot flows filter kind='screenshots' so close-out tokens can't leak in Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0152aazG7AAEF6rWPWCedVgY
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…ption The table headers carry .lab (display:block), which broke the table layout on desktop: headers stacked and the last-name column collapsed. Approving a close-out now sets blurb_locked so the next PD sync can't overwrite it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0152aazG7AAEF6rWPWCedVgY
The sign-off page sends the submission time it showed; approveCloseout's claim requires it, so a PM resubmitting while the lead reviews makes approve fail with "reload" instead of applying edits the lead never saw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0152aazG7AAEF6rWPWCedVgY
# Conflicts: # atlas/app/admin/settings/page.tsx
This was referenced Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
End-of-semester close-out for project PMs, built on
upload_requests(the magic-link table)./admin/closeout(linked from the Uploads page header; the rail is unchanged). Pick a term to list the org's projects with a run that term, along with the run's PM, the PM's email (people directory, aliases included) and the status: not sent / sent / submitted / approved / sent back / expired. Send links createskind='closeout'requests and emails the PMs through the existing batch send machinery with a new template. Resend reuses the live link and its draft. An expired link gets a fresh one. A project with no PM email still comes back as a row with the link to copy. It is never skipped silently./contribute/<token>(closeout kind): a form pre-filled from the project. It has the description, tech tags, topics (fromsettings.topics), repo and demo URLs, screenshots (the same token upload endpoint andImageSlot), that term's contributors as an editable table, and a program lead picked from settings. Save draft and Submit for sign-off both validate on the server, and problems show inline per field. Blockers stop a submit. The token only ever writes the request'sdraftcolumn. The page works at phone width and has a sticky footer./admin/closeout/<token>, reached from Approvals (newcloseoutkind). It shows old → new per field, contributors as added / removed / changed, a picker for which screenshots to keep, and the checks. Approve and Send back with a note work only for the chosen lead's email or a super admin. Everyone else sees the page read-only with "Waiting on …". Approve runs as one transaction. It writes blurb, tech, topics, repo and prod URLs, and images, sets statuscomplete, replaces that term's contributors and marks the request approved. It never writes visibility, published, owner_org, surfaces or featured. Send back reopens the link and emails the PM the note.ProgramLeadsEditorcomponent (the settings page change is two lines). The list is validated server-side: trimmed, email-shaped, deduped, at most 20. It defaults to[]in code.Security
GET /api/settingspayload or ingetGallerySettings(), whose result reaches public pages. They load only fromGET /api/settings?programLeads=1, which needs an admin session.coerceDraft, and every save, submit and approve re-validates on the server. The request body is capped at 100KB, and the existing rate limiter now covers draft save and submit too.kind='screenshots': the outreach lists, the review queue, the counts, the per-project links, approve, and the screenshot reject route. Without that filter, a close-out could be approved or sent back through the screenshot endpoints and skip the lead check.Migration
atlas/db/migrations/008_closeout_requests.sqlis idempotent, andlib/db.tslazy DDL adds the same columns, so the migration and the deploy can go in either order. The rollback refuses to run while any close-out row exists. Not applied.Reviewer, please check
blurb_locked, because the spec whitelisted only the listed fields. A later PD sync could overwrite a description a lead just approved.<select>values, since the draft stores the lead's email. Names-only would need a server-side name→email map.termsEqualand deleted by id, because stored terms predate the canonical spelling.publishBlockersblocks a PM whose project has no course & term. The PM can't fix that, so the message tells them to reply to the email.DigestInput.waitinghas fixed keys.Tests
lib/closeout.test.tscovers coerce, validate, diff, can-approve and lead cleaning.lib/email.test.tscovers the close-out template and note escaping.npx vitest runpasses (237 tests) andnpx tsc --noEmitis clean. The UI has not been clicked through against a database.🤖 Generated with Claude Code
https://claude.ai/code/session_0152aazG7AAEF6rWPWCedVgY