Skip to content

fix(Handle): import missing WALL_THICKNESS constant#15

Open
PeritoAndre wants to merge 1 commit into
mehanix:masterfrom
PeritoAndre:fix/handle-wall-thickness-import
Open

fix(Handle): import missing WALL_THICKNESS constant#15
PeritoAndre wants to merge 1 commit into
mehanix:masterfrom
PeritoAndre:fix/handle-wall-thickness-import

Conversation

@PeritoAndre

@PeritoAndre PeritoAndre commented Jun 7, 2026

Copy link
Copy Markdown

Closes #11
Handle.ts references WALL_THICKNESS in its resize-clamping logic (lines ~188+) but never imports it, so the project fails to compile:

TS2304: Cannot find name 'WALL_THICKNESS'.

The constant is already exported from editor/editor/constants.ts; this only adds the missing import. No behavior change.

Handle.ts references WALL_THICKNESS in its resize-clamping logic (lines ~188+)
but never imports it, so the project fails to compile:

  TS2304: Cannot find name 'WALL_THICKNESS'.

The constant is already exported from editor/editor/constants.ts; this only
adds the missing import. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
qant-au added a commit to qant-au/axonometra that referenced this pull request Jun 10, 2026
Flip tsconfig.json:9 to true and walk the 51 resulting errors across
13 files in three buckets:

Cheap mechanical:
- useRef<HTMLInputElement>(null) + optional chaining at four
  callsites in ToolNavbar.tsx and WelcomeModal.tsx (action item #64).
- Class fields with optional ctor params (Furniture.attachedToLeft /
  attachedToRight, AddFurnitureAction fields) now declared optional.
- Preview.startPoint / set(value) widened to Point | undefined.

Targeted guards:
- WallNodeSequence.remove / addWall / removeWall / getWall extract
  the Map.get() result to a local and early-return on undefined
  (action item #24). reset() iterates .values() instead of .keys() +
  .get(), eliminating the optional indirection.
- WallNodeSequence.addNode no longer round-trips through the map to
  return the freshly-constructed node.
- TransformLayer.target widened to Furniture | null; draw,
  computePoints, drawBorder, computeTargetRotation, update each
  narrow via local var with early return.
- Handle.IHandleConfig.target made optional; TransformLayer stops
  passing the bogus null at construction.
- Floor.addFurniture coords guard pairs with attachedTo guard.
- Floor.setFurniturePosition / removeFurniture extract the map.get
  result and early-return.
- Floor's previousFloor cloning skips entries when the node map
  lookup misses.
- FloorPlan.print null-checks window.open() and toasts on
  popup-blocker (action item mehanix#15).

Structural:
- TransformLayer / FloorPlan / AddWallManager static .instance refs
  declared as T | undefined to match the dispose() pattern landed in
  the previous commit.
- AddNodeAction.execute guards the addNode return.
- FloorPlan.changeFloor passes undefined (not null) to the Floor
  constructor.
- FurnitureAddPanel useState types narrowed (string[] / ReactElement[])
  and Mantine Select onChange handler coerces null -> ''.

Closes axo-015, action items mehanix#9, #24, #64, mehanix#15
(code-review-2026-06-09 mehanix#7, #27, #65, #17).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing constant variable import

1 participant