Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ final class MainWindow {
initialContent: msg.initialContent
)
show()
windowState.togglePanel(.documentEditor)
windowState.selection = .panel(.documentEditor)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist document editor as active panel when opening it

Setting windowState.selection directly here (and similarly in handleDocumentLoadResponse) drops the persistence side effect that togglePanel used to provide via lastActivePanelString in MainWindowState.togglePanel. As a result, after opening a document editor from these daemon messages, restoreLastActivePanel() can no longer restore the document editor on reconnect/app restart and may reopen a stale previous panel instead, which is a regression from the prior behavior.

Useful? React with 👍 / 👎.

}

func handleDocumentEditorUpdate(_ msg: DocumentEditorUpdateMessage) {
Expand All @@ -189,7 +189,7 @@ final class MainWindow {
initialContent: content
)
show()
windowState.togglePanel(.documentEditor)
windowState.selection = .panel(.documentEditor)
}

func show() {
Expand Down