Skip to content

Commit 535b2a9

Browse files
authored
fix(desktop): give Windows a title bar and report every update stage (#151)
## Related Issue No issue — reported directly: on Windows the caption buttons cover the git branch and status in the conversation header, the window has no title bar, and the app never says a new version is available. ## Problem Three defects, all in the desktop shell: 1. **Windows has no title bar.** The desktop shell drops `titleBarOverlay` on win32 and the renderer owns the caption, but it drew the buttons as a `position: fixed` overlay pinned to the top-right — directly on top of the conversation header, covering the git branch and diff counts. The window also had no drag region at all on Windows: the two that exist (`Sidebar.vue`, `ChatHeader.vue`) are both gated on `macos-desktop`, so the window could not be moved. 2. **The update prompt only appears at the very last step.** Automatic downloads are the default, and `UpdateToast` rendered only for `downloaded` (or `available` with automatic downloads off). So "a new version was found", "it is downloading", and "the download failed" were unobservable — and there is no other update surface anywhere in the product: no tray item, no settings toggle, no menu. A user whose download fails is told nothing, ever. 3. **The "Internal testing only" tag** shows in every desktop build, on macOS and Windows alike. ## What changed **Windows title bar.** `WindowControls.vue` is now an in-flow 32px strip above the app instead of an overlay. `.app-shell` is already a flex column, so `.app` simply shrinks and nothing can sit under the buttons. The strip is the window-drag region, with the buttons opting out — that is what restores dragging on Windows. `window-options.ts` is unchanged: `titleBarStyle: 'hidden'` + `thickFrame` is already the correct shell for a renderer-drawn caption. **Update prompt.** `UpdateToast.vue` now reports found → downloading (with percent) → ready to install → failed, with the install action enabled only in the two states that can start one. A failure is surfaced only once an update was actually found in this session, so a check that fails on an offline machine stays quiet; dismissing a failure no longer writes to the skipped-versions list, so the restart prompt still arrives when the retry succeeds. **Internal-testing tag** removed, along with its locale key and layout rule. All three are gated on the desktop shell, so CLI and browser users perceive no change — the changesets name `@pymodel/pythinker-desktop`, not the CLI. The committed `dist-web` bundle is restaged in the same commit, since the desktop app loads that bundle rather than `apps/pythinker-web/src`. ## Checklist - [x] I have read the [CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md) document. - [x] I have linked a related issue, or explained the problem above. - [x] I have added tests that prove my feature works. — `update-toast.test.ts` covers each state, the retry/dismiss split, and the offline-quiet rule; `window-controls.test.ts` asserts the bar is in-flow and drags. 913 tests pass in `apps/pythinker-web`. - [x] Ran `gen-changesets` skill, or this PR needs no changeset. — three entries under `.changeset/`, minor for the two fixes and patch for the tag removal. - [x] Ran `gen-docs` skill, or this PR needs no doc update. — no documented CLI behavior changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added clearer update notifications for available, downloading, downloaded, and failed updates, with retry and dismiss actions. * Added progress and restart guidance for desktop updates. * Improved the Windows title bar layout and window-drag behavior. * **Bug Fixes** * Update controls now remain correctly enabled or disabled based on update status. * **Style** * Removed the “Internal testing only” banner. * Long update messages now wrap correctly. * **Chores** * Refreshed bundled web assets and editor language support. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 3acb36c commit 535b2a9

95 files changed

Lines changed: 433 additions & 347 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-desktop": patch
3+
---
4+
5+
Remove the "Internal testing only" tag.

.changeset/update-prompt-states.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-desktop": minor
3+
---
4+
5+
Say when a new version is found, while it downloads, and when a download fails, instead of only once it is ready to install.

.changeset/windows-title-bar.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-desktop": minor
3+
---
4+
5+
Give the Windows window its own title bar, so the window controls no longer sit on top of the conversation header and the window can be dragged again.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"sourceHash": "39adcc1ccb551ac03f06fe2152c6a69004701da14fd2535f8b26202cb9d27c14",
3-
"sourceFileCount": 389
2+
"sourceHash": "5fa1f4113f68cc5a0de3b4985ae517b47ca98f832e89e97cf636845fd3a2cd67",
3+
"sourceFileCount": 388
44
}

apps/pythinker-code/dist-web/assets/CodeBlockNode-Nw5XZ1fO.js renamed to apps/pythinker-code/dist-web/assets/CodeBlockNode-DqRBT_Oz.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/DesignSystemView-CjvpPwwK.js renamed to apps/pythinker-code/dist-web/assets/DesignSystemView-Egp23i6M.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/Tooltip-G7Fvxpah.js renamed to apps/pythinker-code/dist-web/assets/Tooltip-B67PeCrl.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/arc-Dbai0Lk-.js renamed to apps/pythinker-code/dist-web/assets/arc-DcJEsGTv.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/pythinker-code/dist-web/assets/architectureDiagram-3BPJPVTR-Cove-SWN.js renamed to apps/pythinker-code/dist-web/assets/architectureDiagram-3BPJPVTR-D0usObfC.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)