Repository navigation
v0.28.3 — undo and redo leave nothing selected - #358
Merged
Merged
Conversation
…restores its own selection Share note 56. A history entry keeps the nodes and edges as they were, React Flow's `selected` flags included, while undo / redo set the Inspector's `selectedNodeId` / `selectedEdgeId` to null. React Flow reports a selection only when it changes, so: - restored flags equal to the current ones left a connection or node marked that the Inspector did not show; a click on it changed nothing, and Delete or an arrow key acted on it (the node move also discarded the redo branch); - restored flags that differed brought an old selection back from the history. Undo / redo now clear every flag of the restored entry and both ids. Only an element whose flag changes is copied; the flags are never serialized, so it is no document change and no history entry. The one exception is a module insert (docs/module-system.md §MS3.5): its entries carry the selection from before the insert (undo) and the inserted set (redo), restored as flags and ids together, however often the step is undone and redone. The insert also clears edge flags now: a connection selected before it stayed marked beside the inserted block with no Inspector id, against §MS3.3 "inserted nodes, and nothing else". Docs: large-graph-readability.md LGR-D17, module-system.md §MS3.5. Tests: - graphStore.undoSelection.test.ts (6): flags and ids cleared, no old selection back, no history entry, serialize() unchanged, unflagged objects kept; the module insert's undo / redo, repeatable, including a connection selected before it; ordinary steps around it clear. - frameStore.test.ts: a frame undo / redo keeps the nodes / edges apart from the selection flags, and leaves no node selected. - e2e/undo-redo-selection.spec.ts (5): the stale mark, the old selection, Delete and an arrow key after an undo, and a module insert through the toolbar menu with the marks matching the flags. Tests 1 to 4 fail on b11ff65. Checks: tsc, lint, full vitest (3 592 passed, 1 skipped); 16 related e2e specs on Chromium, 307 passed.
- package.json / package-lock.json 0.28.3; `.changes/undo-clears-selection.json` (user-facing, `release:0.28.3`, Lumi's classification 2026-10-15), date 2026-10-15, to be checked on the merge day. - What's new 0.28.3, three lines in 18 languages (Daisy's draft, for review): after Undo or Redo nothing is selected on the canvas or in the Inspector, so a click selects again and Delete or the arrow keys act on nothing hidden; Undo and Redo bring no earlier selection back; a module insert is the one exception, and a connection selected before it no longer stays highlighted. Undo / Redo / Inspector / canvas / module and the Delete key follow each locale's UI (Entf, Suppr, Suprimir, Canc where the UI names the key so). es-ES = es-419 and pt-PT = pt-BR, written neutrally; French avoids the punctuation its spacing rule governs. Locale count pins follow (catalog 1144, runtime 1366); th and vi declare the Latin `Delete` in the new line; the e2e release list pins 0.28.3. - CHANGELOG v0.28.3; README Latest v0.28.3 (v0.28.2 kept as a section, v0.27.0 moved into the CHANGELOG list). The translation contract tests pass: evidence of the catalogs' structure and terms, not a review of how the lines read; no native-speaker review. Checks: tsc, lint, full vitest (3 592 passed, 1 skipped), change declaration, i18n, i18n surface, control bytes, isolate arguments, ICU arguments, locale lists, functional glyphs, e2e shards, snapshot policy, form / content direction, no pseudo-locales.
Deploying cozy-loop-studio with
|
| Latest commit: |
6306c86
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://53c31064.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://fix-undo-clears-selection.cozy-loop-studio.pages.dev |
Lumi's review of the draft (2026-10-15): the first line carried too many results at once, and the module line's last sentence explained an internal detail. Now four lines, in 18 languages: - `cleared`: after Undo or Redo nothing is selected, on the canvas or in the Inspector (the first line, shortened); - `hidden` (new): a connection or node no longer stays highlighted while the Inspector shows nothing; Delete does not remove it, and the arrow keys do not move a node, until you click to select it — the action named per key, and the arrow keys for nodes only; - `history`: unchanged; - `module`: the exception, without the sentence on the connection selected before the insert (it stays in the CHANGELOG). Count pins follow (catalog 1145, runtime 1367); th and vi declare the Latin `Delete` on the new line instead of the first. README Latest follows the four lines; CHANGELOG says four lines. No native-speaker review. Checks: tsc, lint, full vitest (3 592 passed, 1 skipped), change declaration, i18n, i18n surface, control bytes, isolate / ICU arguments, locale lists, functional glyphs; e2e whats-new.spec.ts on Chromium, 96 passed.
English `whatsNew.v0283.hidden` takes Lumi's wording (2026-10-15): "After Undo or Redo, a connection or node no longer stays highlighted while the Inspector is empty. Delete won't remove it, and the arrow keys won't move a node until you select it." README Latest follows. The other 17 locales are unchanged; the 16 besides English and Korean still have no native-speaker review. Checks: tsc, full vitest (3 592 passed, 1 skipped), i18n, i18n surface, control bytes, functional glyphs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.28.3 — undo and redo leave nothing selected
A history entry kept the nodes and edges as they were, React Flow's
selectedflags included, while undo / redo set the Inspector'sselectedNodeId/selectedEdgeIdto null. React Flow reports a selection only when it changes, so an undo could leave a connection or node marked that the Inspector did not show (a click on it changed nothing; Delete or an arrow key acted on it, and the arrow-key move discarded the redo branch), or, where the flags differed, bring an old selection back from the history. Share note 56 holds the investigation (cases A–F, reproduced onb11ff65with real pointer clicks and keys). Four commits: the fix, the release, and two wording commits from Lumi's review.1. The fix (
195244a,src/store/graphStore.ts)selectedflag of the restored entry and both Inspector ids. Only an element whose flag changes is copied; the flags are never serialized, so it is no document change and no history entry.docs/module-system.md§MS3.5): its entries carry the selection from before the insert (undo) and the inserted set (redo), restored as flags and ids together, however often the step is undone and redone. Ids of elements the restored entry does not have are dropped.docs/large-graph-readability.mdLGR-D17 (new row),docs/module-system.md§MS3.5.2. Tests
src/store/graphStore.undoSelection.test.ts(6): flags and ids cleared on undo and redo; no old selection back; a selection made after an undo is the only one; no history entry,serialize()unchanged, unflagged objects kept; the module insert's undo / redo restore flags and ids, repeatably, including a connection selected before it; ordinary steps around the insert still clear.src/store/frameStore.test.ts: a frame undo / redo keeps the nodes / edges apart from the selection flags and leaves no node selected (it compared whole objects before).e2e/undo-redo-selection.spec.ts(5): the stale mark and a click that selects again, no old selection back, Delete and an arrow key after an undo, and a module insert through the toolbar menu with the canvas marks matching the flags at each step. Tests 1 to 4 fail onb11ff65.3. Release (
9c32ccd, wordingba78c4a,6306c86).changes/undo-clears-selection.json(user-facing), CHANGELOG v0.28.3, README Latest. Release date 2026-10-15, to be checked on the merge day.Verification, by head
6306c866306c86check:i18n,check:i18n-surface,check:control-bytes,check:functional-glyphsba78c4acheck:change-declaration,check:i18n,check:i18n-surface,check:control-bytes,check:isolate-arguments,check:icu-arguments,check:locale-lists,check:functional-glyphs;whats-new.spec.tson Chromium9c32ccd9c32ccd--workers=1 --retries=09c32ccddistconfig, thenpwaconfig, run separately9c32ccdcheck:change-declaration,check:i18n,check:i18n-surface,check:control-bytes,check:isolate-arguments,check:icu-arguments,check:locale-lists,check:functional-glyphs,check:e2e-shards,check:snapshot-policy,check:form-direction,check:content-direction,check:no-pseudo-locales195244aThe two wording commits change only release-note strings, the locale count pins and README; the full local e2e was not rerun for them.
Seen in passing, not in this PR
docs/edge-routing.md§ER8 describes a right-click menu on a connection (route mode, "Remove point", "Reset route") that the app does not have; the same actions exist in the Inspector and by keyboard. No context menu is wired anywhere.