Commit 535b2a9
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
- .changeset
- apps
- pythinker-code/dist-web
- assets
- pythinker-web
- src
- components
- i18n/locales/en
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments