Conversation
…org#308) While drafting a wall, printable keys open a typing buffer; the draft endpoint is projected onto the typed length along the current draft direction, so the pointer keeps steering direction only. Enter commits at the typed length, two-stage Escape clears the buffer first and then cancels the draft, Backspace/Delete edit the buffer. Shared zustand store keeps the 2D floor plan and the 3D view in lockstep (parity rule in wiki/architecture/tools.md); angle/junction snapping is preserved on untyped drafts and bypassed only for the typed commit.
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 91943371-ceba-4f22-9d28-001dcd5623f3 |
- click/Enter commit reuses the projected endpoint the previews show instead of re-snapping the raw pointer (2D + 3D parity) - HUD subscribes to the typing store so the label tracks keystrokes - typing buffer cleared on every commit/cancel path; never carries into the next chain segment - 2D typing keys stopPropagation so tool shortcuts don't fire mid-type - drop unused begin() action
|
Addressed all 5 Bugbot findings in 11e8fa5:
Full check-types + test suites pass (3,125 tests). |
… Enter commit - 3D Enter keeps the buffer across the synthetic grid:click so the commit is recognized as typed (no re-snap), clears defensively after - stopDrafting clears the typing store: double-click finish and chain auto-close no longer leak the old length into the next draft - 2D Enter commits through a latest-ref instead of the first-render closure, which used to restart the draft at the typed point - 2D move preview publishes projectedEnd so a click mid-type commits the projected endpoint, matching the 3D tool
|
Round 2 findings fixed in 596c7e7:
check-types + biome + full test suite pass. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 596c7e7. Configure here.
| backspace: () => | ||
| set((state) => ({ input: state.input.slice(0, Math.max(0, state.input.length - 1)) })), | ||
| clearInput: () => set({ input: '', projectedEnd: null }), | ||
| setProjectedEnd: (end) => set({ projectedEnd: end }), |
There was a problem hiding this comment.
Click commits stale typed length
High Severity
append and backspace only change input. The draft end and projectedEnd update on pointer move, so a click after typing reuses the last pointer point. Enter recomputes the projection and commits the typed length; click does not. The HUD already shows the buffer, so the committed wall does not match the previewed length.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 596c7e7. Configure here.


Closes #308.
What
While drafting a wall in the two-click flow, typing an exact length (e.g.
3m,180cm,2500in mm notation,10'6") now locks the draft to that length along the current draft direction — the pointer keeps steering the direction only.How
useWallDraftTyping(packages/editor/src/store/use-wall-draft-typing.ts) holds the buffer so the 2D floor-plan draft and the 3D wall tool stay in lockstep per the 2D ↔ 3D parity rule inwiki/architecture/tools.md.packages/nodes/src/wall/tool.tsx): awindowkeydown listener mirrors the cabinet tool'sapplyTypedDimensionpattern —parseMeasurementresolves the buffer with the same bare-unit defaults;grid:moveprojects the draft end onto the typed length; Enter synthesizes agrid:clickat the projected endpoint so the normal commit pipeline (chain continuation, auto-close, support-slab election) runs unchanged.floorplan-panel.tsx): the same projection in the wall-draft pointer move, the same key handling in the window keydown effect, and the HUD label override.Testing
packages/editor/src/store/use-wall-draft-typing.test.ts— buffer lifecycle + accepted keys.packages/nodes/src/wall/typed-length.test.ts— the projection math shared by both views.@pascal-app/editor+@pascal-app/nodessuites pass (turbo run test: 3119 tests across 268 files, plus the editor suite).tsgo --noEmitclean for both packages;biome checkclean on touched files.Verified end-to-end on a self-hosted deployment (design.dekorproduct.com) in both the 2D plan and 3D views with metric-m and mm notations.
Thanks for the detailed triage spec on #308 — the interaction follows it point by point.
Note
Medium Risk
Touches core wall placement/commit paths in 2D and 3D with global key handlers and intentional snap bypass on typed commits; regression risk is localized to drafting UX rather than persisted data.
Overview
Adds typed exact-length input while drafting walls in the two-click flow (#308), with matching behavior in 2D floor plan and 3D wall tool.
A new shared Zustand store (
useWallDraftTyping, exported from@pascal-app/editor) holds the measurement buffer and a projected endpoint so preview, HUD, click, and Enter commit stay aligned. While typing, the draft end is projected onto the parsed length along the pointer direction; the length label shows the buffer instead of live distance. Enter commits at that length (3D via syntheticgrid:click; 2D viawallPlacementPointRefto avoid stale closures); Escape first clears the buffer then cancels the draft; Backspace/Delete edit the buffer. Typed commits skip endpoint re-snap so the entered length is preserved; the buffer clears after each segment so chains do not inherit a stale length.Unit tests cover the store/key filter and the shared projection math.
Reviewed by Cursor Bugbot for commit 596c7e7. Bugbot is set up for automated code reviews on this repo. Configure here.