From 0484a07fff69dd30f427876e19489b16520335ad Mon Sep 17 00:00:00 2001 From: jenstandstad Date: Sun, 23 Aug 2026 21:58:05 +0200 Subject: [PATCH] Streamline board chrome and case report --- e2e/board.smoke.spec.ts | 1 + src/App.tsx | 38 ++++++++++++++++++++++++++------------ src/styles.css | 34 ++++++++++++++-------------------- 3 files changed, 41 insertions(+), 32 deletions(-) diff --git a/e2e/board.smoke.spec.ts b/e2e/board.smoke.spec.ts index 149a1f5..08c1dbd 100644 --- a/e2e/board.smoke.spec.ts +++ b/e2e/board.smoke.spec.ts @@ -27,6 +27,7 @@ async function waitForSave(page: Page, action: () => Promise) { test('move, folder expansion, empty-board pan, desktop wheel zoom, mobile pinch, and reload persistence', async ({ page }) => { await page.goto('/?level=e2e-level&edit=1') await expect(page.getByRole('heading', { name: 'Browser Safety Test' })).toBeVisible() + await expect(page.locator('.case-heading')).toHaveText('Browser Safety Test') await expect(page.getByRole('button', { name: 'ADMIN', exact: true })).toBeVisible() expect((await page.locator('.menubar nav > button, .menubar nav > .admin-menu > button').allTextContents()).map(label => label.replace(/\d+$/, ''))).toEqual(['EVIDENCE', 'BRIEF', 'HELP', 'ADMIN']) await expect(page.getByRole('button', { name: 'Timeline settings', exact: true })).toBeVisible() diff --git a/src/App.tsx b/src/App.tsx index ca090f2..d089cc6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -612,7 +612,7 @@ export function App() {
{ if (e.dataTransfer.types.includes('Files')) { e.preventDefault(); setDraggingFiles(true) } }} onDragOver={e => { e.preventDefault(); e.dataTransfer.dropEffect = 'copy' }} onDragLeave={e => { if (!e.currentTarget.contains(e.relatedTarget as Node)) setDraggingFiles(false) }} onDrop={e => { e.preventDefault(); if (e.dataTransfer.files.length) void uploadFiles(e.dataTransfer.files) }}> -
{requestedEditMode && caseState.editingAllowed ? 'AUTHORING LEVEL' : 'ACTIVE INVESTIGATION'}

{caseState.title}

{caseState.subtitle || caseState.id.toUpperCase()}

{requestedEditMode && caseState.editingAllowed ? 'DRAFT' : 'CASE'}
{caseState.levelStatus?.toUpperCase() || 'ACTIVE'}
+

{caseState.title}

document.id === selected) ? selected : null} linkFrom={linkFrom} recentlyCreatedExhibitId={recentlyCreatedExhibitId} arrivingExhibitIds={arrivingExhibitIds} recentlyCreatedConnectionId={recentlyCreatedConnectionId} tool={boardTool} boardRef={boardRef} update={update} onCardClick={handleCardClick} onConnectionTarget={completeThread} onEditConnection={connection => setThreadDraft(connection)} onDiscardExhibit={removeExhibit} onOpenSource={id => setOpenDoc(documents.find(d => d.id === id) || null)} onUpdateDocumentCue={(id, cue) => update(state => ({ ...state, exhibits: state.exhibits.map(exhibit => exhibit.id === id && exhibit.type === 'document' ? { ...exhibit, metadata: { ...exhibit.metadata, memory_cue: cue } } : exhibit) }))} onEditFolder={setEditingFolderId} onEditFile={setEditingFileId} onEditEvent={setEditingEventId} onEditParty={setEditingPartyId} /> {briefOpen && Promise;onContinue:()=>void }) { const investigatorName=report.investigatorName || defaultInvestigator + const unfinishedStatement=(value:string) => !value.trim() || /^proof that(?:\s*(?:…|\.\.\.))?$/i.test(value.trim()) + const missingItems=report.claims.flatMap((claim,claimIndex) => claim.evidence.length + ? claim.evidence.flatMap(item => [ + !item.publishedAt ? `CLAIM ${claimIndex + 1} / EXHIBIT ${item.displayNumber} DATE` : '', + !item.sourceCitation?.trim() ? `CLAIM ${claimIndex + 1} / EXHIBIT ${item.displayNumber} SOURCE` : '', + unfinishedStatement(item.relationText) ? `CLAIM ${claimIndex + 1} / EXHIBIT ${item.displayNumber} STATEMENT` : '', + ].filter(Boolean)) + : [`CLAIM ${claimIndex + 1} SUPPORTING EVIDENCE`]) + const reportStatus=report.status === 'accepted' ? 'ACCEPTED' + : report.status === 'evidence_insufficient' ? 'RETURNED — EVIDENCE NOT ESTABLISHED' + : report.status === 'evidence_accepted_report_incomplete' ? `RETURNED${missingItems.length ? ` — ${missingItems.length} ITEM${missingItems.length === 1 ? '' : 'S'} MISSING` : ''}` + : missingItems.length ? `INCOMPLETE — ${missingItems.length} ITEM${missingItems.length === 1 ? '' : 'S'} MISSING` : 'READY TO FILE' const [busy,setBusy]=useState(false) const [error,setError]=useState('') const submit=async (event:React.FormEvent) => { @@ -1154,22 +1166,24 @@ function CaseReportPanel({ report, defaultInvestigator, hasNext, onClose, onSubm } return
void submit(event)}>
{report.title}
-
GLITCH UNIVERSITY · PRINCIPAL INVESTIGATOR PROGRAMME

CASE REPORT

FORM GUPI–7 / EVIDENTIARY FINDING
+

CASE REPORT

{report.title}

+

INVESTIGATOR: {investigatorName}

STATUS: {reportStatus}

+