Code Review Phase 2: Constants & Configuration
Purpose: Review all application constants — the "magic values" that control behavior across the app. These are referenced by nearly every other module.
Prerequisites: Phase 1 (Type System)
Estimated time: 1 hour
Files: 8
Files to Review (in order)
Key Concepts
as const assertions create readonly literal types from object literals
- Custom window events (
CustomEvent) are used for cross-component communication outside of Redux
safeGetItem/safeSetItem wrap localStorage with try-catch for environments where storage is unavailable
Focus Areas
Next: Phase 4 (Redux Store & Slices)
Code Review Phase 2: Constants & Configuration
Purpose: Review all application constants — the "magic values" that control behavior across the app. These are referenced by nearly every other module.
Prerequisites: Phase 1 (Type System)
Estimated time: 1 hour
Files: 8
Files to Review (in order)
src/constants/canvas.ts— Canvas sizing, positioning, and layout defaultssrc/constants/timing.ts— Debounce and delay values (auto-save: 500ms, validation: 300ms)src/constants/storage.ts— localStorage keys + safe accessor wrapperssrc/constants/events.ts— Custom window events + typed dispatch/subscribe helperssrc/constants/dnd.ts— Drag-and-drop MIME types + helper functionssrc/constants/datasetTypes.ts— 75+ dataset type definitions + Kedro class mappingsrc/constants/fileTree.ts— File tree indentation constantssrc/constants/index.ts— Barrel exportKey Concepts
as constassertions create readonly literal types from object literalsCustomEvent) are used for cross-component communication outside of ReduxsafeGetItem/safeSetItemwraplocalStoragewith try-catch for environments where storage is unavailableFocus Areas
STORAGE_KEYSconstants are now used consistently across the codebase (themeSlice, uiSlice, useAppInitialization, telemetry all referenceSTORAGE_KEYS). Verify there are no remaining hardcoded localStorage key strings.DATASET_TYPE_MAPPINGindatasetTypes.tscover every value in theDatasetTypeunion fromkedro.ts?events.tsaccurate?isConnectionIdcheck indnd.tsconsistent with the one inids.ts?