feat(viewer): group-by-project toggle + Gitea 404 handling

- static/board.js: full rerender on toggle-grouping; by-project mode = N cols
  per project with status-badge inside cards, sorted by canonical status order
- static/board.css: drop placeholder, add .badge.status
- src/gitea.ts: getLatestCommitIso returns null on 404 (path never existed
  remotely; seen on books repo where some per-task slugs in STATUS.md
  don't have file in default branch) + new test
- .gitignore: dist/ already present; add .playwright-mcp/, board-*.png

Smoke-verified: dist/index.html, 78 records from 4 repos, both toggle modes
work in browser, drawer lazy-fetches markdown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
vitya
2026-05-22 14:48:56 +03:00
parent 4c59241d15
commit c0661fb7b3
5 changed files with 129 additions and 25 deletions

View File

@@ -100,6 +100,15 @@ describe('GiteaClient.getLatestCommitIso', () => {
expect(await client.getLatestCommitIso('o', 'r', 'p.md')).toBeNull();
});
test('returns null when Gitea responds 404 (path never existed)', async () => {
const mockFetch: MockFetch = vi.fn().mockResolvedValue(
new Response('Not Found', { status: 404 }),
);
const client = makeClient(mockFetch);
expect(await client.getLatestCommitIso('o', 'r', 'missing.md')).toBeNull();
});
});
describe('GiteaClient.rawUrl', () => {