Skip to content

fix: drafter feedback engine fixes (roof ownership, floor intent, openings, design brief, symbols, 3D pane) - #1364

Open
AxiomeCG wants to merge 2 commits into
pascalorg:mainfrom
AxiomeCG:fix/drafter-feedback-engine
Open

AxiomeCG wants to merge 2 commits into
pascalorg:mainfrom
AxiomeCG:fix/drafter-feedback-engine

Conversation

@AxiomeCG

@AxiomeCG AxiomeCG commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements the @pascal-app/core, @pascal-app/nodes, @pascal-app/mcp, and @pascal-app/editor engine fixes from the drafter feedback audit and code review:

  • Roof ownership & Home Designer foundation levels (packages/core/src/services/roof-level.ts, packages/core/src/agent-operations/scene-queries.ts, packages/core/src/agent-operations/verify-scene.ts, packages/core/src/contracts/reference-inventory.ts):
    • Recognize Home Designer foundation levels via metadata.homeDesigner === 'foundation', home-designer:project settings.foundation.published (Record or array entries), or home-designer:foundation-seat foundationLevelId.
    • Prioritize building-scoped foundation type (published[levelId], published[buildingId], building.metadata.foundation.type) over project-wide settings.foundation.type fallback so basements remain occupied storeys while non-basement foundations act as support levels (no empty_levels or missing_stair false positives on raised-floor crawlspace models).
  • Floor-intent elevation propagation (packages/core/src/lib/floor-intent-changes.ts):
    • Carry level-supported roofs with moved base plates without double-applying shared level lifts, order-independently.
    • Evaluate stationary base plates on moved levels alongside moved plates and pass normalized stack updates into floorIntentConflicts so shared roofs/ceilings reliably report floor-foundation-shared-storey conflicts matching applied motion.
  • Multi-slab floor openings (packages/core/src/lib/structure-reconcile.ts):
    • Apply floor openings across all overlapping manual slabs and generated plates.
    • Split polygons-with-holes using orthogonal-axis fallback and bounded recursion without emitting un-holed rings when holes remain, ensuring manual holes enclosed by an opening are never double-subtracted.
  • design_brief ergonomics & rollout compatibility (packages/core/src/agent-operations/design-brief.ts, packages/core/src/agent-tools/design-brief.ts):
    • Fold accents, punctuation, case, and whitespace when matching quotes, accepting requestTexts (per-message matching) alongside requestText.
    • Allow omitting beyond when axes.dressing is bounded, omitting the beyond key from persisted session records so older readers preserve both designBrief and viewed.
  • Site, plan symbols, roof plan, and 2D-only pane layout:
    • Expose frontEdgeGuessed on SiteBrief['buildable'] (packages/core/src/lib/site-placement.ts).
    • Cap water-heater plan symbols at HEATER_SYMBOL_MAX (packages/nodes/src/item/plan-symbols.ts).
    • Emit roof tags, pitch, and overhang metadata in packages/nodes/src/roof/floorplan.ts.
    • Keep the hidden 3D pane zero-width in 2D-only mode (packages/editor/src/components/editor/index.tsx).

Verification

  • bunx biome check across all 22 changed/added files: 0 errors.
  • bunx turbo run check-types: 14/14 workspace packages succeeded (build succeeded).
  • packages/core: bun test — 7,961 pass / 3 skip / 0 fail (166,173 expect() calls across 440 files; skipped: 3 detached and live give the same complete patch malformed-geometry tests).
  • bunx turbo run test --filter=@pascal-app/nodes --filter=@pascal-app/mcp --filter=@pascal-app/editor: 9/9 tasks succeeded:
    • @pascal-app/nodes: 6,123 pass / 1 skip / 0 fail (1,175,030 expect() calls across 514 files; skipped: user-set material is applied).
    • @pascal-app/editor: 2,851 pass / 0 fail (32,975 expect() calls across 311 files).
    • @pascal-app/mcp: 1,585 pass / 0 fail (8,604 expect() calls across 84 files).
  • Not run: Live browser E2E / visual rendering check.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…nings, design brief, symbols, 3D pane)

Addresses the core/nodes/mcp/editor fixes from drafter feedback and code review:

- Roof ownership & foundation support levels: recognize Home Designer published (Record/array), seated, and tagged non-basement foundations using building-scoped priority (published level -> published building -> building.metadata.foundation.type -> project settings.foundation.type) so porch roofs resolve to Ground Floor and foundation support levels do not trigger empty_levels or missing_stair false positives while basements remain occupied storeys.
- Floor intent propagation: carry level-supported roofs with moved base plates without double-applying shared level lifts, check stationary plates alongside moved plates so shared roofs report floor-foundation-shared-storey conflicts, and align floorIntentConflicts with normalized stack updates.
- Multi-slab floor openings: reconcile floor openings across overlapping manual slabs and generated plates, splitting holes-with-holes via orthogonal fallback and depth bounds without emitting un-holed rings when holes remain.
- design_brief ergonomics & rollout compat: fold accents/punctuation/case/whitespace per supplied user message (requestText / requestTexts) and allow omitting beyond when dressing is bounded while omitting the key from persisted sessions.
- Site/plan/UI polish: expose frontEdgeGuessed on SiteBrief, cap water heater plan symbols at HEATER_SYMBOL_MAX, emit roof tags/pitch/overhang metadata in roof floorplan, and keep hidden 3D pane zero-width in 2D-only mode.
@AxiomeCG
AxiomeCG force-pushed the fix/drafter-feedback-engine branch from c3660c1 to 9e3cf7f Compare December 4, 2026 21:58

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9e3cf7f. Configure here.

This branch has not been deployed

No deployments
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.

1 participant