Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions apps/desktop/e2e/prompt-rail.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ test('the first click of a session lands on its prompt and holds', async ({
expect((await landing())?.offset).toBeLessThan(24);
expect((await landing())?.tickIsCurrent).toBe(true);

// And stays: the fill runs on idle callbacks after the jump, so a jump that
// only wins the first frame reads as landing and then sliding away.
// And stays: turns keep resolving their content and remeasuring after the
// jump, so a jump that only wins the first frame reads as landing and then
// sliding away.
await page.waitForTimeout(1_200);
const settled = await landing();
expect(settled?.offset).toBeGreaterThan(-24);
Expand All @@ -265,7 +266,7 @@ test('long transcripts keep a bounded mounted turn window', async ({
promptRailWindow: page,
}) => {
const count = async () => page.locator('[data-virtual-turn-id]').count();
await page.locator('[data-chat-scroll-container="true"][data-turn-window="ready"]').waitFor();
await page.locator('[data-virtual-turn-id]').first().waitFor();
await loadPromptRailBeyondVirtualWindow(page);
expect(await page.evaluate(() => {
const transcript = document.querySelector<HTMLElement>('.maka-chat-message-list');
Expand All @@ -288,8 +289,8 @@ test('long transcripts keep a bounded mounted turn window', async ({
test('evicting a turn-owned sibling interaction hands focus back to the transcript', async ({
promptRailWindow: page,
}) => {
const scroller = page.locator('[data-chat-scroll-container="true"][data-turn-window="ready"]');
await scroller.waitFor();
const scroller = page.locator('[data-chat-scroll-container="true"]');
await page.locator('[data-virtual-turn-id]').first().waitFor();
await loadPromptRailBeyondVirtualWindow(page);
await scrollTranscriptTo(page, 'bottom');
await expect(page.locator('[data-virtual-turn-id="turn-prompt-rail-120"]')).toHaveCount(1);
Expand Down
10 changes: 10 additions & 0 deletions apps/desktop/src/renderer/styles/chat-message.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@
width: 100%;
}

/* Inserting earlier turns above the reader must not move what they are
reading. The browser's scroll anchoring does exactly that, so state the
dependency on the scroller that runs it rather than inheriting the `auto`
default: Maka reads no geometry and restores no position of its own. The
one case anchoring declines is a scroller sitting at zero, compensated in
useChatScroll after the turns land. */
[data-chat-scroll-container='true'] {
overflow-anchor: auto;
}

.maka-turn-virtual-item {
display: flex;
width: 100%;
Expand Down
293 changes: 0 additions & 293 deletions packages/ui/src/__tests__/arrival-bottom-pin.test.ts

This file was deleted.

Loading