From 16156111a604a99a8915dde547f3fb02738c0227 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 28 Apr 2026 14:25:23 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20complete=20MENTORING=20round=20config?= =?UTF-8?q?=20form=20(=C2=A7A)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Surfaces every MentoringConfigSchema field on the round Config tab: - Adds "Mentoring Request Window" card with mentoringRequestDeadlineDays numeric input (1-90 days, default 14) and passThroughIfNoRequest toggle (default ON; OFF holds projects PENDING until manual mentor assignment). - Adds inline help-text for the Eligibility dropdown explaining each option's effect on auto-PASS behavior. - Hides the General Settings card on MENTORING rounds (it only renders Advancement Targets, which don't apply to a pass-through round). - Relaxes the Launch Readiness "File requirements set" gate for MENTORING rounds without filePromotionEnabled + a target window — file requirements only matter when files will be promoted to a downstream submission window. Spec: docs/superpowers/specs/2026-04-28-mentor-round-readiness-design.md §A Plan: docs/superpowers/plans/2026-04-28-pr3-mentoring-config-completeness.md Co-Authored-By: Claude Opus 4.7 (1M context) --- ...04-28-pr3-mentoring-config-completeness.md | 39 ++++++++++++++++ .../(admin)/admin/rounds/[roundId]/page.tsx | 8 +++- .../admin/rounds/config/mentoring-config.tsx | 45 +++++++++++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 docs/superpowers/plans/2026-04-28-pr3-mentoring-config-completeness.md diff --git a/docs/superpowers/plans/2026-04-28-pr3-mentoring-config-completeness.md b/docs/superpowers/plans/2026-04-28-pr3-mentoring-config-completeness.md new file mode 100644 index 0000000..8d9e65f --- /dev/null +++ b/docs/superpowers/plans/2026-04-28-pr3-mentoring-config-completeness.md @@ -0,0 +1,39 @@ +# PR 3 — MENTORING Round Config Completeness (§A) + +> **For agentic workers:** Use superpowers:executing-plans for inline execution. + +**Goal:** Surface every `MentoringConfigSchema` field on the round Config tab; hide the empty General Settings card on MENTORING rounds; relax the "File requirements set" Launch Readiness gate when no file promotion is configured. + +**Architecture:** UI-only changes. No schema, no API. Three files touched. + +**Spec:** `docs/superpowers/specs/2026-04-28-mentor-round-readiness-design.md` §A. + +## File map + +| File | Action | Why | +|------|--------|-----| +| `src/components/admin/rounds/config/mentoring-config.tsx` | Modify | Add `mentoringRequestDeadlineDays` numeric input + `passThroughIfNoRequest` toggle; add help-text to Eligibility | +| `src/app/(admin)/admin/rounds/[roundId]/page.tsx` | Modify | Hide General Settings card when `round.roundType === 'MENTORING'`; relax File-requirements readiness gate for MENTORING rounds without file promotion configured | + +## Tasks + +### Task 1: Add the two missing inputs to `mentoring-config.tsx` + +- [ ] **Step 1: Patch the file** — append a new "Mentoring Request Window" card BETWEEN the existing two cards, and add help-text to Eligibility. Code in execution. + +- [ ] **Step 2: Typecheck** — `npm run typecheck`. Expect 0 errors. + +### Task 2: Hide General Settings card + relax readiness on MENTORING rounds + +- [ ] **Step 1: Patch `(admin)/admin/rounds/[roundId]/page.tsx`** — wrap the General Settings card in `{!isMentoring && (...)}` and extend the file-requirements bypass condition. + +- [ ] **Step 2: Typecheck + build** — confirm clean. + +### Task 3: Smoke + commit + +- [ ] **Step 1: `npm run build`** — confirm clean. +- [ ] **Step 2: Commit** — message references §A. + +## Out of scope + +Form unit tests (heavy render setup; existing config-save mutation already verified by other PRs). Manual smoke covers the UI work. diff --git a/src/app/(admin)/admin/rounds/[roundId]/page.tsx b/src/app/(admin)/admin/rounds/[roundId]/page.tsx index 86844f1..78b4632 100644 --- a/src/app/(admin)/admin/rounds/[roundId]/page.tsx +++ b/src/app/(admin)/admin/rounds/[roundId]/page.tsx @@ -514,6 +514,7 @@ export default function RoundDetailPage() { const isFiltering = round?.roundType === 'FILTERING' const isEvaluation = round?.roundType === 'EVALUATION' + const isMentoring = round?.roundType === 'MENTORING' const hasJury = ['EVALUATION', 'LIVE_FINAL', 'DELIBERATION'].includes(round?.roundType ?? '') const hasAwards = roundAwards.length > 0 const isSimpleAdvance = ['INTAKE', 'SUBMISSION', 'MENTORING'].includes(round?.roundType ?? '') @@ -589,7 +590,8 @@ export default function RoundDetailPage() { action: undefined as Route | undefined, actionLabel: undefined as string | undefined, }, - ...((isEvaluation && !(config.requireDocumentUpload as boolean)) + ...((isEvaluation && !(config.requireDocumentUpload as boolean)) || + (isMentoring && !(config.filePromotionEnabled as boolean) && !config.promotionTargetWindowId) ? [] : [{ label: 'File requirements set', @@ -2198,7 +2200,8 @@ export default function RoundDetailPage() { - {/* General Round Settings */} + {/* General Round Settings — hidden on MENTORING rounds (no advancement targets apply) */} + {!isMentoring && ( + )} {/* Round-type-specific config */} Admin Selected +
    +
  • All Advancing Projects — every project that enters this round is paired with a mentor.
  • +
  • Requested Only — only projects that explicitly request mentoring participate (default).
  • +
  • Admin Selected — admin manually picks which projects get a mentor.
  • +
@@ -56,6 +61,46 @@ export function MentoringConfig({ config, onChange }: MentoringConfigProps) { + + + Mentoring Request Window + How long teams have to request a mentor, and what happens to non-requesters + + +
+ +

After this many days, teams can no longer submit a mentoring request. Default: 14.

+ { + const v = parseInt(e.target.value, 10) + if (!Number.isNaN(v) && v >= 1 && v <= 90) update('mentoringRequestDeadlineDays', v) + }} + /> +
+ +
+
+ +

+ When ON, projects that don't request mentoring auto-PASS to the next round (default). + When OFF, all projects are held in PENDING until the admin decides — useful when mentoring is mandatory. +

+
+ update('passThroughIfNoRequest', v)} + /> +
+
+
+ Communication & Files