Repository navigation
Declare publish_live, derived from Maximum status - #19
Conversation
The app reads a `publish_live` connect capability to default Calendar pushes to `status: publish`, and no plugin declared it, so every post arrived as a draft until a customer flipped the app's switch and raised Maximum status too. The flag is derived from Maximum status (`ingest_post_status`) rather than given a checkbox of its own: one control, so it can never claim more than the ingest endpoint enforces. True only for Published. It joins the set the reconnect prompt compares, so raising or lowering the cap after connecting asks for a reconnect. When it is the only stale name, the prompt and the status card say it is about publishing. The generic "capabilities" message talks about page enhancements, which have not changed. Cut as 1.3.0, as earlier feature PRs did; nothing is tagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Summary by QodoReport live-publishing capability from Maximum status
AI Description
Merge Risk
|
Code Review by Qodo
Nice, no open findings for this group Nice, no open findings for this group Nice, no open findings for this group Resolved findings 1.
|
Qodo FixerNo findings are within the configured fix scope. To change which findings are fixed, adjust the setting on your Qodo configuration page. |
Review follow-ups on the publish_live reconnect prompt: - Lowered to Pending, a post CiteCue asks to publish arrives pending review, not as a draft. The notice now says which. - The status card asked for the notice's one leading reason, so a stale publish flag vanished from "Content pushes" whenever page enhancements were stale too. It now asks publish_live_is_stale() directly. - A site that accepts no pushes is sent no posts, so publish drift there is no reason to reconnect. The flag is still reported as Maximum status says; the prompt waits until pushes are switched on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Code review by qodo was updated up to the latest commit d3840f7 |
The Calendar's own "Publish live" switch overrides CiteCue's default per post, so a stale publish_live changes only what a scheduled post defaults to. The notice said every post would arrive as a draft (raised) or that CiteCue would always ask to publish (lowered). Both now name the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Code review by qodo was updated up to the latest commit 25cc466 |
The "Content pushes" row said "Accepted (as drafts, unless raised below)" whatever the setting, so on a site set to Published it sat just above the line saying the site now publishes live. It now states the cap: saved as drafts, held for review, or may be published live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Code review by qodo was updated up to the latest commit de2b7dd |
What
The connect claim now sends
publish_live. It istrueonly when Maximum status (ingest_post_status) is Published. Draft and Pending sendfalse. The CiteCue app reads it to default Calendar pushes tostatus: publishinstead of a draft. Until now no plugin declared it, so every post landed as a draft.There is no new checkbox. The flag is derived from the existing setting, so one control decides both, and the flag can never claim more than the ingest endpoint enforces. The cap still has the final say on every push.
Reconnect prompt
publish_livejoinsactive_delivery_capabilities(), the set compared againstcapabilities_reported. Raising or lowering Maximum status after connecting therefore tripsneeds_seo_head_reconnect(), and the next claim re-reports the flag.Without a further change, that drift would have shown the existing
capabilitiesmessage ("this version can place CiteCue page enhancements…"). That message is wrong here, and the reason's own docblock warns against exactly that. So:seo_head_reconnect_reason()returns a newpublish_livereason when it is the only stale name. If a delivery capability is stale too,capabilitieswins, and one reconnect fixes both.Citecue_Connect::claim()needed no change. It already mergesdeclared_capabilities()into the body as flat booleans and recordsactive_delivery_capabilities()after a successful claim.Docs and version
statusrow mentionspublish_live.docs/connect-handshake.mdshows the flags in the claim body.readme.txt: 1.3.0 changelog and upgrade notice.CITECUE_VERSION, Stable tag), because earlier feature PRs bumped in the same PR (Place CiteCue page enhancements on the page you already have (tier 1) #13 → 1.2.0, Link back to citecue.com, and cut 1.2.1 #17 → 1.2.1). Nothing is tagged or released.Tests
New cases in
test-settings.php,test-connect.php,test-admin-notices.phpandtest-admin-screen.php:publishand false fordraft/pending(data provider), and a fresh install doesn't declare it;capabilities_reportedrecords it;capabilities_reported, with reasonpublish_live, and the reconnect between them clears it;null) upgrade path;Run locally against a throwaway MariaDB 12:
composer test: core, WooCommerce stub and multisite each 395 tests, OK (19 / 12 / 18 skipped, all pre-existing)composer lint: cleancomposer phpcs(WPCS + PHPCompatibilityWP 7.4): clean, 42 filesbin/build-plugin-zip.sh HEAD: buildsNot changed
The permanent "Dismiss" on the reconnect notice is still one key (
seo_head_reconnect). An administrator who dismissed an earlier capabilities prompt won't see the publish one as a notice. The status card still shows it.🤖 Generated with Claude Code