fix: scope inflight snapshots and compact mobile dashboard

This commit is contained in:
RockChinQ
2026-10-11 04:58:25 +00:00
parent 0b5b4cca59
commit 752e550b8f
5 changed files with 57 additions and 2 deletions
@@ -201,7 +201,7 @@ export default function MonitoringFilters({
onPipelinesChange([...next]);
};
return (
<div className="grid min-w-0 flex-1 grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5">
<div className="grid min-w-0 flex-1 grid-cols-2 gap-3 lg:grid-cols-5">
{/* Bot Filter */}
<div className="min-w-0 space-y-1.5">
<Label
+1 -1
View File
@@ -223,7 +223,7 @@ function MonitoringPageContent() {
<div className="w-full h-full overflow-y-auto overflow-x-hidden">
{/* Filters and Refresh Button - Sticky */}
{!error && (
<div className="sticky top-0 z-10 -mt-1 pb-5 pt-1 bg-background">
<div className="relative z-10 -mt-1 pb-3 pt-1 bg-background lg:sticky lg:top-0 lg:pb-5">
<div>
<Card className="flex flex-col gap-4 p-4 xl:flex-row xl:items-end">
<MonitoringFilters
+28
View File
@@ -0,0 +1,28 @@
import { expect, test } from '@playwright/test';
import { installLangBotApiMocks } from './fixtures/langbot-api';
for (const width of [375, 430]) {
test(`dashboard filters fit mobile ${width}`, async ({ page }) => {
await page.setViewportSize({ width, height: 812 });
await installLangBotApiMocks(page, { authenticated: true });
await page.goto('/home/monitoring');
const bot = page.getByRole('combobox', { name: 'Bot', exact: true });
await expect(bot).toBeVisible();
const grid = bot.locator('..').locator('..');
expect(
await grid.evaluate(
(el) => getComputedStyle(el).gridTemplateColumns.split(' ').length,
),
).toBe(2);
const box = await grid.boundingBox();
expect(box!.x).toBeGreaterThanOrEqual(0);
expect(box!.x + box!.width).toBeLessThanOrEqual(width);
await expect(
page.getByRole('button', { name: /Reset Filters/i }),
).toBeVisible();
await page.screenshot({
path: `test-results/dashboard-${width}.png`,
fullPage: true,
});
});
}