beadboard/tests
Viktor Barzin 845e90d7c0 [beadboard] Add quality filters for acceptance criteria and description length
## Context

The left-panel task list surfaces every bead regardless of whether the task
has been specified thoroughly enough for an agent to pick it up. Tasks with
empty `acceptance_criteria` or very short descriptions are low-signal noise
that muddles the navigation spine — especially now that we plan to dispatch
tasks to Claude agents (which need concrete instructions to succeed).

Epics are deliberately exempt: their role is grouping, not execution, so
requiring acceptance criteria / long descriptions on epics would hide the
entire backbone of the navigation.

## This change

- Plumbs `acceptance_criteria` end-to-end: adds the optional field on
  `BeadIssue`, and reads it both from `.beads/issues.jsonl` (parser) and
  Dolt SQL (`read-issues-dolt.ts` row shape + normalizer).
- Extends `LeftPanelFilters` with `hideNoAcceptance` and
  `hideShortDescription` (both default `true`) in the source-of-truth
  `hooks/use-url-state.ts` and in the re-exported shadow type on
  `components/shared/left-panel.tsx`.
- Updates `isTaskMatch` in both `left-panel.tsx` and `left-panel-new.tsx`
  to skip non-epic tasks lacking acceptance criteria or with a description
  shorter than `SHORT_DESCRIPTION_MIN_LENGTH` (200 chars). Epics bypass
  both filters via the `issue_type === 'epic'` guard.
- Exposes `isTaskMatch` from `left-panel.tsx` so the filter tests can
  assert behavior directly (previously only `shouldHideEpicEntry` was
  exported).
- Adds two checkboxes under the existing "Hide Closed" button in both
  left-panel variants (legacy `left-panel.tsx` and the one unified-shell
  currently wires up — `left-panel-new.tsx`).
- Seeds both new filter flags as `true` in the `UnifiedShell` default
  state so fresh sessions see the high-signal view without toggling.

## What is NOT in this change

- No mutation of `bd` / CLI behavior. Filters are purely UI-level.
- No localStorage persistence for the two new flags — existing
  `hideClosed` is also React-only, so parity is preserved. If/when we
  persist any of these, all three move together.
- No change to the `metadata.acceptance` path used by `kanban.ts`'s
  `hasQualitySignal` — that's a separate signal with its own callers.

## Test Plan

### Automated

Tests run from `/home/wizard/code/beadboard`:

```
$ node --import tsx --test tests/components/shared/left-panel-filtering.test.ts
# tests 15
# pass 15
# fail 0
# duration_ms 604
```

All 15 filter cases pass: 6 pre-existing `shouldHideEpicEntry` cases plus
9 new `isTaskMatch` cases covering acceptance-criteria-empty hides,
acceptance-criteria-disabled shows, epic exemption, 199/200-char
description boundary, null description, and short-description flag
disabled.

Related suites still green:

```
$ node --import tsx --test tests/components/shared/left-panel.test.tsx \
    tests/components/shared/unified-shell-hide-closed-contract.test.ts
# tests 7 pass 7 fail 0
```

Pre-existing failures in `tests/hooks/url-state-integration.test.ts`
(`view=activity` cases) and one pre-existing typecheck error in
`left-panel.tsx` thread prop are unrelated — both reproduce on `main`
before this change.

### Manual Verification

1. `npm install`
2. `npm run dev`
3. Open `http://localhost:3000` with bd project loaded.
4. Expected: two new checkboxes appear under "Hide Closed" in the left
   sidebar — "Hide tasks without acceptance criteria" and
   "Hide tasks with short description (<200 chars)". Both checked by
   default.
5. Toggle each off. Expected: additional beads appear in epic expansions
   (tasks that were previously hidden because they lack quality signal).
6. Confirm epics remain visible regardless of the checkbox state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 14:00:51 +00:00
..
api Cleanup: Runtime artifacts, hard-coded paths, PR 14 bug fixes 2026-03-05 15:57:33 -08:00
cli feat(cli): expose bb agent coordination commands 2026-03-03 18:26:07 -08:00
components [beadboard] Add quality filters for acceptance criteria and description length 2026-04-18 14:00:51 +00:00
docs docs(ci): finalize global install runtime docs and smoke coverage 2026-03-02 20:46:18 -08:00
guards checkpoint: pre-split branch cleanup 2026-03-03 16:43:42 -08:00
hooks checkpoint: pre-split branch cleanup 2026-03-03 16:43:42 -08:00
lib feat: add Linux/macOS support for pathing, registry, and project scope 2026-03-22 12:48:56 +01:00
scripts Cleanup: Runtime artifacts, hard-coded paths, PR 14 bug fixes 2026-03-05 15:57:33 -08:00
server chore: checkpoint before DAG views UX overhaul 2026-02-22 20:43:59 -08:00
skills/beadboard-driver Cleanup: Runtime artifacts, hard-coded paths, PR 14 bug fixes 2026-03-05 15:57:33 -08:00
types checkpoint: pre-split branch cleanup 2026-03-03 16:43:42 -08:00
bootstrap.test.mjs checkpoint: pre-split branch cleanup 2026-03-03 16:43:42 -08:00
pr14-critical-bugs.test.ts Cleanup: Runtime artifacts, hard-coded paths, PR 14 bug fixes 2026-03-05 15:57:33 -08:00