feat(reports): show chapter progress while a report is being written (BUG-601)

The worker already persists a phase ladder and durable per-section rows;
the waiting screen parsed the progress fields and rendered none of them.
Chapter progress now drives the screen: one cell per chapter rather than
a percentage bar, since the job percent jumps 0->30 and 90->100.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016P5RoqzmUQEbeC2qjAkeGr
This commit is contained in:
Jesse_Chen
2026-09-09 03:30:15 +00:00
co-authored by Claude Fable 5
parent 301eae4b76
commit 848e39e61f
9 changed files with 684 additions and 18 deletions
@@ -57,9 +57,16 @@ async function resolvePersistenceForUser() {
userId: user.id,
persistence,
jobs: createSupabasePersonalReportJobService(supabase),
listSections: async (ownerId: string, requestId: string) => {
// sectionId and attemptCount are consumed by resolveReportRead to derive
// reader-visible chapter state; neither is forwarded to the browser raw.
listSections: async (ownerId: string, requestId: string) => {
const rows = await sections.list(ownerId, requestId);
return rows.map((row) => ({ status: row.status, lastErrorCode: row.lastErrorCode }));
return rows.map((row) => ({
sectionId: row.sectionId,
status: row.status,
attemptCount: row.attemptCount,
lastErrorCode: row.lastErrorCode,
}));
},
loadLongformAppendix: async (input: Readonly<{ userId: string; reportId: string }>) => {
const appendixRead = await supabase