Appearance
Daedalus TypeScript Error Separate PR Plan (2026-04-30)
Goal
- Separate current snap-improvement delivery from legacy TypeScript debt in
frontend/src/components/Daedalus/Drafting/D_Daedalus.vue. - Keep snap feature PR focused and reviewable.
- Resolve broad typing debt in a dedicated follow-up PR with safer scope control.
Scope Split
- This PR (snap-improvement):
- Align snap dedicated toggle + sidebar wiring.
- Dimension align/polar behavior verification test.
- Small local refactor (shared line-like draft predicate).
- Separate TS debt PR:
- Existing compile/type errors that predate this snap delivery.
Error Buckets For Separate PR
EquipmentMetamissing properties
- Examples:
drawConstructionCircle,linkedEquipmentRef,linkedPartRef,linkBindingType,linkBindingUpdatedAt,drawTableCols,drawTableRows. - Action:
- Expand
EquipmentMetaexplicitly with canonical optional fields. - Audit all write/read paths to avoid
any-style drift.
- Expand
- Style/layer type strictness mismatches
- Examples:
CadLineType/CadLineWeightassignments from genericstring,CanonicalLayerTypeset membership mismatches. - Action:
- Add normalizers/guards at setter boundaries.
- Narrow conversion functions before assignment.
- Nullability and flow narrowing gaps
- Examples:
cursorWorldPos.valuepotentially null; map callbacks whereeqmay be null. - Action:
- Add early returns and local narrowed aliases.
- Use explicit non-null safe guards around pointer-dependent flows.
- Legacy pointer-branch enum drift
- Example: comparison against
'draw-text'not compatible withQuickPrimitivePointerDownBranch. - Action:
- Align branch literals and union type source-of-truth.
- Leader/meta object shape mismatches
- Example:
leaderNumberingIndexnullable assignment conflicts with declared type. - Action:
- Decide canonical nullable contract (
number | nullvsnumber | undefined) and apply consistently.
- Decide canonical nullable contract (
Recommended PR Steps
- Add missing
EquipmentMetafields and nullable contracts. - Fix nullability errors with minimal control-flow changes.
- Introduce layer/style normalizers and replace direct
stringassignments. - Align branch union literals and cleanup unreachable comparisons.
- Re-run diagnostics and keep any behavior-affecting change covered by focused tests.
Validation Checklist
get_errorsshows zero new errors outside intended touch files.- Existing E2E for Daedalus still green.
- New dimension align/polar spec remains green:
frontend/e2e/daedalus-dimension-align-polar.spec.js
Suggested Branch Naming
chore/daedalus-typescript-debt-pass-1
Suggested Commit Chunking
types: expand EquipmentMeta contracttypes: tighten layer/style assignment boundariestypes: null-safety pass for pointer and map flowstypes: align pointer branch unions
