From 2c4ebaeb7f414e7fa1f5b506ba6f775952fe7afc Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Thu, 16 Jul 2026 18:09:50 +0530 Subject: [PATCH] feat(zero): publish thread title, visibility, created_by columns --- .../175_publish_thread_metadata_to_zero.py | 23 +++++++++++++++++++ surfsense_backend/app/zero_publication.py | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 surfsense_backend/alembic/versions/175_publish_thread_metadata_to_zero.py diff --git a/surfsense_backend/alembic/versions/175_publish_thread_metadata_to_zero.py b/surfsense_backend/alembic/versions/175_publish_thread_metadata_to_zero.py new file mode 100644 index 000000000..d4d298a4a --- /dev/null +++ b/surfsense_backend/alembic/versions/175_publish_thread_metadata_to_zero.py @@ -0,0 +1,23 @@ +"""publish thread metadata to zero_publication + +Revision ID: 175 +Revises: 174 +""" + +from collections.abc import Sequence + +from alembic import op +from app.zero_publication import apply_publication + +revision: str = "175" +down_revision: str | None = "174" +branch_labels: str | Sequence[str] | None = None +depends_on: str | Sequence[str] | None = None + + +def upgrade() -> None: + apply_publication(op.get_bind()) + + +def downgrade() -> None: + """No-op. Historical publication shapes are immutable.""" diff --git a/surfsense_backend/app/zero_publication.py b/surfsense_backend/app/zero_publication.py index c44a29dcd..f6dff6cdf 100644 --- a/surfsense_backend/app/zero_publication.py +++ b/surfsense_backend/app/zero_publication.py @@ -60,6 +60,9 @@ AUTOMATION_COLS = [ NEW_CHAT_THREAD_COLS = [ "id", "workspace_id", + "title", + "visibility", + "created_by_id", ] # Enough to drive the lifecycle UI by push: status, the reviewable brief, and