bug-board-create-scrum-type-disabled Cannot create a Scrum board — the create-board dialog’s Scrum type option is permanently disabled (stale "Epic 4" seam left over after Story 4.5 shipped)
Estimate: 25m · Depends on: 3.7.4, 4.5
Type: bug (stale seam) · Parent: Epic 3 (Boards) · Surfaces: the create-board dialog on /boards (BoardSwitcher.tsx → BoardFormModal, Subtask 3.7.4) · Unblocked by: Story 4.5 (Scrum board) + Subtask 3.7.3 (boardsService.createBoard) · Status: open · Reported by: Yue.
You cannot create a Scrum board through the UI. On /boards, the board switcher’s New board dialog draws a Kanban / Scrum type picker, but the Scrum tile is rendered permanently disabled — greyed (opacity-60, aria-disabled) with an "Epic 4" badge — and the only selectable type is Kanban. So every board a user creates is a Kanban board; there is no way to create a Scrum board from the product.
Why it’s now a bug (not a deliberate seam). When the create dialog shipped (3.7.4) the Scrum board view did not exist yet, so the Scrum tile was intentionally stubbed with the "Epic 4" badge as a forward-looking placeholder. That prerequisite has since landed: Story 4.5 (Scrum board, sprint-scoped view) is done, the backend boardsService.createBoard(projectId, { type: scrum }) shipped in 3.7.3 (and is already exercised in production by 4.4’s sprint-start, which provisions a type == scrum board via that exact call), and the DTO/enum (BoardTypeDto = 'kanban' | 'scrum') + the POST /api/boards route already validate and accept scrum. The whole stack supports a user-created Scrum board EXCEPT the one disabled tile — the seam was never re-opened when 4.5 merged, so the UI silently caps board creation at Kanban.
Root cause. In app/(authed)/boards/_components/BoardSwitcher.tsx, BoardFormModal hardcodes the type and never lets it change:
const [type] = useState<BoardType>('kanban');— state with no setter, so the submitted type is alwayskanban.- The Kanban tile is a static
role="radio" aria-checkedelement; the Scrum tile (data-testid="board-type-scrum") is a staticaria-disabled/aria-checked={false}element withopacity-60and a<Pill>{t('epic4Badge')}</Pill>— neither tile is actually a clickable control. There is noonClick/onKeyDowntogglingtypeon either tile.
Repro. Sign in as zhuyue@motir.co / !QAZ1qaz, open the moooon / motir project → /boards. Open the board switcher → New board. Observe the type picker: the Scrum tile is greyed with an "Epic 4" badge and cannot be selected; only Kanban is available. Create the board → it is a Kanban board. There is no path to a Scrum board.
Fix. Re-open the seam now that 4.5 has shipped: make the type picker a real two-option radio group.
- Give
BoardFormModala workingconst [type, setType] = useState<BoardType>('kanban')(Kanban stays the default). - Make BOTH tiles selectable controls (button /
role="radio"withonClick+ arrow-key roving focus per the radiogroup a11y pattern), togglingaria-checkedand the selected-state styling (border-(--el-accent)/bg-(--el-muted)like the current Kanban tile). Remove thearia-disabled/opacity-60and theepic4BadgePill from the Scrum tile. - Submit carries the chosen
typeto the existingcreateBoard(name, type)→POST /api/boards { name, type }path (already acceptsscrum; no service/route/schema change). Newly-created Scrum boards already render correctly — ascrumboard with no active sprint shows the 4.5 "No active sprint" empty state, and gains the sprint header once a sprint is started. - Drop the now-unused
epic4Badgei18n key frommessages/*.json(and update thenewBoardSeedHintcopy if the type-picker hint changes). Keep the colour/shape token rules (--el-*+ element-shape tokens) for any restyled tile.
Acceptance criteria
- The New-board dialog’s Scrum tile is enabled and selectable; choosing it and submitting creates a
type == scrumboard (verified server-side), which then appears in the switcher and renders the 4.5 Scrum surface (sprint header / "No active sprint" empty state). - Kanban remains the default selection; the picker is a proper radio group (arrow-key navigable, single selection,
aria-checkedtracks the choice) with noaria-disabledtile and no "Epic 4" badge. - A component test for
BoardFormModalasserts the Scrum tile is selectable and that submitting after selecting Scrum callsonSubmit(name, 'scrum')(today it always submitskanban); an E2E (board-multi.spec.tsor sibling) creates a Scrum board end-to-end and asserts it renders the Scrum board view. - No dead
epic4Badgereference remains;pnpm test:coveragekeeps any changed component file at/above the gate.
Context refs
app/(authed)/boards/_components/BoardSwitcher.tsx—BoardFormModal(theuseState<BoardType>('kanban')with no setter, the static Kanban/Scrum tiles, theepic4BadgePill) +createBoard()which already POSTs{ name, type }lib/services/boardsService.tscreateBoard+lib/dto/boards.tsBoardTypeDto+app/api/boards/route.ts(InvalidBoardTypeError) — the backend that already acceptsscrum;lib/services/sprintsService.tsstart flow — the existing in-product caller that provisions ascrumboard viacreateBoard- Story 4.5 (
story-4.5.ts,done) — the Scrum board view that makes a user-created scrum board fully functional; Subtask 3.7.4 — the create dialog that owns the seam messages/en.jsonepic4Badge/boardTypeScrum/newBoardSeedHint— the copy to clean upmotir-core/CLAUDE.md— colour via--el-*, shape via element-shape tokens (applies to the restyled Scrum tile); the radiogroup a11y pattern for the two-option picker