You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Continued Phase 3 shared utility cleanup from PR_26140_033.
5
+
- Extracted only behavior-identical helpers and switched local duplicates to shared imports.
6
+
- Did not change gameplay logic, schema behavior, manifest contracts, generated/vendor/archive files, or report snapshots.
7
+
8
+
## Implementation Summary
9
+
- Added shared `normalizePathSeparators` to `src/shared/string/stringHelpers.js` and exported it through shared string/utils indexes.
10
+
- Replaced behavior-identical local text helpers with shared `normalizeText` and `sanitizeText` imports across active game/tool/shared modules.
11
+
- Replaced array-rejecting object helpers with shared `asObject`; replaced array-allowing pipeline helpers with shared `toObject` where semantics matched.
12
+
- Replaced duplicated finite number helpers with shared `toFiniteNumber` or `asFiniteNumber` in runtime, games, and Collision Inspector V2.
13
+
- Kept local helpers where semantics differ, including path helpers with slash-collapse/fallback differences and geometry point helpers with invalid-point/rounding differences.
14
+
15
+
## Duplicate Scanner Results
16
+
Source: `tools/shared/powerShell/find_dupes_called.ps1`, refreshed to `tmp/dupes_called.txt`.
17
+
18
+
| Candidate | Before Phase 3 | After Phase 3 | Notes |
19
+
| --- | ---: | ---: | --- |
20
+
|`sanitizeText`| 38 | 8 | Remaining hits are samples and an old report snapshot, out of PR scope. |
21
+
|`normalizeText`| 11 | 4 | Remaining active hits differ by lowercase semantics or deprecated tool scope; samples are out of scope. |
22
+
|`normalizePath`| 4 | 2 | Remaining active helpers differ by fallback, trimming, or slash-collapse behavior. |
23
+
|`asObject`| 8 | 2 | Remaining duplicate includes sample runtime plus shared utility. |
|`normalizePoint`| 2 | 2 | Kept local because invalid point handling differs. |
27
+
|`normalizePoints`| 2 | 2 | Kept local because filtering/rounding semantics differ. |
28
+
|`toObject`| 2 | 2 | Remaining duplicate includes old report snapshot plus shared utility. |
29
+
|`node_modules` paths | not found | not found | Scanner output stayed focused away from dependency tree. |
30
+
31
+
## Remaining Repo-Owned Candidates
32
+
-`src/engine/runtime/fullscreenBezel.js` and `tools/preview-generator-v2/PreviewGeneratorV2RepoAccess.js` both contain `normalizePath`, but they do not have identical behavior.
33
+
-`tools/shared/assetPipelineConverters.js` has a path normalizer built around `normalizeProjectRelativePath` and fallback behavior, so it was left local.
34
+
-`tools/asset-manager-v2/js/assetPreviewHelpers.js` has `normalizeText` with lowercase semantics, so it was not merged into the trim-only helper.
35
+
-`src/engine/collision/objectVector.js` and `tools/shared/vector/vectorAssetContract.js` keep separate `normalizePoint(s)` helpers because invalid point and precision behavior differ.
36
+
- Sample-phase helpers and old report snapshots are intentionally out of scope for this PR.
Playwright impacted: Yes. Shared runtime/tool JavaScript imports changed, so Workspace Manager V2, Object Vector Studio V2, Collision Inspector V2, and Asteroids gameplay smoke were validated.
54
+
55
+
## Coverage
56
+
- Produced advisory Playwright V8 coverage artifacts at `docs/dev/reports/playwright_v8_coverage_report.txt` and `docs/dev/reports/coverage_changed_js_guardrail.txt`.
57
+
- Missing changed runtime JS coverage is reported as WARN per project rules, not FAIL.
58
+
59
+
## Full Samples Smoke
60
+
Skipped. This PR is a scoped utility extraction with targeted Workspace, Asteroids, Object Vector Studio V2, and Collision Inspector V2 validation; it does not broadly change the sample loader/framework.
61
+
62
+
## Manual Validation Notes
63
+
1. Open Workspace Manager V2 and confirm repo selection still populates games/tools.
64
+
2. Launch Object Vector Studio V2 and Collision Inspector V2 from Workspace Manager V2.
65
+
3. Launch Asteroids and confirm normal gameplay render/collision behavior.
66
+
4. Review `tmp/dupes_called.txt` for remaining out-of-scope duplicate candidates listed above.
0 commit comments