From 9106b3536217622646cc5e13c0dd489fa9a52cad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 12 Sep 2026 14:45:43 +0000 Subject: [PATCH 1/4] Initial plan From cc1ca13cc4d139dc51c7629ebece2d2060e2d5b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 12 Sep 2026 14:48:09 +0000 Subject: [PATCH 2/4] fix: persist horizontal/vertical orientation across page refreshes --- packages/yasgui/src/PersistentConfig.ts | 9 +++++++++ packages/yasgui/src/Tab.ts | 3 +++ packages/yasgui/src/index.ts | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/packages/yasgui/src/PersistentConfig.ts b/packages/yasgui/src/PersistentConfig.ts index 20f3917f..bd62a381 100644 --- a/packages/yasgui/src/PersistentConfig.ts +++ b/packages/yasgui/src/PersistentConfig.ts @@ -315,6 +315,15 @@ export default class PersistentConfig { /** * Get list of disabled developer-configured endpoint buttons */ + public getOrientation(): "vertical" | "horizontal" | undefined { + return this.persistedJson.orientation; + } + + public setOrientation(orientation: "vertical" | "horizontal") { + this.persistedJson.orientation = orientation; + this.toStorage(); + } + public getDisabledDevButtons(): string[] { return this.persistedJson.disabledDevButtons || []; } diff --git a/packages/yasgui/src/Tab.ts b/packages/yasgui/src/Tab.ts index 363b3d22..7de2d106 100644 --- a/packages/yasgui/src/Tab.ts +++ b/packages/yasgui/src/Tab.ts @@ -621,6 +621,9 @@ export class Tab extends EventEmitter { // Update global config this.yasgui.config.orientation = newOrientation; + // Persist orientation + this.yasgui.persistentConfig.setOrientation(newOrientation); + // Apply to all tabs for (const tabId in this.yasgui._tabs) { const tab = this.yasgui._tabs[tabId]; diff --git a/packages/yasgui/src/index.ts b/packages/yasgui/src/index.ts index 99f820a1..08b0ef32 100644 --- a/packages/yasgui/src/index.ts +++ b/packages/yasgui/src/index.ts @@ -186,6 +186,12 @@ export class Yasgui extends EventEmitter { this.config.showSnippetsBar = persistedShowSnippetsBar; } + // Load persisted orientation if available + const persistedOrientation = this.persistentConfig.getOrientation(); + if (persistedOrientation !== undefined) { + this.config.orientation = persistedOrientation; + } + this.tabElements = new TabElements(this); this.tabPanelsEl = document.createElement("div"); From a24efee40bb425b1d0716da3c037e510fbb0d68b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 12 Sep 2026 14:49:19 +0000 Subject: [PATCH 3/4] fix: add JSDoc comments to getOrientation/setOrientation --- packages/yasgui/src/PersistentConfig.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/yasgui/src/PersistentConfig.ts b/packages/yasgui/src/PersistentConfig.ts index bd62a381..25fae3a2 100644 --- a/packages/yasgui/src/PersistentConfig.ts +++ b/packages/yasgui/src/PersistentConfig.ts @@ -313,17 +313,23 @@ export default class PersistentConfig { } /** - * Get list of disabled developer-configured endpoint buttons + * Get the persisted layout orientation */ public getOrientation(): "vertical" | "horizontal" | undefined { return this.persistedJson.orientation; } + /** + * Set and persist the layout orientation + */ public setOrientation(orientation: "vertical" | "horizontal") { this.persistedJson.orientation = orientation; this.toStorage(); } + /** + * Get list of disabled developer-configured endpoint buttons + */ public getDisabledDevButtons(): string[] { return this.persistedJson.disabledDevButtons || []; } From 5a1eecc6f015efe655bf3620cceb9fda5a253141 Mon Sep 17 00:00:00 2001 From: Mathias Vanden Auweele Date: Sat, 12 Sep 2026 17:30:13 +0200 Subject: [PATCH 4/4] Improve getOrientation method implementation Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- packages/yasgui/src/PersistentConfig.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/yasgui/src/PersistentConfig.ts b/packages/yasgui/src/PersistentConfig.ts index 25fae3a2..d62fb797 100644 --- a/packages/yasgui/src/PersistentConfig.ts +++ b/packages/yasgui/src/PersistentConfig.ts @@ -315,9 +315,10 @@ export default class PersistentConfig { /** * Get the persisted layout orientation */ - public getOrientation(): "vertical" | "horizontal" | undefined { - return this.persistedJson.orientation; - } +public getOrientation(): "vertical" | "horizontal" | undefined { + const orientation = this.persistedJson.orientation; + return orientation === "vertical" || orientation === "horizontal" ? orientation : undefined; +} /** * Set and persist the layout orientation