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

+4 -1
View File
@@ -2,6 +2,7 @@ import "server-only";
import { and, asc, desc, eq, gt, gte, inArray, isNull, or } from "drizzle-orm";
import { ulid } from "ulid";
import { db } from "@/lib/db/client";
import { hubMissingMessage } from "@/lib/hub/availability";
import {
ACTIVE_JOB_STATES,
type JobPurpose,
@@ -14,7 +15,7 @@ import {
export class JobError extends Error {
constructor(
public code: "not_found" | "busy" | "nothing_selected" | "not_cancellable",
public code: "not_found" | "busy" | "nothing_selected" | "not_cancellable" | "hub_missing",
message: string,
public status: number,
) {
@@ -30,6 +31,8 @@ export async function queueDownload(modelId: string, purpose: JobPurpose = "init
const d = db();
const model = await d.query.models.findFirst({ where: eq(models.id, modelId) });
if (!model) throw new JobError("not_found", "Model not found.", 404);
const missing = hubMissingMessage(model);
if (missing) throw new JobError("hub_missing", missing, 409);
const open = await d.query.jobs.findFirst({
columns: { id: true },