Docs: admin languages and texts, wording rule for agents, new screen names

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-27 15:46:25 +01:00
co-authored by Claude Opus 5.5
parent 6b46bc0c14
commit 0a2374db18
45 changed files with 443 additions and 360 deletions
+18 -18
View File
@@ -133,7 +133,7 @@ One language: one entry in `locales`, no `[locale]` folder (i18n.md).
**Check.** `pnpm payload generate:importmap` (whiteLabel adds admin components) and `pnpm generate:types` without
errors; `pnpm dev`, `/admin`: first-user screen → after saving, TOTP setup is enforced (QR);
the panel shows Site Settings, Site Integrations, Cookie Settings, Notifications, the Forms group, Consent records.
the panel shows Site settings, Site integrations, Cookie banner, Notifications, the Forms group, Consent records.
`curl -s -o /dev/null -w '%{http_code}' -X POST localhost:3000/api/ipal/consent -H 'content-type: application/json'
-d '{"id":"0123456789abcdef","version":1,"state":{"necessary":true,"functional":false,"analytics":false,"marketing":false}}'` → `201`.
@@ -290,7 +290,7 @@ exports `route.Page`, `route.generateMetadata`, `route.generateStaticParams`.
`notFoundView.ts` (`'use server'`, `loadNotFoundView(locale)` → `renderNotFoundView(content, { blocks: blockRegistry }, locale)`)
and `not-found.tsx` (`export default createNotFoundPage(content, { load: loadNotFoundView })`) — both from `/rsc`, PROGRAMISTA §2.8.
**Check.** `curl -sI localhost:3000/ | grep -i location` → `/pl`; after stage 11 (Homepage in System Pages)
**Check.** `curl -sI localhost:3000/ | grep -i location` → `/pl`; after stage 11 (Homepage in System pages)
`curl -s -A Googlebot localhost:3000/pl | grep -o '<link rel="canonical"[^>]*>'` — in `<head>`, plus `hreflang`
and `rel="alternate" type="text/markdown"`; `/pl/nie-ma-takiej` → 404 with content from the panel; `/admin` and `/_next` → no 500;
`pnpm build` shows `●` (SSG) next to `[[...slug]]`.
@@ -318,7 +318,7 @@ and `rel="alternate" type="text/markdown"`; `/pl/nie-ma-takiej` → 404 with con
| File | Content |
|---|---|
| `src/app/sitemap.xml/route.ts` | `export { sitemapRoute as GET } from '@/lib/content'` + `export const dynamic = 'force-dynamic'` |
| `src/app/robots.ts` | `export { getRobots as default } from '@/lib/content'` + `force-dynamic` (AI crawler policy from Site Settings → Search & AI; `robots` = code only) |
| `src/app/robots.ts` | `export { getRobots as default } from '@/lib/content'` + `force-dynamic` (AI crawler policy from Site settings → Search engines; `robots` = code only) |
| `src/app/manifest.ts` | `export { manifest as default } from '@/lib/content'` + `force-dynamic` |
| `src/app/api/health/route.ts` | `export { healthRoute as GET } from '@/lib/content'` + `force-dynamic` |
@@ -355,8 +355,8 @@ export function register() {
**Check.** `curl -s localhost:3000/sitemap.xml | head` → `<urlset` with `xhtml:link hreflang`; in the browser
the "XML Sitemap" style; `curl -s localhost:3000/robots.txt` → `Sitemap:`, `Disallow: /admin`, AI bots (GPTBot,
ClaudeBot…) with `Allow` (a policy picked in Site Settings → Search & AI → AI crawlers shows up after a reload);
`curl -sI localhost:3000/sitemap.xml | grep -i cache-control` → `s-maxage=3600`; `/manifest.webmanifest` → JSON with the name from Site Settings; `/api/health` → `200`
ClaudeBot…) with `Allow` (a policy picked in Site settings → Search engines → AI assistants shows up after a reload);
`curl -sI localhost:3000/sitemap.xml | grep -i cache-control` → `s-maxage=3600`; `/manifest.webmanifest` → JSON with the name from Site settings; `/api/health` → `200`
(`503` without a database); `curl -sI localhost:3000/pl | grep -i 'x-frame-options\|content-security-policy-report-only'`;
an empty `PAYLOAD_SECRET` in `.env` → `pnpm dev` exits with a list of missing variables (restore it).
@@ -365,16 +365,16 @@ an empty `PAYLOAD_SECRET` in `.env` → `pnpm dev` exits with a list of missing
or your own text; `buildSecurityHeaders({ frameOptions, coop, hsts, additional })` — an `additional` entry with the same key
overrides the default; CSP: `buildCsp` flags (`youtube`, `googleMaps`, `extra`), after a clean console `mode: 'enforce'`;
`buildImagesConfig({ extraHosts })`; env validation is fully opt-in — filter/add rules
(`ipalEnvRules(…).filter(…)`). Staging: `IPAL_NOINDEX=1` (also stops IndexNow). Search & AI: `robots` instead of
(`ipalEnvRules(…).filter(…)`). Staging: `IPAL_NOINDEX=1` (also stops IndexNow). Search engines: `robots` instead of
`getRobots` ignores the panel; `ipalKit({ searchSettings: false })` removes the tab; per-bot exceptions in code:
`createContentHelpers({ robots: { aiBotRules: [{ userAgent, access }] } })`. Sitemap: `sitemapOptions: { maxUrls,
cacheControl, memoSeconds }`, `sitemapEntries: (entries) => entries` (add/remove URLs), `underConstructionSeo: false`.
**Search & AI panel step.** Nothing in code — the tab exists by default. **Postgres:** after installing or upgrading
**Search engines panel step.** Nothing in code — the tab exists by default. **Postgres:** after installing or upgrading
the plugin run `pnpm payload migrate:create` (new columns `search_verification_*`, `ai_crawlers_policy`, the
`ai_crawlers_rules` table, localized `llms_intro`) → `pnpm payload migrate`; SQLite/Mongo: nothing. Search Console:
verify the **domain via DNS** (stage 11) and leave the verification fields empty; only for URL-prefix verification
paste the code into Site Settings → Search & AI (never into code). `llmsIntro` (per language): 2–4 sentences of facts
paste the code into Site settings → Search engines (never into code). `llmsIntro` (per language): 2–4 sentences of facts
from the brief (who, what, where, since when, for whom) — it goes at the top of `/llms.txt`. Check:
`curl -s localhost:3000/llms.txt | head` (the note under the description).
@@ -410,16 +410,16 @@ list is currently fixed; block Markdown: `markdown: { overrides }` in `createCon
**Steps.** Skill **ipal-form**: a block with `<RenderForm>` (`/rsc`), `src/components/forms/formClasses.ts`, the action from stage 6
(one per project), every form from a **seed** `scripts/seed-form-*.ts` (email to the company + confirmation to the customer,
every language, consent checkbox). Cookies: skill **ipal-consent-check** — `cookie-scan.mjs` → `import-cookies.ts` into
Cookie Settings → Cookies; on the cookie policy page a block with `<CookieTable>` (`/rsc`, data from `getCookieTable`);
the same list appears in the `settings="detailed"` dialog (labels: Cookie Settings → Detail labels, every language).
Cookie banner → Cookie list; on the cookie policy page a block with `<CookieTable>` (`/rsc`, data from `getCookieTable`);
the same list appears in the `settings="detailed"` dialog (labels: Cookie banner → Settings window → Cookie list headings, every language).
**Check.** Panel → Forms: the seeded form; a submission on `/pl` → an entry in Form Submissions + 2 emails (SMTP:
Site Integrations → SMTP → Send test); with Turnstile test keys the widget is visible, without a token the submission is rejected;
Site integrations → SMTP → Send test); with Turnstile test keys the widget is visible, without a token the submission is rejected;
`node .agents/skills/ipal-consent-check/scripts/consent-check.mjs http://localhost:3000/pl` = 0 errors;
after a choice in the banner a new record in Consent records.
**Turn off / override.** Turnstile: both keys empty (panel and env) → no widget and no verification; fail-closed
`turnstileOnConfigError: 'reject'`; the Turnstile/SMTP fields in Site Integrations currently always. Form look:
`turnstileOnConfigError: 'reject'`; the Turnstile/SMTP fields in Site integrations currently always. Form look:
`formClasses`, unusual ones → `useBuilderForm` (no copy of the engine). Banner: `settings`, `controls`, `order`,
`equalChoice`, `classNames`, tokens; no `consentLog` = no register and no endpoint (then remove `logEndpoint`).
**Consent Mode choice** (record it in "Project decisions"): `'advanced'` (default) — the Google tag loads at once with
@@ -428,7 +428,7 @@ no request to `googletagmanager.com` before analytics or marketing consent (a cl
Check in `basic`: DevTools → Network shows no `gtm.js` / `gtag/js` before consent. Analytics: empty IDs in the panel or
`analytics={false}`. Forms: `createSubmitAction({ turnstileHostnames: ['client.pl'] })` rejects a token solved on
another domain (leave it empty in dev — Cloudflare test keys report `example.com`). The locale cookie respects consent;
after an editor bumps Cookie Settings → Policy version nothing to change (`createProxy(config, { policyVersion })` pins one).
after an editor bumps Cookie banner → Policy version nothing to change (`createProxy(config, { policyVersion })` pins one).
## 10. Navigation
@@ -470,14 +470,14 @@ scaling (5). `●` routes for pages need the database at build time (PROGRAMISTA
**Panel steps for the user** (`/admin`, paste them this list with the gaps from the report):
1. First user with the **admin** role + 2FA setup (TOTP app).
2. **Site Settings → General**: site name, logo, favicon (PNG), description.
2. **Site settings → General**: site name, logo, favicon (PNG), description.
3. **Pages**: home page (title and slug **in every language**, otherwise `/en` → 404), 404, privacy policy,
cookie policy (with the `CookieTable` block), terms if needed; `noindex` on the policies; AI summary.
4. **Site Settings → System Pages**: Homepage (without it `/pl` → 404), 404, policies; content collection archives.
5. **Cookie Settings**: banner texts, Privacy link label, Policy version, Cookies (import from the scan), Detail labels —
4. **Site settings → System pages**: Homepage (without it `/pl` → 404), 404, policies; content collection archives.
5. **Cookie banner**: banner texts, Privacy link label, Policy version, Cookies (import from the scan), Detail labels —
in every language.
6. **Notifications**: form messages in every language.
7. **Site Integrations**: SMTP or Graph (From Name/Address; Send test), Turnstile (for testing site
7. **Site integrations**: SMTP or Graph (From Name/Address; Send test), Turnstile (for testing site
`1x00000000000000000000AA`, secret `1x0000000000000000000000000000000AA`; production keys from the client), analytics/pixel
IDs, IndexNow → generate key. Mail/Turnstile errors show up as a dashboard alert.
8. **Forms**: check the addresses in the Emails tab of the seeded forms.
@@ -515,7 +515,7 @@ prepare the list with values, a human adds them, you verify with `dig`). Full ta
From domain: SMTP from the panel → the domain of the *From address* (records from the mailbox provider); Graph → From is
always `GRAPH_SENDER` (agency domain, set once — nothing in the project). After DNS: *Send test* and in the received
email `Authentication-Results: spf=pass dkim=pass dmarc=pass`. We verify Search Console **via DNS** —
the verification fields in Site Settings → Search & AI stay **empty** (only URL-prefix verification uses them; the plugin then adds the `<meta>` itself); submit the sitemap `https://client.pl/sitemap.xml`
the verification fields in Site settings → Search engines stay **empty** (only URL-prefix verification uses them; the plugin then adds the `<meta>` itself); submit the sitemap `https://client.pl/sitemap.xml`
once by hand in GSC and Bing (no API). Turnstile, IndexNow, llms, MCP — no DNS.
Final report: what is wired, what is missing (data, keys, decisions), the DNS record list with values (`dig` status), every `ipal-audit-skip`, any