From 09de5fc2ea0a84ef1cebf05a8764765d1755f403 Mon Sep 17 00:00:00 2001 From: elkaix Date: Mon, 17 Aug 2026 00:53:47 -0400 Subject: [PATCH] feat(web): prompt for desktop updates and tidy the sidebar header Add a desktop-only update toast that offers install or skip, centre the settings button in the sidebar footer, and make the sidebar brand start a new session. --- .changeset/desktop-update-toast.md | 5 + apps/pythinker-web/src/App.vue | 10 ++ apps/pythinker-web/src/components/Sidebar.vue | 54 ++++++- .../src/components/UpdateToast.vue | 150 ++++++++++++++++++ .../src/components/settings/SettingsPane.vue | 48 ++++++ .../src/i18n/locales/en/settings.ts | 2 + .../src/i18n/locales/en/update.ts | 7 + apps/pythinker-web/src/i18n/locales/index.ts | 2 + apps/pythinker-web/test/sidebar.test.ts | 6 + apps/pythinker-web/test/update-toast.test.ts | 95 +++++++++++ 10 files changed, 372 insertions(+), 7 deletions(-) create mode 100644 .changeset/desktop-update-toast.md create mode 100644 apps/pythinker-web/src/components/UpdateToast.vue create mode 100644 apps/pythinker-web/src/i18n/locales/en/update.ts create mode 100644 apps/pythinker-web/test/update-toast.test.ts diff --git a/.changeset/desktop-update-toast.md b/.changeset/desktop-update-toast.md new file mode 100644 index 00000000..c77f0945 --- /dev/null +++ b/.changeset/desktop-update-toast.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Prompt for desktop updates with a toast that offers install or skip, centre the settings button in the sidebar footer, and start a new session when the sidebar brand is clicked. diff --git a/apps/pythinker-web/src/App.vue b/apps/pythinker-web/src/App.vue index 7078b150..854253b4 100644 --- a/apps/pythinker-web/src/App.vue +++ b/apps/pythinker-web/src/App.vue @@ -18,6 +18,7 @@ import SettingsPane from './components/settings/SettingsPane.vue'; import SessionsDialog from './components/SessionsDialog.vue'; import AddWorkspaceDialog from './components/AddWorkspaceDialog.vue'; import StatusPanel from './components/StatusPanel.vue'; +import UpdateToast from './components/UpdateToast.vue'; import WarningToasts from './components/WarningToasts.vue'; import MobileTopBar from './components/MobileTopBar.vue'; import MobileSwitcherSheet from './components/MobileSwitcherSheet.vue'; @@ -1090,6 +1091,7 @@ function openPr(url: string): void { @update-config="handleUpdateConfig($event)" @login="loginFromSettings" @open-onboarding="openOnboardingFromSettings" + @close="showSettings = false" /> + + + @@ -1411,6 +1416,11 @@ function openPr(url: string): void { height: env(titlebar-area-height, 44px); -webkit-app-region: drag; user-select: none; + /* Windows has no vibrancy, so the bar earns its own tone: a shade darker than + the shell with a hairline under it, which also frames the window buttons. */ + background: color-mix(in srgb, var(--ink) 4%, var(--panel)); + border-bottom: 1px solid var(--line); + box-sizing: border-box; } .auth-page { flex: 1; diff --git a/apps/pythinker-web/src/components/Sidebar.vue b/apps/pythinker-web/src/components/Sidebar.vue index 2c462def..22cb4f4a 100644 --- a/apps/pythinker-web/src/components/Sidebar.vue +++ b/apps/pythinker-web/src/components/Sidebar.vue @@ -464,10 +464,15 @@ onBeforeUnmount(() => {
-
- +
+