Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(appshot): fold the gallery to two rows instead of three

rubenluetke10-beepf312c94dc4b9
diff --git a/jarvis/ui/web/frontend/src/views/AppshotLibrary.test.tsx b/jarvis/ui/web/frontend/src/views/AppshotLibrary.test.tsx
index 9f5239278e..742cecc74d 100644
--- a/jarvis/ui/web/frontend/src/views/AppshotLibrary.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/AppshotLibrary.test.tsx
@@ -83,8 +83,8 @@ describe("AppshotLibrary", () => {
vi.unstubAllGlobals();
});
- it("shows three full rows first, then more and less on request", async () => {
- // Four columns fit: three rows are twelve tiles.
+ it("shows two full rows first, then more and less on request", async () => {
+ // Four columns fit: two rows are eight tiles.
const realStyle = window.getComputedStyle.bind(window);
vi.spyOn(window, "getComputedStyle").mockImplementation((element, pseudo) => {
const style = realStyle(element, pseudo);
@@ -93,7 +93,7 @@ describe("AppshotLibrary", () => {
});
items = Array.from({ length: 30 }, (_, index) => ({ ...ORIGINAL, id: `p${index}`, has_edit: false }));
render(<AppshotLibrary enabled refreshKey="" />);
- await waitFor(() => expect(screen.getAllByTestId("appshot-library-tile")).toHaveLength(12));
+ await waitFor(() => expect(screen.getAllByTestId("appshot-library-tile")).toHaveLength(8));
expect(screen.queryByTestId("appshot-library-less")).toBeNull();
fireEvent.click(screen.getByTestId("appshot-library-more"));
@@ -101,7 +101,7 @@ describe("AppshotLibrary", () => {
expect(screen.queryByTestId("appshot-library-more")).toBeNull();
fireEvent.click(screen.getByTestId("appshot-library-less"));
- expect(screen.getAllByTestId("appshot-library-tile")).toHaveLength(12);
+ expect(screen.getAllByTestId("appshot-library-tile")).toHaveLength(8);
vi.restoreAllMocks();
});
diff --git a/jarvis/ui/web/frontend/src/views/AppshotLibrary.tsx b/jarvis/ui/web/frontend/src/views/AppshotLibrary.tsx
index aae5bedb88..3219117867 100644
--- a/jarvis/ui/web/frontend/src/views/AppshotLibrary.tsx
+++ b/jarvis/ui/web/frontend/src/views/AppshotLibrary.tsx
@@ -38,7 +38,7 @@ import { useEventStore } from "@/store/events";
type Filter = "all" | "edited";
/** Rows shown while the gallery is folded; "Show more" opens the rest. */
-const ROWS = 3;
+const ROWS = 2;
/** Tiles each further "Show more" adds; the grid stays light with 500 kept. */
const PAGE = 48;
/** Columns assumed until the grid has been measured (and where it cannot be). */