Repository navigation
feat(content-editor): confirm the author the site names for E-E-A-T, instead of picking one (00271) - #1473
Conversation
…instead of picking one (00271)
E-E-A-T came only from an author picked in Settings › Authors: a page
under the team byline scored 0, though many sites show their author
through the CMS. With no author picked, the person can now tick "The
author is a real person, named on your site" (the byline's points) and
then "Their profile on your site has a short bio and profile links"
(the profile's), page by page. Picking an author still takes precedence.
00271 keeps who and when on content_drafts; a trigger stamps them from
the session (no confirming in another's name), clears the profile with
the author, and keeps a deleted profile's set-null. Before you publish
names the author as confirmed and leaves the JSON-LD author out; no
"By {Brand} Team" line goes in for a confirmed author.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
left a comment
There was a problem hiding this comment.
A few fixes before merge:
-
Export and Send to CMS still give the team as the author after an author is confirmed.
_draft-editor.tsx:2699and:2721passteamByline={authorsRead ? teamName(language, brandName) : ''}to both dialogs whether or not an author is confirmed. As a result,pageFieldsfills the CMS's author field with "{Brand} Team", and Send to CMS sends that as the page's author. Before you publish says the opposite: "Check your CMS sets them as the author". The Library's bulk send has the same gap and also keeps the "By {Brand} Team" line.cmsSource(web/src/lib/content/cms-send.ts:140) doesn't know about the confirmation, andgetContentDraftPages(web/src/lib/actions/content-drafts.ts:311) doesn't read it. Fix:- with no author picked and
authorConfirmed.real, passteamByline=''to both dialogs, so the send goes out withauthor: nulland the CMS keeps its own author; - read
author_real_atintoDraftPage, and havecmsSourcedrop the byline line and the team name in the same case; - add a test on
cmsSourceand one on the author the Send dialog sends.
- with no author picked and
-
00271_content_draft_author_confirmed.sql:47and:57: a request can still setauthor_real_by/author_profile_byto null while the tick stays. Only the profiles FK'son delete set nullneeds to clear it, and that runs as the table's owner. Keepold.*_byon any change to who alone, unless the role bypasses RLS ((select rolbypassrls from pg_catalog.pg_roles where rolname = current_user), asguard_content_draft_archivedoes). -
_draft-editor.tsx:553–565: unticking the author clears both boxes optimistically. If that save fails, the catch restoresrealonly, so the profile box stays unticked and E-E-A-T shows 60, while the database still has the profile ticked (100 after a reload). Keep the pair from before the change and restore it on failure.
Dry-run on prod, rolled back, with 00270 then 00271:
- On a tick or an insert, a forged
byoratis replaced by the session's user and now. A change tobyalone that names another member is undone. - Unticking the author clears the profile.
- Another organization's member and anon update no rows.
- The service role stamps
byas null and can't set it.
The ticks count only when no author is picked. The to-dos keep their ids (byline, authorProfile), so they don't clash with the proof or brand-facts to-dos.
…-confirm # Conflicts: # supabase/schema.sql
…uard who confirmed Review fixes on the E-E-A-T author confirmation (00271): - with no author picked and the one the site names confirmed, Export and Send to CMS name no team (the CMS keeps its own author); the Library's bulk send reads author_real_at and drops the team and its byline line - 00271: a change to who confirmed alone is undone for every role that doesn't bypass RLS, clearing it too; the profiles FK's set null, run as the owner, still clears it - unticking the author restores both boxes when its save fails Co-Authored-By: Claude Opus 5.5 <[email protected]>
…med one, one confirmation save at a time Pre-push review fixes: - Export's Before you publish line doesn't say "no author yet" for an author the site names, and its Author row says the CMS keeps its own - the confirmation boxes wait while one is being saved, so a failed save puts back the pair as it was saved Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks! Fixed in 915ab7e and 35e551d (main merged forward first,
Pre-push review found three more, fixed in 35e551d:
Checks: |
gkhngyk
left a comment
There was a problem hiding this comment.
All items done. Looks good.
- Export and Send to CMS no longer name the team when no author is picked and the site's author is confirmed. Send goes with
author: null, Export shows "Your site's own", andcmsSourcedrops the team and the byline line, so the Library's bulk send matches. Each case has a test. - 00271: a change to
*_byalone, including clearing it, is now undone unless the role bypasses RLS. - Unticking puts back the pair as it was saved. The boxes also wait while a confirmation is saving.
Dry-run on prod, rolled back, with 00271 on top of 00270:
- A member's tick with a forged
atandbyis stamped with now and the member's id. The tick stays whenbyis cleared, set to another organization's user, or claimed by a second member; each of those changes is undone. The profile box behaves the same way. - Unticking the author clears all four columns.
- Another organization's member and anon update no rows.
- A member's insert with a forged
byand no tick stores noby. With the ticks, it stores the session's id and now. - The service role stamps
byas null. The table's owner (the FK'son delete set null) can clearbyand keep the tick.
Summary
In Quality, E-E-A-T came only from an author picked from Settings › Authors. A page under the team byline ("Acme Team") scored E-E-A-T 0, and Quality's average dropped with it, even when the site already shows the real author through its CMS. The user asked for tick boxes instead.
Now, with no author picked, the person can confirm the author their site names, page by page:
Picking an author still works and takes precedence; the ticks don't add to a picked author.
Where it shows
authorout rather than naming the brand's Organization.Who and when (00271)
content_drafts.author_real_at/byandauthor_profile_at/by.by= the session's user andat= now. A request can't confirm in another's name or date it; a change tobyalone is undone.on delete set nullis kept.Migration order: 00271 follows 00270 in #1467. If this merges first, I'll renumber whichever lands second, so migrations stay in order.
Related issue
User report (tested on app.ansvisor.com): "Is the author check required for E-E-A-T? Our sites may already have this field. A tick box instead: is the author real, does their profile have these?"
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
The browser check (both themes, 1024 px) is still owed, batched with the other editor fixes.
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Web:
yarn test(CHECK_TESTS) andyarn buildpass.supabase/schema.sqlrebuilt.🤖 Generated with Claude Code