Skip to content
Strata v1.2.6

2026-05-10: CI Fix & Follow-up

Follow-up to the previous “feedback-and-fixes” plan. CI was still failing (frontend function coverage 89.26% < 90% threshold), the docs right sidebar broke, the acquisition date row is in the wrong position, and plan doc filenames were missing the day component.


  1. Frontend CI coverage: npx vitest run --coverage fails — functions 89.26% < 90% threshold. Root cause: AssetSnapshotsList.tsx has only 12.5% function coverage (handleEditOpen and handleEditSave never exercised by tests).
  2. Backend CI DATABASE_URL: Already fixed in previous commit (e0eae66). The issue report predated that fix.
  3. Acquisition date row at wrong position: “Acquired” pseudo-row is rendered at the TOP of the snapshots table. User wants it at the BOTTOM (last row, below all value snapshots).
  4. Docs right sidebar disappeared: The CSS override .sl-container { margin-inline: auto; } in custom.css also affects the <div class="sl-container"> inside PageSidebar.astro, which uses that class to compute the TOC sidebar width. Our override collapsed it.
  5. Plan doc filenames missing day: Two plan docs created in the previous session use YYYY-MM- instead of YYYY-MM-DD- as required by AGENTS.md Convention #8.

#ConventionCheck
1Doc site update✅ Plan doc added; CSS fix documented
2All 4 test gates✅ Frontend unit must reach ≥90%; backend unaffected
3Self-review✅ See Self-Review table below
4Endpoint coverage⏭ No new endpoints
5Bug-to-Test✅ Coverage gap IS the bug; adding tests is the fix
6Seed isolation⏭ Not touching seed data
7Transaction invariants⏭ No transaction changes
8Plan history✅ This file
9Infra test gate⏭ No infra changes
10Env compatibility⏭ No tooling changes
11Do-no-harm baseline✅ Confirmed 391 tests pass before changes
12Execution summary⏭ After implementation
13Doc grep✅ Old plan filenames grepped before renaming

File: front/src/components/assets/__tests__/AssetSnapshotsList.test.tsx

Add two tests:

  • handleEditOpen: click the pencil icon on a snapshot row → verify the edit dialog opens with correct pre-filled value and date
  • handleEditSave: fill in the edit dialog inputs and click Save → verify mutateAsync is called with correct args

These are the only two untested functions in AssetSnapshotsList.tsx (lines 31–34 and 37–52).


File: front/src/components/assets/AssetSnapshotsList.tsx

Move the {acquisitionDate && <TableRow>} block from before {sorted.map(...)} to after it.

Result:

Row 1: [latest snapshot date] [value]
Row 2: [older snapshot date] [value]
...
Last: [acquisition date] (acquired) [acquisition price]

Update test assertions that depend on row order.


File: docs/src/styles/custom.css

Remove .sl-container { margin-inline: auto; }.

Root cause: Starlight’s PageSidebar.astro uses .sl-container to size the TOC sidebar:

/* Inside PageSidebar.astro scoped styles */
.sl-container {
width: calc(var(--sl-sidebar-width) - 2 * var(--sl-sidebar-pad-x));
}

Our global override reset that width calculation, collapsing the right sidebar. The Starlight default layout already centers the main content correctly using --sl-content-margin-inline. Removing our override restores the sidebar.


Rename:

  • docs/src/content/docs/plans/2026-05-feedback-and-fixes.md2026-05-10-feedback-and-fixes.md
  • docs/src/content/docs/plans/2026-05-fix-release-gitignore.md2026-05-09-fix-release-gitignore.md

Both created without the DD (day) component that AGENTS.md Convention #8 requires.


CheckResult
AssetSnapshotsList row order change backward-compatible✅ Props unchanged; only render order changes
Test for acquisition row position updated✅ Tests check presence, not index position
Removing .sl-container CSS breaks anything else✅ No other CSS rule in custom.css uses .sl-container
Plan doc references to old filenames✅ Doc grep before committing
Backend CI fix verified✅ DATABASE_URL present in ci.yml at line 28

FileChange
docs/src/styles/custom.cssRemove .sl-container { margin-inline: auto; }
front/src/components/assets/AssetSnapshotsList.tsxMove acquisition row to last position
front/src/components/assets/__tests__/AssetSnapshotsList.test.tsxAdd handleEditOpen and handleEditSave tests
docs/src/content/docs/plans/2026-05-feedback-and-fixes.mdRename → 2026-05-10-feedback-and-fixes.md
docs/src/content/docs/plans/2026-05-fix-release-gitignore.mdRename → 2026-05-09-fix-release-gitignore.md

Commit: see git log

FileStatus
docs/src/styles/custom.css✅ Removed .sl-container { margin-inline: auto; }
front/src/components/assets/AssetSnapshotsList.tsx✅ Acquisition row moved to last position
front/src/components/assets/__tests__/AssetSnapshotsList.test.tsx✅ Added handleEditOpen + handleEditSave tests
docs/src/content/docs/plans/2026-05-feedback-and-fixes.md✅ Renamed → 2026-05-10-feedback-and-fixes.md
docs/src/content/docs/plans/2026-05-fix-release-gitignore.md✅ Renamed → 2026-05-09-fix-release-gitignore.md

None.

GateResult
Backend unit⏭ Skipped (no backend changes)
Backend e2e⏭ Skipped (no backend changes)
Frontend unit✅ 393 tests passed — coverage threshold met (≥90%)
Frontend e2e⏭ Skipped (no user flow changes beyond row order)
  • AssetSnapshotsList.tsx function coverage was 12.5% — only handleEditOpen and handleEditSave were uncovered. Adding two tests raised overall function coverage above the 90% threshold.
  • Starlight’s PageSidebar.astro uses .sl-container (scoped styles) to compute the TOC sidebar width. Our global override in custom.css was not scoped and overrode it, collapsing the right sidebar. Removing the override restores default Starlight layout.