Remove recordings feature, replay sessions directly, bump to 0.6.0
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:
@@ -2,18 +2,16 @@ import type { Metadata } from "next";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { SessionsSummaryCards } from "@/components/stats/SessionsSummaryCards";
|
||||
import { DeviceUsageTable } from "@/components/stats/DeviceUsageTable";
|
||||
import { RecordingLibraryStats } from "@/components/stats/RecordingLibraryStats";
|
||||
import { getDeviceCommandCounts, getDeviceUsageStats, getRecordingLibraryStats, getSessionsSummary } from "@/lib/db/queries/stats";
|
||||
import { getDeviceCommandCounts, getDeviceUsageStats, getSessionsSummary } from "@/lib/db/queries/stats";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
export const metadata: Metadata = { title: "Stats" };
|
||||
|
||||
export default async function StatsPage() {
|
||||
const [sessionsSummary, deviceUsage, commandCounts, recordingStats] = await Promise.all([
|
||||
const [sessionsSummary, deviceUsage, commandCounts] = await Promise.all([
|
||||
getSessionsSummary(),
|
||||
getDeviceUsageStats(),
|
||||
getDeviceCommandCounts(),
|
||||
getRecordingLibraryStats(),
|
||||
]);
|
||||
|
||||
const commandCountByDevice = new Map(commandCounts.map((c) => [c.deviceId, c.commandCount]));
|
||||
@@ -23,14 +21,13 @@ export default async function StatsPage() {
|
||||
<div className="flex flex-col gap-6">
|
||||
<div>
|
||||
<h1 className="font-heading text-2xl font-semibold">Stats</h1>
|
||||
<p className="text-sm text-muted-foreground">Usage across sessions, devices, and your recording library.</p>
|
||||
<p className="text-sm text-muted-foreground">Usage across sessions and devices.</p>
|
||||
</div>
|
||||
|
||||
<Tabs defaultValue="sessions">
|
||||
<TabsList className="bp-glass">
|
||||
<TabsTrigger value="sessions">Sessions</TabsTrigger>
|
||||
<TabsTrigger value="devices">Devices</TabsTrigger>
|
||||
<TabsTrigger value="recordings">Recordings</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="sessions" className="pt-4">
|
||||
<SessionsSummaryCards summary={sessionsSummary} />
|
||||
@@ -38,9 +35,6 @@ export default async function StatsPage() {
|
||||
<TabsContent value="devices" className="pt-4">
|
||||
<DeviceUsageTable devices={devices} />
|
||||
</TabsContent>
|
||||
<TabsContent value="recordings" className="pt-4">
|
||||
<RecordingLibraryStats stats={recordingStats} />
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user