#573 Separate The Apply Positions Page From The Manage Positions Page - #592
Open
b-at-neu wants to merge 2 commits into
Open
#573 Separate The Apply Positions Page From The Manage Positions Page#592b-at-neu wants to merge 2 commits into
b-at-neu wants to merge 2 commits into
Conversation
/positions is now purely the applicant browse page for every viewer, signed in or not, and marks positions the caller already applied to. The reviewer workbench (create action, active/archived split, stats) moves to /my-positions, mirroring the flat /my-applications pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
b-at-neu
commented
Aug 24, 2026
b-at-neu
left a comment
Collaborator
Author
There was a problem hiding this comment.
Code Review — Cycle 1 · needs revision
1 open — 1 🟡 Low (see inline)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Author
Revision — Cycle 1fixed R1-L1 · 433bbd0 |
b-at-neu
commented
Aug 24, 2026
b-at-neu
left a comment
Collaborator
Author
There was a problem hiding this comment.
Code Review — Cycle 2 · approved
0 open — clean
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.
Closes #573
Summary
/positionsis now purely the applicant browse page — every viewer, signed in or not, sees the same Open / Recently Closed list, and a signed-in viewer's own applications now mark the relevant cards (draft/withdrawn/applied badge + matching CTA)./my-positions: the create action, the active/archived partition, and per-position application stats. Admins get a flat "All Positions" list including drafts.nav-items.tsgains amyPositionsNavItemunder Manage;Positionsstays under Apply for managers/admins too, so they can still browse and apply like any other user.docs/WORKFLOWS.md(AN-1, AN-2, PM-2, AD-1, the PM/AD persona intros, PM-3's trigger) is updated to match, and a new AP-17 documents the applied marker.Changes
app/(main)/(auth)/my-positions/page.tsx,loading.tsx— new; the reviewer view, gated byrequireManagerOrAdminOr404, with the admin flat-list branch and the manager managed-list branch moved off/positions.app/(main)/positions/page.tsx— stripped to browse-only:getOpenPositions()+getRecentlyClosedPositions()+ the viewer's applied-application map (getMyApplicationsByPosition); no admin branch, no managed-position filtering.app/(main)/positions/[id]/page.tsx— back link goes to/my-positionswhen the viewer can manage the position,/positionsotherwise.components/features/position-card.tsx— new optionalmyApplicationprop driving anApplicationStatusBadgeand the applicant CTA (Continue application / Edit & resubmit / View application).components/features/managed-positions-section.tsx— heading is now "Active" (it sits under an H1 that already says "My Positions").components/features/managed-positions-widget.tsx,open-positions-summary.tsx— "See all" / "Manage positions" links →/my-positions; the admin widget's position title now links to the position detail page.components/features/position-danger-zone.tsx— post-delete redirect →/my-positions.components/layouts/nav-items.ts,use-nav-items.ts— newmyPositionsNavItem; managers/admins now see Positions under Apply and My Positions under Manage.prisma/data/applications.ts— newgetMyApplicationsByPosition(userId).lib/types.ts— newMyPositionApplication.prisma/actions/position-actions.ts—/my-positionsadded alongside every existing/positionsrevalidation.prisma/actions/applications.ts—createDraftApplicationanddeleteDraftApplicationnow also revalidate/positionsso the applied marker can't go stale.docs/WORKFLOWS.md— AN-1, AN-2, PM-2, AD-1, PM-3's trigger, and the PM/AD persona intros rewritten; new AP-17; TOC updated.tests/db/authorization.test.ts— caller-scoping test forgetMyApplicationsByPosition.Testing plan
/positions: Open Positions and (if any) Recently Closed render, cards show View Details + Apply, and Apply routes through/login?redirectTo=…./my-positions: 404./my-positions: 404. Sidebar shows Positions and My Applications, no Manage group./positions: card shows Draft badge + Continue application; delete the draft and the badge/button disappear without a manual refresh./positions: Applied badge, View application goes to your/my-applications/[id], no Apply button. Withdraw it → Withdrawn badge + Edit & resubmit while still accepting./my-positions: only your positions, "Active" first with stats, "Archived (N)" collapsed if applicable, New position in the header. Create a position → appears here after redirect, never on/positionswhile a draft./positionsnow lists the open positions you manage too, with the applicant card (no Edit button)./positions/[id]for a position you manage: back link reads "Back to my positions" →/my-positions. Open one you don't manage: "Back to positions" →/positions./my-positions: flat list including drafts, stats on every card, New position. Change a position's status in Edit and return — list reflects it immediately./positions/[id]/edit→ land on/my-positions, row is gone./my-positions; the admin widget's position titles open the position detail page.Automated checks
npm run prettier:check— passnpm run eslint:check— passnpm run tsc:check— passnpm run test:unit— 227 passed (Postgres unavailable in this environment, sotests/db/**— including the newgetMyApplicationsByPositioncase — could not be run locally; CI runs the fulldbproject)Notes
/my-positionsmirrors the flat/my-applications//applicationspair already in the nav, per the plan's stated rationale./positions/[id]does not split — it stays the single, shareable,generateMetadata'd URL for a position; only its back-link target is viewer-dependent.checkPositionEditable/isPositionActive/ARCHIVED_POSITION_EDIT_ERRORare untouched.