P4 app: Digital text viewer + extraction audit chip on setup page

'Digital text' button opens the digital-replica markdown (stem text, parts, marks,
answer-space placeholders, spec refs) in a dialog with download. A 'Marks N/M' chip
surfaces the extraction cover-total reconciliation (green=ok / amber=under-read) from
extraction_meta.audit. examRepository.getDigitalText + DigitalTextResponse type.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
2026-07-03 02:09:34 +00:00
co-authored by Claude Opus 4.8
parent e6ecc723cc
commit 0c46582ec3
3 changed files with 68 additions and 2 deletions
+7
View File
@@ -15,6 +15,7 @@ import type {
AutoMapResponse,
BankResponse,
CorpusResponse,
DigitalTextResponse,
BatchQueueResponse,
BatchResultsResponse,
CreateBatchPayload,
@@ -164,6 +165,12 @@ export const examRepository = {
return res.data.templates ?? [];
},
async getDigitalText(templateId: string): Promise<DigitalTextResponse> {
const headers = await authHeaders();
const res = await axios.get<DigitalTextResponse>(`${EXAM_BASE}/templates/${templateId}/digital-text`, { headers });
return res.data;
},
async getTemplate(templateId: string): Promise<ExamTemplateDetail> {
const headers = await authHeaders();
const res = await axios.get<ExamTemplateDetail>(`${EXAM_BASE}/templates/${templateId}`, { headers });