Phase 3 completion — Personal Workflow feature set is now complete.
Collections / Watchlists:
- New tables: collections (UUID share_token, slug, public/private) and
collection_bills (unique bill-per-collection constraint)
- Full CRUD API at /api/collections with bill add/remove endpoints
- Public share endpoint /api/collections/share/{token} (no auth)
- /collections list page with inline create form and delete
- /collections/[id] detail page: inline rename, public toggle,
copy-share-link, bill search/add/remove
- CollectionPicker bookmark-icon popover on bill detail pages
- Collections nav link in sidebar (auth-required)
Shareable Brief Links:
- share_token UUID column on bill_briefs (backfilled on migration)
- Unified public share router at /api/share (brief + collection)
- /share/brief/[token] — minimal layout, full AIBriefCard, CTAs
- /share/collection/[token] — minimal layout, bill list, CTA
- Share2 button in BriefPanel header row, "Link copied!" flash
AuthGuard: /collections → AUTH_REQUIRED; /share prefix → NO_SHELL_PATHS
Authored-By: Jack Levy
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
843 B
Python
34 lines
843 B
Python
"""Add share_token to bill_briefs
|
|
|
|
Revision ID: 0016
|
|
Revises: 0015
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
revision = "0016"
|
|
down_revision = "0015"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.add_column(
|
|
"bill_briefs",
|
|
sa.Column(
|
|
"share_token",
|
|
postgresql.UUID(as_uuid=False),
|
|
nullable=True,
|
|
server_default=sa.text("gen_random_uuid()"),
|
|
),
|
|
)
|
|
op.create_unique_constraint("uq_brief_share_token", "bill_briefs", ["share_token"])
|
|
op.create_index("ix_brief_share_token", "bill_briefs", ["share_token"])
|
|
|
|
|
|
def downgrade():
|
|
op.drop_index("ix_brief_share_token", "bill_briefs")
|
|
op.drop_constraint("uq_brief_share_token", "bill_briefs")
|
|
op.drop_column("bill_briefs", "share_token")
|