Skip to content

Unavailable view tab, room-scoped wall finishes, set_finish_script - #1312

Open
wass08 wants to merge 5 commits into
mainfrom
fix/unavailable-view-tab-room-wall-stretch
Open

wass08 wants to merge 5 commits into
mainfrom
fix/unavailable-view-tab-room-wall-stretch

Conversation

@wass08

@wass08 wass08 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

  • Unavailable views get a tab. A pane restored onto a view whose plugin isn't in the project (a Home Designer elevation opened in another project) now shows a selected amber tab named after the view, with a close button, and the pane offers Close this view. Both go back to 3D, or 2D when the other pane already shows 3D. The state waits until the project has loaded plus 0.6 s, so plugins that register their views as they load don't flash it.
  • A room's wall finish stops at the room. Wall face scripts take an optional u0/u1 stretch. author_scene builds a room's wallCode only on that room's stretch of each wall, so a bathroom's tile no longer runs into the bedrooms along a shared wall; rooms with the same code share one build. Wet-room, room and default-finish readings, the paint refusal and the skirting gap follow the stretch. Old scenes load unchanged (no stretch = whole face).
  • set_finish_script (chat and MCP, one contract): builds a three.js finish on what already stands — a room's walls (only its own stretch, optionally to toHeight), a room's floor, one wall face or a slab's top. Core plans each surface and its module inputs; the host compiles once per surface. A face another room's script covers is skipped and named; remove: true takes a finish off.

How to test

  1. Open a project with Home Designer, open an elevation from Views, then open a project without Home Designer: the bar shows the amber elevation tab after loading (no flash during load); close it or press Close this view to return to 3D.
  2. With an agent, in a house where a bathroom and bedroom share a wall: set_finish_script on the bathroom with surface: 'walls', a tile module and toHeight: 2.1. The tile stops at the partition and at 2.1 m; the bedroom keeps its paint. remove: true takes it off.
  3. author_scene with a room wallCode on a wall that runs past the room: the build covers only that room's stretch.

Ran: bun test in core (src, 7317 pass), mcp (full, 1532 pass), editor views tests; tsgo --noEmit for core, editor, geometry-script and mcp; bun run i18n:check.

Screenshots / screen recording

Not added yet.

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

🤖 Generated with Claude Code


Note

Medium Risk
Changes how wall finishes are authored, compiled, and applied across author-scene, agent/MCP tools, and geometry refresh; behavior is covered by new tests but affects shared-wall scenes.

Overview
Adds set_finish_script end-to-end (core planFinishScript / setFinishScript, agent tool, MCP compile-and-patch flow) so tiles and other three.js finishes can target a room's walls (per-face stretches), floor, a single wall face, or a slab top, with skip/remove semantics and scene_changed when geometry shifts during compile.

Wall face scripts now support u0/u1 along the wall plus optional height; author_scene applies each room's wallCode only on that room's stretch (shared walls stop at partitions; matching codes merge), and downstream readers (wet room layers, finish readings, paint refusal, skirting) respect partial scripts. Legacy scenes without stretches still mean the full face.

The editor waits ~600ms after hydration before treating a layout's missing plugin view as unavailable: an amber tab and pane actions call leaveUnavailableView to return to 3D (or 2D if the other pane is 3D), with i18n for the new copy.

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

wass08 and others added 3 commits November 23, 2026 10:11
…s stretch of a face

- A pane restored onto a view whose plugin is gone now shows a selected,
  amber 'Unavailable view' tab with a close button, and the pane offers
  'Close this view', returning to 3D (2D when the other pane already shows 3D).
- Wall face scripts take an optional u0/u1 stretch along the wall. author_scene
  builds a room's wallCode only on that room's stretch, so a bathroom's tile no
  longer runs on into the bedrooms along a shared wall; rooms sharing one code
  share one build. Wet-room, room and default-finish readings and the paint
  refusal follow the stretch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stered their views

A restored tab flashed 'unavailable' while the project loaded: its install
list is empty until then, and a plugin registers its views as it loads. The
tab bar and the pane now wait for the project to load plus a short settle
window, showing the pane as loading meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and MCP

One shared contract and core planner/operation: a room's walls (only the
room's own stretch of each face, optionally to toHeight), a room's floor, one
wall face or a slab's top. Hosts compile the module once per surface (the
chat in the editor tab, the MCP through its script host). A face another
room's script covers is skipped and named; remove takes a finish off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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 9f0340e. Configure here.

Comment thread packages/mcp/src/tools/finish-script.ts Resolved
wass08 and others added 2 commits November 23, 2026 10:33
…piled

Each compile now carries the inputs it was built for; the operation compares
them with the replanned surface and refuses scene_changed, so tiles built for
a wall's old length never land on its new one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A server wraps its script host (hostFinishCompiler); a page can pass its own
sandbox, so an in-page agent compiles finishes as the chat does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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