mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-07 17:04:42 +00:00
* feat(app): add chat outline navigation Long agent sessions need prompt navigation without coupling viewport movement to disposable server windows. Keep fetched timeline pages in client state so repeated jumps stay local, and settle prompt jumps against virtualized row measurement changes. * fix(app): preserve chat outline timeline coverage * fix(app): reconcile outline window submissions * fix(app): harden outline timeline navigation
24 lines
756 B
TypeScript
24 lines
756 B
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
import { returnToTimelineTail } from "./timeline-tail-navigation";
|
|
|
|
describe("returnToTimelineTail", () => {
|
|
it("reports a failed fetch without scrolling or rejecting", async () => {
|
|
const scrollToBottom = vi.fn();
|
|
const onError = vi.fn();
|
|
const logError = vi.fn();
|
|
|
|
await expect(
|
|
returnToTimelineTail({
|
|
fetchTail: () => Promise.reject(new Error("disconnected")),
|
|
scrollToBottom,
|
|
onError,
|
|
logError,
|
|
}).then(() => ({
|
|
scrolled: scrollToBottom.mock.calls.length,
|
|
errors: onError.mock.calls.length,
|
|
warnings: logError.mock.calls.length,
|
|
})),
|
|
).resolves.toEqual({ scrolled: 0, errors: 1, warnings: 1 });
|
|
});
|
|
});
|