From c98096c1edcc01db5de56c96e0d4fd9e5247782c Mon Sep 17 00:00:00 2001 From: blankie Date: Sun, 26 Jul 2026 23:50:09 +0000 Subject: [PATCH 1/3] fix: include column name in _ensure_columns ALTER TABLE --- src/tinyweb/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tinyweb/db.py b/src/tinyweb/db.py index 9c138a1..174bc7c 100644 --- a/src/tinyweb/db.py +++ b/src/tinyweb/db.py @@ -142,7 +142,7 @@ def _ensure_columns(db, table, columns): existing = {r[1] for r in db.execute(f"PRAGMA table_info({table})").fetchall()} for name, col_def in columns.items(): if name not in existing: - db.execute(f"ALTER TABLE {table} ADD COLUMN {col_def}") + db.execute(f"ALTER TABLE {table} ADD COLUMN {name} {col_def}") def init_db(): From 527f8b59471b0c81db882bf88d75dacbef212e07 Mon Sep 17 00:00:00 2001 From: blankie Date: Sun, 26 Jul 2026 16:58:58 -0700 Subject: [PATCH 2/3] fixed _ensure_columns bug --- src/tinyweb/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tinyweb/db.py b/src/tinyweb/db.py index 9c138a1..174bc7c 100644 --- a/src/tinyweb/db.py +++ b/src/tinyweb/db.py @@ -142,7 +142,7 @@ def _ensure_columns(db, table, columns): existing = {r[1] for r in db.execute(f"PRAGMA table_info({table})").fetchall()} for name, col_def in columns.items(): if name not in existing: - db.execute(f"ALTER TABLE {table} ADD COLUMN {col_def}") + db.execute(f"ALTER TABLE {table} ADD COLUMN {name} {col_def}") def init_db(): From 11f3bc62c0543adb71a36d1815341ec490d37338 Mon Sep 17 00:00:00 2001 From: blankie Date: Sun, 26 Jul 2026 17:25:19 -0700 Subject: [PATCH 3/3] fixed inline rename --- src/tinyweb/handlers/subscriptions.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/tinyweb/handlers/subscriptions.py b/src/tinyweb/handlers/subscriptions.py index 9528837..393157a 100644 --- a/src/tinyweb/handlers/subscriptions.py +++ b/src/tinyweb/handlers/subscriptions.py @@ -152,6 +152,11 @@ def handle_subscriptions(msg=""): _sync_threads.pop(sub_id, None) _sync_starts.pop(sub_id, None) + edit_script = """""" + cards = "" for s in subs: sub_id = s["id"] @@ -181,13 +186,21 @@ def handle_subscriptions(msg=""): cards += ( f'
' - f'
{esc(s["nickname"] or s["name"] or "unknown")}
' - f'
{esc(s["dest_hash"])}
' - f'
' + f'
' + f'{esc(s["nickname"] or s["name"] or "unknown")}' + f'' + f'rename' + f'
' + f'
{esc(s["dest_hash"])}
' f'
last sync: {esc(last)}
' f'{status_html}' f'
' @@ -222,6 +235,7 @@ def handle_subscriptions(msg=""): f'' f'

or subscribe to an instance

' f'

{msg}

' + f'{edit_script}' f'
{listing}' f'
back', head_html=head_html,