release: publish v2.0.19 sidebar interaction fixes

Restore the shared sliding-selection transition after React StrictMode effect restarts, disable redundant service filters, add regression coverage, and update the public English changelog and package metadata for v2.0.19.
This commit is contained in:
Sucukdeluxe
2026-08-11 02:49:41 +02:00
parent ef5c20c8df
commit 14090011e3
7 changed files with 73 additions and 9 deletions
+28
View File
@@ -1,6 +1,34 @@
import { describe, expect, it } from "vitest";
describe("sliding selection scheduling", () => {
it("re-arms transitions when a StrictMode effect cleanup cancels the first frame", async () => {
const selectionModule = await import("../src/renderer/ui/SlidingSelection");
const schedule = Reflect.get(selectionModule, "scheduleSelectionTransitions");
expect(schedule).toBeTypeOf("function");
let transitionsEnabled = false;
let nextFrame = 0;
const pending = new Map<number, FrameRequestCallback>();
const requestFrame = (callback: FrameRequestCallback): number => {
nextFrame += 1;
pending.set(nextFrame, callback);
return nextFrame;
};
const cancelFrame = (frame: number): void => {
pending.delete(frame);
};
const firstFrame = schedule(false, 0, () => { transitionsEnabled = true; }, requestFrame, cancelFrame);
cancelFrame(firstFrame);
const secondFrame = schedule(false, 0, () => { transitionsEnabled = true; }, requestFrame, cancelFrame);
expect(transitionsEnabled).toBe(false);
expect(pending.has(firstFrame)).toBe(false);
pending.get(secondFrame)?.(0);
expect(transitionsEnabled).toBe(true);
});
it("applies the first mounted selection before scheduling later movements", async () => {
const selectionModule = await import("../src/renderer/ui/SlidingSelection");
const schedule = Reflect.get(selectionModule, "scheduleSelectionLayout");