Skip to content

feat(settings): let Admins allow agents to publish and send on their own - #1977

Merged
gkhngyk merged 4 commits into
ansvisor:mainfrom
cihan-gyk:feature/settings-go-live-switch
Nov 2, 2026
Merged

gkhngyk merged 4 commits into
ansvisor:mainfrom
cihan-gyk:feature/settings-go-live-switch

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

AUTONOMOUS-GO-LIVE PR 6: Admins can let agents publish and send on their own, a switch on Settings › Chat (§7.1, §7.3). Stacked on #1967 (00443). No migration of its own. Hidden unless staff turn on CHAT_AUTO_GO_LIVE for the workspace; behind it, PR 5's precedence exception does the rest.

What changes

  • Settings › Chat › "Agents that publish on their own", under "What Managers may take live":
    • The switch: "Allow agents to publish and send on their own", with the note on the four guards.
    • Who: Admins change it; everyone else reads On or Off.
    • On: shows "On since {date} · by {name}".
    • Locked below Growth ("Needs Growth · you're on {current}") and while Content Quality is off.
  • Turning it on opens the responsibility dialog:
    • its five points;
    • a tick, "I understand, and I'm allowed to decide this for {workspace}." (Turn on stays off until it is ticked);
    • "We keep your name and the time with this setting."
  • Turning it off needs no dialog and counts from the next call.
  • setAutoGoLive(on, terms):
    • Admins only, active plan, Full auto's plan (Growth+), Content Quality on, and the current terms version (GO_LIVE_TERMS = 1).
    • It writes auto_go_live_groups = ['publishing'], with who, when and the terms version; off empties the groups.
    • Answers unavailable with the flag off or before 00443.
  • getChatSettingsView returns goLive (null with the flag off or before 00443, so the section doesn't show).
  • lib/chat/flag.ts autoGoLiveEnabled: CHAT_AUTO_GO_LIVE + CHAT_AUTO_GO_LIVE_ORGS, on top of CHAT_AGENTIC.
  • Words that said "EXECUTE needs a click" add "unless an Admin let an agent go live on its own" where the section shows (Who decides' Hard rules, the execute note).
  • SettingsSwitch moves to its own file, shared by both sections.
  • Help:
    • new settings/chat-rules.md, Set the rules Chat follows (approved: false);
    • chat/chat.md and chat/chat-settings.md: "In your own chats nothing is published or sent without your click. Agents an Admin allows can publish on their own."

The owner approved the screens.

Related issue

None. AUTONOMOUS-GO-LIVE spec, PR 6.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. With CHAT_AGENTIC=true, CHAT_AUTO_GO_LIVE=true and Content Quality on, as an Admin on Growth, open Settings › Chat.
  2. Turn on Allow agents to publish and send on their own. The dialog opens, and Turn on stays off until the tick.
  3. Tick, then Turn on. The row reads "On since … · by you".
  4. Turn it off: no dialog.
  5. As a Manager, the row only says On or Off. On Starter, it shows the lock.

Unit tests:

  • chat-settings (view, on, off, refusals, before 00443);
  • chat-settings-section (hidden with the flag off, dialog, off, locks, read-only);
  • flag;
  • Help.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint passes
  • yarn typecheck passes
  • yarn format:check passes
  • Changes are focused — one concern per PR
  • Help article updated under help/ (or no user-visible change)

CI passed on this branch (337d426), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41362902939): schema is up to date; web format:check, lint, typecheck, all tests and yarn build pass; server lint, format:check and all tests pass.

🤖 Generated with Claude Code

cihan-gyk and others added 3 commits November 1, 2026 23:56
…permission

AUTONOMOUS-GO-LIVE PR 1 (migration 00443), with nothing reading it yet:
chat_settings gains the workspace switch (auto_go_live_groups, who turned
it on, when, under which terms); chat_agent_go_live keeps an agent's
permission for the version it was given on, with its daily limit (1-20,
5 unless set); chat_agent_go_live_events keeps each step an agent takes
live on its own, read by brand access. reserve_agent_go_live and
finish_agent_go_live (service role) hold the daily limit under a lock per
agent, once per (draft, target); a failed step frees its slot. Types,
schema.sql, and the brand-access and demo coverage lists follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
AUTONOMOUS-GO-LIVE PR 6. Settings › Chat gets "Agents that publish on
their own", under what Managers may take live: an Admin's switch, off by
default, locked below Growth and while Content Quality is off, read-only
for everyone else. Turning it on asks the Admin to accept the
responsibility text first (its version kept with who and when, 00443);
turning it off needs no dialog. Hidden unless staff turn on
CHAT_AUTO_GO_LIVE for the workspace (autoGoLiveEnabled). Where it shows,
the page's "EXECUTE needs a click" lines say an Admin may let an agent go
live on its own. Help: a new Settings › Chat article, and the "nothing is
published without your click" lines name the exception.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…check the plan themselves

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the needs-migration Adds or edits a migration — apply it to the hosted database label Nov 1, 2026
gkhngyk
gkhngyk previously approved these changes Nov 2, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# Conflicts:
#	server/src/lib/brand-access-policies.test.js
#	supabase/schema.sql
@github-actions github-actions Bot removed the needs-migration Adds or edits a migration — apply it to the hosted database label Nov 2, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gkhngyk
gkhngyk merged commit c53047f into ansvisor:main Nov 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants