Skip to content

Commit 0d6d260

Browse files
author
DavidQ
committed
Move id helpers to shared utils
1 parent dbdb8e5 commit 0d6d260

9 files changed

Lines changed: 28 additions & 11 deletions

File tree

docs/dev/CODEX_COMMANDS.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
MODEL: GPT-5.4-codex
22
REASONING: high
3-
43
COMMAND:
5-
Execute docs/pr/BUILD_PR_REPO_STRUCTURE_67_MOVE_MAP_STRING_NORMALIZERS_TO_SHARED.md exactly.
6-
Modify only listed files.
7-
Package to:
8-
<project folder>/tmp/BUILD_PR_REPO_STRUCTURE_67_MOVE_MAP_STRING_NORMALIZERS_TO_SHARED_delta.zip
4+
Execute docs/pr/BUILD_PR_REPO_STRUCTURE_68_MOVE_MAP_ID_HELPERS_TO_SHARED.md exactly.
5+
Package to <project folder>/tmp/BUILD_PR_REPO_STRUCTURE_68_MOVE_MAP_ID_HELPERS_TO_SHARED_delta.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Move remaining string normalizers into shared utils
1+
Move id helpers to shared utils

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Next: evaluate remaining shared/tools boundary candidates
1+
Next: numeric edge helpers
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
string normalization consolidation
1+
id helpers consolidation

docs/dev/reports/file_tree.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
inspectorUtils + stringUtils only
1+
src/engine/debug/inspectors/shared/inspectorUtils.js
2+
src/shared/utils/idUtils.js
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exact files only, no behavior change
1+
exact files only; no behavior change
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# BUILD PR — Move ID Helpers to Shared
2+
3+
## Files
4+
- src/engine/debug/inspectors/shared/inspectorUtils.js
5+
- src/shared/utils/idUtils.js
6+
7+
## Actions
8+
- move id-related helpers (createId, isValidId, etc.) to shared idUtils
9+
- import from shared in inspectorUtils
10+
11+
## Constraints
12+
- exact files only
13+
- no refactor

src/engine/debug/inspectors/shared/inspectorUtils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ inspectorUtils.js
77

88
import { asPositiveInteger } from "../../../../shared/utils/numberUtils.js";
99
import { sanitizeText } from "../../../../shared/utils/stringUtils.js";
10+
import { createId, isValidId } from "../../../../shared/utils/idUtils.js";
1011

1112
export { sanitizeText };
13+
export { createId, isValidId };
1214

1315
export function asObject(value) {
1416
return value !== null && typeof value === "object" && !Array.isArray(value)

src/shared/utils/idUtils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
export function generateId() {
1+
export function createId() {
22
return `id-${Math.random().toString(36).slice(2, 10)}`;
33
}
44

5+
export function generateId() {
6+
return createId();
7+
}
8+
59
export function isValidId(value) {
610
return typeof value === "string" && value.trim().length > 0;
711
}

0 commit comments

Comments
 (0)