fix(downloads): keep active priority menu stable

Treat the selected priority as a disabled no-op so clicking it no longer closes the context menu. Reorder packages consistently across high, normal, and low priority groups while preserving stable order within each group. Add regression coverage for all priority transitions and the active menu state.
This commit is contained in:
Sucukdeluxe
2026-08-15 03:23:24 +02:00
parent f4b9bc9f12
commit 135b2e7316
4 changed files with 104 additions and 13 deletions
+6
View File
@@ -1171,6 +1171,12 @@ describe("downloads view", () => {
});
describe("downloads App integration", () => {
it("keeps the priority menu open when the selected priority is already active", () => {
const source = readFileSync(new URL("../src/renderer/App.tsx", import.meta.url), "utf8").replaceAll("\r\n", "\n");
expect(source).toMatch(/disabled=\{allMatch\}[\s\S]{0,260}window\.rd\.setPackagePriority/);
});
it("updates the clipboard checkbox optimistically before IPC reconciliation", () => {
const source = readFileSync(new URL("../src/renderer/App.tsx", import.meta.url), "utf8").replaceAll("\r\n", "\n");