Skip to content

Commit 153e676

Browse files
OpenSource03claude
andcommitted
fix: use sidebar width constant in AppSidebar and bump to 280px
- Replace hardcoded w-[280px] class with APP_SIDEBAR_WIDTH constant via style prop - Bump APP_SIDEBAR_WIDTH from 260 to 280 for better sidebar spacing - Update layout-constants tests for new width values Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1fbf63b commit 153e676

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

electron/src/lib/__tests__/layout-constants.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ describe("layout constants", () => {
2424
});
2525

2626
it("computes the bootstrap window minimum width for each platform", () => {
27-
expect(APP_SIDEBAR_WIDTH).toBe(260);
27+
expect(APP_SIDEBAR_WIDTH).toBe(280);
2828
expect(ISLAND_LAYOUT_MARGIN).toBe(16);
2929
expect(WINDOWS_FRAME_BUFFER_WIDTH).toBe(16);
30-
expect(getBootstrapMinWindowWidth("darwin")).toBe(1664);
31-
expect(getBootstrapMinWindowWidth("win32")).toBe(1680);
30+
expect(getBootstrapMinWindowWidth("darwin")).toBe(1684);
31+
expect(getBootstrapMinWindowWidth("win32")).toBe(1700);
3232
});
3333
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "harnss",
3-
"version": "0.17.0",
3+
"version": "0.17.1",
44
"productName": "Harnss",
55
"description": "Harness your AI coding agents — one desktop app for Claude Code, Codex, and any ACP agent",
66
"author": {

src/components/AppSidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { isMac } from "@/lib/utils";
44
import { Button } from "@/components/ui/button";
55
import { ScrollArea } from "@/components/ui/scroll-area";
66
import type { ChatSession, Project, Space } from "@/types";
7+
import { APP_SIDEBAR_WIDTH } from "@/lib/layout-constants";
78
import { SidebarSearch } from "./SidebarSearch";
89
import { SpaceBar } from "./SpaceBar";
910
import { UpdateBanner } from "./UpdateBanner";
@@ -162,8 +163,9 @@ export const AppSidebar = memo(function AppSidebar({
162163
return (
163164
<div
164165
className={`flex shrink-0 flex-col overflow-hidden bg-sidebar transition-[width] duration-200 ${
165-
isOpen ? "w-[280px] ps-2" : "w-0"
166+
isOpen ? "ps-2" : ""
166167
}`}
168+
style={{ width: isOpen ? APP_SIDEBAR_WIDTH : 0 }}
167169
>
168170
<div
169171
className={`drag-region flex h-[52px] items-center gap-2 pe-3 ${isMac ? "ps-[84px]" : "ps-2"}`}

src/lib/layout-constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const MIN_CHAT_WIDTH_ISLAND = 828;
22
export const MIN_CHAT_WIDTH_FLAT = 828;
33
export const BOTTOM_CHAT_MAX_WIDTH_CLASS = "max-w-[61.5rem]";
44
export const CHAT_INPUT_MAX_WIDTH_CLASS = BOTTOM_CHAT_MAX_WIDTH_CLASS;
5-
export const APP_SIDEBAR_WIDTH = 260;
5+
export const APP_SIDEBAR_WIDTH = 280;
66
export const ISLAND_LAYOUT_MARGIN = 16;
77
export const WINDOWS_FRAME_BUFFER_WIDTH = 16;
88

0 commit comments

Comments
 (0)