Flag models deleted from the Hub; tag picker, tags in settings, account menu

- Worker checks each model's repo and pinned commit on the Hub every
  UPDATE_CHECK_INTERVAL_HOURS and after failed downloads; missing repos or
  commits are flagged (badge, banner, Status filter) and block new
  downloads. Local files are never touched. "Check now" on the model page.
- Tag picker dropdown ("Create new tag…" first, then existing tags) on the
  model page and in Add model.
- Settings: separate File labels and Tags pages; create tags there. Unused
  tags are no longer deleted automatically.
- Header: app icon, nav with active state, account menu with the OIDC
  profile picture, theme switch and sign out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-05 22:53:57 +02:00
1 parent df18415e02
commit 3603742637
33 files changed
+1708 -122

No files matched your search

@@ -0,0 +1,12 @@
import { NextResponse } from "next/server";
import { withAuth } from "@/lib/api-auth";
import { apiError } from "@/lib/api-errors";
import { checkHubAvailability, getCheckedModel } from "@/lib/hub/availability";
/** Check right now whether the repo and pinned commit are still on the Hub. */
export const POST = withAuth<RouteContext<"/api/models/[id]/hub-check">>(async (_req, { params }) => {
const { id } = await params;
const model = await getCheckedModel(id);
if (!model) return apiError(404, "not_found", "Model not found.");
return NextResponse.json(await checkHubAvailability(model));
});
+15 -1
View File
@@ -1,8 +1,22 @@
import { NextResponse } from "next/server";
import { z } from "zod";
import { withAuth } from "@/lib/api-auth";
import { listTags } from "@/lib/tags";
import { apiError, handleApiError } from "@/lib/api-errors";
import { createTag, listTags, TagError } from "@/lib/tags";
export const dynamic = "force-dynamic";
/** All user tags with usage counts. */
export const GET = withAuth(async () => NextResponse.json(await listTags()));
const Body = z.object({ name: z.string(), color: z.string().nullable().optional() });
/** Create a tag that isn't on any model yet. */
export const POST = withAuth(async (req) => {
try {
return NextResponse.json(await createTag(Body.parse(await req.json())), { status: 201 });
} catch (err) {
if (err instanceof TagError) return apiError(err.status, err.code, err.message);
return handleApiError(err);
}
});