Date: 2026-05-19 Branch: main Result: Complete — 0 build errors, 914/914 tests pass.
LSPDFRManager.LocalApi/Dtos/ — three new DTO files:
HistoryDtos.cs—ChangeHistoryEntryDto,HistoryResponseLogDtos.cs—LogFileInfoDto,LogsAvailableResponse,LogLinesResponseCompatibilityDtos.cs—ComponentVersionDto,CompatibilityResponse
LSPDFRManager.LocalApi/Endpoints/ — three new endpoint extension classes:
HistoryEndpoints.cs — GET /api/v1/history?limit=50&offset=0
- Reads
change_history.jsondirectly (no WPF service singleton dependency) - Paginates: limit clamped 1–500, offset ≥ 0
- Converts
ChangeHistoryActionenum to string via.ToString() - Returns
HistoryResponse(entries, total)
LogEndpoints.cs — GET /api/v1/logs + GET /api/v1/logs/{name}?tail=200
- Safe name mapping server-side:
manager,browse-api,rph,scripthookv,scripthookvdotnet - Actual file paths never exposed in responses
/logsreturns only files that currently exist on disk/logs/{name}slices last N lines; tail clamped 1–1000; returnsLogLinesResponse(name, label, lines, totalLines)
CompatibilityEndpoints.cs — GET /api/v1/compatibility
- Calls
VersionDetectorService.DetectAsync(AppConfig.Instance.GtaPath) - Returns 5 components: GTA5, LSPDFR, RagePluginHook, ScriptHookV, ScriptHookVDotNet
- Handles unconfigured/missing GTA path gracefully — returns all
present: false,gtaPathConfigured: false
Program.cs — added app.MapHistory(), app.MapLogs(), app.MapCompatibility()
LocalApiHost.cs — same three endpoint registrations wired into the in-process host
frontend/src/types/ — three new type files:
history.ts—ChangeHistoryEntryDto,HistoryResponselogs.ts—LogFileInfoDto,LogsAvailableResponse,LogLinesResponsecompatibility.ts—ComponentVersionDto,CompatibilityResponse
frontend/src/lib/api/ — three new API client modules:
history.ts—fetchHistory(limit, offset)logs.ts—fetchAvailableLogs(),fetchLogLines(name, tail)compatibility.ts—fetchCompatibility()
Stub pages replaced with real pages (useQuery-driven):
HistoryPage.tsx— paginated list with action badge, affected file, timestampLogsPage.tsx— sidebar log selector, tail-count dropdown, scrollable pre blockDashboardPage.tsx— component version cards (green Present / grey Not found), GTA path warning
routeConfig.ts — /, /history, /logs → status: 'in-progress'
- No write, install, uninstall, restore, backup, or filesystem mutation endpoints added
- PathSafety not bypassed — log endpoints use a hard-coded name→path mapping; no user-supplied paths reach the filesystem
GtaBaselineServicenot used (WPF-bound viaModLibraryService) — compatibility endpoint usesVersionDetectorServiceonly- No WPF-bound services exposed through LocalApi
- No WPF files deleted or weakened
- No tests removed or weakened
| Command | Result |
|---|---|
npm run typecheck |
Pass — 0 errors |
npm run lint |
Pass — 0 errors |
npm run build |
Pass — 97 modules, wwwroot updated |
dotnet build LSPDFRManager.sln --no-incremental |
Pass — 0 errors |
dotnet test |
Pass — 914/914 |
LSPDFRManager.LocalApi/Dtos/HistoryDtos.csLSPDFRManager.LocalApi/Dtos/LogDtos.csLSPDFRManager.LocalApi/Dtos/CompatibilityDtos.csLSPDFRManager.LocalApi/Endpoints/HistoryEndpoints.csLSPDFRManager.LocalApi/Endpoints/LogEndpoints.csLSPDFRManager.LocalApi/Endpoints/CompatibilityEndpoints.csfrontend/src/types/history.tsfrontend/src/types/logs.tsfrontend/src/types/compatibility.tsfrontend/src/lib/api/history.tsfrontend/src/lib/api/logs.tsfrontend/src/lib/api/compatibility.tsMILESTONE5_RESULT.md
LSPDFRManager.LocalApi/Program.cs— endpoint registrationsLSPDFRManager.LocalApi/LocalApiHost.cs— endpoint registrationsfrontend/src/pages/HistoryPage.tsx— replaced stubfrontend/src/pages/LogsPage.tsx— replaced stubfrontend/src/pages/DashboardPage.tsx— replaced stubfrontend/src/routes/routeConfig.ts—/,/history,/logs→ in-progress
| Method | Path | Response |
|---|---|---|
| GET | /api/v1/history?limit=50&offset=0 |
HistoryResponse |
| GET | /api/v1/logs |
LogsAvailableResponse |
| GET | /api/v1/logs/{name}?tail=200 |
LogLinesResponse |
| GET | /api/v1/compatibility |
CompatibilityResponse |
- Vite dev proxy (
/api→ LocalApi port) fornpm run devworkflow - Pagination UI on HistoryPage (next/previous buttons)
- Log auto-refresh / polling option
- IDE Roslyn type-conflict hints (double Shared reference) — deferred to Milestone 14+
- Session token for DNS rebinding protection (Milestone 9)
- Remaining 14 stub pages (Milestones 6–13)