Merge branch 'fix/updates-all-products'

This commit is contained in:
2026-11-27 08:36:04 +02:00
7 changed files with 26 additions and 13 deletions
+13
View File
@@ -5,6 +5,19 @@ versions follow [Semantic Versioning](https://semver.org/).
## [Unreleased]
## [2.24.1] - 2026-11-27
No migration; no API is removed. Frontend only, apart from one error message.
### Fixed
- **Servers → Updates offered only Cross Events and Accounts.** The product tabs were a fixed list
from before the Church Website, so its installs couldn't be updated from there (only one at a
time from the install's page). The tabs are now every product: Cross Events, Accounts, the Church
Website, and the App once it has an install. The note on what happens to each church's Accounts
shows for every product but Accounts. The "one product per batch" error no longer names only
Events and Accounts.
## [2.24.0] - 2026-11-27
No migration; no API is removed.
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "events-hub-backend",
"version": "2.24.0",
"version": "2.24.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "events-hub-backend",
"version": "2.24.0",
"version": "2.24.1",
"hasInstallScript": true,
"dependencies": {
"@anthropic-ai/sdk": "^1.3.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "events-hub-backend",
"version": "2.24.0",
"version": "2.24.1",
"private": true,
"description": "Cross Events Hub — API for managing Cross Events installs, licences and heartbeats",
"main": "src/index.js",
+1 -1
View File
@@ -1200,7 +1200,7 @@ async function scheduleUpdate({ deploymentIds, product: wanted = null, version,
const deployments = await prisma.deployment.findMany({ where: { id: { in: ids } }, include: { server: true, install: true, customer: true } });
if (deployments.length !== ids.length) throw fail(404, 'NOT_FOUND', 'One of the installs wasn\'t found.');
const products = new Set(deployments.map(d => d.product));
if (products.size !== 1) throw fail(400, 'BAD_REQUEST', 'A batch is for one product: choose Cross Events or Accounts installs, not both.');
if (products.size !== 1) throw fail(400, 'BAD_REQUEST', 'A batch is for one product: choose installs of one product, not several (or update a whole church from its customer page).');
const product = [...products][0];
// Hub 2.6.0: the page says which product it's updating; a mismatch is refused, never guessed.
if (wanted && wanted !== product) throw fail(400, 'WRONG_PRODUCT', `These installs are ${PRODUCT_NAMES[product]}, not ${PRODUCT_NAMES[wanted] || wanted}.`);
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "events-hub-frontend",
"version": "2.24.0",
"version": "2.24.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "events-hub-frontend",
"version": "2.24.0",
"version": "2.24.1",
"dependencies": {
"lucide-react": "^0.536.0",
"next": "^15.5.24",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "events-hub-frontend",
"version": "2.24.0",
"version": "2.24.1",
"private": true,
"scripts": {
"dev": "next dev -p 3200",
@@ -5,7 +5,7 @@ import Link from "next/link";
import { api, ApiError, errorText } from "@/lib/api";
import { fmtDate } from "@/lib/format";
import { usePaged } from "@/lib/paging";
import { PRODUCT_NAMES } from "@/lib/products";
import { PRODUCTS, PRODUCT_NAMES, type Product } from "@/lib/products";
import { ReleaseSelect } from "@/components/ReleaseSelect";
import type { Release } from "@/lib/types";
import { Loading, Message, PageTitle, Pager, Tabs } from "@/components/ui";
@@ -13,9 +13,9 @@ import { ServersNav, StatusPill, toInput, fromInput, type Deployment, type Job }
type Msg = { type: "ok" | "err"; text: string } | null;
const H = 60 * 60 * 1000;
/** Products the Hub updates on servers. */
const UPDATABLE = ["events", "accounts"] as const;
type Updatable = (typeof UPDATABLE)[number];
/** Products the Hub updates on servers. 2.24.1: the Church Website and App too (only Events and Accounts were offered). */
const UPDATABLE = PRODUCTS;
type Updatable = Product;
const versionOf = (d: Deployment) => d.install?.version || d.version || "?";
@@ -95,7 +95,7 @@ export default function UpdatesPage() {
{!all ? <Loading /> : (
<form className="card space-y-4" onSubmit={submit}>
<Tabs tabs={UPDATABLE.map(p => ({ key: p, label: `${PRODUCT_NAMES[p]} (${(all || []).filter(d => d.product === p).length})` }))} active={product} onChange={pick} />
<Tabs tabs={UPDATABLE.filter(p => p !== "app" || (all || []).some(d => d.product === p)).map(p => ({ key: p, label: `${PRODUCT_NAMES[p]} (${(all || []).filter(d => d.product === p).length})` }))} active={product} onChange={pick} />
<div className="flex flex-wrap items-center gap-2 text-sm">
<span className="text-slate-500">Select:</span>
<button type="button" className="btn-secondary px-2 py-1 text-xs" onClick={() => setChosen(deployments.map(d => d.id))}>All live {name} ({deployments.length})</button>
@@ -115,7 +115,7 @@ export default function UpdatesPage() {
<div>
<label className="label" htmlFor="b-v">{name} release</label>
<ReleaseSelect key={product} id="b-v" releases={ownReleases} value={form.version} onChange={version => setForm({ ...form, version })} />
{product === "events" && <p className="mt-1 text-xs text-slate-500">Each church&apos;s Accounts stays on its version, unless this release needs a newer one: then it&apos;s updated first in the same deploy, or installed first if the church has none. The confirmation lists what happens.</p>}
{product !== "accounts" && <p className="mt-1 text-xs text-slate-500">Each church&apos;s Accounts stays on its version, unless this release needs a newer one: then it&apos;s updated first in the same deploy, or installed first if the church has none. The confirmation lists what happens.</p>}
</div>
{form.emergency && form.asap
? <div><span className="label">When</span><p className="mt-2 text-sm">As soon as possible: the agent starts within a minute. They run one at a time.</p></div>