Skip to content

[pull] main from TryGhost:main - #1439

Merged
pull[bot] merged 7 commits into
code:mainfrom
TryGhost:main
Aug 24, 2026
Merged

pull[bot] merged 7 commits into
code:mainfrom
TryGhost:main

Conversation

@pull

@pull pull Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

9larsons and others added 7 commits August 24, 2026 11:19
no ref

Five small duplications/oddities:
- **Newsletter reorder**: the optimistic-reorder block (mirrored local
state, active/archived derivation, `setQueriesData` + sequential
`editNewsletter`) was duplicated verbatim across `newsletters.tsx` and
`newsletters-tab-content.tsx` (both live, reached from different
settings surfaces). Extracted into `use-newsletter-reorder.ts`, used by
both.
- **Front-end preview fetches**: the theme and announcement-bar previews
hand-rolled byte-identical POSTs (`x-ghost-preview`, cors, credentials);
one `fetch-frontend-preview.ts` helper now owns it — deliberately a
plain fetch, it targets the site front-end, not the Admin API.
- **`use-whats-new`**: a `useQuery` whose queryFn was a synchronous
boolean over already-loaded data → `useMemo`; the synthetic query key is
gone.
- **Email validation**: the two hand-rolled regexes (member edit, import
mapping) → `validator.isEmail`. Looseness audited: every valid fixture
passes both, every invalid fixture fails both; nothing relied on the
looser match — and the server's member validation is validator-based, so
the client now matches the server exactly.
- **`@xyflow/react` CSS**: imported once, in the only module that mounts
`<ReactFlow>` (`automation-canvas.tsx`); verified the styles still land
in the lazy editor chunk in a production build.
no ref

Unified on one limiter instead of multiple implementations.
no ref

The recent cleanup established several invariants by hand; this makes them self-enforcing. Every rule was proven to fire (deliberate violation → error → revert), and product code carries **zero** eslint-disable except four documented ones (see PR).
…ted (#30230)

no ref

If a container restarted while an email's batches were still being
built, the next run treated the partial batch set as complete: sendEmail
skipped createBatches whenever any batches already existed, silently
abandoning the un-built tail of recipients. The email was then marked
submitted with an email_count reflecting the pre-send estimate, so
recipients below the interruption point were never batched or sent.

createBatches is now idempotent. It reads the coverage a prior run
already built (per segment: recipient count and the lowest built member
id) and resumes each segment below that watermark, so re-running builds
only the un-built tail and never duplicates. sendEmail always reconciles
instead of skipping, and totalCount is seeded from existing coverage so
the domain-warmup split and the email_count correction stay accurate.
Batch creation also now aborts at a batch boundary on shutdown,
mirroring the send loop, leaving a consistent partial that resumes on
the next boot.
ref
https://github.com/TryGhost/Ghost/actions/runs/32774072137/job/97591747358

Cached Admin builds could retain restrictive file permissions, leaving
the Docker runtime unable to serve Ember Admin assets. We'd get errors
like this in CI:

```
EACCES: permission denied, open '/home/ghost/core/built/admin/index.html'
```

This normalizes permissions while producing the legacy Ember output so
restored builds remain readable.

This is only for Ember Admin, which we plan to remove soon.
ref df5535b

# Manual test

Disabled the flag:

<img width="400" alt="Screenshot 1"
src="https://github.com/user-attachments/assets/eacc3e66-eff8-4591-bbf9-59c0dcbbfa68"
/>

And I can see the new columns:

<img width="1844" height="368" alt="Screenshot 2"
src="https://github.com/user-attachments/assets/820e1f0d-fa9c-4dc1-aa87-62e7a3913aa1"
/>
@pull pull Bot locked and limited conversation to collaborators Aug 24, 2026
@pull pull Bot added the ⤵️ pull label Aug 24, 2026
@pull
pull Bot merged commit 825943f into code:main Aug 24, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants