Skip to content

Fix dual output source z order - #6158

Open
aleksandr-voitenko wants to merge 5 commits into
stagingfrom
fix-dual-output-source-z-order
Open

Fix dual output source z order#6158
aleksandr-voitenko wants to merge 5 commits into
stagingfrom
fix-dual-output-source-z-order

Conversation

@aleksandr-voitenko

@aleksandr-voitenko aleksandr-voitenko commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Description

This fixes the following issue:

Steps:
- Add a new source in a single output mode
- Enable dual output

Expected results:
The latest source is present at the top of the sources list and rendered on top of other
sources for both vertical and horizontal canvases.

Actual results:
The latest source is present at the top of the sources list and rendered on top of other
sources for the horizontal canvas, but it is rendered behind other sources on the vertical canvas (see screenshot)
image

Details

When a source was added in single-output mode and Dual Output was subsequently enabled, the source remained top-most on the horizontal canvas but could render behind older sources on the vertical canvas.

Collections saved with this incorrect vertical order also retained the problem after restarting Desktop.

Even more details

Horizontal and vertical scene nodes share one scene-node list and are connected through sceneNodeMaps. Partner creation and single-to-dual conversion did not consistently preserve the horizontal z-order when constructing the vertical node block. Nested-folder reparenting could also reverse sibling order.

Changes

  • Preserve source z-order when converting a single-output collection to Dual Output.
  • Keep newly created source, copied-source, and folder partners correctly ordered for both active and inactive scenes.
  • Preserve nested-folder sibling order during conversion.
  • Validate mapped dual-output scenes when a collection is loaded.
  • Rebuild the vertical node order from the authoritative horizontal order for valid existing scenes.
  • Require a complete one-to-one node map with matching displays, node types, sources, and mirrored folder relationships before repairing.
  • Leave malformed or incomplete scene graphs untouched and log a warning instead of guessing.
  • Avoid changing node mappings while repairing persisted order.

@bundlemon

bundlemon Bot commented Sep 4, 2026

Copy link
Copy Markdown

BundleMon

Files added (4)
Status Path Size Limits
renderer.(hash).js
+10.53MB -
vendors~renderer.(hash).js
+4.67MB -
updater.js
+115.29KB -
guest-api.js
+40.23KB -

Total files change +15.35MB

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

@michelinewu michelinewu added staging Pull requests that can't be bundled needs new osn version This code is waiting for the next osn version before it can be merged labels Sep 8, 2026
Comment thread app/services/dual-output/node-order.ts
@aleksandr-voitenko aleksandr-voitenko removed the needs new osn version This code is waiting for the next osn version before it can be merged label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

staging Pull requests that can't be bundled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants