From 379858a97d509d4ca9c619abdcd2ec0539cb3a6d Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Thu, 1 Oct 2026 00:27:21 -0700 Subject: [PATCH] fix: pin holds the first slot, and the nav table says what it shares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pinning brings the sidebar's handle back, and from behind it the unpin button sat one slot over from where the pin had just been clicked — so a second click in the same place opened the sidebar instead. An operator is detached by default, which makes that the default state of the feature rather than an edge case. `NAV_PAGES` claimed one table stops a page being called one thing in the nav and another in the header, which holds for the seven entries the sidebar's main group is built from and not for the four grouped separately — `/routes` was "Triggers" in the header and "HTTP" in the nav. The comment now says which is which, and that entry is named for the page rather than its group. `sidebarPageAllowed` gets a table test: it decides what an operator sees, and its `=== true` is what a future `Option`-style default would silently change. Co-Authored-By: Claude Opus 5 (1M context) --- .../src/lib/components/PageHeaderBar.svelte | 57 ++++++++++--------- .../src/lib/components/sidebar/navPages.ts | 12 +++- .../components/sidebar/operatorRoutes.test.ts | 26 +++++++++ 3 files changed, 65 insertions(+), 30 deletions(-) create mode 100644 frontend/src/lib/components/sidebar/operatorRoutes.test.ts diff --git a/frontend/src/lib/components/PageHeaderBar.svelte b/frontend/src/lib/components/PageHeaderBar.svelte index d011b291fd..e75a95bf51 100644 --- a/frontend/src/lib/components/PageHeaderBar.svelte +++ b/frontend/src/lib/components/PageHeaderBar.svelte @@ -92,6 +92,36 @@ The row's height matches the sidebar's own header row, so the two read as one ba 'shadow-[inset_0_-1px_0_0_rgb(var(--color-border-light))] dark:shadow-[inset_0_-1px_0_0_#374151] [html.github-dark_&]:shadow-[inset_0_-1px_0_0_rgb(var(--color-border-light))]' )} > + + {#if onPin} + + + {/if} + + {#if onUnpin} + + {/if} + {#if (navDetached.val || panelled) && !navHidden && !hideNavHandle} - - {/if} - - {#if onUnpin} - - - {/if} -