Repository navigation
fix(panel): a write's late answer draws nothing over a list pushed since it was sent - #4343
Merged
Merged
Conversation
…nce it was sent Since #3297 nothing reads the list again after a write, so a write's answer that landed after a newer push stood over it. The Automations list now counts the pushes it takes and lands a write's answer only where none came since the write was sent; the write's own commit is pushed after it in any case. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… push carried it A create's page opens on the automation it answers, so dropping that answer after an unrelated push left the editor on an automation the list did not hold yet, its draft and once-only webhook secret lost. Creates now always land, added only where no push carried the automation already. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…y its answer The list remembers every automation a push carried, and a create's answer adds the automation only where none did, so one another window deleted before the answer landed stays deleted. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3297, from Devin's review there, which came in after it merged.
What was wrong
Since #3297, the Automations list is pushed by the host and isn't read again after a write. A write's answer still lands in the list at once, but nothing compared it with the pushes. So a slow answer could overwrite a newer push and stay there. For example: window A toggles an automation off and its answer is slow; window B turns it on; A gets the push showing On, then A's late Off answer lands and shows Off.
Change
useAutomationscounts the lists it's pushed. A write on an automation the list already holds (change, toggle, delete, new secret) lands its answer only if no push arrived after it was sent. A create's answer always lands, because its page opens on it. It's added only if no push has already carried the new automation (from Devin's review here). Dropping the answer loses nothing: if that push came from before the write committed, the commit itself is pushed next, within about a second.Checks
automations-page.test.tspasses (86); panel typecheck and biome are clean.Made with Luke