diff --git a/.env.example b/.env.example
index 82fc1ec..842ad88 100644
--- a/.env.example
+++ b/.env.example
@@ -37,7 +37,7 @@ KANAME_VERSION=
# ---------------------------------------------------------------------------
MAX_CONCURRENT_DOWNLOADS=1
-# Hub update check interval; 0 disables it
+# How often the worker checks every model on the Hub (still there? later: newer commits); 0 disables it
UPDATE_CHECK_INTERVAL_HOURS=12
# 1 (default): hf downloads over plain HTTP, so progress can be measured from bytes on disk.
# 0: use Xet (chunk-level dedup on updates), but progress only advances in large jumps.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a22ebaa..9813816 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,17 @@ step 1 (Hugging Face downloader) is released as a minor version.
tree (base model → quantized/finetuned → this repo) listing other local models of the same base.
- Hub metadata now includes the author's avatar and the relation to the base model; existing models
are refetched once by the worker.
+- Models deleted from Hugging Face are flagged, never deleted locally: the worker checks every model
+ every `UPDATE_CHECK_INTERVAL_HOURS` (and right after a failed download) whether the repo and the
+ pinned commit still exist. A deleted repo (or one made private) or a rewritten history shows a
+ warning badge in the library (searchable, and a value of the Status filter), a banner on the model
+ page, and blocks new downloads and "Download more". "On the Hub" in the sidebar shows the last
+ check, with "Check now".
+- Create tags in Settings (name and color), before any model uses them.
+- Tag picker on the model page and in Add model: a dropdown with "Create new tag…" first, then your
+ existing tags with their colors, and "Manage tags…".
+- Account menu in the header with your profile picture from the OIDC provider (initials as
+ fallback): name and email, links to the settings, theme (system/light/dark) and sign out.
### Changed
@@ -40,6 +51,9 @@ step 1 (Hugging Face downloader) is released as a minor version.
can't bypass it.
- Quant labels (library column, Quant filter, "Local copy") only count model weights, not MTP,
mmproj or imatrix files.
+- Tags are no longer deleted automatically when no model uses them anymore; delete them in Settings.
+- Settings has separate pages for **File labels** and **Tags**.
+- Header: app icon, navigation with icons and the current page highlighted.
### Fixed
diff --git a/drizzle/0007_hub_state.sql b/drizzle/0007_hub_state.sql
new file mode 100644
index 0000000..aca4ddd
--- /dev/null
+++ b/drizzle/0007_hub_state.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `models` ADD `hub_state` text;--> statement-breakpoint
+ALTER TABLE `models` ADD `hub_missing_since` integer;
\ No newline at end of file
diff --git a/drizzle/meta/0007_snapshot.json b/drizzle/meta/0007_snapshot.json
new file mode 100644
index 0000000..655a4fd
--- /dev/null
+++ b/drizzle/meta/0007_snapshot.json
@@ -0,0 +1,960 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "4bf01375-42a2-440f-aeba-69644c7bca95",
+ "prevId": "84e7c88b-53c4-4eba-8f2f-7de08b494316",
+ "tables": {
+ "job_files": {
+ "name": "job_files",
+ "columns": {
+ "job_id": {
+ "name": "job_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "model_file_id": {
+ "name": "model_file_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "expected_bytes": {
+ "name": "expected_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "done_bytes": {
+ "name": "done_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "state": {
+ "name": "state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "job_files_job_id_jobs_id_fk": {
+ "name": "job_files_job_id_jobs_id_fk",
+ "tableFrom": "job_files",
+ "tableTo": "jobs",
+ "columnsFrom": [
+ "job_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "job_files_model_file_id_model_files_id_fk": {
+ "name": "job_files_model_file_id_model_files_id_fk",
+ "tableFrom": "job_files",
+ "tableTo": "model_files",
+ "columnsFrom": [
+ "model_file_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "job_files_job_id_model_file_id_pk": {
+ "columns": [
+ "job_id",
+ "model_file_id"
+ ],
+ "name": "job_files_job_id_model_file_id_pk"
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "job_logs": {
+ "name": "job_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "job_id": {
+ "name": "job_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "stream": {
+ "name": "stream",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "line": {
+ "name": "line",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "job_logs_job_idx": {
+ "name": "job_logs_job_idx",
+ "columns": [
+ "job_id",
+ "id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "job_logs_job_id_jobs_id_fk": {
+ "name": "job_logs_job_id_jobs_id_fk",
+ "tableFrom": "job_logs",
+ "tableTo": "jobs",
+ "columnsFrom": [
+ "job_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "jobs": {
+ "name": "jobs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "model_id": {
+ "name": "model_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "purpose": {
+ "name": "purpose",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "target_sha": {
+ "name": "target_sha",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "state": {
+ "name": "state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'queued'"
+ },
+ "attempt": {
+ "name": "attempt",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "total_bytes": {
+ "name": "total_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "done_bytes": {
+ "name": "done_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "speed_bps": {
+ "name": "speed_bps",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "eta_seconds": {
+ "name": "eta_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "exit_code": {
+ "name": "exit_code",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error_code": {
+ "name": "error_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cancel_requested_at": {
+ "name": "cancel_requested_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "jobs_state_idx": {
+ "name": "jobs_state_idx",
+ "columns": [
+ "state"
+ ],
+ "isUnique": false
+ },
+ "jobs_model_idx": {
+ "name": "jobs_model_idx",
+ "columns": [
+ "model_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "jobs_model_id_models_id_fk": {
+ "name": "jobs_model_id_models_id_fk",
+ "tableFrom": "jobs",
+ "tableTo": "models",
+ "columnsFrom": [
+ "model_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "model_files": {
+ "name": "model_files",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "model_id": {
+ "name": "model_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "size": {
+ "name": "size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "blob_oid": {
+ "name": "blob_oid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "lfs_sha256": {
+ "name": "lfs_sha256",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "selected": {
+ "name": "selected",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "state": {
+ "name": "state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ },
+ "checked_at": {
+ "name": "checked_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "model_files_model_path_uq": {
+ "name": "model_files_model_path_uq",
+ "columns": [
+ "model_id",
+ "path"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "model_files_model_id_models_id_fk": {
+ "name": "model_files_model_id_models_id_fk",
+ "tableFrom": "model_files",
+ "tableTo": "models",
+ "columnsFrom": [
+ "model_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "model_revisions": {
+ "name": "model_revisions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "model_id": {
+ "name": "model_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sha": {
+ "name": "sha",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "superseded_at": {
+ "name": "superseded_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "model_revisions_model_idx": {
+ "name": "model_revisions_model_idx",
+ "columns": [
+ "model_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "model_revisions_model_id_models_id_fk": {
+ "name": "model_revisions_model_id_models_id_fk",
+ "tableFrom": "model_revisions",
+ "tableTo": "models",
+ "columnsFrom": [
+ "model_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "model_tags": {
+ "name": "model_tags",
+ "columns": {
+ "model_id": {
+ "name": "model_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "model_tags_tag_idx": {
+ "name": "model_tags_tag_idx",
+ "columns": [
+ "tag_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "model_tags_model_id_models_id_fk": {
+ "name": "model_tags_model_id_models_id_fk",
+ "tableFrom": "model_tags",
+ "tableTo": "models",
+ "columnsFrom": [
+ "model_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "model_tags_tag_id_tags_id_fk": {
+ "name": "model_tags_tag_id_tags_id_fk",
+ "tableFrom": "model_tags",
+ "tableTo": "tags",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "model_tags_model_id_tag_id_pk": {
+ "columns": [
+ "model_id",
+ "tag_id"
+ ],
+ "name": "model_tags_model_id_tag_id_pk"
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "models": {
+ "name": "models",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "repo_type": {
+ "name": "repo_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'model'"
+ },
+ "repo_id": {
+ "name": "repo_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tracked_revision": {
+ "name": "tracked_revision",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'main'"
+ },
+ "pinned_sha": {
+ "name": "pinned_sha",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "local_path": {
+ "name": "local_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "include_patterns": {
+ "name": "include_patterns",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'[]'"
+ },
+ "exclude_patterns": {
+ "name": "exclude_patterns",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'[]'"
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ },
+ "remote_sha": {
+ "name": "remote_sha",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_checked_at": {
+ "name": "last_checked_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_check_error": {
+ "name": "last_check_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hub_state": {
+ "name": "hub_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hub_missing_since": {
+ "name": "hub_missing_since",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_verified_at": {
+ "name": "last_verified_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "downloaded_at": {
+ "name": "downloaded_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "base_models": {
+ "name": "base_models",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "base_relation": {
+ "name": "base_relation",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "author_avatar_url": {
+ "name": "author_avatar_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pipeline_tag": {
+ "name": "pipeline_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "license": {
+ "name": "license",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hub_tags": {
+ "name": "hub_tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "metadata_fetched_at": {
+ "name": "metadata_fetched_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "models_repo_uq": {
+ "name": "models_repo_uq",
+ "columns": [
+ "repo_type",
+ "repo_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tags": {
+ "name": "tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "tags_slug_uq": {
+ "name": "tags_slug_uq",
+ "columns": [
+ "slug"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "worker_state": {
+ "name": "worker_state",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "instance_id": {
+ "name": "instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pid": {
+ "name": "pid",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hf_version": {
+ "name": "hf_version",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "models_dir_free_bytes": {
+ "name": "models_dir_free_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "models_dir_total_bytes": {
+ "name": "models_dir_total_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "heartbeat_at": {
+ "name": "heartbeat_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json
index 7fee44e..26bd5dc 100644
--- a/drizzle/meta/_journal.json
+++ b/drizzle/meta/_journal.json
@@ -50,6 +50,13 @@
"when": 1791224932279,
"tag": "0006_settings_and_tag_color",
"breakpoints": true
+ },
+ {
+ "idx": 7,
+ "version": "6",
+ "when": 1791233230682,
+ "tag": "0007_hub_state",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/src/app/(app)/[org]/[repo]/download-card.tsx b/src/app/(app)/[org]/[repo]/download-card.tsx
index 23291c8..a768457 100644
--- a/src/app/(app)/[org]/[repo]/download-card.tsx
+++ b/src/app/(app)/[org]/[repo]/download-card.tsx
@@ -15,7 +15,16 @@ import { formatBytes, percent } from "@/lib/format";
const OPEN = ["queued", "downloading", "verifying"];
/** Sidebar card: current download state, actions and (while running) per-file progress. */
-export function DownloadCard({ modelId, status }: { modelId: string; status: ModelStatus }) {
+export function DownloadCard({
+ modelId,
+ status,
+ hubMissing,
+}: {
+ modelId: string;
+ status: ModelStatus;
+ /** The repo or pinned commit is gone from the Hub; no new downloads. */
+ hubMissing: boolean;
+}) {
const { snapshot } = useLive({ model: modelId });
const [busy, setBusy] = useState(false);
const latest = snapshot?.jobs[0];
@@ -35,6 +44,7 @@ export function DownloadCard({ modelId, status }: { modelId: string; status: Mod
if (open?.state === "queued") hint = snapshot?.worker.online ? "Waiting for a free download slot." : "Queued, but the worker is offline.";
else if (open) hint = "Runs in the background; you can close this page.";
else if (status === "ready") hint = "All selected files are present.";
+ else if (hubMissing) hint = "Can't download: no longer available on Hugging Face. Local files are kept.";
return (
@@ -84,6 +94,7 @@ export function DownloadCard({ modelId, status }: { modelId: string; status: Mod
) : (
status !== "ready" &&
+ !hubMissing &&
snapshot && (