agent: Address review follow-ups for quit-time thread flush - #59079
Merged
Conversation
rtfeldman
marked this pull request as ready for review
June 16, 2026 14:27
MartinYe1234
approved these changes
Jun 16, 2026
This was referenced Jun 18, 2026
Closed
liusuren123
pushed a commit
to liusuren123/zed
that referenced
this pull request
Jun 30, 2026
…stries#59079) Follow-up to zed-industries#58962 addressing review feedback on the quit-time thread flush. The flush now builds its save payloads through the same helper as `save_thread`, so the two write paths can't drift — in particular, the flush now captures the current draft prompt the same way ordinary saves do, instead of writing whatever stale draft was last serialized. It also logs database connection errors instead of silently discarding them, and runs the per-thread saves concurrently, since all quit observers share gpui's 200ms `SHUTDOWN_TIMEOUT` and serial saves risked a partial flush. The regression test now quits through the real `App::shutdown` path, so the `on_app_quit` registration itself is exercised rather than just the flush method, and it additionally covers draft-prompt capture and the empty-thread skip. Release Notes: - N/A
This was referenced Jul 1, 2026
This was referenced Jul 10, 2026
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
…stries#59079) Follow-up to zed-industries#58962 addressing review feedback on the quit-time thread flush. The flush now builds its save payloads through the same helper as `save_thread`, so the two write paths can't drift — in particular, the flush now captures the current draft prompt the same way ordinary saves do, instead of writing whatever stale draft was last serialized. It also logs database connection errors instead of silently discarding them, and runs the per-thread saves concurrently, since all quit observers share gpui's 200ms `SHUTDOWN_TIMEOUT` and serial saves risked a partial flush. The regression test now quits through the real `App::shutdown` path, so the `on_app_quit` registration itself is exercised rather than just the flush method, and it additionally covers draft-prompt capture and the empty-thread skip. Release Notes: - N/A
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 #58962 addressing review feedback on the quit-time thread flush.
The flush now builds its save payloads through the same helper as
save_thread, so the two write paths can't drift — in particular, the flush now captures the current draft prompt the same way ordinary saves do, instead of writing whatever stale draft was last serialized. It also logs database connection errors instead of silently discarding them, and runs the per-thread saves concurrently, since all quit observers share gpui's 200msSHUTDOWN_TIMEOUTand serial saves risked a partial flush.The regression test now quits through the real
App::shutdownpath, so theon_app_quitregistration itself is exercised rather than just the flush method, and it additionally covers draft-prompt capture and the empty-thread skip.Release Notes: