commit bdc7e74c9343ac27d0d6f67688f23a3dc3bc100a
parent 2408a1ea710c0e45c67acf60faa452d21af55502
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 05:27:32 -0400
umtool: ⌘K jumps to research cases too (c:<case>, its board)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/umtool/app/api/jump/route.ts b/umtool/app/api/jump/route.ts
@@ -1,23 +1,29 @@
import { listPieces } from "@/lib/pieces";
+import { listCases } from "@/lib/research/boards";
+import { researchCaseHref } from "@/lib/research/hrefs";
export const dynamic = "force-dynamic";
// What the ⌘K palette can jump to that is not a fixed place: every piece, as
-// { id, title, href, kind, stage, lifecycle }. The places, tools and create
-// actions are the palette's own (components/shell/JumpPalette.tsx).
+// { id, title, href, kind, stage, lifecycle }, and every research case (R2:
+// `c:<case>`, its board). The places, tools and create actions are the
+// palette's own (components/shell/JumpPalette.tsx).
export async function GET() {
- const pieces = await listPieces();
+ const [pieces, cases] = await Promise.all([listPieces(), listCases().catch(() => [])]);
return Response.json(
{
- pieces: pieces.map((p) => ({
- id: p.id,
- title: p.title,
- href: p.href,
- kind: p.kind,
- site: p.site,
- stage: p.stage,
- lifecycle: p.lifecycle,
- })),
+ pieces: [
+ ...pieces.map((p) => ({
+ id: p.id,
+ title: p.title,
+ href: p.href,
+ kind: p.kind,
+ site: p.site,
+ stage: p.stage,
+ lifecycle: p.lifecycle,
+ })),
+ ...cases.map((c) => ({ id: c.piece, title: c.title, href: researchCaseHref(c.id), kind: "case", site: null, stage: "research", lifecycle: "active" })),
+ ],
},
{ headers: { "cache-control": "no-store" } },
);