# Cover lineup undo edge cases and keep focus after clear \(\#199\) · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/b3f15ddd8a42c8094fa91fbe598862dea1766085)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: b3f15ddd8a42c8094fa91fbe598862dea1766085

Requested commit: b3f15ddd8a42c8094fa91fbe598862dea1766085

Commit: b3f15ddd8a42c8094fa91fbe598862dea1766085

Tree: aaeef10fc483be2fab670a4e3c571a4f43dabf18

Author: Dara Adedeji

Committer: GitHub

## Message

```
Cover lineup undo edge cases and keep focus after clear (#199)

* Cover lineup undo edge cases and keep focus after clear

- App shortcuts no longer go dead when their own focus node holds focus.
  With the web semantics tree on, a click on an empty part of the page
  focuses the GlobalShortcuts node, which sat above its Shortcuts, so key
  events never reached them and Ctrl+Z did nothing. The node now sits
  inside Shortcuts and Actions, under a debug label.
- A weapon or lineup field edit whose target a teammate deleted changes
  nothing and gets no inverse, like every other kind.
- Tests: deleting a link into a shared landing, undone, redone and undone
  again; a teammate deleting a lineup before its deletion is redone; the
  missing-target cases above; the shortcut node holding focus.
- Removed what undo no longer reaches: the lineup graph cases in
  LineUpProvider.undoAction/redoAction and the provider and size-cache
  snapshot helpers. UtilityProvider's snapshot methods stay because
  custom_shape_color_test still calls them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drop weapon changes whose agent or origin a teammate deleted

Reconciliation after hydration kept a weapon change whose agent or lineup
origin was gone, so the next Ctrl+Z did nothing visible. It now goes,
unless a retained addition or deletion can bring the target back, like
every other edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
```

## Parents

- [bb89f7a8fde4a25b0d8c6f92306bfbda76d213b9](https://git.cafe/dara/icarus/commit/bb89f7a8fde4a25b0d8c6f92306bfbda76d213b9?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/b3f15ddd8a42c8094fa91fbe598862dea1766085?format=markdown)
