Skip to content

Conversation

@carlos-zamora
Copy link
Member

If persistedWindowLayout is enabled, we now persist the window layout every few minutes (excluding the text buffer).

This was done by adding a SafeDispatcherTimer to the WindowEmperor that calls PersistState() every 5 minutes. For BuildStartupKind, I split up Persist into PersistAll and PersistLayout. This way, we go through all the same code flow that Persist had except for specifically serializing the buffer.

Validation Steps Performed

✅ (with the timer set to 3 seconds) create a window layout and ensure the layout is restored after forcefully stopping Terminal (aka simulating a "crash")

Closes #18838

@carlos-zamora carlos-zamora enabled auto-merge (squash) May 14, 2025 17:35
@carlos-zamora carlos-zamora merged commit f769597 into main May 14, 2025
17 of 19 checks passed
@carlos-zamora carlos-zamora deleted the dev/cazamor/continuous-session-persistence branch May 14, 2025 18:08
@sparrowt
Copy link

Brilliant, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Open windows from a previous session" opens wrong tabs after crash

4 participants