Skip to content

fix(sidebar): add dynamic export to group-order route to prevent static caching#660

Merged
Kewton merged 2 commits intodevelopfrom
feature/651-worktree
Apr 14, 2026
Merged

fix(sidebar): add dynamic export to group-order route to prevent static caching#660
Kewton merged 2 commits intodevelopfrom
feature/651-worktree

Conversation

@Kewton
Copy link
Copy Markdown
Owner

@Kewton Kewton commented Apr 14, 2026

Summary

  • /api/sidebar/group-orderexport const dynamic = 'force-dynamic' を追加
  • 原因: Next.js がビルド時に GET ハンドラを静的プリレンダリングし .next/server/app/api/sidebar/group-order.body にキャッシュしていた。これにより PUT リクエストが App Router ハンドラに届かず Pages Router の 405 エラーになっていた
  • 修正: force-dynamic を追加することでルートを常にサーバーサイドで実行し、GET/PUT 両方が正常に動作するようになった

Test plan

  • グループをドラッグ&ドロップで並べ替えできる
  • リロード後も順序が保持される (GET /api/sidebar/group-order が保存済み順序を返す)
  • スマホ・別ブラウザからアクセスしても同じ順序が適用される
  • 全ユニットテストがパス (npm run test:unit)

🤖 Generated with Claude Code

Kewton and others added 2 commits April 14, 2026 11:22
…ic 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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
@Kewton Kewton merged commit 621aa14 into develop Apr 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant