mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Constrain shared agent catalog details
This commit is contained in:
@@ -102,7 +102,7 @@ export function PersonaCatalogDialog({
|
||||
<Dialog onOpenChange={onOpenChange} open={open}>
|
||||
<ChooserDialogContent
|
||||
className="h-[42rem] max-w-4xl"
|
||||
contentClassName="flex min-h-0 flex-1 p-0"
|
||||
contentClassName="flex min-h-0 min-w-0 flex-1 p-0"
|
||||
data-testid="persona-catalog-dialog"
|
||||
description={personaCatalogCopy.dialogDescription}
|
||||
headerClassName="bg-sidebar pb-3 text-sidebar-foreground"
|
||||
|
||||
@@ -1305,7 +1305,12 @@ test("custom personas can be shared to the relay catalog", async ({ page }) => {
|
||||
|
||||
\`\`\`text
|
||||
This deliberately long fenced-code example must not establish the minimum width of the full custom-agent instruction document or force earlier prose outside the catalog detail pane.
|
||||
\`\`\``,
|
||||
\`\`\`
|
||||
|
||||
| Before | After | Why |
|
||||
| --- | --- | --- |
|
||||
| \`transition: all 300ms\` | \`transition: transform 200ms ease-out\` | Specify exact properties so a wide instruction table stays independently scrollable without expanding the full catalog detail pane. |
|
||||
| \`transform: scale(0)\` | \`transform: scale(0.95); opacity: 0\` | Preserve physicality while keeping the shared agent instructions inside their container. |`,
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -1342,8 +1347,19 @@ This deliberately long fenced-code example must not establish the minimum width
|
||||
page.getByTestId(`persona-catalog-list-item-${personaId}`),
|
||||
).toContainText("Catalog Analyst");
|
||||
await selectCatalogPersona(page, personaId);
|
||||
const catalogDialog = page.getByTestId("persona-catalog-dialog");
|
||||
const catalogDetailPane = page.getByTestId("persona-catalog-detail-pane");
|
||||
await expect(catalogDetailPane).toContainText("Design System And Styling");
|
||||
await expect(catalogDialog).toBeVisible();
|
||||
await expect(catalogDetailPane).toBeVisible();
|
||||
await waitForAnimations(page);
|
||||
const [catalogDialogRight, catalogDetailPaneRight] = await Promise.all([
|
||||
catalogDialog.evaluate((element) => element.getBoundingClientRect().right),
|
||||
catalogDetailPane.evaluate(
|
||||
(element) => element.getBoundingClientRect().right,
|
||||
),
|
||||
]);
|
||||
expect(catalogDetailPaneRight).toBeLessThanOrEqual(catalogDialogRight);
|
||||
expect(
|
||||
await catalogDetailPane.evaluate(
|
||||
(element) => element.scrollWidth - element.clientWidth,
|
||||
|
||||
Reference in New Issue
Block a user