Repository navigation
feat(settings): add Settings › Content with Hand off quality fixes automatically, per brand (CE-051, part 2) - #1482
Merged
gkhngyk merged 11 commits intoOct 25, 2026
Conversation
…t in one run (00275, CE-051, part 1) POST /api/content-drafts/:draftId/handoff (Quality phase 2): the editor sends the page's fixable checks by key, with what each names on the page; the server says what each asks and runs Fix open rules as one run of kind 'handoff', its suggestions left for review. The editor's details are no fact the agent may write, and a placeholder stays the person's. 00275: content_agent_runs.kind 'handoff' and origin (person | auto), an automatic hand-off once a draft; brands.content_quality_handoff (off by default) and content_drafts.quality_handoff, the brand's setting copied when the draft is made. An automatic run on a draft its brand doesn't hand off is 409 not_due, a second one 409 already; one the AI budget stops before it begins is taken back, to run once the budget renews. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tomatically, per brand (CE-051, part 2) With Content Editor Quality's phase 2, Settings has a Content section: per brand, Hand off quality fixes automatically (brands.content_quality_handoff, 00275, off by default). Admins and managers change it; anyone else sees it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rand's approved facts Pre-push review fixes: - the source checks (claims, fresh, weak, primary, broken) read the draft's sources as link targets, so the agent can link one - trust:brandFacts writes the brand's approved facts, read on the server - a placeholder is read in the passage before and after the change: a "before" that cuts into its brackets doesn't fill it - the person's own rules are no fact a hand-off may write either - not_due first; a person's run writes no origin (the column's default), so a database before 00275 takes it; a run not taken back is failed Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tting off Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rkspace, say what turning it off does Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 of 12 tasks
…doff-api # Conflicts: # supabase/schema.sql
…ne fix at a time (CE-051) - dropsPlaceholder counts each placeholder before and after the change, read in what is kept (the new words and the blocks after them): filling one of two "[figure, source]" in a passage is dropped too. In a heading only the agent's own forms count, as the editor reads them. - A hand-off's prompt says to leave every [placeholder] as it is. - Fix open rules and a hand-off are refused with 409 `running` while another fix or hand-off on the draft is under way (fixUnderWay). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
7 of 12 tasks
gkhngyk
approved these changes
Oct 25, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
What I checked:
- Only admins and managers can change the setting, through the brands admin/manager update policy. The section's
canManagematches that policy, and a refused update (no row back) is reported as a failed save. - A new draft copies its brand's setting. A member's change to
quality_handoffon a draft is undone, by a plain update or an upsert. Another organization can't change the brand or the draft. The server can still set it. - The section only shows with phase 2. Below phase 2,
/dashboard/settings/contentfalls back to Account.
Low, follow-up:
web/messages/en.json:6971: the hint says pages get their fixes "when they're first opened in the editor", but that's part 4. Until part 4 lands, ticking the box does nothing visible. Drafts made in the meantime are still flagged, so once part 4 ships they'll be handed off (and use AI usage) the next time they're opened. Keep phase 2 off in production until part 4 is in.web/src/types/supabase.ts:985(and its Insert/Update twins):content_drafts.quality_handoffsits betweenagent_state_atandarchived_at. The generator sorts columns, so the next regen will move it. Regenerate the file, or put the column where the generator would.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Quality Phase 2, CE-051, part 2: Settings › Content.
Stacked on #1481, which adds
brands.content_quality_handoff(00275). Its own change is the last commits.The spec says: Settings › Content › "Hand off quality fixes automatically", off by default. When it's on, every new or optimized page gets the hand-off run. Changes still wait for the person's approval, and every run is logged in History.
hasSettingsSection). It has its own address,/dashboard/settings/content.web/src/types/supabase.tsgains 00275's columns.Pre-push review fixes:
Related issue
Quality spec (Drive), Phase 2, CE-051 (part 2). Stacked on #1481.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
NEXT_PUBLIC_CONTENT_QUALITY_PHASE=2./dashboard/settings/contentopens Account.The browser check (both themes, 1024 px) is still owed, batched with the other Quality P2 PRs.
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Web:
yarn test(3,620 passed) andyarn buildpass. After the review fixes, I re-ran lint, typecheck,buildand the settings tests (63 passed).🤖 Generated with Claude Code