Skip to content

feat(content): send the Library's selected pages to the CMS together (Send to CMS #1331, part 3b: bulk) - #1440

Merged
gkhngyk merged 213 commits into
ansvisor:mainfrom
cihan-gyk:feature/cms-send-bulk
Oct 24, 2026
Merged

gkhngyk merged 213 commits into
ansvisor:mainfrom
cihan-gyk:feature/cms-send-bulk

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Send to CMS, part 3b (web): send the Library's selected pages together. Part 3a (#1439) is the row send. The server is #1437 and the editor is #1438.

Stacked on #1439. This PR's own commit is bcfed196.

Picking rows

  • Admins and managers get a box on each row and a "select all listed" box in the header. There are no boxes under Archived, which the server doesn't send.
  • Changing the tab or the Created range drops the picks.
  • A bar above the table shows "N pages selected", Send to CMS and Clear.
  • Past 25 pages the bar says "Up to 25 pages a send" and Send is off. 25 is the server's per-send cap.

Bulk dialog (library/_bulk-send-dialog.tsx)

  • Reading the pages. It reads them as the row send does, through readCmsSources, which the row send now shares. That gives the publishable HTML, plus the author and byline line once Quality is live. It also reads the slug and meta each page kept from its last send (readKeptFields).
  • Listing them. Each page shows as Ready, or with the reason it can't go: no title, a title over 300, nothing to publish, placeholders, over a million characters, or no slug (a title in another script). Those pages are left out; the dialog says to fix them in the editor.
  • If the kept slug and meta can't be read, the send is held, with Try again. Sent with the page's own slug, a page sent before could land in the CMS twice.
  • Sending. The ready pages go in as few requests as the API's proxy takes. They are grouped by bytes, with a 3 MB budget under the 4.5 MB serverless body limit, and a 413 has its own message.
    • Each request is a send of its own on the server: one page is sent before it answers, more go on in the background.
    • A refused request stops the rest. The day's limit, not_found (a page archived meanwhile) and an invalid that names pages.N get their own messages, and the last one names the page.
  • Progress. After sending, the dialog reads the sends by id every 2 s until none is queued, for at most 3 minutes. It shows "Sending: n of N done", then a summary such as "2 pages sent, 1 failed", with each page's state. The skipped count from the day's limit is shown too.
  • Closing. Closing leaves the sends going. While any row's last send is queued, the Library reads the rows' sends again every 5 s, the same rate as while the agent writes.

Deploy order

Same as #1438 and #1439: deploy after #1437 and after migration 00262 is on prod.

Related issue

Part of #1331 (phase 1). Next: Zapier / Make / n8n docs for the content_draft.sent package.

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. Run feat(content): send Content Editor pages to the brand's webhook as content packages, and take back where they went live (Send to CMS #1331, part 1: server) #1437's server with 00262 applied, and this branch's web. Set a brand webhook with Content page sent ticked; a local listener works on self-hosted.
  2. Content › Library. Tick a few rows, including one with a [placeholder] in its text. The bar shows "N pages selected".
  3. Click Send to CMS. The page with the placeholder shows "Placeholders to fill"; the others show "Ready".
  4. Click Send N pages. The dialog shows "Sending: 0 of N done", then "N pages sent." The webhook receives one content_draft.sent package per page, sharing a batchId.
  5. Close the dialog. The picks are cleared, and each sent row shows its send icon.
  6. Tick 26 rows: the bar says "Up to 25 pages a send" and Send is off.
  7. Under Archived, and as an analyst, there are no boxes.

Checked locally at 1024px (the table still fits with the extra column), in light and dark. I used three temporary drafts on the dev DB and deleted them afterwards, together with the delivery rows and the webhook config. The demo draft was verified byte-identical.

The browser check ran before the pre-push review's fixes: matching by delivery id, the Library re-reading queued rows, page-named refusals, Try again, and bytes for the groups. Those are covered by tests.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/): 0 errors, 6 existing warnings in files this PR doesn't touch
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

Also run:

  • yarn test: 372 files / 3394 tests pass.
  • yarn build with CI's placeholder env passes.

🤖 Generated with Claude Code

cihan-gyk and others added 30 commits October 23, 2026 02:24
The workspace's one AI budget (Improve, the Content Editor's AI and the
Action Center's task writer) had no meter: the first sign of it was an
"AI usage is used up" error. Migration 00242 records what each AI call
was for (prompt_improve_usage.feature, backfilled) and sums the period's
spend by feature (ai_usage_by_feature). GET /api/billing/ai-usage
returns the shares of the plan's budget, and the Billing page shows the
share used, when it resets and what used it, with Agent Chat noted as
running on the workspace's own key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The workspace's AI budget was checked by reading the period's spend; the
call's cost was written once the model answered. Calls running at once
(two tabs, a teammate, an Action Center sweep) all read the same spend
and all ran past the budget. 00243's reserve_ai_usage takes a
per-organization lock, reads the spend with the calls in flight, and
holds the call's estimated cost; reserveAiBudget turns the hold into the
real cost or releases it. Improve, the brief rebuild, Apply rules with
Agent, Start Agent and the Action Center task writer use it in place of
enforceImproveQuota, which goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review fixes:
- Apply rules with Agent and Start Agent charge an answer the provider
  billed but that missed the schema (NoObjectGeneratedError), as Improve,
  the brief and the task writer do; before, the hold was let go and the
  call ran free.
- A call holds the org's median cost over its last 20 calls this period,
  never less than the model's typical cost, so calls in flight pass the
  budget by far less.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Apply rules with Agent makes at most 8 small edits a run, which can't
bring a long page to its Length (about 2% a run on prod). The Content
Agent can now rewrite the whole page in one background call, left as ONE
suggestion (kind 'page', migration 00247) to compare and accept or reject:
- POST /api/content-drafts/:draftId/rewrite, through Start Agent's claim,
  budget hold and background run;
- passages AI quotes today, tables, images, quotes and HTML blocks go to
  the model as [[KEEP n]] lines and come back as they were; a rewrite that
  drops one fails the run;
- one H1, only the page's own links and the ones offered, the editor's
  tags; the page as it was is kept on the suggestion (before_html).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Length

Review fixes:
- Kept blocks are described under the page (a quoted passage's words, a
  table's rows, an image's alt) and their text counts toward Length, so a
  rewrite aims at the whole page's length; with Length off it keeps the
  page's own. A kept H1 stays first, and the page's language is kept.
- The answer is taken out of a code fence, text left at its root goes in
  paragraphs, and an answer in Markdown fails the run.
- The page's own links stay exactly as written (query and anchor too).
- Kept blocks go back untouched (an empty table cell stays), only the
  page's first H1 counts as its title, a page that writes "[[KEEP" gets
  markers of its own, and a page that is only kept blocks isn't sent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…compare it

The Rules tab opens with the agent's two ways to meet its rules: Apply
rules with Agent (small edits, up to 8 a run) and Rewrite the page to
these rules (the whole page as one change). The rewrite is recommended,
with a one-line reason, when the page is more than 30% off its Length or
4 rules or more are open.

A rewritten page comes back as one suggestion with its own bar over the
page: the characters before and after and the agent's reason, Compare
(the page and the rewrite side by side), Accept (History keeps the page
first), Reject, and Undo. A page that changed since the agent read it
isn't written over. The page waits for the rewrite with its own steps,
and a failed rewrite's Try again rewrites again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review fixes:
- A page is compared with the one the agent read by its words, with a
  space between blocks, so stored line breaks and lists don't read as a
  change (Accept and Undo were refused on imported pages).
- One agent run at a time from the page; a rewrite never starts before
  the locked passages are read, and sends the editor's own locked keys.
- Accept holds the page still from the start and checks it again before
  putting the rewrite in; Undo puts the page back as it was (two H1s too),
  and the bar waits while the HTML view is open.
- No rewrite advice for an empty page or one too long to send whole; the
  rewrite mark survives a reload; the waiting view says the rewrite waits
  in the editor; Compare's links don't navigate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Content Editor v1.1, part 1 (CE-025, CE-026, §4): the agent row and the
rewrite bar become one card above the toolbar, in three states:
- waiting: "Content Agent has {n} suggestions for you", what they change
  and the rules they gain ("Rules 5 → 6 of 13"), with Review (scrolls to
  the first suggestion and marks it), Reject all and Accept all; a page
  rewritten shows its characters, with Compare;
- all reviewed: what was accepted and the rules met and still open, with
  Undo all and Run Agent;
- working: while Apply rules with Agent runs.
The tile moves a little (a soft ring, a blink, a spark; a sweep and a
breath while working), never a rotating ring, and not at all with reduced
motion. The card wraps on a narrow page; Accept all and Run Agent are the
primary buttons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Run Agent on the card keeps to one agent run at a time and says why it
  waits; Apply rules never starts beside another run or before the locked
  passages are read.
- Ghost buttons show their hover on the card's grey; the tile and its
  count are hidden from screen readers (the title says it) and the count
  is darker for contrast; "+N more" comes from en.json, the reason's first
  letter is upper-cased in the page's locale.
- Review picks the first open suggestion in the page's order and focuses
  it; the sweep shows on the light tile in dark mode; the spark is slower
  once all are reviewed; without motion the working line is a faint full
  line; "0 still open" isn't said.
- globals.css keeps its own lines; only the motion block is added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…split Run Agent

Content Editor v1.1 part 2 (CE-028–CE-031): the side panel's tabs become
Instructions · Sources · Live page. Instructions holds Brief | Rules, with
the rules still open on the tab and the segment. Each segment opens with a
status card: Rules has one split Run Agent ▾ (Fix open rules, or Rewrite
the whole page, which renames it "Rewrite page") in place of the two rule
buttons; Brief has Run Agent while empty and Rebuild brief once written.
Why the agent can't run is written under the card, and each card's ⓘ tip
opens below it. The brief shows "Not set yet" and its Length in characters
and about as many words; the toolbar counter adds the page's words.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Run Agent's choice is worked out once and falls back to Fix without a
  rewrite; once a rewrite starts, the button is back on Fix.
- ▾'s choices are menu radio items; Fix is off when only rules the agent
  can't fix are open, and the card says what to do instead.
- The reason line under the card stays mounted for screen readers; Rewrite
  from brief writes its reason too; the tab's count is read out.
- Brief | Rules switch with the arrow keys, one tab stop.
- An edited brief's rebuild question sits under the card; a brief without
  H2s says to rebuild it; an empty brief shows no origin line.
- Plural copy for the open suggestions and the counter's words; rule names
  joined by the formatter; Run Agent's tip leaves ▾ out without a rewrite.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Content Editor v1.1 part 3 (CE-032, CE-034): under each Run Agent card,
"Uses your data: 1 prompt · 21 fan-outs · 20 cited pages · 10 Search
Console queries · Edit sources", counted as the Sources tab keeps them, so
turning one off lowers it at once. The Sources tab carries its count, and
its top says "N sources in use" and when the Content Agent last wrote from
them (its latest suggestions or the brief it built). A first visit's note
at the top of Instructions says the agent writes from the person's data;
closing it is kept in their own user metadata.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- "Last used by Content Agent" also counts the agent writing the page
  (agent_state_at: Start with Agent, Rewrite from brief on a new page),
  not a run that failed; a value that isn't a date is skipped.
- The latest batch's time is its first suggestion's, not a sort per render.
- Tests: the Brief segment's line, no line while the sources can't be read,
  the tab's count, the note showing again after a failed write, and a
  suggestion read with its createdAt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… name them

Content Editor v1.1, CE-033 (server): Fix open rules, Start with Agent and
Rewrite the whole page read the sources the Sources tab keeps, numbered
S1, S2… (content-sources.js). Each suggestion keeps the sources it names
and the words each supports (content_draft_suggestions.sources and
source_marks, 00248); a page rewritten whole keeps its sources.

No number without a source: the model reads a source by its words only, so
a number the agent adds must be the page's, the brand's, the brief's, the
rules', today's, or in a source's own words (then marked to it). A
suggestion with any other number is not kept; a page written whole gets a
placeholder in its place. Source numbers written into the words are taken
out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Content Editor v1.1, CE-033 (web) and the rest of CE-034: under each
suggestion, "Based on" chips name the sources it used (number, kind, name;
the Sources tab's details on hover), and a small number marks the words
each supports. A click on either opens Sources on that row, scrolled to
and ringed for a moment, once. The agent card adds "built from N of your
sources · See sources". Fix open rules sends the kept sources, and the
first-visit note says every change shows the sources it used.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Content Editor v1.1, CE-027/035 (server): each Content Agent run (Fix open
rules, Start with Agent, Rewrite the whole page, the brief) is written in
content_agent_runs (00249) with its steps named by the data it reads
("Reading 20 cited pages", "Matching 21 fan-outs", "Writing 3 changes") as
it reaches them. POST /api/content-drafts/:id/stop marks the run stopped
and aborts its model call; the run checks before it keeps anything, so a
stopped run changes nothing (no suggestions, page, brief or History).

A run that can't be written still runs; runs a stopped server left are
closed when the next starts, and Stop ignores them. Background runs are
written before Start answers, so Stop finds them at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Stop also clears the draft's 'writing' state at once: a background run lets
go once it sees the stop, but one no server holds any more never would, and
the waiting page would wait out the 10 minutes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…p it (CE-027, CE-035)

The agent card, the brief and the waiting page show the run's real steps
(content_agent_runs, read from the browser every second) and a Stop button
that ends the run through the API proxy, leaving the page as it was. A dashed
decoration under the H1 says where Fix is drafting, and the agent's dots
replace every spinner on its buttons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…h (CE-030)

When the brief is rebuilt, the server reads the first few cited pages kept
in Sources (only addresses AI answers cited for the brand, never the draft's
own page), counts their main text as the Rules tab counts length, and saves
the median as brief.citedLength. The Brief tab says "From the rules · cited
pages average N characters"; with fewer than two pages read it stays "From
the rules". textLength moves to page-content.js to avoid an import cycle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	server/src/lib/content-writer.js
#	server/src/lib/content-writer.test.js
#	supabase/schema.sql
…le it writes

content_drafts.agent_run ('write' or 'rewrite', in 00247 and its guard) is
set when Start or a rewrite claims the draft, so every device knows a failed
rewrite from a failed Start. Fix open rules and the MCP suggest call answer
409 'writing' while a run holds the draft, so its answer is never dropped
after it was charged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…le it writes

content_drafts.agent_run ('write' or 'rewrite', in 00247 and its guard) is
set when Start or a rewrite claims the draft, so every device knows a failed
rewrite from a failed Start. Fix open rules and the MCP suggest call answer
409 'writing' while a run holds the draft, so its answer is never dropped
after it was charged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…st batch's rows

The editor reads content_drafts.agent_run, so a failed rewrite is tried again
as one on every device (the localStorage mark is gone). Fix open rules' new
409 'writing' says the agent is already writing. getDraftSuggestions finds
the latest batch first and reads only its rows, and Compare's links can't
take focus.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The card's Run Agent writes its reason in the card's second line (amber, tied
to the button by aria-describedby) instead of a hover title, and is turned
off when the only rules left open are ones the agent doesn't fix (one H1),
as the Rules card does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cihan-gyk and others added 8 commits October 24, 2026 12:11
…es have gone

Pages too long for one request went as two sends side by side; ansvisor#1331 sends
one page at a time. The dialog now waits for the last request's queued
pages (reading them every 2 s, for up to 3 minutes) before posting the next.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ast_deliveries, and a stale queued one as interrupted

- one row a draft (00262's function, distinct on draft_id), so a page sent
  many times keeps its mark past PostgREST's 1,000 rows
- a send still queued after 15 minutes reads as "Not sent: interrupted":
  the Library neither waits on it nor says it is still going

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ep the kept slug per field

- HTML edited in the HTML view and not applied asks to be applied first
- the header's Send waits while the page saves (one click), and is off
  while the page can't save (conflict, too large), as Mark ready is
- the dialog keeps what the draft kept in each field the person hasn't
  changed, the slug above all; Try again stays in place while it reads
- the meta title prefill cuts at any space, never inside an emoji, without
  the punctuation the cut leaves

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…o, as the Library does

One helper (lastSend) reads both the Library's marks and the Send dialog's
last send, so the two never disagree; its type sits where generation puts it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…oes, showing what went meanwhile

- the next request waits up to 15 minutes (00262's interrupted limit), not
  3; past it, the rest aren't posted beside the pages still going, and the
  dialog says how many weren't sent
- while it waits, the dialog shows what went and "Waiting" for the rest,
  and can be closed (the rest still go); a failed read is read again
- once the day's sends are used up, no more requests are posted

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…test's mock

The ansvisor#1439 merge took the table reads by ids out of the mock along with
readCmsStatuses' old read; readKeptFields and readDeliveries still use them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

Thanks. Both items are handled. #1439 and #1438 are merged in (89e6963), and upstream/main came in through #1438.

  1. A send left queued. readCmsStatuses (from feat(content): send a Library page to the CMS from its row, and show each row's last send (Send to CMS #1331, part 3a: Library row) #1439) reads a send still queued after 15 minutes as failed, "Not sent: interrupted". The Library's polling stops on it, and the editor's Send dialog reads it the same way.
  2. Groups side by side (07ab428, 0edb2f9). When the pages split into several requests (over ~3 MB), the dialog posts the next request only once the last one's pages are no longer queued, so pages still go one at a time. From the pre-push review:
    • The wait lasts up to 15 minutes, 00262's interrupted limit, because one 25-page group can take about 7 minutes. Past that, the rest aren't posted beside pages still going. The dialog says how many weren't sent (bulk.waitedOut).
    • The dialog no longer sits in "sending" for minutes. It shows what went, "Waiting" for the pages still to post, and progress over all of them. It can be closed; the rest still go while the Library is open.
    • A read that fails during the wait is read again.
    • Once a request comes back with pages skipped for the day's cap, no more requests are posted.
    • Tests cover the wait (including a failed read), the 15-minute limit and the day's cap.
    • cmsSendGroups' comment says the groups no longer go side by side.

Checks: format, lint (no new warnings), typecheck and the build pass. One test failed in the full run: main's _export-dialog.test.tsx "downloads Word and Markdown…". It checks focus right after an arrow key, and it failed the same way on a branch cut from main without these changes. It passes on its own (3 of 3), and every other test passes (3,411).

@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.

Both items are done. Two low follow-ups:

  1. Closing during the wait. _bulk-send-dialog.tsx:207-228 with :268 and :338-339: the dialog can be closed while a request waits for the last one's pages.

    • send() goes on after the dialog unmounts. It posts the rest once the earlier pages have gone, up to 15 minutes later.
    • Until then, nothing shows those pages are still to go. Their rows keep their last send, and the Library stops polling once nothing is queued.
    • Someone who closes the dialog and sends the same rows again gets them in the CMS twice.

    Fix, either:

    • keep the dialog open while requests wait (Close off, as during sending); or
    • stop the loop when the dialog closes (a ref checked before each post) and say how many pages weren't sent.
  2. _bulk-send-dialog.tsx:405-416: a page whose workflow called back failed after its webhook answered 200 shows "Webhook answered 200" in red. The workflow's reason is only in the title. Show "Failed" with the reason for a 2xx answer, as on #1439.

This branch carries #1438's basket test, which ends the run with an unhandled elementFromPoint error. Merge #1438's fix in.

Checked and fine:

  • The next request goes only once the last one's pages aren't queued.
  • A read that fails during the wait is read again.
  • Past the 15-minute limit, the dialog says how many pages weren't sent.
  • A request that hits the day's cap stops the rest.
  • Progress counts the waiting pages.
  • Merge commits ebe7946, 2898f14 (en.json resolved by keeping both sides) and 89e6963 carry no changes of their own.

cihan-gyk and others added 5 commits October 24, 2026 13:46
… and give a 2xx send's failure its reason

- the test clicks the page's text: ProseMirror reads the click's place
  with elementFromPoint, which jsdom lacks; it's stubbed for that test
- a send the webhook took (2xx) that the workflow then called back failed
  shows the workflow's reason, not "The webhook answered 200"

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d read a send as interrupted after 30 minutes

- a send the webhook took (2xx) that the workflow then called back failed
  shows the workflow's reason on hover, not "The webhook answered 200"
- INTERRUPTED_AFTER_MS follows 00262: 30 minutes, as a batch with webhooks
  timing out can run about 20

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s, and give a 2xx send's failure its reason

- closed (or left) while a request waits for the last one's pages, the
  dialog posts no more, and a toast says how many pages didn't go: else
  they went up to half an hour later with nothing showing it
- the wait follows 00262's 30 minutes
- a page its webhook took (2xx) that its workflow then called back failed
  reads Failed, the reason on hover

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cihan-gyk added a commit to cihan-gyk/ansvisor that referenced this pull request Oct 24, 2026
cihan-gyk and others added 3 commits October 24, 2026 13:59
…e-page one's too

The close was read only during the wait for queued pages: a one-page
request (sent at once, never queued) or a read in flight let the next
request go. It's read before each request after the first too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

Both items are done.

  1. Closing during the wait (f81419a, 546ed4d). I took the second option: the loop stops when the dialog closes.
  2. A 2xx answer with a failure. The row shows "Failed" with the workflow's reason, as on feat(content): send a Library page to the CMS from its row, and show each row's last send (Send to CMS #1331, part 3a: Library row) #1439.

#1439 is merged in (1b00c1e), including #1438's basket test fix. The full run exits 0 (372 files, 3,418 tests).

Checks: yarn format, yarn lint, yarn typecheck, yarn test and yarn build pass.

@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.

All items done. One low follow-up.

Last review:

  1. Closing during the wait: done.
    • A ref is checked during the wait (_bulk-send-dialog.tsx:54) and before each later request (:202). The second check covers a one-page request, and a read that was in flight when the dialog closed.
    • A toast says how many pages didn't go.
    • Both cases have tests.
  2. A 2xx failure now reads "Failed", with its reason on hover, as the other failures do.
  3. GROUP_WAIT_MS and the "waited out" message both say 30 minutes. That matches 00262 at #1437's cffb209 and #1439's INTERRUPTED_AFTER_MS.

Low, can follow:

  1. The person only learns that closing stops the rest after they've closed.
    • While a request waits (going.waiting isn't empty), the dialog shows progress and Close (:340-352, :370-371). Nothing there says the pages still to go need it kept open.
    • Fix: add a short line in that state, for example "Keep this open: the rest go once these have."
    • Also update the component comment at :82-84 ("Closing leaves them going"). It's now true only for pages already posted.

Merge commits bbdfe37 and 1b00c1e carry no changes of their own.

@gkhngyk
gkhngyk merged commit 281c226 into ansvisor:main Oct 24, 2026
4 of 5 checks passed
gkhngyk pushed a commit that referenced this pull request Oct 24, 2026
…k (Send to CMS #1331, part 4) (#1441)

* docs(content): document Send to CMS and the content_draft.sent webhook (Send to CMS #1331, part 4)

- a Send to CMS guide: setting up the webhook, sending one page or up to
  25 from the Library, the row icons, and building the workflow in n8n,
  Make or Zapier with the callback that reports the live address
- the Webhooks reference: the content_draft.sent event (opt-in), its
  package, the X-Ansvisor-Signature HMAC, the published callback and the
  delivery rules (2xx, 15 s, no redirects, 25 a send, 200 a day)
- the Content Editor guide points to it from the editor and the Library

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(content): match Send to CMS's status callback and package fields (#1437 review)

- the callback is /status with { status, url?, externalId?, reason? }
- the package's jsonLd, method, sourceUrl, pageType, language and brand.id
- links to http, https, mailto, tel or relative addresses; the callback
  shares the opportunity callback's limits; a 2 s pause between pages

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(content): say a bulk send's later requests stop when its dialog closes (#1440)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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