mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
feat(marketing): project-branded drafts + project badges on the X/video queues (#570)
Item B+C of the video/X per-project targeting spec, plus the company_goals.company_name field they depend on (migration 075). - CompanyGoalsService.resolve_product_name is the single fallback chain (project name -> charter company_name -> RoboCo); XEngine and VideoEngine both call it and their prompt builders are pure functions taking product_name — release posts/videos stop hardcoding RoboCo. - The X and video queue responses carry project_slug/project_name via one shared unloaded-guard helper (api/schemas/project_fields.py); both panel queues render a shared ProjectBadge so multi-project drafts are tellable apart. - Business -> Goals editor gains the company-name input. - Fixes a pre-existing test-isolation leak: the company-goals routes test commits the charter singleton into the session-scoped test DB and polluted later suites; it now deletes the row on teardown. Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
"""Add company_goals.company_name — brands X/video drafting prompts.
|
||||
|
||||
CEO-authored product/company name (mirrors ``brand_voice``, migration 061):
|
||||
feeds ``XEngine``/``VideoEngine``'s product-name resolution as the fallback
|
||||
below a project's own name and above the "RoboCo" literal default. Additive
|
||||
and inert until the CEO sets it in the Business -> Goals editor.
|
||||
|
||||
Revision ID: 075_company_goals_company_name
|
||||
Revises: 074_telegram_credentials
|
||||
Create Date: 2026-07-18
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = "075_company_goals_company_name"
|
||||
down_revision = "074_telegram_credentials"
|
||||
branch_labels: dict[str, str] | None = None
|
||||
depends_on: dict[str, str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"company_goals",
|
||||
sa.Column("company_name", sa.Text(), nullable=False, server_default=""),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("company_goals", "company_name")
|
||||
Reference in New Issue
Block a user