Skip to content

feat(studio): edit a whole selection in the inspector, delete it in one undo - #78

Merged
Hacks4Snacks merged 1 commit into
mainfrom
hacks4snacks/studiobulkedit
Jul 27, 2026
Merged

feat(studio): edit a whole selection in the inspector, delete it in one undo#78
Hacks4Snacks merged 1 commit into
mainfrom
hacks4snacks/studiobulkedit

Conversation

@Hacks4Snacks

Copy link
Copy Markdown
Owner

feat(studio): edit a whole selection in the inspector, delete it in one undo

What changed

Multi-selection now does more than copy/duplicate. Select several elements of the
same kind, or several data flows, and the inspector edits all of them.

  • Every property control writes the whole selection in one step
  • A property the selection disagrees about shows as (mixed)
  • Clearing to (none) removes it from every selected object
  • Delete removes the whole selection, taking connected flows with it
  • Bulk edit and bulk delete are each a single undo step

Why

onSelectionChange kept only selectedNodes[0] and selectedEdges[0], so
everything downstream of the selection was single-object by construction
(STU-002). Widening that one piece of state and changing the three property
writers to take string[] is most of the feature — a single selection is just
the one-element case, so there is still only one code path, not a parallel
"bulk" one.

Design notes

(mixed) is a disabled option, so it can never be committed. Opening the
inspector on a mixed selection must not flatten the values it is showing — only
a control the author actually changes is written. A property set on
some-but-not-all of the selection counts as mixed rather than as the value one
object happens to hold.

Mixed kinds refuse typed editing, on evidence rather than caution. The schema
declares AuthenticationScheme for both process and external, but external
accepts Token and PublicKey and process does not — one shared control would
offer values the schema rejects for part of the selection. (Algorithm and
Multiplicity are identical across their kinds, so a name-based intersection
looks safe right up until it isn't.) Elements and flows share nothing at all.
Both cases still offer delete, which is unambiguous.

Names are not offered across a selection. A name identifies one object.

@Hacks4Snacks
Hacks4Snacks merged commit 1bda13b into main Jul 27, 2026
10 checks passed
@Hacks4Snacks
Hacks4Snacks deleted the hacks4snacks/studiobulkedit branch July 27, 2026 20:43
This was referenced Jul 27, 2026
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