t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Saving a keybinding discards other unsaved keybinding edits

Open pnupu opened this issue 2 months ago • 1 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate standalone issue.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open Settings → Keybindings.
  2. Edit the shortcuts or When conditions of several existing bindings without saving.
  3. Save one edited binding.
  4. Observe that other unsaved edits revert to their saved values.

Which edits disappear depends on the bindings' order in the saved configuration. No particular shortcuts or search filter are required.

Expected behavior

Saving one binding preserves every other binding's unsaved edits. The order in which bindings are saved should not matter.

Actual behavior

Other edited rows revert to their saved values, discarding their unsaved changes. Users must re-enter those edits when configuring several bindings together.

Impact

Minor bug or occasional failure

Version or commit

Reproduced against d29c56a5c.

Environment

Reproduced in Chrome using the web client from vp run dev with an isolated checkout and disposable settings. This editor is shared by web and desktop.

The recording host currently reports macOS 26.5.2 and Chrome 153.0.8010.36; versions were checked during this draft review.

Supporting evidence

Saving replaces a binding by removing its old entry and appending the new one. Settings row IDs include each binding's array index, so unchanged siblings receive new IDs when their positions shift. React recreates those rows and their local draft state.

https://github.com/user-attachments/assets/9473e0db-0c90-4825-a7a9-4113704d99f2

Related: https://github.com/pingdotgg/t3code/pull/4366 describes the same behavior. It was closed without merging.

Workaround

Edit and save one binding at a time.

pnupu avatar Sep 10 '26 18:09 pnupu

[!NOTE] Grok responding on behalf of Julius.

Fixed by #11109, which just landed on main: saving one keybinding no longer resets other rows' unsaved edits, since rows now keep a stable identity. Closing as completed.

juliusmarminge avatar Oct 19 '26 18:10 juliusmarminge