Skip to content

editor: drop the stale 6 m caps and surface the ceiling's level bound - #650

Merged
wass08 merged 2 commits into
mainfrom
fix/height-caps-leftovers
Aug 14, 2026
Merged

editor: drop the stale 6 m caps and surface the ceiling's level bound#650
wass08 merged 2 commits into
mainfrom
fix/height-caps-leftovers

Conversation

@wass08

@wass08 wass08 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Follow-up to #642, which raised the room-envelope height caps from 6 m to 20 m but left two sliders behind, so a tall storey still wasn't usable in practice.

  • ceiling/panel.tsx — the non-level-parent fallback stayed at 6 while definition.ts uses Number.POSITIVE_INFINITY for the same case, so the panel and the 3D drag handle disagreed on the same bound. They now agree.
  • slab/panel.tsx — the elevation sliders (Surface/Floor and Base/Rim) stayed at max={6}, so a slab could not be raised past 6 m inside a 20 m level. clampSlabElevation in the write path is the real bound; the slider was only a UI ceiling.

It also fixes a usability trap found while verifying the above. A ceiling's cap is the storey plane (getCeilingClampBound), which on a stock 2.5 m level is 2.49 m — so the "Standard (2.5m)" and "High (3.0m)" presets clamped silently and read as dead buttons, with nothing pointing at the level height as the actual gate. Presets taller than the level are now disabled with the available height in their tooltip, and the Height section names the bound.

The clamp itself is unchanged: a ceiling still never pokes through its own storey.

How to test

  1. bun dev, draw a room with walls and a ceiling.
  2. Select the ceiling → Height → switch to Custom height. On a default 2.5 m level, confirm the Standard (2.5m) and High (3.0m) presets are disabled, and hovering one explains that it's taller than the level.
  3. Confirm the section now reads "Limited by the level to 2.49 m — raise the level height for a taller ceiling."
  4. Raise the level height (level badge → Level height) to e.g. 6 m. The presets re-enable and the ceiling slider now goes up to 5.99 m.
  5. Select a slab → Elevation. Confirm the Surface/Floor and Base/Rim sliders now travel to 20 m instead of stopping at 6 m, and that clampSlabElevation still holds them under the storey.

I verified the clamp empirically rather than by reading: getCeilingClampBound returns 19.99 on a 20 m level in every configuration tested — single level, level above, and level above with a covering floor slab.

Screenshots / screen recording

N/A — will add a short clip if the reviewer wants one; the visible change is two disabled preset buttons and one line of helper text in the ceiling panel.

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Note

Low Risk
Editor-only panel bounds and preset UX; geometry clamp logic is unchanged.

Overview
Removes leftover 6 m UI limits on ceiling and slab inspectors so tall storeys (up to 20 m) are editable in the panel, matching the write-path clamps and definition.ts.

In ceiling/panel.tsx, the non-level-parent maxHeight fallback changes from 6 to Number.POSITIVE_INFINITY (same as the 3D/registry bound). Height presets that exceed the storey clamp are disabled with a tooltip, and when the cap is finite the panel shows “Limited by the level to …” so silent clamping no longer looks like broken buttons.

In slab/panel.tsx, Surface/Floor and Base/Rim sliders max rise from 6 to 20; clampSlabElevation remains the real limit on save.

Reviewed by Cursor Bugbot for commit fae36af. Bugbot is set up for automated code reviews on this repo. Configure here.

wass08 and others added 2 commits August 14, 2026 10:15
…aise

`#642` raised the room-envelope caps from 6 m to 20 m but missed two
sliders, so a tall storey is still unusable in practice:

- ceiling panel's non-level-parent fallback stayed at 6 m while
  `definition.ts` uses `POSITIVE_INFINITY` for the same case — the panel
  and the 3D drag handle disagreed on the same bound.
- slab elevation (Surface/Floor and Base/Rim) stayed at 6 m, so a slab
  could not be raised past 6 m inside a 20 m level. `clampSlabElevation`
  in the write path is the real bound; the slider was just a UI ceiling.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ilent

A ceiling's cap is the storey plane (`getCeilingClampBound`), so on a
stock 2.5 m level it is 2.49 m — which means the "Standard (2.5m)" and
"High (3.0m)" presets clamped silently and read as dead buttons, with
nothing pointing at the level height as the real gate.

Presets taller than the level are now disabled with the available height
in their tooltip, and the Height section names the bound. The clamp
itself is unchanged: a ceiling still never pokes through its own storey.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@wass08
wass08 merged commit 551704c into main Aug 14, 2026
3 checks passed
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