Repository navigation
fix(tui): save config updates in order - #65761
Conversation
There was a problem hiding this comment.
The fix works. I ran the #65523 reproduction script 12 times on each checkout. On the base branch, 6 of 12 picks left cli.json on a theme that was only previewed. With this change, all 12 picks were saved correctly. The config tests in packages/tui pass.
Saves now run one after another. Reloads from the file watcher join the same queue, so a reload set off by a save's own write runs after the saves already waiting and reads the newest file. A failed save doesn't block later ones, and the caller still gets the error (the callers in theme.tsx already handle it).
Public API is unchanged: this only touches the TUI's internal ConfigProvider, and update keeps the same signature.
I have no concerns that would block this.
Issue for this PR
Closes #65523
Type of change
What does this PR do?
How did you verify your code works?
/themesreproduction against the patched TUI and checked thatcli.jsonkept the selected theme.bun run check.Screenshots / recordings
Checklist