Skip to content

fix: make moveTab validate before committing source removal - #27

Open
ddebowczyk wants to merge 1 commit into
Jeshwin:mainfrom
ddebowczyk:fix/make-tab-moves-atomic
Open

fix: make moveTab validate before committing source removal#27
ddebowczyk wants to merge 1 commit into
Jeshwin:mainfrom
ddebowczyk:fix/make-tab-moves-atomic

Conversation

@ddebowczyk

Copy link
Copy Markdown

Summary

  • Validate tab source, destination, and placement before a source mutation.
  • Move the stored tab object, not an action payload that reuses its ID.
  • Adjust a tree destination only when removing the source tab collapses its window; preserve an explicit self-edge split and make self-center moves no-ops.
  • Keep the legacy external [-1] source at the public boundary but represent it explicitly in the reducer.

Validation

  • npm test -- --run tests/reducer.test.ts (42 passed)
  • NODE_OPTIONS=--localstorage-file=/tmp/react-layman-pr02-localstorage.json npm test (79 passed)
  • npx --no-install tsc --noEmit
  • npm run lint
  • npm run build:lib

Plain npm test still has the known Node 26 localStorage setup failure in persistence tests. PR 04 owns that portable test setup.

@ddebowczyk
ddebowczyk force-pushed the fix/make-tab-moves-atomic branch 2 times, most recently from 1248fa3 to 3a4fea9 Compare August 12, 2026 13:42
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