дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 03:05:40 +02:00
fix(app): keep update progress visible on the welcome screen (#951)
Check for Updates on the welcome screen showed nothing while the request was out: the check ran only as a status-bar task, and the welcome screen has no status bar. Leaving a project also dropped every notification, including a running update download. A check started with no project or LightEdit window open now shows its progress in a balloon (keyed like the result, so the result replaces it); project windows keep it in the status bar. A project switch clears only project notifications and keeps the app-wide update ones. Co-authored-by: youngtseup <[email protected]>
Цей коміт міститься в:
1 джерело
843ff74d5d
коміт
c50d212a1d
5 files changed
+64
-4
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { useProject } from "@/platform/project";
|
||||
import { activateWorkbench } from "./activate";
|
||||
import { notify, useNotifications } from "./notificationStore";
|
||||
|
||||
afterEach(() => {
|
||||
useNotifications.setState({ items: [] });
|
||||
useProject.setState({ project: null, lightEdit: false });
|
||||
});
|
||||
|
||||
describe("notifications across project changes", () => {
|
||||
it("keeps app-level update notifications and drops project ones", () => {
|
||||
useProject.setState({
|
||||
project: { root: "/p", name: "p", trusted: true, isGit: false, settings: {} } as never,
|
||||
});
|
||||
const dispose = activateWorkbench();
|
||||
try {
|
||||
notify({ level: "info", title: "Downloading OpenIDEA 0.1.35", key: "app.update", sticky: true });
|
||||
notify({ level: "info", title: "Git refresh failed", group: "vcs" });
|
||||
useProject.setState({ project: null });
|
||||
expect(useNotifications.getState().items.map((n) => n.title)).toEqual(["Downloading OpenIDEA 0.1.35"]);
|
||||
} finally {
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Заблокувати користувача