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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user