From aa05cbdde515511433acb17f14f19d7625371ac6 Mon Sep 17 00:00:00 2001 From: kewton Date: Tue, 14 Apr 2026 11:22:54 +0900 Subject: [PATCH 1/2] fix(sidebar): add dynamic export to group-order route to prevent static caching Next.js statically pre-rendered the GET handler at build time, storing the response in .next/server/app/api/sidebar/group-order.body. This caused PUT requests to fall through to the Pages Router 405 handler instead of reaching the App Router handler. Adding `export const dynamic = 'force-dynamic'` ensures the route is always server-rendered on demand, so both GET and PUT are handled by the route module. Co-Authored-By: Claude Sonnet 4.6 --- src/app/api/sidebar/group-order/route.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/api/sidebar/group-order/route.ts b/src/app/api/sidebar/group-order/route.ts index 43097603..31e48b71 100644 --- a/src/app/api/sidebar/group-order/route.ts +++ b/src/app/api/sidebar/group-order/route.ts @@ -3,6 +3,9 @@ * PUT /api/sidebar/group-order — save repository group order */ +// Disable static caching so GET always reads from DB and PUT is never 405-blocked +export const dynamic = 'force-dynamic'; + import { NextResponse } from 'next/server'; import { getDbInstance } from '@/lib/db/db-instance'; import { getSidebarGroupOrder, setSidebarGroupOrder } from '@/lib/db/app-settings-db'; From 7fe0e4c0ca480d8fa41963516516e57aff68f0c9 Mon Sep 17 00:00:00 2001 From: kewton Date: Tue, 14 Apr 2026 11:29:31 +0900 Subject: [PATCH 2/2] feat(sidebar): show full description in branch tooltip Previously the tooltip only showed branch name, repo name, status, and worktree path. Description was only visible inline with line-clamp-2. Changes: - Add description field to BranchTooltip (full text, no truncation) - Remove global whitespace-nowrap; apply it per-line for header rows - Add max-w-sm to tooltip to prevent overflow on very long descriptions - Use whitespace-pre-wrap + break-words so line breaks in description are preserved Co-Authored-By: Claude Sonnet 4.6 --- src/components/sidebar/BranchListItem.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/sidebar/BranchListItem.tsx b/src/components/sidebar/BranchListItem.tsx index 75924fe2..fe7d9959 100644 --- a/src/components/sidebar/BranchListItem.tsx +++ b/src/components/sidebar/BranchListItem.tsx @@ -96,7 +96,7 @@ function BranchTooltip({ fixed z-[9999] px-3 py-2 rounded-md shadow-lg bg-gray-950 text-xs text-gray-200 border border-gray-700 - whitespace-nowrap pointer-events-none + pointer-events-none max-w-sm transition-opacity duration-150 " style={{ @@ -105,11 +105,16 @@ function BranchTooltip({ opacity: isVisible ? 1 : 0, }} > -

{branch.name}

-

{branch.repositoryName}

-

Status: {branch.status}

+

{branch.name}

+

{branch.repositoryName}

+

Status: {branch.status}

{branch.worktreePath && ( -

{branch.worktreePath}

+

{branch.worktreePath}

+ )} + {branch.description && ( +

+ {branch.description} +

)} , document.body