Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

refactor(app): compact canvas tools toggle

Louis Beaumont3fb4f29c9dad
diff --git a/apps/screenpipe-app-tauri/components/settings/__tests__/live-view-canvas.test.tsx b/apps/screenpipe-app-tauri/components/settings/__tests__/live-view-canvas.test.tsx
index 5fc6269d6..ab9d17a34 100644
--- a/apps/screenpipe-app-tauri/components/settings/__tests__/live-view-canvas.test.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/__tests__/live-view-canvas.test.tsx
@@ -158,6 +158,9 @@ describe("LiveViewCanvas", () => {
const toggle = screen.getByTestId("canvas-tools-toggle");
expect(toggle.getAttribute("aria-expanded")).toBe("false");
expect(toggle.getAttribute("aria-label")).toContain("select tool active");
+ expect(toggle.getAttribute("title")).toContain("select active");
+ expect(toggle.textContent).toBe("");
+ expect(toggle.className).toContain("w-8");
expect(screen.queryByTestId("canvas-tools-panel")).toBeNull();
expect(screen.getByTestId("canvas-interaction-hint")).toBeTruthy();
diff --git a/apps/screenpipe-app-tauri/components/settings/live-view-canvas.tsx b/apps/screenpipe-app-tauri/components/settings/live-view-canvas.tsx
index b6a9e339c..d59ccdb9f 100644
--- a/apps/screenpipe-app-tauri/components/settings/live-view-canvas.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/live-view-canvas.tsx
@@ -32,7 +32,6 @@ import {
import {
ArrowRight,
ChevronLeft,
- ChevronRight,
Hand,
LayoutGrid,
Maximize2,
@@ -1366,17 +1365,11 @@ export function LiveViewCanvas({
data-testid="canvas-tools-toggle"
aria-label={`open canvas tools. ${activeTool.label} tool active`}
aria-expanded="false"
- className="flex h-8 max-w-32 items-center gap-2 px-2 font-mono text-[10px] uppercase tracking-wide text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-foreground"
+ title={`open canvas tools · ${activeTool.label} active`}
+ className="flex h-8 w-8 items-center justify-center text-muted-foreground transition-colors hover:bg-foreground hover:text-background focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-foreground"
onClick={() => setToolsOpen(true)}
>
- <ActiveToolIcon
- className="h-3.5 w-3.5 shrink-0"
- aria-hidden="true"
- />
- <span className="truncate">
- {tool === "select" ? "tools" : activeTool.label}
- </span>
- <ChevronRight className="h-3 w-3 shrink-0" aria-hidden="true" />
+ <ActiveToolIcon className="h-4 w-4 shrink-0" aria-hidden="true" />
</button>
)}
</div>