# CAPA Board Scrollable Columns Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Add vertical scrolling to CAPA board status columns so large numbers of closed/completed cases don't overflow the viewport; apply uniformly to all statuses.
**Architecture:** Set a max-height on each status column container with `overflow-y-auto` to create independent scrollable areas. This preserves the board layout while accommodating growth. No database or API changes needed—pure UI improvement.
**Tech Stack:** React, TailwindCSS, Next.js (no new dependencies)
## Global Constraints
- Version bump: 1.2.0 → 1.2.1
- Apply scrolling to all status columns uniformly (open, in_progress, overdue, pending_verification, verified, closed)
- Preserve existing board and table view toggle
- Mobile-responsive: scrollable on desktop, adapt on smaller screens if needed
- No breaking changes to component props or API
---
## File Structure
**Modified files:**
- `components/capa/capa-board.tsx` — Add max-height + overflow-y-auto to status column container
- `package.json` — Bump version to 1.2.1
---
## Task 1: Add scrollable container to status columns
**Files:**
- Modify: `components/capa/capa-board.tsx:108-132`
**Interfaces:**
- Consumes: Existing `STATUS_COLORS`, `STATUS_LABELS`, `byStatus` grouping
- Produces: Unchanged `CapaBoard` component signature; internal styling only
- [ ] **Step 1: Read current board view structure**
Current code (lines 108-132):
```jsx
{STATUS_ORDER.filter(s => s !== 'reopened').map(status => (
```
Problem: When `byStatus[status]` has 50+ items, the column grows vertically unbounded.
- [ ] **Step 2: Modify status column to add scroll container**
Wrap the items container (`
`) with max-height and overflow. Replace lines 114-129:
```jsx
{byStatus[status].map(c => (
{c.description}
{(c.owner as { name: string } | null)?.name ?? '—'}{c.priority}
Due {c.due_date}
))}
{byStatus[status].length === 0 && (
Empty
)}
```
Key changes:
- `max-h-96` — Limit column height to 24rem (384px), tunable per design
- `overflow-y-auto` — Vertical scroll when content exceeds max-height
- `pr-2` — Add right padding for scrollbar gutter visibility
- [ ] **Step 3: Test in browser**
Build and start dev server:
```bash
npm run build
npm run dev
```
Navigate to `/hse/capa`. Create test scenario:
- Manually add 30+ CAPAs to "closed" status in DB (or use existing data)
- Verify closed column scrolls independently without affecting other columns
- Verify other status columns (open, in_progress, etc.) also scroll when content is heavy
- Test on mobile (sm breakpoint) — scrolling should still work within narrower columns
Expected: Each status column scrolls vertically; header and grid layout remain fixed.
- [ ] **Step 4: Verify mobile responsiveness**
Check at breakpoints:
- **Mobile (< 640px):** Single column, should scroll if many items
- **Tablet (640px–1024px):** Two columns, both scrollable
- **Desktop (> 1024px):** Three columns, all scrollable
All scrollable behavior should work; no layout shifts.
- [ ] **Step 5: Commit**
```bash
git add components/capa/capa-board.tsx
git commit -m "feat(capa-board): add scrollable columns for large case lists
Wrap status column items in max-h-96 overflow-y-auto container so that
columns with 30+ items scroll independently. Apply to all statuses
uniformly. Preserves board layout and header visibility."
```
---
## Task 2: Bump version to 1.2.1
**Files:**
- Modify: `package.json:3`
**Interfaces:**
- Consumes: Current version string (1.2.0)
- Produces: Updated version string (1.2.1)
- [ ] **Step 1: Update package.json version**
Replace line 3:
```json
"version": "1.2.1",
```
- [ ] **Step 2: Commit**
```bash
git add package.json
git commit -m "bump: version 1.2.0 to 1.2.1"
```
---
## Task 3: Rebuild and deploy
**Files:**
- Generate: `.next/` build directory
**Interfaces:**
- Consumes: Updated source files
- Produces: Production-ready bundle
- [ ] **Step 1: Build**
```bash
npm run build
```
Expected output: Build completes, no errors.
- [ ] **Step 2: Sync to server**
```bash
rsync -avz -e "ssh -p 9321" /Users/yapweeihan/Projects/IMS.nosync/.next/ \
setia@175.136.239.121:/var/www/ims/.next/
```
- [ ] **Step 3: Restart service**
```bash
ssh -p 9321 setia@175.136.239.121 "sudo systemctl restart ims && sleep 1 && sudo systemctl is-active ims"
```
Expected: Service restarts, returns "active".
- [ ] **Step 4: Verify in production**
Navigate to `http://64.176.82.100/ims/hse/capa` in browser. Confirm:
- Board view displays with scrollable columns
- Sidebar shows version v1.2.1
- All status columns scroll when content is abundant
---
## Spec Coverage
✓ CAPA board closed status is scrollable
✓ All status columns apply same principle
✓ Version incremented by 0.0.1 (1.2.0 → 1.2.1)
✓ No breaking changes
---
Plan complete and saved. Ready for execution.
**Two execution options:**
**1. Subagent-Driven (recommended)** — Fresh subagent per task, review between tasks, fast iteration
**2. Inline Execution** — Execute tasks in this session via executing-plans, batch execution with checkpoints
Which approach?