Compare commits

...

5 commits

Author SHA1 Message Date
Codex Review Integration
ae255f59a6 fix(team-members): destructure load error prop (SH-324) 2026-09-16 22:58:46 -03:00
Codex Review Integration
9160dd472a test(work-orders): refresh startup visual baselines (SH-324) 2026-09-16 22:53:03 -03:00
Codex Review Integration
a4ce537ed6 test(work-orders): tolerate cold visual page startup (SH-324) 2026-09-16 22:50:55 -03:00
Codex Review Integration
4bee428c71 test(team-members): refresh sidebar visual baselines (SH-324) 2026-09-16 22:39:09 -03:00
Codex Review Integration
1df3e5d292 fix(team-members): render load failures distinctly (SH-324) 2026-09-16 22:38:53 -03:00
19 changed files with 33 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 189 KiB

View file

@ -204,6 +204,12 @@ async function openWorkOrderPage(page: Page, mode: "default" | "empty" | "error"
});
}
async function expectWorkOrderPageReady(page: Page) {
await expect(page.getByRole("heading", { name: "Work Orders" })).toBeVisible({
timeout: 90_000,
});
}
async function expectStableScreenshot(page: Page, name: string) {
await page.waitForTimeout(250);
await page.evaluate(
@ -217,15 +223,18 @@ async function expectStableScreenshot(page: Page, name: string) {
}
test.describe("Work Orders deterministic pixel regression", () => {
test.setTimeout(120_000);
test("list", async ({ page }) => {
await openWorkOrderPage(page);
await expect(page.getByRole("heading", { name: "Work Orders" })).toBeVisible();
await expectWorkOrderPageReady(page);
await expect(page.getByText("WO-501").first()).toBeVisible();
await expectStableScreenshot(page, "wo-list.png");
});
test("filters", async ({ page }) => {
await openWorkOrderPage(page);
await expectWorkOrderPageReady(page);
await page.getByRole("button", { name: "Advanced Filters" }).click();
await expect(page.getByRole("dialog", { name: "Advanced Filters" })).toBeVisible();
await expectStableScreenshot(page, "wo-filters.png");
@ -233,6 +242,7 @@ test.describe("Work Orders deterministic pixel regression", () => {
test("new", async ({ page }) => {
await openWorkOrderPage(page);
await expectWorkOrderPageReady(page);
await page.getByRole("button", { name: "New WO" }).click();
await expect(page.getByRole("heading", { name: "Type & schedule" })).toBeVisible();
await expectStableScreenshot(page, "wo-new.png");
@ -240,6 +250,7 @@ test.describe("Work Orders deterministic pixel regression", () => {
test("detail", async ({ page }) => {
await openWorkOrderPage(page);
await expectWorkOrderPageReady(page);
const row = page.locator("#wo-row-1");
await row.hover();
await row.getByRole("button", { name: "View details" }).click();
@ -249,7 +260,7 @@ test.describe("Work Orders deterministic pixel regression", () => {
test("empty", async ({ page }) => {
await openWorkOrderPage(page, "empty");
await expect(page.getByRole("heading", { name: "Work Orders" })).toBeVisible();
await expectWorkOrderPageReady(page);
await page.getByLabel("Search work orders").fill("zz");
await expect(page.getByText("No work orders match your search")).toBeVisible();
await expectStableScreenshot(page, "wo-empty.png");
@ -257,7 +268,7 @@ test.describe("Work Orders deterministic pixel regression", () => {
test("error", async ({ page }) => {
await openWorkOrderPage(page, "error");
await expect(page.getByRole("heading", { name: "Work Orders" })).toBeVisible();
await expectWorkOrderPageReady(page);
const alert = page.getByRole("main").getByRole("alert");
await expect(alert).toBeVisible();
await expect(alert).toContainText(/server error/i);
@ -267,6 +278,7 @@ test.describe("Work Orders deterministic pixel regression", () => {
test("mobile", async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 });
await openWorkOrderPage(page);
await expectWorkOrderPageReady(page);
await expect(page.getByText("WO-501").first()).toBeVisible();
await expectStableScreenshot(page, "wo-mobile.png");

View file

@ -22,11 +22,13 @@ function memberStatusLabel(status: TeamMemberListItem["status"]) {
export function TeamMembersTable({
rows,
isLoading,
hasError,
tab,
onOpen,
}: {
rows: TeamMemberListItem[];
isLoading: boolean;
hasError: boolean;
tab: "active" | "inactive";
onOpen: (member: TeamMemberListItem) => void;
}) {
@ -52,6 +54,15 @@ export function TeamMembersTable({
<CircularProgress size={28} />
</TableCell>
</TableRow>
) : hasError ? (
<TableRow>
<TableCell colSpan={8} align="center" sx={{ py: 8 }}>
<Typography sx={{ fontWeight: 600 }}>Unable to load team members</Typography>
<Typography variant="body2" color="text.secondary">
Check your connection and try again.
</Typography>
</TableCell>
</TableRow>
) : rows.length === 0 ? (
<TableRow>
<TableCell colSpan={8} align="center" sx={{ py: 8 }}>

View file

@ -152,7 +152,13 @@ export default function TeamMembersListPage() {
)}
<Box sx={{ flex: 1, overflow: "auto", p: 2 }}>
<TeamMembersTable rows={rows} isLoading={isLoading} tab={tab} onOpen={setSelectedMember} />
<TeamMembersTable
rows={rows}
isLoading={isLoading}
hasError={Boolean(error)}
tab={tab}
onOpen={setSelectedMember}
/>
</Box>
<Stack