mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-10 10:25:03 +00:00
* fix(app): rest the iPhone composer at the screen's bottom clearance The composer sat 50pt above the bottom edge on every iPhone: the dock padded the rectangular home-indicator safe area (34pt) and the composer stacked another 16pt under it. On iPhone Duo that safe area is also taller than needed; iOS 27.1's bottom-bar layout guide, which follows the screen's corners, rests 26pt from the edge. The native window-layout probe now publishes that clearance, and WindowLayoutProvider overrides the safe-area context's bottom with it, so every useSafeAreaInsets() consumer reads one bottom value and null falls back to the system inset. The docked composer applies max(bottom, 16) once and keeps 16pt above the keyboard through the translate view's transform; the gap is not animated as padding because layout updates through the keyboard transition are expensive on Android Fabric. Co-authored-by: Elsa Granger <zeyugao@outlook.com> * fix(app): keep the Import session gap under the wide new workspace composer The composer's own bottom spacing used to separate it from the Import session pill on the wide form. With that spacing moved to the dock, the centered slot padded below the pill instead, so the pill touched the composer. The pill now owns its gap above. Co-authored-by: Elsa Granger <zeyugao@outlook.com> --------- Co-authored-by: Elsa Granger <zeyugao@outlook.com>
54 lines
2.2 KiB
TypeScript
54 lines
2.2 KiB
TypeScript
import type { Locator } from "@playwright/test";
|
|
import { expect, test } from "../support/fixtures";
|
|
import { gotoAppShell } from "../support/helpers/app";
|
|
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
|
|
import { openNewWorkspaceComposer } from "../support/helpers/new-workspace";
|
|
import { seedWorkspace } from "../support/helpers/seed-client";
|
|
import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
|
|
|
|
async function box(locator: Locator) {
|
|
await expect(locator).toBeVisible({ timeout: 30_000 });
|
|
const rect = await locator.boundingBox();
|
|
expect(rect).not.toBeNull();
|
|
return { top: rect!.y, bottom: rect!.y + rect!.height };
|
|
}
|
|
|
|
test.describe("Composer bottom spacing", () => {
|
|
test("the chat composer rests one content spacing above the window edge", async ({ page }) => {
|
|
const agent = await seedMockAgentWorkspace({
|
|
repoPrefix: "composer-bottom-spacing-",
|
|
title: "Bottom spacing",
|
|
});
|
|
try {
|
|
await openAgentRoute(page, { workspaceId: agent.workspaceId, agentId: agent.agentId });
|
|
const surface = await box(
|
|
page.getByTestId("message-input-root").filter({ visible: true }).first(),
|
|
);
|
|
const viewportHeight = await page.evaluate(() => window.innerHeight);
|
|
expect(viewportHeight - surface.bottom).toBe(16);
|
|
} finally {
|
|
await agent.cleanup();
|
|
}
|
|
});
|
|
|
|
test("the wide new workspace form keeps one content spacing above Import session", async ({
|
|
page,
|
|
}) => {
|
|
const workspace = await seedWorkspace({ repoPrefix: "composer-bottom-spacing-form-" });
|
|
try {
|
|
await page.setViewportSize({ width: 1440, height: 900 });
|
|
await gotoAppShell(page);
|
|
await waitForSidebarHydration(page);
|
|
await openNewWorkspaceComposer(page, {
|
|
projectKey: workspace.projectKey,
|
|
projectDisplayName: workspace.projectDisplayName,
|
|
});
|
|
const composer = await box(page.locator('[data-testid="message-input-root"]:visible'));
|
|
const importButton = await box(page.getByTestId("new-workspace-import-session"));
|
|
expect(importButton.top - composer.bottom).toBe(16);
|
|
} finally {
|
|
await workspace.cleanup();
|
|
}
|
|
});
|
|
});
|