|
1 | | -# Aggregate Review — Travelback (2026-05-04, Cycle 4) |
| 1 | +# Aggregate Review — Travelback (2026-05-04, Cycle 5) |
2 | 2 |
|
3 | 3 | ## Overview |
4 | 4 |
|
5 | | -Deep review completed. All quality gates pass clean (lint=0, typecheck=clean, test=219/219, audit=0 vulns, build=clean). The codebase is in excellent condition after cycles 1-3 fixes. Previous cycles' MEDIUM findings (C3-F1 MapView monolith, C3-C1 stale deferred findings) were addressed or carried. This cycle found only minor/cosmetic issues. |
| 5 | +Deep review completed across all 11 agent perspectives. All quality gates pass clean (lint=0, typecheck=clean, test=219/219, audit=0 vulns, build=clean). The codebase remains in excellent condition after cycles 1-4. This cycle found one actionable code quality issue and minor style inconsistencies. |
6 | 6 |
|
7 | 7 | ## Deduplicated Findings (ordered by severity/confidence) |
8 | 8 |
|
9 | | -### LOW PRIORITY |
| 9 | +### LOW PRIORITY — ACTIONABLE |
10 | 10 |
|
11 | | -#### C4-F1. Inconsistent indentation in MapView progress effect |
| 11 | +#### C5-F1. Dead code: `isMapRenderExportError` uses fragile substring matching |
| 12 | +**Severity**: Low (code quality / fragility) | **Confidence**: High |
| 13 | +**File**: `src/lib/useExportController.ts:24-27` |
| 14 | +**Issue**: `isMapRenderExportError` checks `error.message.includes('Map did not finish rendering')` to classify export errors. However, `ExportError` instances from `waitForStableMap` (lines 177, 189) already carry codes `'EXPORT_MAP_RENDER'` and `'EXPORT_MAP_IDLE'`, which are mapped in `EXPORT_ERROR_I18N` (lines 17-22). The catch block at line 267 checks `error instanceof ExportError && EXPORT_ERROR_I18N[error.code]` before the substring fallback, making `isMapRenderExportError` dead code. If someone changes the error message text, the function would silently break. |
| 15 | +**Fix**: Remove `isMapRenderExportError` function and the substring check in the catch block. Rely solely on `ExportError.code` for classification. |
| 16 | +**Agent agreement**: code-reviewer (C5-F1), critic (C5-C2), verifier (V6), debugger (C5-DB1). |
| 17 | + |
| 18 | +### LOW PRIORITY — STYLE |
| 19 | + |
| 20 | +#### C5-F2. Inconsistent indentation in MapView progress effect |
12 | 21 | **Severity**: Low (style) | **Confidence**: High |
13 | 22 | **File**: `src/components/MapView.tsx:1064-1067` |
14 | | -**Issue**: Lines 1064-1067 (marker position update inside the progress useEffect) use 6-space indentation instead of the surrounding 4-space indentation. This is a formatting inconsistency introduced during cycle 2 refactoring. |
| 23 | +**Issue**: 6-space indentation instead of surrounding 4-space. Carried from C4-F1. |
15 | 24 | **Fix**: Re-indent to 4 spaces. |
16 | 25 |
|
17 | | -#### C4-F2. TimelineSelector `hasTime` not memoized |
18 | | -**Severity**: Low (perf) | **Confidence**: Medium |
19 | | -**File**: `src/components/TimelineSelector.tsx:369` |
20 | | -**Issue**: `hasTime` is computed via `points.some((p) => p.time)` on every render. For tracks with up to 250K points, this iterates the full array each time the component re-renders. Since `points` reference only changes on track load/trim, this should be memoized. |
21 | | -**Fix**: Wrap in `useMemo` keyed on `points`. |
22 | | - |
23 | | -### INFORMATIONAL (no action required) |
24 | | - |
25 | | -#### C4-I1. exportVideo waitForIdle signature uses `Promise<void>` but callers return `Promise<boolean>` |
26 | | -**Severity**: Info | **Confidence**: High |
27 | | -**File**: `src/lib/videoEncoder.ts:83` vs `src/components/MapView.tsx:689` |
28 | | -**Issue**: `exportVideo` declares `waitForIdle: () => Promise<void>` but the actual MapView implementation returns `Promise<boolean>`. TypeScript allows this (boolean return is discarded) but the API contract is slightly misleading. |
29 | | -**Fix**: None required — this is standard TypeScript variance behavior. Document for awareness. |
30 | | - |
31 | | -#### C4-I2. `smoothCameraState` wrapper is now a trivial delegate to `lerpCamera` |
32 | | -**Severity**: Info | **Confidence**: High |
33 | | -**File**: `src/components/MapView.tsx:77-79` |
34 | | -**Issue**: After cycle 3's P06 consolidation, `smoothCameraState` is now a one-line wrapper calling `lerpCamera(previous, target, factor, linear, bearingFactor)`. The wrapper exists for readability (naming the concept) and is used in exactly one call site. No action needed. |
35 | | -**Fix**: None required. |
36 | | - |
37 | | -#### C4-I3. mediabunny Output has no explicit cleanup API on abort |
| 26 | +#### C5-F3. Inconsistent indentation in SceneEditor scenes list |
| 27 | +**Severity**: Low (style) | **Confidence**: High |
| 28 | +**File**: `src/components/SceneEditor.tsx:568` |
| 29 | +**Issue**: 8-space indentation (extra 4 spaces) at the scenes list rendering block. |
| 30 | +**Fix**: Dedent by 4 spaces. |
| 31 | + |
| 32 | +### CARRIED DEFERRED ITEMS (from cycles 1-4) |
| 33 | + |
| 34 | +#### DEF-01. MapView.tsx monolith (1200 lines, 7+ concerns) |
| 35 | +**Severity**: Low (architecture) | **Confidence**: High |
| 36 | +**File**: `src/components/MapView.tsx` |
| 37 | +**Original**: C3-F1. Extract pure functions to src/lib/mapUtils.ts. |
| 38 | +**Status**: Deferred. Requires significant refactoring effort. Not blocking. |
| 39 | + |
| 40 | +#### DEF-02. No tests for MapView pure utility functions |
| 41 | +**Severity**: Low (test gap) | **Confidence**: High |
| 42 | +**Original**: C3-TE1, C5-TE1. |
| 43 | +**Status**: Deferred. Blocked by DEF-01 (extraction). |
| 44 | + |
| 45 | +#### DEF-03. No tests for export controller state machine |
| 46 | +**Severity**: Low (test gap) | **Confidence**: High |
| 47 | +**Original**: C5-TE2. |
| 48 | +**Status**: Deferred. Complex async testing setup required. |
| 49 | + |
| 50 | +#### DEF-04. No tests for JourneyCreator parseCoordinateQuery |
| 51 | +**Severity**: Low (test gap) | **Confidence**: High |
| 52 | +**Original**: C5-TE3. |
| 53 | +**Status**: Deferred. Easy to implement, low priority. |
| 54 | + |
| 55 | +#### DEF-05. mediabunny Output has no explicit cleanup API on abort |
38 | 56 | **Severity**: Info | **Confidence**: Medium |
39 | 57 | **File**: `src/lib/videoEncoder.ts:168-173` |
40 | | -**Issue**: When export is aborted, `output.finalize()` is correctly skipped (to avoid corrupt MP4), but the Output/CanvasSource/BufferTarget objects rely on GC for cleanup. mediabunny does not expose a `dispose()` or `close()` method. This was flagged in C3-F4 but is a library limitation, not a code defect. |
41 | | -**Fix**: None — deferred until mediabunny adds explicit cleanup API. |
| 58 | +**Original**: C3-F4, C4-I3. |
| 59 | +**Status**: Deferred. Library limitation, not a code defect. |
| 60 | + |
| 61 | +#### DEF-06. `waitForIdle` type mismatch (Promise<boolean> vs Promise<void>) |
| 62 | +**Severity**: Info | **Confidence**: High |
| 63 | +**Files**: `src/components/MapView.tsx:35` vs `src/lib/videoEncoder.ts:83` |
| 64 | +**Original**: C4-I1. |
| 65 | +**Status**: Deferred. TypeScript variance allows this. No runtime impact. |
42 | 66 |
|
43 | | -## VERIFIED FIXES FROM CYCLES 1-3 |
| 67 | +### VERIFIED FIXES FROM CYCLES 1-4 (all intact) |
44 | 68 |
|
45 | | -All prior fixes verified: |
46 | | -- C3-F3 referenceGridData dependency: VERIFIED (line 866 includes `referenceGridData`) |
47 | | -- C3-F2 camera smoothing consolidation: VERIFIED (`smoothCameraState` delegates to `lerpCamera`) |
48 | | -- C3-P1 fallback timer optimization: VERIFIED (line 117: `document.visibilityState === 'hidden'` guard) |
49 | | -- C3-C1 stale deferred findings: VERIFIED (N01 archived, N10 corrected) |
50 | | -- All cycle 1-2 fixes: VERIFIED (no regressions) |
| 69 | +- C4-F2 `hasTime` memoization: VERIFIED (TimelineSelector.tsx:363) |
| 70 | +- C3-F2 camera smoothing consolidation: VERIFIED (MapView.tsx:77-79) |
| 71 | +- C3-F3 referenceGridData dependency: VERIFIED (MapView.tsx:866) |
| 72 | +- C3-P1 fallback timer optimization: VERIFIED (usePlaybackController.ts:117) |
| 73 | +- C2-DB-01 export progress restoration: VERIFIED (useExportController.ts:311) |
| 74 | +- C2-DB-04 resetSize cleanup: VERIFIED (MapView.tsx:685-702) |
| 75 | +- All cycle 1 fixes: VERIFIED (no regressions) |
51 | 76 |
|
52 | 77 | ## AGENT FAILURES |
53 | 78 |
|
54 | | -None. Single-agent review completed. |
| 79 | +None. All 11 agent perspectives completed successfully. |
55 | 80 |
|
56 | 81 | ## Cross-Agent Agreement Summary |
57 | 82 |
|
58 | | -N/A — single-agent cycle. All findings are low-informational; no prior-agency disagreement. |
| 83 | +All agents agree the codebase is in excellent condition. The only actionable finding (C5-F1) is agreed upon by 4 agents (code-reviewer, critic, verifier, debugger). All other findings are style/informational. |
0 commit comments