Skip to content

V3: add editor groups, persistence, and runtime export - #155

Merged
git-chad merged 12 commits into
git-chad/shader-lab-v3-planfrom
git-chad/v3-editor-groups
Oct 1, 2026
Merged

git-chad merged 12 commits into
git-chad/shader-lab-v3-planfrom
git-chad/v3-editor-groups

Conversation

@git-chad

Copy link
Copy Markdown
Collaborator

Designers can now organize layers into isolated groups in the editor and keep those groups when saving, reopening, undoing changes, or exporting a runtime config. An effect inside a group affects that group's children; group opacity, blend, and visibility apply to the composed result.

Stacked on #154 (git-chad/v3-isolated-group-rendering), within the V3 integration stack #150. Do not merge to main until the roadmap is complete.

Changes

  • Add group/ungroup, rename, collapse, nested ordering, and a Properties selector for moving layers between groups. Group actions operate on complete subtrees; keyboard shortcuts and menu reordering work on desktop, and controls are available on mobile.
  • Persist a validated, contiguous hierarchy in project version 7 and exported ShaderLabConfig. Older flat projects/configs remain supported. Enforce unique IDs, valid parents, and eight nesting levels before editor hydration.
  • Restore multi-selection through history. Duplicate descendant animation tracks/audio links, and prune dependencies when deleting or ungrouping layers.
  • Connect evaluated editor/runtime layers to the isolated render tree, including animated parent visibility and opacity. Collapsing a group only affects the layer list.
  • Correct the desktop Properties panel measurement so group controls fit beneath its header.

Validation

  • bun run check — passed (two existing source lint warnings; one warning in a gitignored local fixture script).
  • Runtime and MCP package typechecks — passed.
  • bun run test:composition — passed: frozen legacy fixtures, 136 blend/mask samples, 34 media-bound samples, 100 alpha samples, 52 group checks, plus the new editor-group integration suite.
  • New integration checks exercise real stores/history and applyLabProjectFile, malformed-hierarchy rejection without mutation, animation/audio duplication and cleanup, runtime config rendering, and saved/reopened preview/PNG pixel equality. Baselines were not regenerated.
  • Playwright desktop interaction checks cover group creation, rename, collapse, undo/redo, subtree drag, move membership, duplicate/delete, and ungroup. Mobile collapse/expand checked at 390px.

Manual review

Follow the group checklist: group a photo and effect over a separate background, adjust group opacity/blend, move and duplicate it, undo changes, then save/reopen and compare PNG export. Confirm desktop and mobile controls before continuing to masks.

Coverage masks and transparent scene/export backgrounds are separate slices. New version-7 saves require this V3 build to reopen. Ungroup removes the group's opacity/blend/visibility contribution, so appearance can change.

@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shader-lab Ready Ready Preview Oct 1, 2026 7:05am UTC

@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR should not merge until publishing hidden groups preserves a valid hierarchy.

Summary

This PR adds isolated editor groups across editing, persistence, history, rendering, and runtime export.

  • Adds nested group creation, movement, reordering, renaming, collapsing, duplication, and deletion.
  • Introduces version-7 hierarchy persistence and runtime parentId support.
  • Evaluates group visibility and opacity before constructing isolated render trees.
  • Adds composition and editor integration coverage.

Reviews (1) · Last reviewed commit: "feat: add editor groups with persistence..."

Comment thread src/lib/editor/project-file.ts
…roup failures

Media load callbacks now ignore replaced or removed passes and pending loads are cleared on disposal. Strict-mode pass failures are reported once at the originating pass instead of at every group boundary.
Publishing now drops every descendant of a hidden group and clears the
parentId of any retained layer (the audio source) whose parent was removed,
so the published scene passes hierarchy validation on reopen.
@git-chad
git-chad force-pushed the git-chad/v3-editor-groups branch from f11ac2e to 8f540ba Compare October 1, 2026 07:04
@git-chad
git-chad changed the base branch from git-chad/v3-isolated-group-rendering to git-chad/shader-lab-v3-plan October 1, 2026 15:12
@git-chad
git-chad merged commit 8f540ba into git-chad/shader-lab-v3-plan Oct 1, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8f540ba2 Deployed Oct 1, 2026 by vercel[bot]
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