Task #41: Let users click a non-binary file in the "Geprüfte Dateien" tree to view its stored text content, without re-downloading the archive. Changes: - lib/api-spec/openapi.yaml: added optional nullable `content` field to the ScanFile schema so the scan-detail response can carry stored file text. - Regenerated API codegen (api-client-react + api-zod via orval) and ran the libs typecheck. - artifacts/api-server/src/routes/scans.ts: serializeFile now returns `content` alongside the existing `hasContent`. Only used by the scan detail endpoint, so list responses are unaffected. - artifacts/skillguard/src/pages/scan-report.tsx (FilesTree): non-binary file names are now clickable buttons that open a Dialog showing the stored content in a monospace, scrollable panel (ScrollArea). Binary files (hasContent === false) render as plain text and show a clear "Keine Vorschau verfügbar (Binärdatei)." message in the dialog guard. Verification: - tsc -b passes for both skillguard and api-server. - relation + compare route tests pass (8 tests). - Confirmed via API that the detail endpoint exposes content for a text-source scan (hasContent true) and null for binary .skill archives. No new persistence: content is read from existing scan file data. Replit-Task-Id: 931befbc-6ca3-4d15-b422-ac8e9f061f9f |
||
|---|---|---|
| .. | ||
| api-server | ||
| mockup-sandbox | ||
| skillguard | ||