Remove recordings feature, replay sessions directly, bump to 0.6.0
CI / Build and push image (push) Successful in 1m41s
CI / Static checks (push) Successful in 2m12s

Recordings were just a thin named pointer over an already-captured
session's events, so the whole separate feature (recordings table, API
routes, pages, UI) is gone: any completed session can now be named and
replayed directly. Replaying no longer creates a session or duplicates
events of its own - it just bumps the source session's playCount/lastPlayedAt.

Also renames play_sessions/playSession(s) to sessions/session(s) throughout
the schema, queries, API routes, and UI for consistency, and updates the
README to match the new flow.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-27 21:38:51 +02:00
co-authored by Claude Sonnet 5
parent 2a3c4ff1f2
commit 401b9b5033
46 changed files with 1710 additions and 1018 deletions
+30
View File
@@ -0,0 +1,30 @@
import { NextResponse } from "next/server";
import { z } from "zod";
import { listSessions, startSession } from "@/lib/db/queries/sessions";
import { withRouteLogging } from "@/lib/api/with-route-logging";
const deviceInputSchema = z.object({
slotLabel: z.string().min(1),
bleName: z.string().min(1),
deviceClass: z.string().nullish(),
capabilities: z.object({ outputs: z.array(z.string()), featureCount: z.number() }).optional(),
});
const bodySchema = z.object({
name: z.string().min(1).optional(),
devices: z.array(deviceInputSchema).min(1),
});
export const GET = withRouteLogging("sessions.list", async () => {
const rows = await listSessions();
return NextResponse.json({ sessions: rows });
});
export const POST = withRouteLogging("sessions.start", async (req: Request) => {
const parsed = bodySchema.safeParse(await req.json().catch(() => null));
if (!parsed.success) {
return NextResponse.json({ error: parsed.error.message }, { status: 400 });
}
const result = await startSession(parsed.data);
return NextResponse.json(result, { status: 201 });
});