LLasitava Projects
BUILD / BUILD-27

Item detail never renders subtasks (+ comment markdown shows raw **)

P1 bug Done
Description
JC caught live on BUILD-8: 6 subtasks exist via API but /app/p/{k}/items/{key} (and interim /p/ view) render NO subtasks section — only subtask.created activity rows. Comments also display raw markdown asterisks. Fix: item-detail loader fetches subtasks (typed client, listSubtasks), renders a Subtasks section w/ done state (checkbox, disabled till BUILD-24 lands); safe markdown rendering for comment bodies (bold/bullets/line breaks, NO raw HTML injection). Dark power-tool style. Covers the BUILD-18 markdown-render subtask.
Labels
web capture
Comments
agent:claude-peagent2026-08-23T17:26:57.713Z
**Live-verified Done** - cd07d59 merged (ff) + fresh-build deployed - BUILD-8 detail: 6 subtask rows render (read-only checkboxes till BUILD-24) - Comment markdown renders (bold/bullets), zero raw asterisks, XSS-safe
agent:build-agentagent2026-08-23T17:21:13.063Z
**Done — pushed, no merge/deploy** - Branch: `fix/item-detail-subtasks-md` (based off `origin/main` @ fade5d7) - Commit: `cd07d59` - Only one item-detail template exists (`web/src/pages/p/[projectKey]/items/[itemKey].astro`, mounted at `/app` via Astro's `base` config) — no separate legacy fork to touch. **What it looks like:** a new **Subtasks** section (dark-power-tool styling, gold `#d4a853` accent-color on the checkbox) between the item fields and Comments — one row per subtask: a disabled checkbox reflecting `done` + the title (struck-through + faint when done). No subtasks = no section at all. Comment bodies now render **bold**, bullet lists, line breaks, and `inline code` safely (escape-first pipeline, script-tag XSS test passes inert). **Gates:** vitest 215/215 green, coverage 100/100/100/100 (ratchet holds), `pnpm run typecheck` clean, `npx astro check` 0 errors/warnings, `check-astro-ssr-bundle.sh` OK. No synth/deploy performed.
agent:build-agentagent2026-08-23T17:20:29.264Z
**Root cause found + fix implemented (RED→GREEN)** - Subtasks: `loadItemDetail` never called `GET /projects/{k}/items/{key}/subtasks` — data existed in the typed client/contract, page just never asked for it. Added as a 4th parallel fetch alongside item/comments/activity. - Comments: body was interpolated via Astro auto-escape (`{comment.body}`), which literalizes markdown syntax. Replaced with a new zero-dep `mdLite.ts` (escape-first, then transform: bold, bullet lists, line breaks, inline code) injected via `set:html`. **Tests written FIRST (red), then made to pass:** - `web/src/lib/__tests__/mdLite.test.ts` — 11 cases incl. XSS (`<script>` renders inert) - `web/src/lib/loaders/__tests__/itemDetailLoader.test.ts` — subtasks fetch + default-to-[] - `web/src/pages/p/[projectKey]/items/__tests__/itemDetail.test.ts` — Subtasks section placement, empty-list = no section, disabled checkbox per row, markdown rendering, XSS-in-comment **Status:** vitest 215/215 green, coverage 100/100/100/100 (ratchet holds), `pnpm run typecheck` clean, `npx astro check` 0 errors, `check-astro-ssr-bundle.sh` OK. Next: commit + push.
Activity
agent:claude-peagent comment.added
2026-08-23T17:26:57.731Z
agent:claude-peagent item.transitioned
2026-08-23T17:26:57.489Z
agent:build-agentagent comment.added
2026-08-23T17:21:13.204Z
agent:build-agentagent comment.added
2026-08-23T17:20:29.484Z
agent:claude-peagent item.transitioned
2026-08-23T17:14:41.961Z
agent:claude-peagent item.created
2026-08-23T17:14:32.241Z