Skip to content

fix(editor): preserve valid focus and selection state#213

Merged
DavidBabinec merged 1 commit into
mainfrom
fix/editor-interaction-state
Jul 11, 2026
Merged

fix(editor): preserve valid focus and selection state#213
DavidBabinec merged 1 commit into
mainfrom
fix/editor-interaction-state

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

What changed

  • keep deferred AI composer autofocus from stealing focus already placed inside the assistant panel
  • prune invalid selected node ids after both undo and redo restore history
  • cover normal autofocus, header-focus retention, undo insertion, and redo deletion regressions

Why

The merged-main browser release gate exposed two user-visible interaction failures: opening the assistant could steal focus back from a panel action, and undoing a selected insertion could leave a stale selection that made the next insert silently no-op.

Verification

  • bun test src/__tests__/editor-store/undo-redo.test.ts src/__tests__/panels/agentPanel.test.tsx (43 pass)
  • bun run lint
  • bunx tsc -b --pretty false
  • git diff --check

@DavidBabinec DavidBabinec merged commit f64c6a9 into main Jul 11, 2026
9 checks passed
@DavidBabinec DavidBabinec deleted the fix/editor-interaction-state branch July 11, 2026 18:27
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