Skip to content

fix(editor): respect export scope when collecting floorplan schedules - #857

Merged
Aymericr merged 1 commit into
pascalorg:mainfrom
Zhao0335:fix/floorplan-schedule-export-scope
Sep 12, 2026
Merged

fix(editor): respect export scope when collecting floorplan schedules#857
Aymericr merged 1 commit into
pascalorg:mainfrom
Zhao0335:fix/floorplan-schedule-export-scope

Conversation

@Zhao0335

@Zhao0335 Zhao0335 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #631.

collectFloorplanSchedules walked the entire level subtree and never took FloorplanExportScope into account. A 'structure' PDF still emitted zone/room schedule pages (and other non-structure contributors) whose plan geometry the same export excluded.

exportFloorplanPdf already passes scope into collectFloorplanGeometry. This threads the same scope into schedule collection and gates each schedule-contributing node kind with isFloorplanNodeInExportScope.

How to test

  1. Open a model with doors/windows (structure) and rooms/zones (site).
  2. Export a floorplan PDF with scope structure.
  3. Confirm the PDF has door/window schedules but no room/zone schedule pages.
  4. Export with scope full — all schedules should still appear.
  5. Focused unit test: collectFloorplanSchedules with registered structure vs site kinds.

Screenshots / screen recording

N/A — export content only.

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

Validation

  • packages/editor: floorplan-export.test.ts 25/25 pass (includes new scope test)
  • @pascal-app/core and @pascal-app/viewer builds clean

Note

Low Risk
Export-only behavior change with a default-preserving API and focused unit coverage; no auth or data-path changes.

Overview
Structure-scoped floorplan PDFs no longer include schedule pages for node kinds whose plan geometry is already excluded from that export (e.g. room/zone schedules when only structure is exported).

collectFloorplanSchedules now accepts FloorplanExportScope (default full) and skips schedule contributors that fail isFloorplanNodeInExportScope, matching collectFloorplanGeometry. exportFloorplanPdf passes the same scope used for geometry into schedule collection.

Adds a unit test that registers structure vs site schedule contributors and asserts structure yields only structure schedules while full keeps both.

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

collectFloorplanSchedules walked the whole level subtree and ignored
FloorplanExportScope, so a structure-only PDF still emitted zone/room
schedule pages whose geometry the same export excluded.

Thread scope into the collector and gate schedule contributors with
isFloorplanNodeInExportScope, matching geometry collection.

Fixes pascalorg#631
@pascal

pascal Bot commented Sep 11, 2026

Copy link
Copy Markdown

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: a90203b7-ec2d-4fe5-a3be-8403524a093d

@Aymericr
Aymericr merged commit 7254139 into pascalorg:main Sep 12, 2026
1 check 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.

Floorplan export: schedules ignore scope — 'structure' PDFs still emit zone/room schedule pages

2 participants