You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix resize repaint gaps and initial view sizing (#1039)
* Fix resize repaint gaps and initial view sizing
The post-resize invalidate block repainted the title bar, content and
env-select popup but skipped the progress view, even though it gets
re-bounded on every resize. On the platforms that need the explicit
invalidate that left the progress view stale until the next paint, so
it now gets invalidated alongside the others.
The title bar and welcome view were laid out from the compile-time
DEFAULT_WIN_* constants at load time. A session restored at a larger or
maximized size then rendered mis-sized for a frame until the first
resize corrected it. Both now read the live size from getContentBounds,
mirroring what _resizeViews already does.
The update check parsed the release feed body with no status check, so a
5xx or an HTML error page went straight into yaml.load and could be
mistaken for metadata. It now fails fast on a non-ok response and guards
that the parsed version is a valid semver before comparing, which routes
a bad response cleanly to the existing error dialog on the 'always' path
instead of comparing against garbage.
Also leave a note by the dialog toolkit script so nobody extends the
CommonJS interop shim to it: the toolkit is a UMD bundle that branches on
typeof exports and faking exports there takes down every jp-* component.
I wrote and verified these with Claude Code: tsc clean, the full unit
suite green, and a focused test that a non-ok update response never
reaches the body parse (fails before the status check, passes after).
* test: sort the vitest named imports to satisfy eslint
The installer CI runs eslint:check before building and the sort-imports rule
rejected the unsorted import in the new checkForUpdates test, failing the Linux
job (and cancelling the others). Order the members alphabetically.
* fix: share title bar bounds between load and resize
The initial bounds in load() spanned the full content width with no inset,
while _resizeViews() insets by 1px on non-macOS, so the title bar gapped by a
pixel on the first paint until the first resize corrected it. Compute the
bounds once in _titleBarBounds() and use it from both so the first paint
matches every later resize.
Note: AI-assisted (Claude Code). Manually verified: tsc and eslint clean, added a unit test for the macOS and non-macOS rects and confirmed it fails when the inset is removed.
Copy file name to clipboardExpand all lines: src/main/dialog/themedwindow.ts
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,7 @@ export class ThemedWindow {
106
106
overflow-y: auto;
107
107
}
108
108
</style>
109
+
<!-- do not prepend the cjsInteropShim here: the toolkit is a UMD bundle that branches on typeof exports, so faking exports breaks every jp-* component -->
0 commit comments