Files
crosscode-platform/apps/website/CHANGELOG.md
T
joshuaandClaude Opus 5.5 dcc22a5c16 Accounts 1.8.0, Website 1.1.0: admins redesigned as Cross Events' dashboard and settings
- Website: an icon sidebar in groups (Your site, Content, Go live, Team), a
  dashboard with cards and a tile per part of the admin, steps to the first
  publish across the top of every admin page, and a live preview beside the
  page editor and Template and style (computer or phone width, folds away,
  reloads on save). A framed request (Sec-Fetch-Dest: iframe) with an admin
  session reads the drafts, so no preview cookie is set. /preview/start
  takes ?to=. The page editor has Content and Page details tabs.
- Accounts: /admin is an overview (cards, "Needs you", a tile per section);
  People moved to /admin/people; the sidebar shows the part you're in,
  grouped, with a count on Deletion requests; People redesigned, with a
  confirm before Deactivate; Email and WhatsApp split into two cards.
- Both: darker grey labels for contrast; lucide-react in the Website.
- e2e: the live preview shows drafts while the site stays live; axe on the
  page editor.
- docs: VERSIONS, changelogs, WHATS-NEW.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 19:57:22 +02:00

15 KiB
Raw Blame History

Changelog — Church Website

[1.1.0] — 2026-11-26

No migration, no new settings, no backend changes. The admin redesigned as Cross Events' admin dashboard and settings. Adds lucide-react (the version Accounts uses).

Added

  • Steps to the first publish across the top of every admin page until the site is live (from the setup checklist): each step is a link, done ones are ticked, "Next" goes to the first one to do, and it folds to one line (remembered in the browser). It updates after every save.
  • A live preview beside the page editor (home and custom pages) and Template and style: the page at computer or phone width, scaled to fit, reloaded on each save at the same scroll position. It folds to a tab on the right (remembered); on phones it's a Preview button that opens it full screen. It shows drafts without the preview cookie: a request from a frame (Sec-Fetch-Dest: iframe) with an admin session reads the drafts, so the live site in another tab stays live. Links inside it load in full so they stay on drafts. /preview/start takes ?to= (a site path only) to open the full preview on that page.

Changed

  • The admin's frame: a sidebar with icons in groups (Your site, Content, Go live, Team), a drawer on phones, and a bar across the top with the changes not published, Preview and who's signed in. Publish shows the number of changes waiting.
  • The dashboard as Cross Events': a welcome, four cards (site, changes waiting, storage, last edit), a tile for every part of the admin, and recent edits.
  • The page editor has tabs, Content and Page details (title, address, menu, search and sharing); blocks are cards with a summary, icon buttons to move, hide and remove (asks first), and "Add a block" is a grid of tiles. Template and style has tabs: Template, Home page layout, Style. Every admin page has its icon.

[1.0.2] — 2026-11-26

No migration, no new settings. Works with Accounts 1.7.0; with Accounts 1.7.1 the first sign-in after an install links at once.

Fixed

  • Preview sent admins to the server's own address (http://localhost:<web port>, found on cross-demo2). /preview/start, /preview/exit and shared preview links redirected to new URL(path, request.url), and behind the proxy request.url is the address Next.js is reached on. They now answer with a relative Location (src/lib/localRedirect.ts), so the browser stays on the site's address.
  • The admin couldn't be signed in to for up to 30 minutes after an install. The Website links itself to the church's Accounts, but only at a heartbeat, and Accounts refused it until Accounts' own next heartbeat. Now opening /admin without a link links on the spot (asking the Hub for a fresh list first when it has no Accounts in it; tried at most every 15 seconds). A connect involving an install that isn't in the cached list yet (Accounts, or Events for the event feed) also asks the Hub for a fresh list (at most once a minute) instead of refusing. Only one connect to Accounts runs at a time, so a heartbeat and a sign-in can't leave the two sides with different secrets.
  • The sign-in problem page says when the site isn't linked yet (ACCOUNTS_NOT_LINKED: "This website isn't linked to your church's sign-in yet"), instead of "can't reach your church's sign-in", which read like an outage.

[1.0.1] — 2026-11-26

Fixed

  • The messages' thumbnails come from the site (WEBSITE-1.0-PLAN §7): they loaded from YouTube (i.ytimg.com) with the page, so every visitor was in touch with YouTube before pressing play. The backend now fetches a message's thumbnail once and keeps it (/api/thumbnails/<id>.jpg, kept in uploads/.thumbnails/, not counted as storage and left out of the export); only the site's own messages' videos are fetched, and only a JPEG is kept. The messages page asks for the first one from the <head> (it's the largest thing on screen), and the e2e checks that nothing is asked of YouTube or Spotify until play is clicked.
  • Calendar events' dates read "Sun (month: November)": a weekday and month without a day is printed that way by Intl. Now "Sun · November".
  • The variant screenshots no longer flake (e2e only): a section starting at a fractional position came out a pixel taller or shorter from run to run. The header's and each section's height is rounded up before the screenshot; the baselines were taken again with it.

[1.0.0] — 2026-11-26

Added

  • The app's skeleton (WEBSITE-1.0-PLAN §1): an Express + Prisma backend with /api/health and /api/v1/site/status (Coming soon until the first publish), the content model and its first migration, the section variants per template (§3, decision 16) with the template switch rules, and a Next.js frontend with the Coming soon page, an admin placeholder and robots.txt.
  • Signing in to the admin through the church's Accounts (§10), as Cross Events 3.x: the Hub client (protocol v2, product website, registers from HUB_LICENCE_KEY, heartbeats with aggregate counts), links (crosscode.link/1; the Website connects itself to the church's Accounts once the Hub lists it), /api/auth/signin, /callback, /me, /signout (then Accounts' sign-out), back-channel logout and Accounts' calls (user.updated, user.export, user.deleted). The Website keeps its own session (ccw_session, only a hash stored) and its own roles; the first Owner is whoever signs in with the Hub's admin email (HUB_ADMIN_EMAIL, verified in Accounts) while the site has none. Owners and Admins sign in with a second step (two_factor_required_for_admins, on by default); asked of Accounts once, then explained.
  • The four templates and the public site (§3, §5, §6): Heritage, Bold, Community and Clean, each drawing all 26 section variants its own way, with its headers, homepage order and style settings (section colour, spacing, buttons, image treatment). The church's colours are made safe by the backend (site/palette.ts: tints, shades and text colours checked against WCAG AA, with a note for the admin when one is changed); fonts and corners come from its shared brand style, else the template's suggestion. Pages: home, every page kind (visit, about, ministries, leadership, events, messages, give, contact, custom) with its blocks, simple event pages, a real 404, Coming soon from the church profile, sitemap.xml and robots.txt. Every page has a title, description, canonical, Open Graph and one <h1>; home and contact have the church's JSON-LD. Messages load YouTube (youtube-nocookie) or Spotify only when clicked; maps are OpenStreetMap.
  • Publishing (site/snapshot.ts): Publish copies the working copy into a numbered version; visitors see the latest (GET /api/v1/site/content, with live messages and events and the church profile from Accounts, kept 10 minutes). Section data is checked per type (site/sections.ts); a section that doesn't fit is left out, never shown broken. Uploads are served from /api/uploads/ (SVGs sandboxed).
  • The demo church (npm run demo -- --template <id>): Acacia Hill Church, fictional, with illustrated images; refuses to replace a site its admins published unless --force.
  • End to end (npx playwright test in apps/website, no database, a production build): every template's pages pass axe (WCAG 2.2 AA) and the SEO basics, with screenshots at phone and desktop in e2e/screens/; the admin's flows (edit, preview, publish; discard; a shared link, revoked; restore; a template switch; a Viewer; signing in from a deep admin page) and axe on every admin screen.
  • The release checks (§13): every section variant in every template (e2e/variants.spec.ts: 26 × 4, axe on each, and 312 screenshots at phone, tablet and desktop compared with the last baselines, kept on the machine that runs them, not in git); Lighthouse on a phone (e2e/lighthouse.spec.ts: home, an event and the messages in each template, the median of three runs with the CPU slowdown calibrated to the machine: SEO 100, accessibility 95+, performance 90+); and the same suite on real Postgres (E2E_DATABASE_URL=postgresql://…/<name>_e2e: the database made again, the migrations applied with prisma migrate deploy). The e2e server's clock is frozen, so the demo's dates are the same every run.
  • The map loads only once it's on screen (the With map service times): until then, a link to it. The iframe's own lazy loading fetched OpenStreetMap's 300 KB script with the page on a phone, and told OpenStreetMap about every visitor. The messages page's first thumbnail isn't lazy (it's the largest thing on screen), and the page connects to its host at once.
  • Contrast on Bold (found by the variant checks): the service times' notes on Bold's dark panel (Panel and With map), and the dates of the Calendar events on a dark band, are light now (cc-dark on the panel; cc-brand-text, which the dark rules can override, for the dates).
  • The admin (§4, §10): a dashboard with the setup checklist, pending changes, storage and notes about the church's colours; Template and style (the template, each homepage section's layout with the recommended ones first, the homepage order, the style settings); Pages (details, search engine title and description with a search result preview, the home page's sections, other pages' blocks: add, move, hide, remove; custom pages); Ministries and Leadership; the media library (uploads checked by their bytes, alt text, storage; uploads stop when storage is full); and Publish and history. Roles: a Viewer reads, an Editor and above changes and publishes, a Ministry leader edits only their own ministry. Every change comes from the site itself (same origin).
  • Drafts, preview and publish (§4): every change is a draft; the pending list says what changed, who and when, and any one can be discarded; one Publish for the whole site, with a note; every version is kept and any can be restored into the working copy (each version keeps the working copy's rows, never sent to visitors). The preview shows the working copy on the site's own addresses, fully clickable, with a bar above the page (phone / tablet / desktop width, Back to editing, Publish); a shared preview link works signed out for 7 days or until revoked, and can't change anything. Publish refreshes the public pages at once (WEBSITE_CONTENT_CACHE_SECONDS, 30 by default, is how long they're kept otherwise).
  • People (§10): Owners and Admins add someone by email (their account comes from the church's Accounts through people.ensure, with a "choose your password" email when it's new), change roles and remove access. Only an Owner touches Owners; nobody changes themselves; a lower role or removal ends that person's sessions at once. A Ministry leader is tied to their ministry.
  • Messages (§7): from the church's YouTube channel or playlist automatically (YouTube's public feed, every hour, no API key; each new video goes live by itself), or by hand with a YouTube or Spotify link; speaker, series, passage and notes; publish, unpublish, hide. A video is never added twice; one from the feed can only be hidden (deleting it would bring it back).
  • Simple events (§8): date and time or all day, place, description, photo and an optional link; publish, cancel, remove. Both publish on their own, not with the site (decision 9).
  • Photos made safe and fast (§3): every upload is turned upright, stripped of its metadata (a phone photo can carry where it was taken), kept at most 2400 px wide, and saved at 480, 960 and 1600 px in WebP and JPEG; the pages pick the size the screen needs (<picture>, srcset). Every file counts towards storage; a photo the library can't read is refused. (sharp 0.35: prebuilt binaries, no build step on the servers.)
  • The event feed (§8, roadmap §4), both ways, as Cross Events 2.4: Publish my events serves the Website's published simple events as crosscode.event/1 (GET /api/feed/v1/events, ?updatedSince=; unpublished and removed ones in deleted for 90 days) and tells linked siblings with a signed event.changed; Show events from fetches each linked sibling's feed every 15 minutes and at once on its signed event.changed, keeping read-only copies that link back to the origin (for registering), only of events that really come from that sibling, one bad event skipped, and the last good copy kept when a fetch fails. Admin → Linked products: Connect, Disconnect, Show events from, Publish my events, Check now. Accounts' signed church.changed now fetches the church profile again at once.
  • Church details (§2, decision 10): the church's name, colours, fonts and corners, logo, service times, contact and social links, saved through Accounts' church.update as the signed-in admin; live at once on all the church's sites (not drafts), refused when someone changed them in between.
  • Settings (§10): Google Search Console and Bing verification codes (shown on the home page), the Coming soon line, and the menu's order. Audit log for Owners and Admins; recent edits on the dashboard.
  • Search engines (§11): a share image made from the church's colours and name for pages without their own; Event structured data on the Website's own event pages, VideoObject / PodcastEpisode for messages, BreadcrumbList on every page but home; a page's old address sends people on to the new one (permanent redirect) once published.
  • Two editors at once (§4): a save that someone else's save overtook is refused, saying who, and nothing is overwritten. A Ministry leader's events: an event can belong to a ministry; its Ministry leader adds and changes it, an Editor publishes it. Choose your template with the church's own content: each template can be previewed on the real site before it's chosen.
  • A simple event with an outside link still has its own page here, with a "More information" button (its address in the event feed).
  • Get more storage (§10, decision 12; contracts 1.18.0, Hub 2.22.0): an Owner or Admin asks under Media library (5 GB steps); the request goes to the Hub, which emails Cross Code, and the new limit arrives with a heartbeat. The heartbeat now reports the licence's storage limit, so the Hub emails the church at 80% and when it's full.
  • The admin page signs people in and out; /auth/problem explains a refused sign-in.
  • The church's export (scripts/export-church.ts): export.json in crosscode.church-export/1 with its website part, for crosscode export and uninstall.
  • crosscode: scripts/products/website.sh (the same hooks as Accounts, ports 5300 / 3300, uploads in the export), crosscode add <church> website (needs the church's Accounts; served on www.<address>, or the Cross Code address itself), and the installer shared by Accounts and the Website (install_app).