R3-1: the SQL adapters throw "Failed query: …" and put the database's own words
("column … does not exist", "no such column") in the error's cause, so the loud
start-up line never appeared on a real Postgres or SQLite. The reason is now
built from the whole cause chain; other failures (ECONNREFUSED, a locked
database) still only warn. Tested with wrapped errors and against the real
adapter with the column dropped.
Docs and the doctor's fix text name how the migration is applied
(deployment.md 4.3) wherever they said only "before the site serves".
Co-Authored-By: Claude Fable 5.2 <[email protected]>
R2-1: /api/ipal/admin-icon answers with bytes only for a bitmap recognised by its
first bytes (PNG, JPEG, GIF, WebP, ICO, AVIF). An SVG favicon keeps the redirect
to the media file: a site-wide CSP rule overrides a route's own sandbox header,
so the header alone protected nothing in a built site. buildUploadSecurityHeaders
also returns a rule for the icon path, as a second layer.
R2-2: the SQL migration runs when the new container starts (prodMigrations, or
the start command), never in Coolify's pre-deployment command; docs and the log
line say so and point to deployment.md 4.3.
R2-3: requireSetup: null is the default. R2-4: the missing-column log line only
for a column error. R2-5, R2-6: the resetAccess example keeps the code check;
with guard: false the reset endpoint does not exist.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
SR-1: /api/ipal/admin-icon sends the upload security headers (sandbox policy,
nosniff) with the bytes: an SVG is shown, never run. fetchPublicImage stops
reading at the size limit.
SR-2: requireSetup.exempt exempts only on exactly true; an async function, and a
windowHours that is not a number or false, stop the start.
SR-3: on Postgres / SQLite the missing column makes every login fail: the log
says so, the docs call the migration a required step of the same deploy, and
ipal-doctor reports a SQL project without it.
SR-4: an admin's reset also ends the account's sessions.
SR-5: the reset needs a session that entered its own TOTP code by default.
SR-6: the doctor's import-map rule covers TwoFactorStatusField and TwoFactorAlert.
SR-7: building blocks exported; dashboard notice, status field, setup notice and
the server-side image fetch can be switched off one by one.
SR-8: totpSetupFrom is on the 2FA collection whenever 2FA is on.
SR-9: both ways out of "every administrator is blocked" in security.md.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Owner's decision: for accounts that exist before the upgrade the 72 hours
count from the first start after it. The code already stamped them then; this
adds the tests that the moment is written once per account (a restart, two
instances starting at once, edits and logins do not move it; 71 h after it setup
is open, 73 h after it the account is blocked) and says so in the docs.
After the rebase on 1.16.5: tests that the setup-required notice and the stale
import-map notice both stand above the screen and never replace the code form,
and that requireSetup, safeBack and guard switch independently.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The tab icon endpoint answers with the image itself instead of a redirect
to the media file, and the logo components hand a session that owes its
2FA code (or has not set 2FA up) the picture fetched without credentials,
as an anonymous visitor gets it. Who can read media is unchanged; when the
file is not public or is larger than 512 KB the site name is used.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
twoFactor.requireSetup (on by default with 2FA): an account of the 2FA
collection that has not set TOTP up is refused by ipal-kit's second-factor
check on every collection, global and plugin endpoint; the setup screen and
/api/setup-totp are all it reaches. It has 72 hours from its creation or
from an admin's reset (field totpSetupFrom, stamped by a hook); after that
setup is refused too until an admin reopens it.
Accounts that existed before get their window at the first start after the
upgrade (backfill in onInit), so nobody is blocked when a site upgrades.
Admin side: status and reset / 'Reopen setup' button on the account page
(TwoFactorStatusField), POST /api/ipal/two-factor/reset, a dashboard notice
(TwoFactorAlert), a notice on the setup screen; texts in English and Polish.
ipal-doctor reports blocked accounts and a switched-off mode.
Overridable: requireSetup false, windowHours (false / 0 = none), exempt for
a service account, resetAccess; the per-entity second-factor opt-out applies.
API keys, seeds, bearer-token routes and sites with twoFactor false are not
affected.
HTTP tests (REST, GraphQL, first admin on an empty database) run on SQLite,
Postgres and MongoDB; a browser test on the reference site covers the first
admin, a new editor and the admin's reset. Docs, guide, skills, changelog.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
R3-1: the warning fired on any mention of the 2FA package's setup / verify view
in the config, so it stayed after the fix its own text suggests (SafeTotpView
with the path as ipalTotpView, plus the path in admin.dependencies). It now
warns only when the path is a view's Component.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
R2-1: the notice was rendered instead of the 2FA screen, and its flag is a text
search of the importMap.js on disk — not the map in the build. A false alarm
(map generated in the build with the repository's file in the running image, a
re-exporting map) hid a working code form and locked everyone out. The notice
is now rendered above the screen, the log line says "may be", and the flag goes
to ipal-kit's own provider only.
R2-2: views are compared against copies, so a factory that reuses its view
objects is guarded too; copyViews, changedViewKeys, SAFE_TOTP_VIEW,
totpViewImportKey, findImportMapFile and missingImportMapEntries are exported;
ipal-doctor warns when the config registers the 2FA package's own view; docs
wording and a misplaced comment fixed.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
SB-1: the 2FA package replaces a view that already stands under its keys, so a
key that existed before the factory ran was wrongly treated as the project's own
and left unguarded (also with a double registration, or ipalKit over its own
output). Views are now compared by object, right after the factory.
SB-2: SafeTotpView renders through Payload's RenderServerComponent: a client
component set as a 2FA view gets only client props plus the checked back.
SB-3: a production build with the previous import map shows an empty 2FA screen.
twoFactor.importMapCheck (on, production only) reads the committed map at start:
an error in the log and a message on the 2FA screens. Docs name the real symptom.
SB-4: enabled: false restores admin.dependencies; wrapTotpViews keeps exportName.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
@clocklimited/payload-2fa sends the browser to the `back` query value after a
valid code without checking it (GHSA-rffw-fq79-g3ch upstream, not fixed in the
fork): a prepared link ran script in the panel or left the site.
SafeTotpView now stands in front of the package's setup and verify views and
passes on a checked value: a path on the site's origin inside the admin route,
else the admin root. The package's views stay in the import map through
admin.dependencies, so ipal-kit still never imports the package.
twoFactor.safeBack: false turns it off, a function replaces the rule;
safeAdminBack, wrapTotpViews and SafeTotpView are exported. Projects with 2FA
must regenerate the admin import map.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Job queue (R3-1): only a rule that exists is wrapped. At config time that
is what the project wrote; Payload fills in the rest when it builds the
config (3.94.1: run, queue and cancel are all defaultAccess, a logged-in
user) and the sweep of the running config wraps those. No default is
invented, so a request without a user gets what Payload itself answers.
hasTotp false while the account's record carries a TOTP secret (the 2FA
package's own lookup failed, R3-4): the account owes its code, not
'not set up yet'.
Docs: the two-configs-in-one-process case for calls without a source, and
that a half-logged-in editor's browser is refused media files.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
R2-1: the sweep skipped every collection whose slug starts with payload-,
so a plugin's payload-... collection added after ipalKit was never guarded.
There is no exception by name or prefix now: every collection and global
is guarded, Payload's own included, and the job queue's run / queue /
cancel rules too.
R2-2: role predicates called without a source fail closed where the staff
collections are not known (browser bundle, middleware, edge): nobody is
staff. They accept req.payload, a config (also the client config) or
{ staffCollections } as the source.
R2-3: the staff list is filed per config / Payload instance; a call without
a source gets only what every config in the process calls staff.
R2-4: payload.config is watched on the instance, so a config swapped in by
a dev reload is guarded before any request or Local API call.
R2-5: verify attempts are limited per account (default 5 in 10 minutes,
twoFactor.verifyLimit), counted in memory, never skipped.
R2-6: a user object without collection owes the second factor; endpoints
the 2FA package may add on collections or globals are guarded too; a
warning names staff collections that 2FA does not cover; docs state what
is not covered, fix the one-argument examples and the doctor example.
HTTP tests for each on payload-2fa beta.7, run on SQLite, Postgres and
MongoDB (test adapter added).
Co-Authored-By: Claude Fable 5.2 <[email protected]>
F1: roles count only for accounts of a staff collection, in every exported
predicate and access builder (isAdmin, isEditor, hasMinimumRole, adminOnly,
adminOrEditor, requireRole, adminOrSelf, adminOrSelfIn, the Field variants,
the roles field) and first in userMeetsRole. An account of another auth
collection with its own roles: ['admin'] gets nothing. Staff collections:
admin.user, access.authCollection, access.staffCollections. Predicates take
req.payload as an optional last argument and otherwise use the staff
collections of the config ipalKit built in this process.
F2: every endpoint @clocklimited/payload-2fa registers answers accounts of
the 2FA collection only (setup-totp wrote the secret into the 2FA collection
under the caller's id, whatever collection the caller came from); remove and
the admin reset/remove endpoints also need the second factor.
F3: per-entity opt-out honoured, operation by operation: the package's
custom.totp.disableAccessWrapper and ipal-kit's custom.ipal.secondFactor
(passed on to the package); the package's global disableAccessWrapper too.
F4: a no-user auth strategy on the 2FA collection guards the live config at
the start of each request, so entities from plugins listed after ipalKit
stay guarded after a dev hot reload and with disableOnInit.
Tests through HTTP for all four; the 2FA tests now run on payload-2fa
3.0.0-beta.7 (what client sites use), a second file on beta.1 (alias), and
the HTTP files can run against Postgres (IPAL_TEST_POSTGRES_URI). Docs,
agent guide, skills and changelog updated; the not-yet-enrolled limitation
is stated plainly.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Staff check (userMeetsRole): the 'no roles field = every account passes'
rule applied to the account's own collection, so an account of a second
auth collection (customers) passed every staff check. It now applies only
to staff collections: the panel's login collection plus the new
access.staffCollections. The injected auth collection uses the new
adminOrSelfIn(slug), so an account of another collection with the same
numeric id is not 'self'.
2FA: @clocklimited/payload-2fa wraps the collections and globals present
when it runs; ipalKit's own globals and collections were added later and
stayed unwrapped, so a password without the TOTP code opened them over
REST and GraphQL. ipal-kit now has its own second-factor check
(secondFactorPassed / requireSecondFactor): applied to every collection
and global at the end of ipalKit, again in onInit for entities added by
plugins listed after it, and inside userMeetsRole and the endpoints that
take a project access function. It fails closed: an unrecognised user
shape is refused, and startup stops when the injected 2FA plugin lacks
the parts the check reads (twoFactor.guard: false opts out).
Tests through real HTTP requests (REST and GraphQL) against Payload's
route handlers, plus the reference smoke test. Docs, agent guide, skills
and the reference skills copy updated; changelog entry without a version.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Matches the help text and docs/project-starter.md; a list stays as given,
no flag leaves it to the answers. resolveExternal() + test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The CLI ignored CI (writeSeen was only !sites && !json); docs and comments
already said "not in CI". shouldWriteSeen() + test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
New option secretMinLength (default 32, 0 turns it off); checked only with
NODE_ENV=production. Docs: env table, deployment (what changing the secret
does, checked in Payload 3.94.1 and payload-2fa), AGENT.md, ipal-reference,
ipal-setup. Tests: short secret fails in production, passes in dev, 0 and a
custom minimum.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(a) The code rejects an over-long value (kind 'too_long', validation text at
the field, answers kept); the limit is fixed. (c) Site settings update needs
the editor role; overridable with globalOverrides.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Verified the IAWL summary's "Doc/code" notes against the code and swept
CLI flags, option names/defaults and env vars. Fixed in the docs:
admin groups (consent-records, cookie-review → Privacy; Form messages
global → Forms), tab labels (More, Spam protection, E-mail sending,
Search engines; Sending method), construction field labels, {field} =
label, globalOverrides instead of "a plugin after ipalKit", enabled:false
keeps globals, pages role labels en+pl, switchLocalePath prefix,
accessibility cookie (necessary), seeding summary() shape, prepublishOnly
chain, doctor --strict --offline in the starter, package files list,
ipal-skills --external in PROGRAMISTA, DATABASE_URI (not _URL),
uploadsCollection exists, SiteProviders nonce, buildLinksField labels,
MCP list_pages limit wording, IPAL_DOCTOR_TOKEN in the env table; shipped
seo-check message "Search engines". Reference skills copy refreshed.
Open questions (not changed): forms over-long text, PAYLOAD_SECRET
length, Site settings update access, doctor seen in CI, bare
`ipal-kit create --external`.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@swc/cli 0.8.0 still resolved piscina 4.9.3 and @xhmikosr/decompress 10.2.1
(the two criticals). 0.8.2 with refreshed transitive deps and vite 7.3.8 as a
direct dev dependency take the dev-tree audit from 31 to 4 (0 high, 0 critical).
Docs: Payload 3.94 needs Node 22.23.5+ also in Coolify; how to check it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: "→ 1.16.2" section. PROGRAMISTA §6: item 63. Reference site: skills
and the AGENTS.md pointer on 1.16.2; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.16.2: pnpm.overrides for Payload's
mongoose (8.24.1 → ~8.24.10; GHSA-pcrw-h46h-c93h critical and four more) and
happy-dom (20.x → ^21.0.4; two highs) in the reference site and the starter; new
ipal-doctor rule transitive-min and DoctorContext.installedAll(name). What projects
must update: every MongoDB site adds the two override lines (Postgres/SQLite: the
happy-dom one), reinstalls, rebuilds and redeploys.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@payloadcms/db-mongodb pins mongoose 8.24.1 (one critical, two high, two moderate
advisories, fixed by 8.24.7) and @lexical/headless 0.50 brings happy-dom 20.x (two
high, fixed by 21.0.4). Payload 3.93.0 fixes neither.
- reference/package.json (and so the starter): pnpm.overrides for mongoose
(~8.24.10) and happy-dom (^21.0.4); pnpm audit --prod on the reference is clean
- root package.json: the happy-dom override for the plugin's own dev tree
- ipal-doctor: transitive-min reports mongoose 8.x < 8.24.7 (error) and
happy-dom < 21.0.4 (warning) from the lockfile and prints the override line;
DoctorContext.installedAll(name)
- AGENT.md §4 item 12, ipal-setup, ipal-upgrade, doctor.md, README, CHANGELOG
Co-Authored-By: Claude Fable 5.2 <[email protected]>
ipal-upgrade: "→ 1.16.1" section. PROGRAMISTA §6: item 62. Reference site: skills
and the AGENTS.md pointer on 1.16.1; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.16.1: Next.js 16.4.6 in the plugin,
the reference site and the starter; minimum safe version 16.4.5 because of
GHSA-mfr8-8qww-v76h (16.3.0–16.4.4); ipal-doctor next-min raised. What projects
must update: every site below 16.4.5 runs
`pnpm add [email protected][email protected]` and redeploys.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Next.js 16.3.0–16.4.4 is affected by GHSA-mfr8-8qww-v76h (CVE-2026-119790, moderate:
information disclosure across root params when a 'use cache' function is called
through unstable_cache()), first patched in 16.4.5.
- next and eslint-config-next 16.4.6 in the plugin's dev dependencies and the
reference site (the starter is generated from it); lockfiles refreshed.
- ipal-doctor next-min: error below 16.4.5, naming the advisory; fix
`pnpm add [email protected][email protected]`; still silenceable. Tests.
- AGENT.md §4 item 11, ipal-setup, ipal-upgrade, doctor.md: minimum 16.4.5;
reference skills copy refreshed. CHANGELOG Unreleased.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: "→ 1.16.0" section. PROGRAMISTA §6: item 61. Reference site: skills
and the AGENTS.md pointer on 1.16.0; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.16.0: files on panel forms, checked,
e-mailed to the company and never stored (forms.attachments, File field, streamed
endpoint with the security wall and abort/timeout handling); attachments over SMTP
and Microsoft Graph (upload session, mailbox copy deleted); test e-mail with a
10 MB file; Turnstile reset and BuilderForm honeypot fixes; Graph token cache.
What projects must update: nothing required; to use files — option, File field,
migration on Postgres/SQLite, formClasses keys, proxy body limit, Graph
Mail.ReadWrite or SMTP. Verify on real systems: Graph 10 MB send and cleanup,
Traefik timeout on a slow upload, SMTP size limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Re-review of 1.16.0: beforeFiles could resume after the request was answered and
register the attempt key with nobody left to release it. It now stops after every
await once the request is over; the registration has no await before it.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Security review of 1.16.0 (blocking): a request body that errored mid-file never
resolved, leaking the concurrency slot and the attempt key. Also: idle and request
timeouts (submit.idleTimeoutMs / timeoutMs), ImmutableId preference on every Graph
draft call, the remaining total in the too-large message, files sent to a form
without a File field are refused and logged.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
ipal-upgrade: "→ 1.15.5" section. PROGRAMISTA §6: item 60. Reference site: skills
and the AGENTS.md pointer on 1.15.5; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.15.5: required fields with
references are seeded complete; a stricter dry run (missing $form / $page is an
error there too). What projects must update: nothing required; a required reference
cycle now fails clearly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
createSeeder's first pass resolves { $page } / { $form } references to existing
records, so a required layout is created complete; a forward $page is filled in
pass 2 and a record whose required field needs it waits for that page. Required
cycles and never-appearing targets are an error with nothing written; the dry run
reports the same, including a missing $form. Guards, create-only, the edit check
and SEED_ONLY are unchanged. Reported from vanstevpl-web.
A page whose required layout holds a { $page } / { $form } reference could not be
created: pass 1 left the whole field out, validation rejected the record, and the
dry run reported a create (vanstevpl-web, 1.15.4).
- pass 1 resolves references to records that exist (or were created earlier in
the run), so the field is written complete
- a { $page } to a page later in the same call is null in pass 1 and filled in
pass 2; a record whose required field needs it is retried once that page exists
- required links in a cycle and references to pages or forms that never appear
are an error with nothing written; unknown page targets are found while
planning, so the dry run reports them too
- dry run: a missing form is an error (was a placeholder); a form planned earlier
in the same dry run counts as existing
- real-Payload tests (pl, en, de): the report's careers page, an existing form
target, optional and required forward links, a cycle, missing page and form,
create-only second runs, dry-run parity
- CHANGELOG Unreleased, seeding.md, api.md; reference skills refreshed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: "→ 1.15.4" section (repair with SEED_UPDATE, live site with SEED_ONLY,
edited records and global arrays by hand). PROGRAMISTA §6: item 59. Reference site:
skills and the AGENTS.md pointer on 1.15.4; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.15.4: seeding whole localized arrays
keeps every language. What projects must update: nothing required; repairing records
an earlier seed wrote needs SEED_UPDATE=1 (locally first; on production with SEED_ONLY
and IPAL_SEED_ALLOW_PROD_UPDATE=1 after a backup), edited records and global arrays
by hand.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
createSeeder / writeLocales: a value seeded per language as a whole (form fields,
nested select options, page layouts, global arrays) keeps the stored row ids in
every locale instead of only the last language surviving; localized: true fields
keep rows per locale. Seed guards, the edit check and SEED_ONLY are unchanged.
Reported from vanstevpl-web.
createSeeder / writeLocales: a value written per locale as a whole —
fields: { pl: [...], en: [...], de: [...] }, a page layout, a global array —
returned the picked locale without walking into it, so each locale write made new
shared rows and only the last language survived (vanstevpl-web, 1.15.3).
- localize() localizes the picked value again with the stored rows, so row ids
are shared across locales (arrays, blocks, nested arrays in blocks, groups)
- writeLocales passes the target's fields: a field that is itself localized
(localized: true layout) never reuses another locale's row ids
- real-Payload regression test (pl, en, de): form with blocks and nested select
options, shared and localized page layouts, global array via fillGlobal; a later
PL save validates
- CHANGELOG Unreleased, seeding.md, api.md; reference skills refreshed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: "→ 1.15.3" section. PROGRAMISTA §6: item 58. Reference site: skills
and the AGENTS.md pointer on 1.15.3; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.15.3: ipal-audit and ipal-doctor no
longer report the panel's bilingual labels (adminText(), { en, pl }) as hardcoded
text; public text is still reported. What projects must update: nothing required;
pnpm ipal:skills for the updated audit scripts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-audit and the doctor's i18n-literals read the syntax tree (polish-literals.mjs,
a plain grep without TypeScript): adminText(), { en, pl } as label, singular, plural,
description, placeholder or group, a rowLabel() fallback and const x: AdminText in a
schema file are accepted. Still reported: every .tsx file, Polish-only labels, other
keys, anything under defaultValue. Reported from the Niezly Dandys project.
"Hardcoded Polish text in code" (i18n-literals) grepped every string, so adminText() and { en, pl }
labels in schema files were reported, though AGENT.md 6.5a asks for them. polish-literals.mjs reads
the syntax tree with the project's TypeScript (a plain grep without it) and spares those forms in
schema files only; every .tsx file, Polish-only labels, other keys and defaultValue still fail.
Reported by Niezly Dandys (1.15.2).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: "→ 1.15.2" section. PROGRAMISTA §6: item 57. Reference site: skills
and the AGENTS.md pointer on 1.15.2; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.15.2: ipal-doctor finds the frontend
route group by structure (any app/(<group>) with the catch-all page, layout.frontend
override, findFrontend), accepts notFoundView.ts/.tsx. What projects must update:
nothing required; remove a temporary layout-required silence.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
layout-required takes any app/(<group>) (or app) that holds the catch-all page, a
localized one first, instead of the literal (frontend); two candidates warn.
notFoundView may be .ts or .tsx; required files accept their usual extensions.
ipal-doctor.json layout.frontend wins; new export findFrontend. Reported from the
Say Diamonds project.
layout-required no longer assumes src/app/(frontend): any app/(<group>) (or app itself) holding the
catch-all page is the frontend, a localized one first; two candidates give a warning naming both.
notFoundView.ts or .tsx, and the usual extensions for the other required files. New
ipal-doctor.json layout.frontend override and export findFrontend. Reported by Say Diamonds
(1.15.1, route group (site)).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: "→ 1.15.1" section. PROGRAMISTA §6: item 56. Reference site: skills
and the AGENTS.md pointer on 1.15.1; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.15.1: guardSeedExit() (a seed that
ends early exits 1 with the reason), wired into the seed templates and the
reference site; reference smoke tests start their own server. What projects must
update: nothing required; add guardSeedExit(), check echo $? after a seed in Coolify.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- reference/playwright.config.ts: reuseExistingServer only with E2E_REUSE_SERVER=1.
Playwright starts the built site itself on E2E_BASE_URL's port (default 3100) and
fails when the port is taken — before, a dev server of another project on 3100
(intecion.com's) was tested instead. CI is unchanged: it starts nothing before
test:e2e. README's production check follows.
- reference/.agents/skills refreshed after the seed-exit-guard merge (ipal-form and
ipal-site seed templates, ipal-reference); INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
guardSeedExit() (@intecion/ipal-kit/seed, opt-in): a beforeExit guard exits 1 with
the reason when a seed run ends before Payload initializes or before summary();
createSeeder and summary() mark the stages. Wired into the reference seed and the
ipal-site / ipal-form seed templates. Normal exit codes are unchanged.
payload run starts the CLI with `void start()` and imports the script; when the script's top-level await
is left without live handles, Node exits with code 0 and no output — a success in Coolify's Terminal.
guardSeedExit() (@intecion/ipal-kit/seed, dependency-free) listens for beforeExit: until summary() runs it
prints "[seed] ended before Payload initialized" / "… before the seed finished" and exits 1. createSeeder
marks the run initialized, summary() finished; process.exit paths (normal, errors, the production
refusals) are untouched. Wired into the ipal-site and ipal-form seed templates and the reference seed, so
ipal-kit create sites get it. Tests include a real child process started like payload run.
Docs: seeding.md, deployment.md §4.7, AGENT.md, ipal-reference (+ api.md), CHANGELOG Unreleased.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
starter:gate passes the production full-seed check only when the output says
"full seed refused" and the exit is non-zero; a payload run that ends before
Payload initializes (exit 0, no output) is inconclusive and retried, up to 3 times.
Fixes the flaky check found in the 1.15.0 gate.
payload run can end with exit 0 and no output before Payload initializes (its bin does `void start()`;
when the script's top-level await is left without live handles, Node exits). Such a run proved nothing
but passed or failed the `refused !== 0` check at random. Now only "full seed refused" with a non-zero
exit counts; a run without "[ipal] Plugin initialized" is inconclusive and retried up to 3 times; all
three inconclusive fails the gate with that reason.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
After the entry-list heading fix (37131e9/6f56ef4) card titles are h2 when the list
has no section heading; the reference smoke test selector is now :is(h2, h3) a.
Without it CI's reference-full job fails. One file: reference/e2e/smoke.spec.ts.
The entry-list SEO fix (37131e9) renders card titles as h2 when the list has no
section heading; the blog-archive test looked for h3 only.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: "→ 1.15.0" section with the 10 steps and a check. PROGRAMISTA §6:
item 55. Reference site: skills refreshed (ipal-upgrade) and the AGENTS.md pointer
on 1.15.0; INDEX.md regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.15.0: ipal-kit create (starter),
ipal-doctor, design tokens, block library and page templates, reference site
(INDEX.md shipped), database names and seeding after launch, reference-site plugin
fixes, 2FA texts, CookieButton, SEO fixes, exact dependency pins; What projects must
update (10 steps).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The merge-time regeneration ran while reference/ipal-doctor.json was still
unmerged, and git ls-files lists an unmerged path once per stage, so its section
was written three times. Regenerated with the merges complete.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
starter:gate gives every run a fresh tarball (no stale pnpm dlx cache) and proves
which plugin code generated the site (bundle/cli stamp). No conflicts; the
until-silence filter in generate.ts (aa88e4e) is kept.
Reference site: every page has its own meta description, demo archive and service
pages have real-length content; blocksToMarkdown reads section headers.
Conflicts resolved: reference/ipal-doctor.json — both branches removed their own
two live-seo silences, so the merged file keeps only the two permanent rules
(audit:collections-present, i18n-literals); docs/agent/reference-site/INDEX.md
regenerated with pnpm reference:index.
Block library: item headings sit one level below their section (itemHeadingLevel),
the leading block's first image is the LCP image (blockPosition, leadsWithImage,
blockHasImage); fillGlobal skips a field that already holds the seeded value.
Removes the two block-library live-seo silences from reference/ipal-doctor.json.
Seeding exactly the default (allowThemeToggle: true) used to count as unset,
rewrite it and report create on every run. Now: skip (exists), no write. A choice
at its default is still replaced by a different seeded value; editor changes stay.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- blocksToMarkdown: the library's section header (heading → ##, then intro; eyebrow
skipped), intro, quote and bio are content. Pages whose text sat only in a hero
(archive pages, quote, 404) auto-filled no meta description and fell back to the
site description; /md and llms-full.txt also missed every section heading.
- legal() template: the placeholder names its page, so unfilled privacy/terms pages
don't share a description.
- reference: every demo page has its own meta description (pl/en), posts and case
studies use their excerpt; fuller made-up text on services, contact, quote and
the archives (all pages >= 150 words); no seeding of allowThemeToggle (its default,
fillGlobal rewrote it on every run). The two content silences are gone.
ipal-doctor --strict --offline --deep --url: 0/0/0 (4 silenced: 2 permanent,
2 entryList follow-ups of the block-library track). Smoke tests 15/15.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Found by ipal-doctor live-seo on the reference archive pages (entry list under a
page header without a picture): cards jumped h1 → h3, and the first card image
was lazy.
- itemHeadingLevel: items one below the section heading (h3 under h2, h2 under the
page h1, h2 when the block shows no heading); createBlockRegistry({ itemHeadings })
fixes a level per block. featureGrid, entryList, pricing, steps, team.
- blockPosition / blockHasImage (root): createPageRoute and the 404 view pass
firstImage next to isFirst; leadsWithImage marks the first image of the leading
block eager + fetchPriority high (hero, textMedia, featureGrid, gallery, team,
entryList); priorityImage: false turns it off.
- reference/ipal-doctor.json: the two live-seo silences removed; reference skills
and docs/agent/reference-site/INDEX.md refreshed.
- bin/ipal-blocks.mjs executable like the other bins.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
pnpm's dlx cache is keyed by the spec, so the gate reused the previous run's plugin when the
tarball path stayed the same. Each run now packs to a new file name and calls dlx with
--config.dlx-cache-max-age=0. build:starter records the plugin commit in the bundle; ipal-kit
create records the bundle's sha256 and that commit in .ipal/starter.json; the gate checks both,
and the installed plugin, against the packed tarball.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- audit.sh g(): matches on a starter alternative line (`//: …` after file:line:,
the commented-out variants inside @starter:if markers) are dropped. The reference
site's `//: robots: { aiBots: 'block-training' }` / 'disallow' alternatives made
`audit:robots-blocks-ai-bots` fire although the site blocks no AI bots. The doctor
runs audit.sh, so it follows. Tests: a //: line is not a finding, a real
robots: { aiBots: 'block-training' } line still is.
- reference/.agents/skills refreshed with ipal-skills (ipal-reference, ipal-setup,
ipal-site and ipal-audit were behind the plugin's after the doctor/starter merges).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge follow-up for doctor + starter (both fine alone; three tests failed
together):
- generate.ts: an inherited ipal-doctor.json rule with `until` is a temporary
follow-up of the reference site itself (the four live-seo silences until
2026-11-30); a new site starts with those checks on. Permanent, reasoned
exceptions (i18n-literals, audit:collections-present) are still inherited.
- reference/src/instrumentation.ts: the doctor's cookieCrawl header comment is
wrapped in @starter:if crawl, so a site without crawl doesn't mention it.
- docs/agent/reference-site/INDEX.md regenerated (the merge-time copy repeated
the ipal-doctor.json section).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-kit create <domain> generates a new site from the reference site (bin
ipal-kit, /starter entry, gzipped template bundle built at prepublishOnly,
starter:gate); exact pins of the plugin's own four dependencies (D15, nodemailer
10.3.1); the single-language / non-pl-default refusal; reference/ @starter:if
markers, packageManager, cookieCrawl.
Conflicts resolved:
- reference/src/instrumentation.ts: the starter's multi-line ipalEnvRules with
the @starter:if markers (the doctor's cookieCrawl comment line merged above
assertEnv already).
- reference/ipal-doctor.json: the doctor's version, keeping the four live-seo
silences (until 2026-11-30) — the starter's side was the pre-silence copy.
- docs/agent/skills/ipal-reference/resources/api.md: both /starter and /doctor.
- docs/CHANGELOG.md: both sides in both hunks; one Unreleased section.
- docs/agent/reference-site/INDEX.md: regenerated with pnpm reference:index.
The ipal-doctor bin and /doctor entry: static and deep checks (blockLibraryManifest,
old-style block maps, 2FA behind a switch, folder name as database base), per-site
ipal-doctor.json with per-rule off/files/reason/until, and the reference CI doctor
steps turned on. The reference site runs at zero findings with four live-seo
follow-ups silenced with reasons until 2026-11-30.
Same reference/package.json, reference/ipal-doctor.json and ci.yml env lines as claude/ipal-doctor-build,
so the two branches merge cleanly there. ipal-doctor.json of a new site keeps i18n-literals (the /design
styleguide) and audit:collections-present only while posts/caseStudies are in.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
bin ipal-doctor + @intecion/ipal-kit/doctor: static rules (versions, Node 22, AGENT.md §3
layout and naming, database names, env rules, headers, X-Powered-By, CSP, 2FA, cookie
scanner, adminMeta, AGENTS.md, skills, seeds, block library via blockLibraryManifest,
ipal-audit --quick), registry rules (latest plugin, pnpm audit --prod), live rules (--url,
ipal-seo-check), deep rules (--deep via payload run; GET /api/ipal/doctor, off until
IPAL_DOCTOR_TOKEN). Human / JSON output, --strict, exit codes 0/1/2/3, --sites drift table,
ipal-doctor.json with reasons, until, files, seen.
Fixes found on the way: sitemap leaves out the System pages 404 page; ipal-audit finds
array labels after fields, any form seed, runs grep in UTF-8; ipal-seo-check counts
duplicate titles per language. Reference site at zero findings (static), CI steps on.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-kit create stops before writing anything and points to the manual ipal-setup path;
project-starter.md, AGENT.md, ipal-setup, ipal-site and the CHANGELOG say the same.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- bin `ipal-kit` (subcommand `create`): the architecture questions (or --answers JSON),
rendering from reference/ through starter.manifest.json (placeholders, @starter:if variants,
//: alternatives, demo dropped), answers into AGENTS.md "Project decisions" and ipal-doctor.json,
local .env with a fresh PAYLOAD_SECRET, install from the shipped lockfile, ipal-skills,
ipal-tokens, generate:types/importmap, typecheck, ipal-doctor when shipped, secret check,
first commit
- @intecion/ipal-kit/starter: the building blocks (renderSite, validateAnswers, applyVariants,
collectBundle, lockfileWithoutPlugin, secretFindings …)
- build:starter packs reference/ into dist/starter/template.json.gz (90 KB);
starter:gate in prepublishOnly: site from the packed tarball, frozen install, seed, build,
targeted SEED_ONLY seed in production mode, full seed refused, pnpm start checks
- D15: plugin dependencies pinned exactly (nodemailer 10.3.1)
- reference/: @starter:if markers (runs as before), manifest generate/variants/rewrite
- docs: project-starter.md, AGENT.md, ipal-setup, ipal-site, ipal-reference (+ api.md),
README, PROGRAMISTA §2, CHANGELOG, docs/README, reference index
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-kit now leaves the page assigned as 404 out of the sitemap (unlistedPageIds,
merged in 30c1015), so the smoke test checks every sitemap URL again. Verified:
seed, build and 15/15 Playwright smoke tests on a throwaway MongoDB.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
TOTP_TEXTS (en, pl) merged over payload-2fa's, project translations still win,
twoFactor.texts: false keeps the package's; tab titles on the 2FA views
(TOTP_VIEW_TITLE). CookieButton lifts above the footer (avoid, default
COOKIE_BUTTON_AVOID; side; bottomOverlap; --ipal-cookie-button-inset). Admin
language keeps following the browser (no fallbackLanguage change).
Merge addition: the branch had no CHANGELOG entry — both items added under New
in the one Unreleased section, plus Requires project changes item 6 (CookieButton).
The page assigned as the 404 page is left out of the sitemap, llms.txt, the site
index, search, the search route and MCP search_content (unlistedPageIds;
createSearchRoute settingsSlug). buildImagesConfig allows the site's own
/api/media/file/** when R2_PUBLIC_URL is empty. fillGlobal treats a choice field
still at its default as empty. i18n.md: renderLabel client wrapper. No conflicts;
one Unreleased CHANGELOG section.
- TOTP_TEXTS (admin-ux.md wording) merged over @clocklimited/payload-2fa's
long, informal texts; the project's i18n.translations still win;
twoFactor.texts: false keeps the package's. Setup/verify screens titled
"Two-step verification" / "Weryfikacja dwuetapowa" instead of "Payload".
- CookieButton: position via --ipal-cookie-button-offset / -inset and
--ipal-z-header; lifts above the footer (avoid, default COOKIE_BUTTON_AVOID)
while it is on screen; side prop; className still replaces the look.
- dev: a footer in the frontend layout to check the button against.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
searchContent / listContent read Site settings once (depth 0, homepage + notFound)
and skip unlistedPageIds; createSearchRoute and the MCP route pass settingsSlug.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
reference/ (not shipped, own lockfile, plugin as file:..) builds a complete site
on the plugin; docs/agent/reference-site/INDEX.md (shipped) maps features to its
files, with a test; AGENT.md and skill pointers, PROGRAMISTA §8.1b, a Gitea CI job
that builds, seeds and smoke-tests it. Checked here: plugin gate green; reference
seed, next build (SSG) and 15/15 Playwright smoke tests on a throwaway MongoDB.
Merge addition: CHANGELOG Unreleased line for the reference site index.
- sitemap, llms.txt and the site index leave out the page assigned as the 404
page (unlistedPageIds, exported); it stays when it is also the homepage
- buildImagesConfig: in production with R2_PUBLIC_URL empty, allow the site's
own /api/media/file/** so next/image no longer answers 400
- fillGlobal: a choice field (select, radio, checkbox, number, date) still at its
defaultValue counts as empty; text is never overwritten
- docs: LanguageSwitcher renderLabel needs a 'use client' wrapper (i18n.md,
ipal-site, ipal-setup, api.md)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- entryList entryCollection, post template hero with the title, legal templates noindex
(drop the reference's own workarounds)
- brand primary-inverse roles: 74/74 contrast pairs
- /design shows Light and Dark panels (tokens switch on any element)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
reference/ is one complete client site on the plugin (made-up company, pl/en,
MongoDB, every library block and template, token standard light/dark, forms,
consent, SEO/GEO, enforced CSP, 2FA, base + demo seeds, Coolify runbook,
smoke tests). It uses the plugin as file:.. (injected) and is not shipped.
- docs/agent/reference-site/INDEX.md (generated by scripts/reference-index.mjs,
kept current by test/referenceIndex.test.ts)
- AGENT.md section and pointers in ipal-site, ipal-setup, ipal-reference,
ipal-upgrade, ipal-block; release steps in PROGRAMISTA §8.1b
- CI: reference (fast) on every push, reference-full on main; doctor steps
wired, commented until ipal-doctor ships
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The seven block fixes from the reference site's first visual test (entryList field
entryCollection: Mongoose reserves 'collection'; contact, hero, CMSLink, templates),
plus claude/design-tokens-build d6675d2: data-theme switches tokens on any element
(LIGHT_SELECTOR / DARK_SELECTOR), primary-inverse / primary-inverse-text roles in
the contrast report, theme.md one-icon note, ipal-form formClasses.ts on token
utilities. No conflicts; one Unreleased CHANGELOG section.
Merge addition: AGENT.md names primary-inverse-text next to primary-inverse.
Follow-ups from the reference site's first visual test:
- data-theme="dark"/"light" switches the tokens on any element (LIGHT_SELECTOR,
DARK_SELECTOR as selector lists); the base layer colours a themed panel's text
- inverted sections re-map primary / primary-hover / primary-text to the new
primary-inverse / primary-inverse-text roles; the contrast report checks them
(inherited roles resolved on the ancestor, as the cascade does)
- ipal-form formClasses.ts on token utilities + buttonClass(); theme.md: one-icon
ThemeSwitcher pattern (the default two-option toggle stays)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- CMSLink: a link that wraps content (a logo, a card) and leads nowhere keeps the
content — an empty link group ({ type: 'internal' }) no longer hides logos
- entryList: field `collection` → `entryCollection` (Mongoose reserves
`collection`; unreleased, snapshot updated) + a test against reserved names
- post template starts with a page hero holding the title (the page's h1)
- legal and cookie policy templates set noindex: true (AGENT.md §0c)
- hero background: a full bg-overlay scrim under the text
- MediaValue accepts any object (generated Media types fit without a cast)
- contact: Turnstile renders dark in an inverted section
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fifteen opt-in library blocks (libraryBlocks({ ... }) from /blocks, rendered with
createBlockRegistry from /blocks/rsc), templates (/templates), the ipal-blocks
eject CLI and blockLibraryManifest; block sources ship in src/modules/block-library
for eject. Nothing is on by default; fields, variants, slugs, labels, part
classes, primitives and components are overridable. Seeder { $form } fix. Label
changes "New tab" / "Show contents" (no data change). Contains the design-tokens
branch (already merged). No conflicts; one Unreleased CHANGELOG section.
One design-token standard: tokens.css (neutral defaults, light/dark on
data-theme), tailwind.css preset, a11y.css, fluid variables, the /tokens entry and
the ipal-tokens CLI. CookieBanner and CookieButton read the single token names;
the legacy -dark variables stay as the dark fallback, which now follows the
page's color-scheme (a site without a dark theme no longer gets a dark banner on
a dark-mode device). Font slots --font-family-body / --font-family-heading.
- bin ipal-tokens: src/design/tokens.ts → src/design/tokens.css, --check, WCAG
contrast report (fails on AA errors; --report, --warn-only)
- CookieBanner / CookieButton read the single --ipal-* roles; the fallback follows
color-scheme via light-dark() and still honours the legacy -dark variables
- lightbox fade reads --ipal-duration / --ipal-ease-out
- DESIGN.md and tokens.ts templates in ipal-setup/resources
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Database name rule <domain without dots>_prod / _dev; ipalEnvRules({ databaseName })
warns only (default off); databaseNamesFor, databaseNameFromUri, checkDatabaseName.
createSeeder only / SEED_ONLY: a run touches named records only; a full seed of
production or a non-local database is refused unless IPAL_SEED_ALLOW_FULL=1 or
guard.allowFull (dry runs never refused, guard: false turns guards off).
Merge additions: CHANGELOG "## Unreleased" with Requires project changes;
guard.allowFull and guard: false in ipal-reference SKILL.md and api.md.
- Rule (VERY IMPORTANT): databases are named <domain without dots>_prod /
_dev (intecion.com → intecioncom_prod / intecioncom_dev) on MongoDB and
Postgres — AGENT.md top rules, deployment.md §4.2a (Coolify), env.md,
ipal-setup architecture questions (derive, then confirm), AGENTS.md
template. ipalEnvRules({ databaseName }) warns (never fails) on a
mismatch, domain from NEXT_PUBLIC_SERVER_URL or { domain }, { warn }
overridable; helpers databaseNamesFor, databaseNameFromUri,
checkDatabaseName from the root and /env.
- Rule (VERY IMPORTANT): after launch never re-seed everything — AGENT.md,
seeding.md, ipal-site, ipal-form, ipal-reference. createSeeder gains
`only` / SEED_ONLY (pages:slug, forms:title, global:slug, collection:*;
the rest → "skip (not listed)") and refuses a run with no record list
against a production / non-local database unless IPAL_SEED_ALLOW_FULL=1
(guard.allowFull; dry runs allowed). Seed templates carry an ONLY list;
the form seed touches only its own form.
- Tests: seed only/full-run guard, database-name helpers and warning.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade and PROGRAMISTA §6 item 54 point at 1.14.6 (1.14.5 never
published), with the 1.14.5 steps kept.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump and CHANGELOG entry: the admin link-preview hook fix; 1.14.5 was
tagged but never published, projects go from 1.14.4 to 1.14.6 with the 1.14.5
steps.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
syncAdminMeta returned to payload.logger in its catch even when payload was
undefined, so the Site settings afterChange hook threw with req: {} (an
unhandled rejection that made vitest, and npm publish for 1.14.5, exit 1).
Return early without payload, log through payload?.logger, skip the call in the
hook without req.payload; the fillEmptyLocales hooks get the same guard. Tests:
sync without payload, and every plugin global afterChange hook with req: {}.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: one "→ 1.14.5" section with the 7 steps (replaces the two
unversioned notes). PROGRAMISTA §6: item 54. seo.md points at 1.14.5.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Agent guide and skills: ask architecture questions before building, use ipal-kit
first (report a gap and wait), code rules. Five vendored third-party skills (text
only, pinned SHAs, licences, sha256 manifest in docs/agent/external), copied only
with ipal-skills --external. scripts/vendor-external-skills.mjs is a maintainer
script and is not shipped.
Site settings -> Title separator values are GraphQL enum names (pipe, endash,
hyphen, middot, slash); legacy stored characters map on read and write, MongoDB
is rewritten on init, Postgres projects add titleSeparatorSql() to the generated
migration. test/graphqlSchema.test.ts builds the full schema.
Merge resolution, docs/CHANGELOG.md (one Unreleased section): both new
"What projects must update" items kept — 5 graphql-scalars override, 6 title
separator SQL, plus a note that code reading settings.titleSeparator gets a name
(titleSeparatorChar).
Repo-only pnpm override "graphql-scalars@<2.0.1": "^2.0.1" (GHSA-x8rm-f576-gq67,
high, via @payloadcms/graphql); the docs recommend it to projects on payload
3.90.x-3.92.x. pnpm audit --prod: only the deepmerge low.
The titleSeparator select stored '|', '–', '-', '·', '/'. Select values become
GraphQL enum names; '|', '–', '·' are invalid and '-' and '/' collide on '_', so
every project's /api/graphql answered 500 since 1.0.1 (admin/REST unaffected).
- Values are now pipe/endash/hyphen/middot/slash (same labels); TITLE_SEPARATORS
and titleSeparatorChar map them to the character; titles accept old characters
and custom project values literally
- Field afterRead/beforeChange turn an old stored character into its name
- MongoDB: rewritten at start (migrateTitleSeparator); Postgres: titleSeparatorSql()
for the generated migration (verified up/down/up against Postgres 16)
- Test builds the full plugin GraphQL schema and fails on invalid or duplicate
enum names; unit tests for the mapping, hooks, SQL and Mongo rewrite
- CHANGELOG Unreleased (Fixed + upgrade step 5), seo.md, ipal-upgrade, api.md
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- docs/agent/external: Vercel react-best-practices and composition-patterns
(MIT), Addy Osmani accessibility (MIT), Anthropic frontend-design
(Apache-2.0), official Payload skill at v3.92.1 (MIT) — text only, each
with its licence, SOURCE.md (repo, commit) and an override note in front
of the SKILL.md (ipal-kit first, Payload fetching over swr, DESIGN.md
tokens, Payload 3 not 4); manifest.json with sha256 per file
- scripts/vendor-external-skills.mjs (maintainer, not shipped): fetches by
full commit SHA only, rejects non-text or executable files, regenerates
the manifest; --check verifies it
- ipal-skills --external [names]: copies ext-* after checking every file
against the manifest, downloads nothing, never touches ext-* folders
without ipal-kit's SOURCE.md, removes only retired ones it installed;
an unknown name stops the run before anything is copied
- AGENT.md §14, ipal-setup stage 2 (optional step), README: usage,
overrides, how to update the pins
- test/externalSkills.test.ts: pins are SHAs, no branch fetch, checksums,
text only, licences, override note, installer leaves other folders alone
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@payloadcms/graphql pins graphql-scalars 1.22.2 up to the latest Payload
(3.92.1), so no Payload upgrade fixes the high PhoneNumber ReDoS advisory.
Repo-only pnpm.overrides entry "graphql-scalars@<2.0.1": "^2.0.1" (not passed
to projects). Payload only imports DateTimeResolver and EmailAddressResolver;
checked against the dev app's /api/graphql: login, DateTime and EmailAddress
as input and output, a JSON field, and an invalid e-mail rejected.
pnpm audit --prod: 1 high + 1 low -> 1 low (deepmerge, no fix published).
Docs: AGENT.md §4 item 12, ipal-setup, ipal-upgrade, README, CHANGELOG
Unreleased recommend the same override to projects.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- AGENT.md: "Ask before you build" (languages, styling, content, forms,
analytics/consent, SEO/GEO, database + media, admin, hosting/DNS) —
answers go to AGENTS.md "Project decisions", never guessed; "ipal-kit
first" hard rule — a gap is reported to the owner and the agent waits
for the decision, no hand-built replacements or silent workarounds;
short "Code rules" (SRP, small files, no duplicates, typed, i18n texts,
checks) pointing to §8
- ipal-setup stage 0 and ipal-site phase 0: the architecture question
list, answered before building; content questions keep defaults
- ipal-plugin-gap: report, offer options, wait, record the decision;
ipal-block/collection/form/debug and vibe aligned; AGENTS.md template
and the ipal-skills pointer block carry the rules
- docsConsistency: the rules reach every site-building skill
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Theme choice stored under 'theme' (theme.storageKey to change it); a choice under
the old 'ipal-theme' key moves once, before paint, and only into an empty key.
Cookie scanner integration "Theme choice" for the localStorage key. A storage
select on Cookies -> Cookie list rows and in the detail labels, with a Type
column in <CookieTable> (Postgres: enum + cookie_settings_cookies.storage +
detail_labels_storage).
- adminMeta (default on, with or without whiteLabel): robots noindex/nofollow,
title suffix "— <site> | Panel", og:site_name and en/pl description from
Site settings, preview image GET /api/ipal/admin-og (next/og, from the logo
or name, no external service) and icon GET /api/ipal/admin-icon
- the site name sits in a process-wide store read through getters, so link
previews stay current after a Site settings save and across config loads
- agency option (default Intecion.com) feeds the credit, description and image;
credit reads "Technology support: Intecion.com" (pl: Wsparcie technologiczne)
- the project's own admin.meta keys always win; adminMeta: false / agency: false
- dev: whiteLabel on; docs: white-label.md, AGENT.md, ipal-reference/setup/upgrade
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Theme choice in localStorage under 'theme' (next-themes' key and values)
instead of 'ipal-theme'. ThemeScript moves an old choice before the first
paint and removes the old key; useTheme / ThemeSwitcher do the same
without the script. ipalKit({ theme: { storageKey } }) sets an own key,
which reaches ThemeScript through getSiteShell().theme and <html
data-theme-storage>.
- The cookie scanner declares the theme key (Theme choice: local storage,
necessary, until changed or site data is cleared) when the theme switch
is on, so Scan cookies finds it without a crawl.
- Cookies -> Cookie list rows get a Type (cookie / local storage / session
storage, default cookie, shared by every language), filled by scan, review
and approval. The detailed settings window and <CookieTable> show it with
English and Polish defaults; the approval page marks storage entries.
- Migration: adds cookie_settings_cookies.storage (DEFAULT 'cookie') and
cookie_settings_locales.detail_labels_storage, nothing else.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump and CHANGELOG entry: fillEmptyLocales (empty languages of the
cookie texts filled, own text never overwritten), cookieScanner.adminLayout
'combined' (one Cookies entry with Review and approve / Site check tabs), Cookie
banner renamed Cookies, known issue, what projects update.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fillEmptyLocales (default on): text written in one language fills the empty
languages of cookie-list and cookie-review purpose/duration; a language with its
own text is never overwritten (false or per-slug fields to change it).
cookieScanner.adminLayout (default 'combined'): the Cookie banner global is
"Cookies" with "Review and approve" and "Site check" tabs; cookie-review and
cookie-crawl leave the navigation, their data, API and /admin/cookie-approval
stay ('separate' keeps the old entries). No schema change (Postgres
migrate:create: no schema changes).
Every language filled (fillEmptyLocales, default on): text saved in one
language goes to every language where the same field is still empty, never
over a language's own text. Applies to the cookie list (purpose, duration)
and the cookie review (purpose, duration). Scanner and approval writes give
a language without its own text the default language's text. Building
blocks: buildFillEmptyLocalesGlobalHook / CollectionHook, fillEmptyLocales,
withFillLocales.
One Cookies entry (cookieScanner.adminLayout, default combined): the
Cookie banner global is now labelled Cookies and gets Review and approve
(scan box and approval list inline) and Site check tabs, built from ui
fields. Cookie review and Cookie check leave the navigation
(admin.group false) but keep their pages, data and API. This is
presentation only: no schema change and no migration, only
generate:importmap. adminLayout separate keeps the old layout.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump and CHANGELOG entry: Approve cookies page with one Approve and add,
New/Changed/Needs description/No longer found markers, unknownCategory,
dashboard and e-mail reminders, approval: false, new exports, the lookup change
for hand-typed rows, and what projects with cookieScanner update.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
/admin/cookie-approval (Approve cookies): one "Approve and add" for the ticked
cookies into Cookie banner -> Cookies in every locale; statuses New, Changed,
Needs description, No longer found; never overwrites editor text, never
duplicates or deletes. Unknown cookies -> approval.unknownCategory (default
marketing). Dashboard and e-mail reminders. cookieScanner.approval: false keeps
the per-entry review. New cookie-review fields change and needsDescription
(Postgres: one enum column + index, one boolean).
After "Scan cookies" or a site check, the new Approve cookies view
(/admin/cookie-approval) lists what waits, grouped by consent category, with
provider, purpose and duration and New / Changed / Needs description markers.
One "Approve and add" puts every ticked cookie into Cookie banner -> Cookie
list in every locale. That list feeds the cookie policy table and the
detailed settings window.
- Never overwrites editor text or categories, never adds a second row (a
pattern and a concrete name are the same cookie), never deletes.
- Unknown cookies are approved into a category that needs consent
(approval.unknownCategory, default marketing) and flagged Needs
description; writing a purpose clears the flag.
- Cookies a scan or crawl no longer finds are flagged No longer found, for
review only.
- The dashboard and the crawl e-mail say how many cookies wait and link to
the view; nothing is added without approval.
- Optional: cookieScanner.approval false keeps per-entry review.
- Migration: cookie-review gains change and needsDescription.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump; the Unreleased section becomes 1.14.2: 2FA setup-loop fix
(TotpRedirectProvider), twoFactor.provider, totpRedirectTarget/totpAdminPath,
known issue (low deepmerge advisory via payload), what projects with 2FA update.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-kit swaps @clocklimited/payload-2fa's TOTPProvider (it read the path from an
x-pathname header nothing sets on /admin, so setup-totp?back=null redirected to
itself) for TotpRedirectProvider (/admin), which reads the path in the browser.
twoFactor.provider: own component, or false to keep the package's. Pure rules:
totpRedirectTarget, totpAdminPath. Server-side TOTP enforcement (the package's
access wrapper) is unchanged. Dev app: IPAL_DEV_2FA=1 turns 2FA on.
@clocklimited/payload-2fa's admin provider reads the current path from an
x-pathname request header. Nothing sets it on /admin (the createProxy matcher
skips /admin), so the path was null: every admin page, the setup screen too,
redirected to /admin/setup-totp?back=null, forever. Every new admin on a site
with 2FA got stuck.
ipalKit now swaps that provider for its own TotpRedirectProvider
(@intecion/ipal-kit/admin, client-side): it reads the path in the browser,
never redirects away from the setup/verify screens or logout, and renders
nothing while redirecting. twoFactor.provider takes a project component, or
false to keep the package's. totpRedirectTarget / totpAdminPath export the
rules. Projects run generate:importmap.
Test: test/totpRedirect.test.ts (redirect walk, provider swap). Dev app:
IPAL_DEV_2FA=1 turns 2FA on. Docs: security.md, CHANGELOG (Unreleased),
AGENT.md, ipal-setup/-upgrade/-debug/-reference, PROGRAMISTA item 51.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump and CHANGELOG entry: withSecurityConfig (hide X-Powered-By),
opt-in CSP through buildSecurityHeaders({ csp }) with report-only/enforce and
reports, createCspReportRoute, buildAdminCspHeaders, opt-in nonces, new buildCsp
flags with extra/override, ipal-audit header check; nothing required on upgrade.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
withSecurityConfig hides X-Powered-By (hidePoweredBy: false to keep it).
buildSecurityHeaders({ csp }) is off unless passed; report-only first, then
enforce, with reportUri / Reporting-Endpoints. buildCsp flags with extra and
override, buildAdminCsp(Headers), createCspReportRoute. Nonces only with
createProxy({ csp }) + SiteProviders nonce, so static and ISR pages stay static.
ipal-upgrade: the 1.14.0 section walks through the 8 "What projects must
update" items. PROGRAMISTA §6: item 48 marked 1.14.0, new item 49.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump and CHANGELOG entry: image lightbox, cookie scanner (scan and
browser crawl), admin in English and Polish, admin follow-ups, Next 16.4.3 and
sharp 0.35.5 in dev, nodemailer 10 and Node >=20.9, test/dev generate:types fix,
and what projects must update.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
nodemailer ^8 -> ^10.2.1 (ships its own types; @types/nodemailer removed),
engines.node >=20.9.0. Repo-only pnpm.overrides for Payload's transitive
dependencies (undici, dompurify, fast-uri, js-yaml, browserslist, source-map-js,
fast-copy, baseline-browser-mapping); consumers are not bound by them, and the
docs recommend the dompurify/undici overrides for projects on payload 3.90.x.
pnpm audit --prod: no known vulnerabilities. New emailTransports and twoFactor tests.
- nodemailer ^8.0.1 -> ^10.2.1 (advisories up to 10.1.3); drop @types/nodemailer,
nodemailer 10 ships its own types. Node engines >=20.9.0 (nodemailer 10 needs 20+).
- pnpm.overrides (repo only, not passed to projects) for packages in payload 3.90.2's
tree: undici and dompurify are exact-pinned upstream; fast-uri, js-yaml,
browserslist, source-map-js, fast-copy, baseline-browser-mapping raised to fixed
minimums. pnpm audit --prod: 19 high / 35 moderate / 11 low -> 0.
- Tests: SMTP over a local SMTP socket with real nodemailer (panelSmtpAdapter,
sendEmail, unreachable server status), Microsoft Graph and Graph->SMTP fallback
via mailAdapter; real payloadTotp through ipalKit, plus a check that payload-2fa
resolves the project's payload.
- Docs: email.md, AGENT.md §4 item 12, ipal-setup, ipal-upgrade, README.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dev dependencies: next and eslint-config-next 16.4.3, sharp 0.35.5 (fixes the
Next 16.0.0-16.4.0 advisories: 2 critical RCE, 1 high DoS); minimum safe Next
16.4.1 documented; peer range next >=15 unchanged.
Admin follow-ups: localised stats tab title (DocumentTitle), Polish cookie-scanner
integration names, construction notice close label, FaviconCheck hint under
Site settings -> Site icon (new import-map entry @intecion/ipal-kit/admin#FaviconCheck).
- Statistics view: the browser-tab title follows the admin language.
Payload's custom-view meta.title is one plain string and its custom-view
metadata ignores i18n, so the view renders <DocumentTitle> (/admin) with the
translated title; it re-applies the title while the view is open because
Next streams the English metadata in after hydration. adminDocumentTitle()
adds admin.meta.titleSuffix the way Payload does.
- Cookie scanner: CookieIntegration.label may be { en, pl, ... }. The built-in
names without a product name come from the shared admin texts
(cookieIntegration*, cookieSourceProject); the scan endpoint answers in the
request's admin language and stored source names use the scanning editor's.
- Maintenance notice: getConstructionMode(locale) returns `locale`; the "x"
close button gets a screen-reader name "Close" / "Zamknij" (locale and
closeLabel props; constructionCloseLabel exported).
- Favicon: FaviconCheck (/admin, afterInput on Site settings -> Site icon)
warns in the admin language when the image is under 48x48 or not square,
without blocking the save; validateFaviconField shares faviconProblems().
- Docs, AGENT.md and skills: the above, plus Next.js 16.4.1 or later as the
minimum safe version (AGENT.md 4.11, ipal-setup, ipal-upgrade).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Next 16.0.0-16.4.0 is affected by GHSA-2464-fhr4-w9xw (RCE in image
optimization with SVG, fixed with sharp 0.35.5), GHSA-673q-mjm6-r5xr
(RCE in use cache) and GHSA-p3m5-59mp-jv5r (Server Actions DoS); all
fixed in 16.4.1. The peer range stays open.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Admin languages default to English + Polish unless the project sets
i18n.supportedLanguages; plugin texts under the ipal namespace, project
translations win key by key. All admin wording rewritten and fields regrouped
per docs/dev/admin-ux.md, without changing slugs, field names or the schema
(Postgres migrate:create: no schema changes). Dev app no longer leaks
generate:types; test/adminUx.test.ts.
- stats nav link reads "Statistics overview" (it renders after all nav groups)
- form-builder e-mails array labelled in en + pl
- dev import map: RowLabel (cookie banner rows)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- admin-i18n module: AdminText { en, pl }, component texts under the ipal
namespace (project translations win), en + pl admin languages when the
project sets none (project's supportedLanguages wins)
- every plugin label, description, option, tab and group as { en, pl };
explicit labels instead of auto-labels; sentence case; glossary terms
- visible renames (slugs, names, data unchanged): Cookie banner, Form
messages, Privacy group, Search engines, Maintenance, Spam protection,
E-mail sending, stats nav link Overview (hidden without access)
- Polish visitor defaults by page locale: cookie banner, form messages,
validators, lightbox, accessibility widget; {field} uses the label
- fixes: e-mail status banner used Turnstile wording; developer words and
env var names out of editor messages; stats numbers/dates in the admin
language; test e-mail no longer says ipal-kit
- test/adminUx.test.ts: length limits, en + pl present, no developer words
Co-Authored-By: Claude Opus 5.5 <[email protected]>
cookieScanner option: cookie-review collection, Scan cookies (declarations +
bundled Open Cookie Database), opt-in browser crawl through
services/cookie-crawler with the cookie-crawl global and dashboard alert.
Overlap with claude/test-no-typegen, resolved here: one test-config fix.
- the six real-Payload tests keep buildTestConfig and drop the branch's
duplicate typescript: { autoGenerate: false } lines;
- cookieScannerIntegration and cookieCrawlIntegration use buildTestConfig
instead of buildConfig + their own flag (testConfig.test.ts guard passes).
buildTestConfig (test/helpers.ts) turns typescript.autoGenerate off for the six
real-Payload tests; test/testConfig.test.ts fails if a test calls buildConfig
directly.
- The admin box uses Payload's Button (plain <button class="btn"> rendered
unstyled), shows "Never run" before the first crawl and the note on a
finished crawl (e.g. "Accept all" not found).
- The dashboard warning puts its link on its own line.
- Dev sandbox: cookieScanner { crawl: true } and the regenerated import map.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
cookieScanner.crawl (opt-in) adds "Crawl site" to the Cookie review box. The
site asks the shared scanner service (services/cookie-crawler: Node +
Playwright, Dockerfile, deployed once on Coolify) to crawl its sitemap pages
twice, with no consent and after "Accept all". The service posts cookies,
storage keys and third-party hosts back to POST /api/ipal/cookie-crawl/results
(bearer token, running job only). No browser in the site.
Findings land as drafts through the same merge rules. Anything stored before
consent that is not necessary, and tracker requests before consent, are
violations, flagged on the review entries from the latest crawl only. The
cookie-crawl global keeps the latest result (no history). A dashboard warning
(CookieCrawlAlert) and an opt-in e-mail through the project's mail adapter
follow a crawl with violations or new unknown cookies. Scheduled crawls: a
Coolify scheduled task with the token. ipalEnvRules({ cookieCrawl: true }).
Also: the six older real-Payload tests no longer leave an orphaned
payload generate:types process (typescript.autoGenerate: false).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Outside production getPayload() spawns a detached generate:types child.
With no PAYLOAD_CONFIG_PATH it never finds a config (tsconfig rootDir
'./' sends Payload's findUpSync into an endless loop), so every full
vitest run left six processes spinning at ~40% CPU.
- test/helpers.ts: buildTestConfig() = buildConfig with
typescript.autoGenerate false
- the six tests that boot Payload use it
- test/testConfig.test.ts: fails if a test calls buildConfig directly
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Outside production, getPayload() spawns `payload generate:types` in the
background and that process never exits, leaving one orphan per test file
per run.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipalKit({ cookieScanner }) (opt-in) adds the cookie-review collection, a
"Scan cookies" box above its list and GET/POST /api/ipal/cookie-scan. A scan
lists the cookies of every integration the project switches on (consent,
admin login, locale, stats, GA4, GTM, Meta Pixel, Clarity, LinkedIn, TikTok,
Turnstile), the project's own declarations, and extra names looked up in the
bundled Open Cookie Database, as drafts. Editors accept (→ Cookie Settings →
Cookies, every locale, only empty text filled), edit or reject. A rescan never
deletes, never changes status and never overwrites edited text.
Everything is overridable (access, collectionOverrides, integrations,
declarations, databaseCategories, labels, syncAccepted) and the building
blocks are exported. Admin labels in en + pl. Docs: cookie-scanner.md,
consent.md, AGENT.md, ipal-reference, ipal-consent-check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
scripts/refresh-cookie-database.mjs (pnpm cookie-db:refresh) downloads the CSV
and license at a pinned commit, refuses a non-Apache license, and writes
src/modules/consent/scanner/data/openCookieDatabase.ts (source commit and
change notice in the header) plus docs/licenses/open-cookie-database-LICENSE.txt.
Nothing is fetched at runtime.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-upgrade: the 1.13.0 section walks through the 7 "What projects must
update" items with checks. PROGRAMISTA §6: item 47 for 1.13.0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Version bump and CHANGELOG entry: security and access, performance, SEO/GEO and
Search Console, @intecion/ipal-kit/seed, English docs and agent guide, small and
gap fixes, and what projects must update (behaviour change without access).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- ipalKit({ searchSettings }): switches off / reshapes Site Settings → Search & AI
without `seo`; read as options.searchSettings ?? options.seo?.searchSettings.
- shouldLoadGoogle moved to a pure module (analytics/shouldLoadGoogle.ts) and
exported from @intecion/ipal-kit and /client.
- consentLog.collectionOverrides and stats.collectionOverrides (object merges
access/admin/hooks key by key, function takes over), via the new exported
applyCollectionOverride / CollectionOverride. The stats view and dashboard
chart now follow the stats-visits read access, so overrides narrow them too.
All additive; defaults unchanged. Docs: AGENT.md, ipal-reference, consent,
stats, seo, analytics, ipal-setup.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- ipalEnvRules({ storage: true }): R2_PUBLIC_URL optional (media served by
the app); storage: { requirePublicUrl: true } requires it again.
- seo.uploadsCollection: upload collection of the meta image (default media).
- userMeetsRole(req, minimum): the plugin's admin/editor features (Site
Integrations, settings globals, test e-mail, stats, consent records, form
submissions) stay reachable when `access` is omitted — without a roles
field every logged-in account passes, as in Payload's default.
- IndexNow skip for seed writes is covered by test/seed.test.ts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
createSeeder(payload, { dryRun, update, force, guard, editCheck, context, ... })
returns upsertBySlug, upsertBy, fillGlobal and summary(); building blocks
isLocalDatabase, writeLocales, seedHash, projectOnto, editedSinceSeed.
Behaviour follows docs/seeding.md: create-only by default, natural keys,
never deletes, globals get empty fields only, every locale written with
fallbackLocale: false onto the same row ids, records edited since seeding
skipped, update refused on production / non-local DB unless
IPAL_SEED_ALLOW_PROD_UPDATE=1, context.ipalSkipIndexNow on every write.
Both seed templates now use the helper. Node-only entry (no 'server-only',
which throws under `payload run`). SQLite integration tests cover the
production guard, the edited-record skip, the hash field, row ids and
the IndexNow skip. Agent guide (AGENT.md, ipal-reference, ipal-site,
ipal-form) and seeding.md updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Resolve conflicts in analytics, consent, content, i18n, mcp and stats,
keeping the docs fixes and the new code behaviour, verified against src
- Translate the remaining 14 module pages, ipal-seo-check skill and script
- Integrate the security-perf and SEO agent-guide text: getRobots,
isPathVisible, Search & AI (DNS verification first, meta fields optional),
sitemap index/cache/503, consentMode basic/advanced, policyVersion,
globalOverrides, revalidatePath / buildGlobalRevalidateHook, authAccess,
firstUserAdmin, allowCollectionMismatch, unknown-IP rate limit; stale
claims fixed across AGENT.md, skills, frontend, developer guide, vibe
- docsConsistency: pending list removed (all docs English); relative links
now also check #anchors
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflict in createContentHelpers.ts resolved by keeping both: isPathVisible (per-path, security track) and constructionPaths (per-list, SEO track).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
# src/modules/frontend/createContentHelpers.ts
MCP and search call it once per result; React cache doesn't dedupe in
route handlers, so a 50-result list read Site Settings 300 times.
Concurrent calls now share one in-flight read per locale (6 reads).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Translate to English every doc the code branches did not touch: AGENT.md,
developer guide, vibe, CHANGELOG, docs index, module pages, all skills
except ipal-seo-check (14 pages follow after the security/SEO merge).
Placeholder marker is now [TO FILL: …]; skill resources renamed to
section-code.md / nav-code.md. AGENT.md and the ipal-skills pointer
block say the docs are in English.
- docs/seeding.md: create-only, natural keys, never delete, no users or
secrets, empty-field globals, fallbackLocale: false, dry run, backup and
restore, production update guard, seeds vs migrations, Coolify Terminal.
Seed templates gain --dry-run, the SEED_UPDATE production guard
(IPAL_SEED_ALLOW_PROD_UPDATE), skip of edited records and a summary.
"Seeding on production" rule block in AGENT.md.
- Coolify is the single deployment path (deployment, env, developer guide,
ipal-setup): build vs runtime env, migrations on container start
(prodMigrations), health check and rolling updates, rollback, backups and
restore, DNS/Let's Encrypt/CAA. R2: custom domain needs a Cloudflare zone;
default is media served by the app (R2_PUBLIC_URL empty).
- docsConsistency: no Polish prose outside code/quoted data (pending pages
listed); IPAL_* names may also be read by shipped skill templates.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Applies the docs session's forms.md diff and fixes, corrected for this
branch; adds the override sections and new options.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The proxy parsed the consent cookie as version 1, so after an editor
bumped the policy version NEXT_LOCALE was never saved. It now accepts the
stored record's own version; policyVersion pins one.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Returning the incoming config dropped the plugin's collections and globals,
so a Postgres migration would drop their tables. Now collections, globals
and fields stay; endpoints, onInit and admin components are left out.
Also: ipalKit({ forms: { consentFieldName } }) is stored in config.custom.ipal.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- access.authAccess merges over the injected auth collection's access;
unlock is admin-only by default
- access.firstUserAdmin (default true) makes the first-register promotion optional
- globalOverrides: object merges access/admin/hooks, function takes over
- form Emails protection is applied before formOverrides.fields, so a
project can change it there
- 2FA defaults to admin.user and fails at init when the target is not an
auth collection or differs from admin.user (twoFactor.allowCollectionMismatch)
- buildRolesField, injectRoles, applyGlobalOverrides exported
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- New skill ipal-reference: every ipalKit option (incl. nested keys) with
default and how to turn it off/override it, what the plugin injects
(collections, globals, endpoints, import-map components), every file the
project wires with a minimal example and a check, every env var;
resources/api.md indexes all 432 exports with import path and purpose
- ipal-setup rewritten as a complete start-to-finish install: steps, code,
verification and off/override per stage
- ipal-skills writes a marked <!-- ipal-kit:start/end --> pointer block into
AGENTS.md (creates it if missing) and CLAUDE.md (or creates CLAUDE.md with
@AGENTS.md); only the marked block is ever rewritten; --no-pointer skips.
tsconfig exclude check now matches whole entries
- AGENT.md, PROGRAMISTA, README, docs index: point at ipal-reference and run
`pnpm exec ipal-skills` right after install
- docsConsistency: the agent guide must mention every export (runtime and
types), every plugin option incl. nested keys, every env var the code
reads and every @/lib/content helper
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The main entry and next/middleware re-exported module barrels that also
export React client components (LanguageSwitcher, AlternateLinks*,
AccessibilityWidget), so payload.config, the CLI and the proxy bundle
evaluated React UI. They now import concrete files; i18n client
components moved to modules/i18n/client.ts. test/entryGraph guards it.
Also lint fixes in tests added on this branch.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- createContentHelpers: sitemapEntries transform has the last word,
sitemapOptions passes maxUrls/cacheControl/memoSeconds to sitemapRoute,
underConstructionSeo: false turns the construction filter off
- seo.searchSettings accepts a function over the default fields
- ipal-seo-check: reads sitemap index parts, reports 503 sitemap, warns on
missing Google/Bing verification (skip key: verification)
- docs/seo.md updated
Co-Authored-By: Claude Opus 5.5 <[email protected]>
buildCrossLocaleFieldSync read other locales outside the save's transaction
and its update(req) left req.locale on the last target locale.
buildPreventDeleteSystemPage now reads Site Settings with req.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Payload's link converter rendered fields.url as is; javascript:/data: URLs
stored via import or API reached the href. They now become '#'.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Sitemap: batched reads (500), published-only where, field select; sitemap
index over maxUrls (default 10k) with ?part=N; Cache-Control; in-process
memo; runtime errors → 503 Retry-After (empty urlset only during next build)
- Site Settings → Search & AI tab (seo.searchSettings: false removes it):
Google/Bing/Yandex verification (paste code or whole meta tag) added to
page metadata; AI crawler policy + per-bot exceptions; llms.txt note
- buildRobots aiBotRules; getRobots helper reads the panel; more AI agents
- Under construction: sitemap and llms.txt list only open pages
- collectSiteIndex: no silent 1000 cap; llms routes send Cache-Control
- IndexNow: nothing sent with IPAL_NOINDEX
- Unknown route metadata is noindex
- Tests (unit + SQLite integration) and docs/seo.md
Co-Authored-By: Claude Opus 5.5 <[email protected]>
buildGlobalRevalidateHook + ipalKit({ revalidatePath }) wires it into the
plugin's globals; menus, consent texts and analytics IDs no longer stay
stale for the whole ISR window.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
createContentHelpers exposes isPathVisible (built from getConstructionMode)
and passes it to markdownRoute and mcpPOST; createSearchRoute,
createMcpRoute and createMarkdownRoute accept it. A null/number/string
JSON-RPC message now gets -32600 instead of crashing the route.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- AGENT.md, skills, PROGRAMISTA, vibe, README and module pages checked
against src/ and package.json; every mismatch fixed (consent/analytics
loading, revalidation scope, generateStaticParams, construction gating,
Turnstile fail modes, email/Graph, MCP, i18n, links, slug, hooks, ...)
- New pages: frontend.md, media.md, integrations.md; docs/README.md now
indexes every page
- Main rule (plugin helps, never limits) at the top of AGENT.md,
PROGRAMISTA.md, docs/README.md, README and the setup/plugin-gap skills;
module pages gain a "Wyłączenie, nadpisanie, rozszerzenie" section
- README/PROGRAMISTA: stop telling projects to install packages ipal-kit
already depends on; peer table; publish flow matches prepublishOnly
- ipal-skills: refuse --dest without a value or pointing at the project
root (previously could delete ipal-* folders in cwd)
- docsConsistency: option keys, IPAL_* env names, relative links, README
index, AGENT.md section refs, skill frontmatter, frontend.md helper keys,
no `pnpm add` of own dependencies
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Opt-in; the default stays 'advanced' (tag loads with denied signals).
shouldLoadGoogle holds the rule so it is testable without a DOM.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The daily purge was awaited inside the visitor's request via payload.delete,
which loads and deletes expired documents one by one. It now runs as one
db.deleteMany in the background; failures are logged and retried.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
getSettings ran findGlobal at depth 2 on every request, pulling the
relations of every page a project field links to (menus). Depth 1 keeps
slug/title. The archive page itself was rendered from the settings copy,
which maxDepth caps at 1, so its media never populated; resolveRoute now
re-fetches it at depth 2 like the homepage.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A request without a usable client IP used to skip every limiter. It now
counts against one shared 'unknown-ip' bucket at 20x the limit. submitForm,
createSubmitAction and verifyTurnstile accept turnstileHostnames/hostnames
to reject tokens solved on another domain.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Injected auth collection with roles: admins manage all accounts, others
only themselves (Payload's default let any account edit or delete any other)
- 2FA defaults to the resolved auth collection instead of 'users'
- SiteSettings, CookieSettings, Notifications, Forms: write needs editor+;
form Emails tab readable by editor+ only
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A third settings mode next to 'inline' and 'modal': a large dialog where every consent
category is a card with its on/off control, description and an expandable list of the
cookies it covers (name, provider, purpose, duration), taken from Cookie Settings → Cookies
— the same rows as <CookieTable>. The developer picks the mode with one prop; the
component default stays 'inline', so existing sites are unchanged.
Cookie Settings gets a localized detailLabels group (list labels, English fallback);
getConsentTexts passes texts.cookies and texts.details, sharing the row mapping with
getCookieTable. New classNames slots and data-ipal handles for the cards and lists.
Docs for devs and agents: consent.md (modes compared, which to pick — new projects default
to 'detailed' when the cookie list is filled), AGENT.md, PROGRAMISTA §2.8/§2.11/§6, skills
ipal-setup, ipal-site, ipal-upgrade, ipal-locale-add, ipal-consent-check. Postgres/SQLite
projects need migrate:create for the new fields.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
buildR2Storage registered nothing without R2_* env, so `pnpm dev` / generate:importmap in dev
wrote an importMap.js without S3ClientUploadHandler — committed, the production admin (R2 on)
rendered a blank page with no console error (hit vanstev.pl). The injected s3Storage is now
always registered (enabled: false without R2 → local disk); storage-s3 still adds its client
handler, so the import map is identical in every environment. ipal-audit flags an import map
without the handler.
R2_PUBLIC_URL alone (absolute, outside production) = read-only media: URLs from the media
domain, upload/delete refused with 403 — local dev against a production database without
bucket keys. ipalEnvRules allows it in development.
Cookie Settings (MongoDB): the 1.11.1 rename buttons.save → savePreferences lost the texts on
the first save; onInit copies the old value (all locales) when the new field is missing.
getConsentTexts read the old field as a string, Mongo returns the raw { pl, en } map.
Also: context.ipalSkipAutoFill (SKIP_AUTO_FILL) — save without meta / aiSummary auto-fill;
createPageRoute redirects the homepage under its own slug (homeAlias, default 'redirect');
ipal-audit: multi-line tsconfig exclude, numeronyms (a11y) not "numbered fields",
`${prefix}/${slug}` links and slugs typed into links detected, clearer panel-language message.
Docs: fallback-on-save in i18n.md, `pnpm up --latest` and the stale-token 401 in PROGRAMISTA §1.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Stats: ipalKit({ stats: true }) adds the stats-visits collection, POST /api/ipal/hit, the
/admin/stats view (30-day visits chart, top/entry pages, referrers, devices), a dashboard card
and a nav link. <PageStats> (or <SiteProviders stats>) sends one beacon per page view. Without
consent nothing is stored on the device and no IP is kept: page views are joined by a hash with
an in-memory salt replaced daily. With analytics consent an ipal_vid cookie links visits across
days (server re-checks the consent cookie and policy version; withdrawal deletes the cookie).
Bots, logged-in panel users and prefetches aren't counted. Retention 90 days.
@payloadcms/next added to peerDependencies (DefaultTemplate). Docs: stats.md with privacy text.
Also in this release: meta.description auto-filled from page blocks, <NoSnippet>,
MetaDescriptionCheck in the SEO tab, data-nosnippet on banner/language switcher, GA4 CSP
wildcards, consent version passed to Analytics' default consent.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Next puts a layout's not-found tree into the RSC payload of every page under it. The eager
createNotFoundPage({ blocks }) rendered the panel's 404 page there in every locale, so with
404 = homepage each page shipped the homepage twice (homepage HTML 195 -> 146 KB gzip).
With { load } only <NotFoundLoader> is in the payload; the content comes from the project's
server action (renderNotFoundView, locale checked against configured locales) when a 404 shows.
The eager variant is unchanged. Docs: pages.md, i18n.md, AGENT.md, PROGRAMISTA, ipal-setup, CHANGELOG.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- buildRevalidateHook skips outside Next (no NEXT_RUNTIME) and with context.disableRevalidate
- BuilderForm focuses only on a real step change (no scroll to the form on remount)
- mediaImageProps: placeholder colour only for JPEG (placeholderColor); hook stores no colour for transparent images
- buildLinkField: interface name per shape (CmsLink, CmsLinkPlain, CmsLinkNoLabel) + interfaceName option
- Cookie Settings: buttons.save -> buttons.savePreferences (Mongoose reserved name)
- ThemeScript, ThemeSwitcher, useTheme; Site Settings defaultTheme 'system' + themeToggleLabel; Turnstile follows page theme
- extractHeadings, RenderRichText headingIds, TableOfContents, buildTableOfContentsField
- createPageRoute onMissing: 'redirectHome'
- Form builder: localized placeholder on text/email/textarea/number, new time field
- ipal-audit: no false positive for object keys between JSX elements; /md route not reported as dynamic
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Forms: `values` on RenderForm / BuilderForm / useBuilderForm fills fields the
page knows (chosen product variant, category) — read-only <output>, in the
SSR HTML, sent and validated like any field. prepareBuilderForm (/rsc) is the
server half of RenderForm for client components whose values change in the
browser; publicForm is exported so projects stop copying it.
Links: buildLinkField({ relationTo: ['pages', 'categories', …] }) — a
polymorphic relation; resolveLinkHref builds /{locale}/{archive}/{entry} from
`archives`, which getLinkOptions in createContentHelpers fills from Site
Settings.
SEO: pageJsonLd.entries — the main JSON-LD node per content collection
instead of BlogPosting; buildProductJsonLd emits an Offer only for a real
price from the panel.
Pages: createPageRoute / createNotFoundPage pass isFirst to blocks, so the
first section carries the page's only h1.
Fixes: ipalEnvRules({ storage: true }) requires R2_* in production only
(development: optional, all or none); buildImagesConfig allows the app's own
media on localhost outside production.
Docs, CHANGELOG, PROGRAMISTA §6 (34–37), ipal-form and ipal-upgrade skills.
Tests: builderForm, links, drafts (entries + archives), seo, media, env.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
createPageMetadata read Site Settings → siteDescription but never passed it to
buildMetadata, so pages without their own meta description had no
<meta name="description"> or og:description. Regression test in seo.test.ts.
storage.md: Cloudflare Cache Rule for the media domain (R2 objects carry no
Cache-Control; storage-s3 cannot set it, Cloudflare defaults to 4 h).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CookieBanner: order, settings="modal", controls="switch",
settingsActions, icon and a class slot for every element. Cookie
Settings gains eyebrow, title, settingsDescription, alwaysActiveLabel
and buttons.close.
MaskedField, TestEmailButton and IntegrationStatusBanner import
@payloadcms/ui and moved from /client to /admin; with sideEffects in
package.json the site bundle no longer ships ~235 KB gz of admin code.
A test walks the /client import graph to keep it that way.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
{{*:table}} renders a readable submission summary (questions, option labels,
grouped by step, empty fields skipped) inside an email template with logo,
accent colour and footer from Site Settings → Emails. submitForm stores the
submission in the page language, so emails follow the visitor's locale.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Site Settings -> Under construction: a switch, 'Pages still available' and
notice texts. When on, only the homepage and the chosen pages open (every
language); other addresses redirect to the homepage with the notice
(createPageRoute redirect option), and <ConstructionNotice> cancels clicks
on links to blocked pages and shows the notice. getConstructionMode(locale).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every form block (built-in, Checkbox group, Step, message) gets a showWhen
group: visible only when another field has one of the given values. A hidden
Step drops out with its fields; browser and server share visibleFields, so a
hidden field is neither required nor stored. GDPR consent is always enforced.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Forms: step and checkboxGroup field types (radio, date on), server validation for them,
useBuilderForm (logic) + BuilderForm (unstyled default) + RenderForm (/rsc: rich text,
bound action, public part of the form only — the Emails tab never reaches the browser)
- Notifications: next / back / stepOf texts
- createContentHelpers: getSiteShell, getFormTexts, getLinkOptions, resolveLink, resolveNav,
resolvePageRedirect, one-line route handlers (llms, llms-full, md, mcp, health, indexnow, manifest)
- /rsc: SiteProviders, createPageRoute, createNotFoundPage
- resolveLink / resolveNav / homeSlugFrom, buildSectionHeaderField / buildSectionSettingsField
- Dev sandbox frontend built on these imports; tests (unit + real Payload)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ipal-audit: <video> outside Media, priority outside the hero, <Media> without
sizes, raw YouTube iframes, 100vh/h-screen, fixed pixel sizes, page JSON-LD,
upload sandbox headers, images preset, missing form seeds; accepts
createMarkdownRoute / createSubmitAction.
ipal-seo-check: exactly one h1, heading jumps, img alt and dimensions, LCP
priority, og:image, thin pages, internal links, X-Robots-Tag noindex left on
in production. Verified on bad and good fixtures.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- fluid-wide.css: the fluid.css variables stretched over 360→1920px (export
@intecion/ipal-kit/fluid-wide.css); fluid.css values unchanged.
- New variables in both (unused until a project opts in): --ipal-measure,
--ipal-container(-wide), --ipal-hero-min-h (svh), --ipal-fs-display-fit,
--ipal-fs-h1-fit, --ipal-space-section-fit — keep the hero CTA above the fold
on 1366×768. Verified in Chromium at 360…1920 widths.
- AGENT.md §6.11a (scaling, viewport test list incl. 13–15" laptops and 125/150 %
zoom) and §6.11b (Core Web Vitals table: LCP image, sizes, placeholders, video
modes, YouTube facade, images preset, fonts).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Headless helpers for the project's own <Media> (look stays in the project):
- mediaImageProps: dimensions from the doc (no CLS), lazy by default, LCP image
gets preload + fetchPriority=high + eager (Next 16 replaced 'priority'),
focal point → object-position, blur placeholder + dominant colour.
- MEDIA_SIZES suggestions for 'sizes' (any string still works).
- videoProps: 'background' (muted loop, respects reduced motion) or 'player'
(controls, preload=none, poster).
- buildMediaPlaceholderHook/Field: tiny WebP blur + dominant colour at upload
via the configured sharp (no new dependency).
- buildImagesConfig: AVIF/WebP, R2 remotePatterns, 31-day cache.
- <YouTubeEmbed> (/client): poster + button, youtube-nocookie iframe on click.
- buildCsp youtube allows the i.ytimg.com poster. kod-sekcji Media template
uses the helpers.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- IPAL_NOINDEX=1: whole-site noindex for staging (robots Disallow /, robots
meta noindex,nofollow, X-Robots-Tag via buildSecurityHeaders).
- Markdown mirrors and llms files: X-Robots-Tag noindex; Markdown adds a
Link rel=canonical to the HTML page.
- buildNoindexField refuses noindex on the homepage and archive pages.
- AGENT.md §0c: writing pages for Google and AI (structure, answer-first,
facts, E-E-A-T, entity consistency, sameAs, aiSummary, meta) and a
when-to-noindex table (legal pages stay indexed by default; drafts instead
of noindexed pages; staging via env).
- AGENT.md §6.0: ten component rules (small, Button styled once, buttons as
'+ Add Button' array, variants, panel clarity); audit warns on buttons
styled inside sections.
- AGENT.md §8a + smoke.spec.template.ts: what to test in a client project;
PROGRAMISTA §8.1a: how the plugin itself is tested.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The ipal-form skill now requires seeding each form (scripts/seed-form-*.ts):
idempotent, reads the notification inbox from the panel and stops without
one, adds both e-mails ({{email}} is safe since submitForm accepts exactly one
address). Verified on the dev sandbox in pl + en. Dev sandbox enables forms.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Fix: resolveRoute served never-published drafts by URL (Payload's find
returns them with _status 'draft') — also via Markdown, MCP get_page and
metadata. Drafts are dropped on every branch; `draft: true` for previews.
- Fix: getArchiveEntries listed drafts in archive pages despite its comment;
`_status: published` is added automatically when the collection has drafts.
- form-submissions readable only by editor+ (form-builder default: any account
of the admin collection, incl. plain users from an open sign-up); delete admin.
- Forms stay public for rendering, but the Emails tab (recipients) is hidden
from anonymous REST reads.
- safeHref: CMS links only http(s), mailto, tel, sms, #, / — javascript:, data:
and control-character tricks are dropped in resolveLinkHref.
- Analytics IDs validated in the panel and before reaching the browser.
- buildUploadSecurityHeaders: sandbox CSP for /api/<upload>/file/* so an
uploaded SVG can't run script on the site's origin.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Consent (GDPR)
- Withdrawing consent now deletes GA/Meta/Ads/Clarity/LinkedIn/TikTok/Hotjar
cookies (prefix patterns) on the host AND parent domains — previously only
the locale cookie was removed and _ga & co. stayed. Projects extend the list
via <ConsentProvider cookieMap>, merged with the defaults.
- Cookie Settings → Policy version: raising it asks every visitor again.
- <CookieBanner equalChoice>: Reject styled like Accept (UODO/EDPB), opt-in.
- Opt-in consent log (ipalKit({ consentLog: true }) + logEndpoint): random id,
choices, version, time — no IP/UA; admin-only collection, retention purge.
- Cookie Settings → Cookies + getCookieTable + unstyled <CookieTable> (/rsc).
- Consent cookie gets Secure on HTTPS; consent id stored with the decision.
- ipal-consent-check: cookie-scan.mjs (before/after consent, known-tool
catalog PL/EN, flags non-necessary cookies set before consent) and
import-cookies.ts into the panel (idempotent, keeps editor edits).
Forms
- Server-side type checks per field from the panel definition: email = one
address (blocks "a@x, b@y" recipient injection into {{email}} confirmations
and CR/LF header injection), select/radio only configured options, numbers,
booleans; objects/arrays rejected; control and bidi characters stripped.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
GEO / SEO
- collectSiteIndex: one list of public docs per locale (pages + archive
entries) on sitemap rules; llms.txt/llms-full and MCP list_pages now include
blog/content entries and every language. Fixes hard-coded "## Strony" heading
and homepage not collapsing to the locale root in llms.txt.
- Markdown frontmatter: canonical url + updated date.
- Metadata: X/Twitter card, OG image width/height/alt, og:type article with
published/modified times for entries.
- Fix: Site Settings "defaultShareImage" was never used — now the OG fallback.
- getPageJsonLd (createContentHelpers): WebPage/CollectionPage/BlogPosting,
BreadcrumbList from the real route, FAQPage via a project mapper.
- IndexNow (opt-in ipalKit({ indexNow: true })): submit published URLs in all
languages, key generated in Site Integrations or INDEXNOW_KEY, key route.
- sameAs profiles in Site Settings + sameAsUrls(); sitemap <image:image>.
From project reports
- Fix: package exports were missing ./env and ./fluid.css although the docs
import them (TS2307); regression test checks every documented subpath.
- Fix: plugins run before Payload adds its default users collection, so roles
and 2FA had nothing to attach to — ipalKit injects an auth collection when
the project has none (project's own one wins). Audit no longer errors on it.
- createMarkdownRoute, createSubmitAction (/server, headers injected).
- formatOpeningHours (PL/EN/DE text → schema.org), used by
buildLocalBusinessJsonLd, which also takes a schema.org `type`.
- buildNavigationJsonLd straight from the header global.
- buildCsp googleMaps: full Maps JS API domain set; values de-duplicated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- AGENT.md §0b: one table of everything every site must have (SEO meta/maps,
JSON-LD, llms.txt + llms-full, Markdown, MCP, AI bots, R2, panel forms,
Turnstile, consent, security, ops, system pages, zero hardcodes), the
forbidden replacements (own forms, nodemailer, reCAPTCHA, hand-written
JSON-LD, static SEO files, raw S3) and an `ipal-audit-skip:` escape hatch that
needs a recorded client decision.
- ipal-audit: "missing: …" errors for every mandatory item and for plugin
replacements; ipal-seo-check: runtime GEO checks (llms, Markdown, MCP,
JSON-LD, AI bots, health). Both verified on bare and complete fixtures.
- Skills (setup, site, form, upgrade, audit, seo-check) and PROGRAMISTA.md
wire the full set from step one; GEO is no longer "optional".
- Fix: createProxy({ markdown: true }) lets /md/... through — multilingual
sites redirected /md/pl/x to /pl/md/pl/x, so the documented Markdown route
never worked — and handles Accept: text/markdown.
- createContentHelpers({ markdownAlternate: true }) adds the text/markdown
alternate link in generatePageMetadata.
- JSDoc/docs JSON-LD examples use JsonLdGraph; docs/CHANGELOG.md for 1.9.0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- MCP: new get_site_info and list_pages tools (public by design, published
and indexable content only); search results collapse the homepage to root.
New listContent() helper shared with searchContent.
- Dashboard alert when Turnstile is half-configured (it is silently off then).
- twoFactor.plugin is now required; the dynamic-import fallback (which never
worked under Next and caused a Turbopack warning) is gone.
- a11y: cookie category checkboxes are labelled, buttons have type, test-email
input is labelled; tab labels keep localized collection labels.
- IPAL_IP_HEADER: one-time production warning when unset, opt-in
ipalEnvRules({ ipHeader: true }).
- Tests: SEO/robots/sitemap/hreflang, CSP, Markdown, consent, MCP, and a real
Payload + SQLite integration test for forms and the roles guard (74 total).
- Drop unused mongodb-memory-server; dev .env.example for SQLite.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- dist/ no longer committed; prepare builds it for git installs and
prepublishOnly runs clean + build + unit tests before every publish.
- Gitea Actions CI: typecheck, lint, unit tests, build on push/PR.
- New scripts: typecheck, test:watch; test:int runs once; lint covers src + test.
- dev/: drop the Mongo memory server and template route, opt out of 2FA,
add the pages collection the SEO config expects, alias @intecion/ipal-kit/*
to src, fix e2e credentials, regenerate types and import map.
- Remove stray src/index.tsgrep, dedupe .gitignore, README peer versions 3.90.2.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mostly perfectionist import/key sorting and curly braces from --fix, plus:
- spread instead of .apply() in the Meta Pixel stub
- non-capturing group in the locale-code pattern
- React 19 use(Context) / <Context value> in TurnstileProvider
- email regex rewritten without super-linear backtracking (covered by a test)
- console.warn/error allowed (deliberate server diagnostics)
- test/tsconfig.json so the project service and tsc see test files
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Turnstile is on only when both keys are set (panel or env); then submitForm
requires a valid token, so a bot can no longer skip the check by omitting it.
Not configured -> no widget, no check. New getTurnstileConfig() for layouts.
- /api/ipal/test-email now requires the admin role (403 for other users).
- roles field: create access is admin-only, so open sign-up can't self-assign admin.
- clientIp reads X-Forwarded-For from the right, accepts Headers, can be pinned
via option or IPAL_IP_HEADER; exposed on search/MCP routes.
- Pluggable shared rate-limit store (setRateLimitStore) for multi-instance setups.
- Replace the template int.spec with real unit tests in test/ (44 tests).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This project uses the Payload CMS skill at `.claude/skills/payload/`.
Start with `.claude/skills/payload/SKILL.md` for a quick reference, then see `.claude/skills/payload/reference/` for detailed docs.
## Main rule: the plugin helps projects, never limits them
ipal-kit is a plugin. Every change must leave the consuming project free to adapt it.
- Every module and feature can be turned off on its own. Turning one off never takes away anything the project still needs.
- Every default can be overridden: access rules, fields, hooks, labels, routes, collections and globals. The project's own config is merged with the plugin's and wins.
- Secure defaults are welcome. They come with an option to loosen or extend them, never as a hard lock.
- Export the building blocks (helpers, builders, hooks), not only finished features.
- Never force a dependency, route, UI or data shape where an option or an exported piece would do.
## Rule: an agent that adds the plugin gets the complete guide
When an agent adds ipal-kit to a project, `docs/agent/AGENT.md` and the `ipal-*` skills (installed by `ipal-skills`) must tell it how to set up and use every function the plugin supports.
- Every export, option, env var, route, middleware, layout component, admin import-map entry and hook a project must wire is documented, with steps and a way to verify it.
- A change that adds or alters a feature updates the agent guide and the matching skill in the same change.
| `@clocklimited/payload-2fa` | `^3.0.0-0` | optional peer, but **needed by default**: 2FA is enforced and `ipalKit()` throws at startup unless you pass `twoFactor: { issuer, plugin: payloadTotp }` (or opt out with `twoFactor: false`) |
| `@payloadcms/storage-s3` | `^3.90.2` | optional — only when media go to Cloudflare R2 ([docs/storage.md](./docs/storage.md)) |
- **[README.md](./docs/README.md)** — index of the plugin's modules
- **[CHANGELOG.md](./docs/CHANGELOG.md)** — what changed per version and what projects must update
---
@@ -124,8 +193,9 @@ Everything lives in the **[docs/](./docs)** directory. To get started:
|---|---|
| `404` on `pnpm add @intecion/...` | the `@intecion:registry` line is missing from `.npmrc` — the install went to public npm instead of Gitea |
| `Could not find the module … in the React Client Manifest` | installed from git, not the registry — reinstall from the registry (clean path) |
| two versions of `lucide-react` | your project pins a different major than the plugin's `^0.400.0` — align them |
| two versions of `lucide-react` | your project uses a `lucide-react` outside the plugin's `^0.400.0` (= `0.400.x`) — align them |
| `[ipal] 2FA is enforced but no 2FA plugin was injected` | install `@clocklimited/payload-2fa` and pass `twoFactor: { issuer, plugin: payloadTotp }` |
| `missing secret key … to secure Payload` | `PAYLOAD_SECRET` isn't set in the runtime environment (not a plugin issue) |
If you get stuck, see **[docs/publishing.md](./docs/publishing.md)** or message the
If you get stuck, see **[docs/dev/PROGRAMISTA.md](./docs/dev/PROGRAMISTA.md)** or message the
# Zasady i Standardy Projektowe — Payload CMS 3 + Next 16 + @intecion/ipal-kit
Niniejszy dokument stanowi bezwzględnie obowiązujące reguły pracy dla agenta (Antigravity) w niniejszym projekcie. Został sporządzony na podstawie dokumentacji w `/docs`. Każda zasada musi być ściśle przestrzegana, bez wyjątków i bez stosowania obejść/prowizorek.
---
## 1. ZASADA NADRZĘDNA: ipal-kit JEST OBOWIĄZKOWY
1.**Obowiązkowe użycie pluginu:**
- Każda funkcja dostarczana przez `@intecion/ipal-kit` (i18n, SEO, formularze, consent, email, slug, bezpieczeństwo, strony systemowe, storage R2, breadcrumbs, JSON-LD) **MUSI** być realizowana przez plugin.
- **NIGDY** nie twórz własnego kodu w projekcie dublującego możliwości pluginu.
2.**Sprawdzaj przed pisaniem:**
- Zanim napiszesz jakąkolwiek funkcję, helper czy komponent — sprawdź dokumentację w `node_modules/@intecion/ipal-kit/docs/` oraz definicje typów `.d.ts`. Jeśli funkcja istnieje w pluginie, **musisz** jej użyć.
3.**Gdy w pluginie czegoś brakuje:**
- **NIE** obchodź braku prowizorką ani własnym kodem w projekcie (to tworzy dług technologiczny i rozbieżności).
- **Zgłoś brak funkcji do rozbudowy pluginu**, zamiast łatać to lokalnie.
- Logika uniwersalna (przydatna w innych projektach) trafia do pluginu. W projekcie znajduje się **wyłącznie** specyfika danego klienta (jego bloki, wygląd, struktura danych).
4.**Gdy coś w pluginie nie działa:**
- **Zgłoś problem i błąd**, zamiast tworzyć ciche obejścia, prowizoryczne hooki czy hardkodowane patche.
---
## 2. KROK 0: INSTALACJA I DOSTĘP DO DOKUMENTACJI PLUGINU
*(Scoped override: tylko `@intecion/*` z Gitea, rejestr publiczny bez tokena).*
2. **Instalacja pluginu:**
```bash
pnpm add @intecion/ipal-kit
```
*(NIGDY nie instaluj z gita `git+https://...` — psuje React Client Manifest w Next).*
3. **Lokalizacja dokumentacji źródłowej:**
```bash
ls node_modules/@intecion/ipal-kit/docs/
```
Zawsze korzystaj z plików w `docs/` pluginu (`getting-started.md`, `seo.md`, `forms.md`, `email.md`, `storage.md`, `i18n.md`, `blocks.md`, `turnstile.md` itd.).
---
## 3. ABSOLUTNY ZAKAZ HARDKODOWANIA
### A. Treść i teksty:
- **ZAKAZ:** Tekst widoczny dla użytkownika wpisany w JSX, etykiety i komunikaty w kodzie, instrukcje `if (locale === 'pl')`, tablice z tekstami w kodzie.
- **WYMAGANE:** Każdy tekst pochodzi z pola `localized: true`, pobierany z panelu CMS.
- **Częsty błąd (ukryty hardkod w fallbacku):** `siteName || 'Nazwa Klienta'` lub `catch { return { name: 'Firma...' } }` to **niedopuszczalny hardkod**! Gdy brak danych z panelu/env: **pomiń pole** (np. `...(val ? { name: val } : {})`), nie wstawiaj danych klienta w fallbacku `||` ani w bloku `catch`.
### B. Obrazy i multimedia:
- **ZAKAZ:** `import logo from '@/assets/...'`, ścieżki `src="/images/..."`.
- **WYMAGANE:** Pole `type: 'upload', relationTo: 'media'`, renderowane z `media.url`. Do kolekcji `Media` obowiązkowo wepnij `normalizeFilenameHook`.
- **Preconnect:** Użyj `<MediaPreconnect />` z pluginu (czyta `R2_PUBLIC_URL` z env), nigdy sztywnego tagu `<link>` z domeną.
- **Favicon:** Użyj `buildIconsMetadata(settings.favicon)` z panelu (format PNG, nie ręczny SVG).
### C. Linki i routing:
- **ZAKAZ:** `href="/pl/kontakt"`, menu jako statyczna tablica w kodzie, oraz **sztywna mapa zlokalizowanych ścieżek** (`const localizedRoutes = {...}` — kardynalny antywzorzec).
- **WYMAGANE:** `getLocalizedSlugs` / `switchLocalePath` z bazy danych, `getSystemPagePath`, relacje `relationship -> pages` w panelu CMS.
### D. Konfiguracja i dane firmy:
- **ZAKAZ:** `locale as 'pl' | 'en'`, zaszyty slug kolekcji, dane firmy, NIP, adres, telefon w kodzie.
- **WYMAGANE:** Jedno źródło prawdy `i18n.config.ts`, `locale as never`, dane firmy z globala (np. `siteSettings` / `CompanyInfo`), infrastruktura wyłącznie w `.env`.
### E. Renderer bloków, kolekcje, formularze (częste błędy):
- **Renderer rich text:** ZAWSZE `RenderRichText` z pluginu (`@intecion/ipal-kit/rsc`, wrapper nad oficjalnym konwerterem Lexical). NIGDY własny parser Lexical (switch po node.type, flagi node.format, dangerouslySetInnerHTML, hardkod `.pl`). Styl przez `converters`. Patrz richtext.md.
- **Renderer bloków:** ZAWSZE `RenderBlocks` z pluginu + mapa `registry`. NIGDY własny `switch (block.blockType)` — to gadatliwe, bez enhanceProps, rośnie liniowo. Mapa deklaratywna, silnik z pluginu.
- **MINIMUM kolekcji, nie maksimum:** Domyślnie tylko rdzeń (pages, media, settings, navigation, footer + globale). Kolekcję treści (blog/produkty) TYLKO gdy klient JAWNIE wymaga. NIGDY nie twórz: `users` (WBUDOWANE w Payload — nie duplikuj!), `daneFirmy`/`settings` jako kolekcje (to GLOBALE), FAQ/hero/features jako kolekcje (to BLOKI). Test przed stworzeniem: lista rekordów + własny URL + jawna potrzeba + Payload nie ma wbudowanego. Patrz `kolekcje-katalog.md`.
- **Formularze z buildera:** ZAWSZE pola/etykiety/komunikaty z buildera w panelu (kolekcja Forms) + `submitForm`. NIGDY nie hardkoduj pól ani tekstów w JSX. Turnstile: `TurnstileProvider` (siteKey raz w layoutcie) + `useTurnstile()`.
- **Logika formularza z pluginu:** stan/walidacja/Turnstile/submit przez `useForm` (dowolne pola) lub `useContactForm` (preset) z `@intecion/ipal-kit/client` — hooki NIE renderują markupu, wygląd zostaje w projekcie. NIGDY nie kopiuj ręcznej hydrauliki (useState na pola, regex e-maila, obsługa tokenu, try/catch submitu) do projektu — to antywzorzec, który hook eliminuje. Walidacja przez `buildValidator` + reguły (`required`, `email`, `minLength`, `pattern`…). Patrz `forms.md`.
- **Wartości lokalizowane:** ZAWSZE `resolveLocalized(value, locale)` z pluginu. NIGDY własny `getSafeString`/`(v as any)[locale]` kopiowany do JSON-LD, rich text czy topiców formularza.
- **ZAKAZ:** `locale as 'pl' | 'en'`, zaszyty slug kolekcji, dane firmy, NIP, adres, telefon w kodzie.
- **WYMAGANE:** Jedno źródło prawdy `i18n.config.ts`, `locale as never`, dane firmy z globala (np. `siteSettings` / `CompanyInfo`), infrastruktura wyłącznie w `.env`.
---
## 4. ARCHITEKTURA I STRUKTURA PROJEKTU
### A. Next 16 + Payload 3:
- **NIGDY nie twórz `middleware.ts`.** W Next 16 stosuje się **WYŁĄCZNIE `proxy.ts`** (funkcja `proxy`). Jeśli plik `middleware.ts` istnieje — usuń go natychmiast.
- **Struktura katalogów:**
```
src/
app/
(frontend)/
styles.css # Tailwind + @source na plugin
[locale]/
layout.tsx # root layout bez sztywnego <head>
not-found.tsx # 404 (treść z panelu)
[[...slug]]/
page.tsx # render stron z bloków (podwójne nawiasy!)
- **Brak cykli importów:** Warstwa niższa (bloki) **NIE** może importować warstwy wyższej (`lib/*`). Dane zewnętrzne (np. klucze Turnstile) przekazuj przez `enhanceProps` w `page.tsx`.
- **Dostęp do Payloada:** Jedno źródło `getCachedPayload` w `lib/content.ts`.
- **Server Components (RSC) domyślnie:** Pobieranie danych po stronie serwera; `'use client'` stosuj wyłącznie dla komponentów z lokalnym stanem/interakcją. Chroń wrażliwe moduły przez `import 'server-only'`.
### C. Kluczowe wymagania SEO i Renderingu:
1. **Brak jawnego `<head>` w layoutcie:** Sztywny `<head>` wypycha metatagi Next.js do `<body>`. Pozwól Next.js zarządzać nagłówkiem. `<MediaPreconnect />` umieszczaj w `<body>` (React 19 automatycznie hoistuje tag link do head).
2. **Wymagane ISR:** `export const revalidate = 3600` w `page.tsx` stron (zapobiega race condition streamingu metadanych i zapewnia TTFB ~20ms).
3. **Wymagane `generateStaticParams`:** W `[[...slug]]/page.tsx` eksportuj `generateStaticParams` z `lib/content` (`export { generateStaticParams } from '@/lib/content'`). Gwarantuje synchroniczne generowanie metadanych w `<head>` dla robotów.
4. **`htmlLimitedBots`:** Skonfiguruj w `next.config.ts` zgodnie z `seo.md`.
5. **`export const dynamic = 'force-dynamic'` na route'ach odpytujących bazę:** `manifest.ts`, `llms.txt/route.ts`, `sitemap.xml/route.ts`. Bez tego Next próbuje prerenderować je podczas `docker build` (baza offline → crash). Handlery pluginu mają try/catch jako drugą warstwę, ale `dynamic` to eksport modułowy — MUSI być w pliku route'a, handler nie ustawi go za Ciebie.
6. **Walidacja ENV na starcie:** `instrumentation.ts` z `assertEnv(ipalEnvRules({ ... }))` — fail fast przy brakującej konfiguracji, zamiast kryptograficznego crashu w buildzie. Patrz `env.md`.
---
## 5. STANDARDY KODU I TYPOWANIA (POZIOM SENIOR)
1. **Zero `any` i zero `@ts-ignore`:**
- Zawsze typuj precyzyjnie. Jeśli kształt danych z zewnątrz jest nieznany, użyj `unknown` + zawężenie (type guard).
- Wyjątek: wąskie rzutowanie `as unknown as Record<string, unknown>` przy udokumentowanych rozbieżnościach generatora Payload (np. pole zlokalizowane przy `locale: 'all'`).
2. **Typy generowane:** Importuj typy z `@/payload-types` (`pnpm generate:types`), nie twórz ręcznych duplikatów interfejsów.
3. **Generyki przy wywołaniu:** Stosuj np. `getSiteSettings<SiteSetting>(payload)`, a nie rzutowanie `as SiteSetting` na wyniku.
4. **`satisfies` dla konfiguracji:** Używaj `as const satisfies I18nConfig`.
5. **Obsługa błędów:** Nigdy nie połykaj błędów (`catch {}`). Loguj konkretny komunikat i zwracaj kontrolowany błąd. Stosuj guard clauses (płaski kod).
6. **Transakcje i hooki:** W hookach Payload zawsze przekazuj `req` do kolejnych operacji bazodanowych. Chroń hooki przed nieskończonymi pętlami za pomocą flagi w `context` (np. `context.skip`). Przy `payload.find` pamiętaj o `overrideAccess: false`, jeśli operacja ma respektować uprawnienia usera.
---
## 6. NAZEWNICTWO I KONWENCJE
- **Foldery bloków i pliki kolekcji:** PascalCase (`blocks/HeroSection/`, `collections/Pages.ts`).
- **Pliki bloku:** `config.ts` + `Component.tsx` w jednym folderze.
- **Slugi kolekcji:** camelCase, liczba mnoga (`pages`, `blogPosts`, `products`).
- **Slugi bloków:** camelCase (`hero`, `textSection`). Klucz w `registry.ts` musi być identyczny ze slugiem bloku.
- **Wspólne nazwy pól (obowiązkowe w każdym projekcie):**
- Nagłówek: `heading`
- Podtytuł: `subheading`
- Treść: `body` (textarea) lub `content` (richText)
- Obraz: `image` (upload -> media)
- Przycisk CTA: `ctaLabel` (text, localized)
- Cel CTA: `ctaTarget` (relationship -> pages)
- Link zewn.: `url` (text)
- Zgoda prawna: `consent` (checkbox)
---
**Globale Company/Header/Footer → PROJEKT, nie plugin.** Model danych firmy różni się per kraj (NIP/PL, ABN/AU, EIN/US) i branżę. NIE szukaj buildCompanyGlobal w pluginie — zdefiniuj własny src/globals/Company.ts. Schema.org: klocki pluginu (buildOrganizationJsonLd...) + JsonLdGraph, zmapuj SWOJE dane na @type (LegalService/PL, HVACBusiness/AU). Patrz seo.md.
## 6b. WYMAGANIA PRAWNE (COMPLIANCE)
Każda strona (PL/EU) MUSI mieć: polityka prywatności, polityka cookies, baner
zgody cookies, zgoda RODO w formularzach. Plugin dostarcza MECHANIZM:
- **Strony polityk** → System Pages (role: privacyPolicy, cookiePolicy, termsOfService), linkowane przez `getSystemPagePath`.
- **Baner cookies** → CookieBanner + CookieButton + ConsentProvider (analytics/marketing gated — NIE ładują się przed zgodą).
- **Zgoda RODO** → checkbox `consent` w formularzu (enforcement server-side w submitForm).
- **Strony noindex** → polityki/regulamin zaznacz `noindex` w panelu SEO (kanibalizacja fraz).
- **Ochrona:** hook `buildPreventDeleteSystemPage` blokuje usunięcie strony systemowej.
Granica: MY dostarczamy mechanizm, TREŚĆ prawną (tekst polityk) tworzy klient/prawnik.
**Widget dostępności (a11y)** — OPCJONALNY, NIE dodawaj domyślnie. Wymagany tylko
dla podmiotów publicznych / części e-commerce (European Accessibility Act). Dla
zwykłych stron komercyjnych to opcja — dodawaj GDY klient wymaga (AccessibilityProvider
Wpinaj w kolekcje gdzie dotyczy (patrz `hooks.md`):
- **buildRevalidateHook** (afterChange/afterDelete) — ISR odświeżany po zapisie (redaktor od razu widzi zmianę). `revalidatePath` wstrzykiwany z projektu.
- **trackSlugHistoryHook** (beforeChange) — zmiana slug → zapis starego slug. Odczyt robi **resolveRedirect** (patrz niżej) — NIE pisz własnego lookupu.
- **resolveRedirect** (moduł content) — w catch-all, gdy `resolveRoute` nic nie znajdzie: czyta slugHistory i zwraca cel 301/308; projekt woła `permanentRedirect` (plugin nie importuje `next/navigation`). Domyka trackSlugHistoryHook.
- **buildCrossLocaleFieldSync** (afterChange) — kopiuje pola wspólne dla języków (obrazki) wewnątrz lokalizowanego `blocks` między locale. Lista języków z `config` (NIGDY hardkod `['pl','en',…]`). Zastępuje ręczny hook z zahardkodowaną listą.
- **buildNoindexField** (pole, nie hook) — sidebarowy checkbox `noindex` zgrany z `meta.noindex`, bez `any`. Zamiast ręcznego checkboxa + hooka glue.
- **setPublishedAtHook** — auto-data publikacji (blog).
- **normalizeFilenameHook** — czyste nazwy plików (Media, obowiązkowo).
- **buildPreventDeleteSystemPage** / **buildValidateUniqueRole** — ochrona stron systemowych.
## 6d. BEZPIECZEŃSTWO (nagłówki)
- **buildSecurityHeaders** w next.config — HSTS, COOP, nosniff, Referrer-Policy (z automatu, uniwersalne).
- **2FA WYMUSZONE** — `ipalKit({ twoFactor: { issuer: 'Nazwa Firmy' } })` + `pnpm add @clocklimited/payload-2fa@3.0.0-beta.7`. Wymuszone dla WSZYSTKICH użytkowników (forceSetup), bez opcji wyłączenia per user. NIE ustawiaj `twoFactor: false` (chyba że klient wprost odmawia). Bez zależności = błąd buildu. Patrz security.md.
- **Ścieżka panelu** — `ipalKit({ adminRoute: '/its' })` ukrywa panel. WYMAGA przeniesienia folderu `app/(payload)/admin/` → `app/(payload)/its/`. To obscurity, nie security (2FA to prawdziwa ochrona).
- CSP zostaje w projekcie (domeny), ale skeleton z pluginu. NIE Trusted Types (psuje Turnstile/GA).
## 7. PODZIAŁ PRACY I RÓL
- **Antigravity (Agent):** Buduje architekturę, logikę, kolekcje, bloki, routing, edytowalność przez panel, integracje oraz dba o brak hardkodów.
- **Impeccable (osobne narzędzie):** Dopracowuje wygląd, system wizualny na bazie `PRODUCT.md` i `DESIGN.md`. Antigravity nie „dopieszcza" styli ad-hoc kosztem logiki i edytowalności.
- **Klient / Redaktor:** Samodzielnie zarządza każdą treścią z poziomu panelu CMS.
---
## 8. PROCEDURA RAPORTOWANIA DO PLUGINU
Jeśli w trakcie pracy:
1. Funkcja okaże się brakująca w `@intecion/ipal-kit`,
2. Wystąpi błąd wewnętrzny w bibliotece pluginu,
3. Pojawi się powtarzalna potrzeba biznesowa przydatna w wielu projektach,
**Należy natychmiast przygotować raport proponowanej zmiany/rozbudowy pluginu:**
- Dokładny opis problemu / brakującej funkcjonalności,
- Proponowany interfejs API / sygnatura funkcji lub konfiguracji,
- Uzasadnienie uniwersalności dla innych projektów.
**Nie wolno tworzyć cichej łaty w kodzie projektu.**
---
## 9. MAPA DOKUMENTACJI — gdzie szukać szczegółów
Ten plik to skondensowane reguły. Szczegóły w `node_modules/@intecion/ipal-kit/docs/`:
| Chcę... | Plik |
|---|---|
| Zbudować projekt od zera | `getting-started.md` |
'5. ipal-kit first: if the plugin has it, use it. Broken or not enough → report it with the `ipal-plugin-gap` skill and wait for the owner — no hand-built replacement, never patch `node_modules`.',
'6. Before you set up a site: ask the owner the architecture questions (AGENT.md "Ask before you build") and wait for the answers; record them under "Project decisions".',
'7. ipal-kit docs, this guide and the skills are in English; write rules, AGENTS.md entries and gap reports in English.',
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
{"version":3,"sources":["../../src/exports/client.ts"],"sourcesContent":["'use client'\nexport { MaskedField } from '../globals/SiteIntegrations/components/MaskedField.js'\nexport { TestEmailButton } from '../globals/SiteIntegrations/components/TestEmailButton.js'\nexport {\n AccessibilityProvider,\n AccessibilityWidget,\n useAccessibility,\n} from '../modules/accessibility/client.js'\nexport type { A11yClassNames, A11yState, A11yTexts } from '../modules/accessibility/client.js'\nexport { Analytics } from '../modules/analytics/client.js'\nexport { pushDataLayer } from '../modules/analytics/client.js'\n\n/**\n * Entry point: ipal-kit/client\n *\n * Client-side ('use client') exports — React hooks, providers, and UI\n * components. Kept separate from the main entry so server bundles don't pull in\n * client-only code.\n */\nexport {\n ConsentProvider,\n ConsentScript,\n CookieBanner,\n CookieButton,\n useConsent,\n useConsentContext,\n} from '../modules/consent/client.js'\nexport type { CookieBannerClassNames } from '../modules/consent/client.js'\nexport { formAnalyticsOnSuccess } from '../modules/forms/formAnalytics.js'\nexport type { FormAnalyticsConfig } from '../modules/forms/formAnalytics.js'\nexport { HONEYPOT_FIELD, honeypotInputProps, isHoneypotTripped } from '../modules/forms/honeypot.js'\nexport { useContactForm } from '../modules/forms/useContactForm.js'\nexport type {\n ContactFormErrors,\n ContactFormValues,\n SubmitAction,\n} from '../modules/forms/useContactForm.js'\nexport { useForm } from '../modules/forms/useForm.js'\nexport type { FormErrors, FormSubmitAction, Validator } from '../modules/forms/useForm.js'\nexport {\n buildValidator,\n checked,\n custom,\n email,\n isEmail,\n maxLength,\n minLength,\n pattern,\n required,\n} from '../modules/forms/validators.js'\nexport type { Rule } from '../modules/forms/validators.js'\n// Pure i18n path helpers — no server/RSC deps, safe to import in client\n// components (e.g. a LanguageSwitcher that computes locale URLs on the client).\nexport {\n buildLocalizedPath,\n getLocaleCodes,\n getLocalizedSlugs,\n switchLocalePath,\n} from '../modules/i18n/index.js'\nexport type { I18nConfig, LocalizedSlugs } from '../modules/i18n/index.js'\nexport {\n AlternateLinksProvider,\n AlternateLinksUpdater,\n LanguageSwitcher,\n useAlternateLinks,\n useSetAlternateLinks,\n} from '../modules/i18n/index.js'\nexport type { AlternateLinks, LanguageSwitcherClassNames } from '../modules/i18n/index.js'\nexport { Turnstile } from '../modules/turnstile/client.js'\nexport { TurnstileProvider, useTurnstile } from '../modules/turnstile/client.js'\nexport type { TurnstileProps } from '../modules/turnstile/client.js'\n"],"names":["MaskedField","TestEmailButton","AccessibilityProvider","AccessibilityWidget","useAccessibility","Analytics","pushDataLayer","ConsentProvider","ConsentScript","CookieBanner","CookieButton","useConsent","useConsentContext","formAnalyticsOnSuccess","HONEYPOT_FIELD","honeypotInputProps","isHoneypotTripped","useContactForm","useForm","buildValidator","checked","custom","email","isEmail","maxLength","minLength","pattern","required","buildLocalizedPath","getLocaleCodes","getLocalizedSlugs","switchLocalePath","AlternateLinksProvider","AlternateLinksUpdater","LanguageSwitcher","useAlternateLinks","useSetAlternateLinks","Turnstile","TurnstileProvider","useTurnstile"],"mappings":"AAAA;AACA,SAASA,WAAW,QAAQ,wDAAuD;AACnF,SAASC,eAAe,QAAQ,4DAA2D;AAC3F,SACEC,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,QACX,qCAAoC;AAE3C,SAASC,SAAS,QAAQ,iCAAgC;AAC1D,SAASC,aAAa,QAAQ,iCAAgC;AAE9D;;;;;;CAMC,GACD,SACEC,eAAe,EACfC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,UAAU,EACVC,iBAAiB,QACZ,+BAA8B;AAErC,SAASC,sBAAsB,QAAQ,oCAAmC;AAE1E,SAASC,cAAc,EAAEC,kBAAkB,EAAEC,iBAAiB,QAAQ,+BAA8B;AACpG,SAASC,cAAc,QAAQ,qCAAoC;AAMnE,SAASC,OAAO,QAAQ,8BAA6B;AAErD,SACEC,cAAc,EACdC,OAAO,EACPC,MAAM,EACNC,KAAK,EACLC,OAAO,EACPC,SAAS,EACTC,SAAS,EACTC,OAAO,EACPC,QAAQ,QACH,iCAAgC;AAEvC,wEAAwE;AACxE,gFAAgF;AAChF,SACEC,kBAAkB,EAClBC,cAAc,EACdC,iBAAiB,EACjBC,gBAAgB,QACX,2BAA0B;AAEjC,SACEC,sBAAsB,EACtBC,qBAAqB,EACrBC,gBAAgB,EAChBC,iBAAiB,EACjBC,oBAAoB,QACf,2BAA0B;AAEjC,SAASC,SAAS,QAAQ,iCAAgC;AAC1D,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,iCAAgC"}
{"version":3,"sources":["../../src/exports/next-middleware.ts"],"sourcesContent":["/**\n * Entry point: ipal-kit/next/middleware\n *\n * Re-exports the locale middleware factory and default matcher for use in a\n * client project's middleware.ts. Kept as a thin re-export so the Next-facing\n * surface is separate from the main package export.\n */\nexport { createLocaleMiddleware, DEFAULT_MIDDLEWARE_MATCHER } from '../modules/i18n/index.js'\nexport type { LocaleMiddlewareResult } from '../modules/i18n/index.js'\nexport { createProxy, DEFAULT_PROXY_MATCHER } from '../modules/i18n/index.js'\n"],"names":["createLocaleMiddleware","DEFAULT_MIDDLEWARE_MATCHER","createProxy","DEFAULT_PROXY_MATCHER"],"mappings":"AAAA;;;;;;CAMC,GACD,SAASA,sBAAsB,EAAEC,0BAA0B,QAAQ,2BAA0B;AAE7F,SAASC,WAAW,EAAEC,qBAAqB,QAAQ,2BAA0B"}
{"version":3,"sources":["../../src/exports/rsc.ts"],"sourcesContent":["/**\n * Entry point: ipal-kit/rsc\n *\n * Server-component exports. RenderBlocks is a React Server Component, so it\n * lives here rather than in the main package entry to keep React out of the\n * server-config bundle.\n */\nexport { RenderBlocks } from '../modules/blocks/index.js'\nexport type {\n BlockComponentMap,\n BlockData,\n EnhanceProps,\n RenderBlocksProps,\n} from '../modules/blocks/index.js'\nexport { RenderRichText } from '../modules/richtext/index.js'\nexport type { RenderRichTextProps } from '../modules/richtext/index.js'\nexport { JsonLdGraph } from '../modules/seo/index.js'\nexport { MediaPreconnect } from '../modules/storage/MediaPreconnect.js'\n"],"names":["RenderBlocks","RenderRichText","JsonLdGraph","MediaPreconnect"],"mappings":"AAAA;;;;;;CAMC,GACD,SAASA,YAAY,QAAQ,6BAA4B;AAOzD,SAASC,cAAc,QAAQ,+BAA8B;AAE7D,SAASC,WAAW,QAAQ,0BAAyB;AACrD,SAASC,eAAe,QAAQ,wCAAuC"}
{"version":3,"sources":["../../src/exports/server.ts"],"sourcesContent":["/**\n * Entry point: ipal-kit/server\n *\n * Server-only runtime functions — these import 'server-only' (Turnstile secret,\n * SMTP password, nodemailer). Kept OUT of the main entry so that loading the\n * Payload config or running `payload generate:importmap` (both Node scripts,\n * no bundler) never pulls in 'server-only', which throws outside a bundled\n * server context.\n *\n * Import these only from Server Actions, route handlers, or server components —\n * never from the Payload config or client code.\n */\nexport { verifyTurnstile } from '../modules/turnstile/index.js'\nexport { sendEmail } from '../modules/email/index.js'\nexport type { SendEmailArgs, SendEmailResult } from '../modules/email/index.js'\nexport { submitForm } from '../modules/forms/index.js'\nexport type { SubmitFormArgs, SubmitFormResult } from '../modules/forms/index.js'\n"],"names":["verifyTurnstile","sendEmail","submitForm"],"mappings":"AAAA;;;;;;;;;;;CAWC,GACD,SAASA,eAAe,QAAQ,gCAA+B;AAC/D,SAASC,SAAS,QAAQ,4BAA2B;AAErD,SAASC,UAAU,QAAQ,4BAA2B"}
{"version":3,"sources":["../../../src/globals/CookieSettings/index.ts"],"sourcesContent":["import type { GlobalConfig } from 'payload'\n\nimport { cookieSettingsFields } from './fields.js'\n\n/**\n * Builds the CookieSettings global — consent banner copy managed by editors.\n * Public read (the banner needs it on the frontend for anonymous visitors).\n */\nexport function buildCookieSettings(): GlobalConfig {\n return {\n slug: 'cookie-settings',\n access: {\n read: () => true,\n },\n admin: {\n group: 'Settings',\n },\n fields: cookieSettingsFields,\n label: 'Cookie Settings',\n }\n}\n"],"names":["cookieSettingsFields","buildCookieSettings","slug","access","read","admin","group","fields","label"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ,cAAa;AAElD;;;CAGC,GACD,OAAO,SAASC;IACd,OAAO;QACLC,MAAM;QACNC,QAAQ;YACNC,MAAM,IAAM;QACd;QACAC,OAAO;YACLC,OAAO;QACT;QACAC,QAAQP;QACRQ,OAAO;IACT;AACF"}
{"version":3,"sources":["../../../src/globals/Notifications/fields.ts"],"sourcesContent":["import type { Field } from 'payload'\n\n/**\n * Fields for the Notifications global — localized user-facing texts for action\n * results (form submission outcomes, and future contexts). Every text is\n * localized: true so each language has its own value. Empty fields fall back to\n * built-in English defaults (see modules/notifications/defaults).\n *\n * Grouped per context. `form` holds the outcomes of submitForm; more groups\n * (e.g. `newsletter`, `system`) can be added the same way without touching\n * consumers — getNotificationTexts resolves whatever exists, falling back\n * per field.\n */\nexport const notificationsFields: Field[] = [\n {\n name: 'form',\n type: 'group',\n admin: {\n description:\n 'Messages shown after a form is submitted. Leave a field empty to use the built-in default.',\n },\n fields: [\n {\n name: 'success',\n type: 'text',\n admin: { placeholder: 'Thank you — your message has been sent.' },\n localized: true,\n },\n {\n name: 'error',\n type: 'text',\n admin: { placeholder: 'Something went wrong. Please try again later.' },\n localized: true,\n },\n {\n name: 'rateLimited',\n type: 'text',\n admin: { placeholder: 'Too many attempts. Please wait a moment and try again.' },\n localized: true,\n },\n {\n name: 'turnstile',\n type: 'text',\n admin: { placeholder: 'Captcha verification failed. Please try again.' },\n localized: true,\n },\n {\n name: 'validation',\n type: 'text',\n admin: {\n description:\n 'Shown on a validation error. Use {field} to insert the offending field name.',\n placeholder: 'Please check the {field} field and try again.',\n },\n localized: true,\n },\n {\n name: 'consent',\n type: 'text',\n admin: {\n description: 'Shown when the GDPR consent checkbox is left unchecked.',\n placeholder: 'Please accept the privacy policy to continue.',\n },\n localized: true,\n },\n {\n name: 'notFound',\n type: 'text',\n admin: { placeholder: 'This form is no longer available.' },\n localized: true,\n },\n ],\n label: 'Form messages',\n },\n]\n"],"names":["notificationsFields","name","type","admin","description","fields","placeholder","localized","label"],"mappings":"AAEA;;;;;;;;;;CAUC,GACD,OAAO,MAAMA,sBAA+B;IAC1C;QACEC,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,aACE;QACJ;QACAC,QAAQ;YACN;gBACEJ,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBAAEG,aAAa;gBAA0C;gBAChEC,WAAW;YACb;YACA;gBACEN,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBAAEG,aAAa;gBAAgD;gBACtEC,WAAW;YACb;YACA;gBACEN,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBAAEG,aAAa;gBAAyD;gBAC/EC,WAAW;YACb;YACA;gBACEN,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBAAEG,aAAa;gBAAiD;gBACvEC,WAAW;YACb;YACA;gBACEN,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBACLC,aACE;oBACFE,aAAa;gBACf;gBACAC,WAAW;YACb;YACA;gBACEN,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBACLC,aAAa;oBACbE,aAAa;gBACf;gBACAC,WAAW;YACb;YACA;gBACEN,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBAAEG,aAAa;gBAAoC;gBAC1DC,WAAW;YACb;SACD;QACDC,OAAO;IACT;CACD,CAAA"}
{"version":3,"sources":["../../../src/globals/Notifications/index.ts"],"sourcesContent":["import type { GlobalConfig } from 'payload'\n\nimport { notificationsFields } from './fields.js'\n\n/**\n * Builds the Notifications global — localized action-result texts. Readable by\n * any authenticated panel user; server-side helpers read it with overrideAccess\n * so the frontend can resolve texts without a session.\n */\nexport function buildNotifications(): GlobalConfig {\n return {\n slug: 'notifications',\n access: {\n read: () => true, // texts are public-facing (shown to end users)\n },\n fields: notificationsFields,\n label: 'Notifications',\n }\n}\n"],"names":["notificationsFields","buildNotifications","slug","access","read","fields","label"],"mappings":"AAEA,SAASA,mBAAmB,QAAQ,cAAa;AAEjD;;;;CAIC,GACD,OAAO,SAASC;IACd,OAAO;QACLC,MAAM;QACNC,QAAQ;YACNC,MAAM,IAAM;QACd;QACAC,QAAQL;QACRM,OAAO;IACT;AACF"}
{"version":3,"sources":["../../../../src/globals/SiteIntegrations/fields/turnstile.ts"],"sourcesContent":["import type { Field } from 'payload'\n\n/**\n * Cloudflare Turnstile credentials.\n *\n * siteKey is public (rendered in the widget); secretKey is used for\n * server-side verification. Both are protected at the global level\n * (SiteIntegrations requires an authenticated user) rather than per-field,\n * so they remain editable in the admin panel.\n */\nexport const turnstileFields: Field[] = [\n {\n name: 'turnstileSiteKey',\n type: 'text',\n admin: {\n description: 'Public site key rendered in the Turnstile widget.',\n },\n },\n {\n name: 'turnstileSecretKey',\n type: 'text',\n admin: {\n description: 'Secret key used for server-side verification.',\n // Masked in the UI (••••) — stored plaintext, readable for verification.\n components: {\n Field: '@intecion/ipal-kit/client#MaskedField',\n },\n },\n },\n]\n"],"names":["turnstileFields","name","type","admin","description","components","Field"],"mappings":"AAEA;;;;;;;CAOC,GACD,OAAO,MAAMA,kBAA2B;IACtC;QACEC,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,aAAa;QACf;IACF;IACA;QACEH,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,aAAa;YACb,yEAAyE;YACzEC,YAAY;gBACVC,OAAO;YACT;QACF;IACF;CACD,CAAA"}
{"version":3,"sources":["../../../src/globals/SiteIntegrations/index.ts"],"sourcesContent":["import type { Field, GlobalConfig } from 'payload'\n\nimport { isAdmin } from '../../modules/access/index.js'\nimport { analyticsFields } from './fields/analytics.js'\nimport { smtpFields } from './fields/smtp.js'\nimport { turnstileFields } from './fields/turnstile.js'\n\ntype BuildSiteIntegrationsArgs = {\n /** Extra fields injected by the client project */\n additionalFields?: Field[]\n}\n\n/**\n * Builds the SiteIntegrations global.\n *\n * Holds third-party service credentials. Access is enforced at the global\n * level — the whole global requires an authenticated user — so secrets stay\n * out of anonymous API responses while remaining editable in the admin panel\n * and readable via the server-side Local API. (Field-level read:false was\n * avoided because it also hides fields from the admin UI, making them\n * impossible to enter.)\n *\n * Unnamed tabs keep data flat (siteIntegrations.ga4MeasurementId).\n *\n * Note: R2 storage credentials are NOT here — storage is infrastructure and\n * binds at boot, so its config lives in .env (R2_BUCKET, R2_ENDPOINT, ...),\n * consumed by buildR2Storage. See docs/storage.md.\n */\nexport function buildSiteIntegrations({\n additionalFields,\n}: BuildSiteIntegrationsArgs = {}): GlobalConfig {\n return {\n slug: 'site-integrations',\n access: {\n // Admin-only — secrets live here. Anonymous and non-admin users get\n // nothing through the API; admins read/edit in the panel and via Local API.\n read: ({ req: { user } }) => isAdmin(user),\n update: ({ req: { user } }) => isAdmin(user),\n },\n admin: {\n group: 'Settings',\n },\n fields: [\n {\n type: 'tabs',\n tabs: [\n { fields: analyticsFields, label: 'Analytics' },\n { fields: turnstileFields, label: 'Turnstile' },\n { fields: smtpFields, label: 'SMTP' },\n ...(additionalFields?.length ? [{ fields: additionalFields, label: 'Custom' }] : []),\n ],\n },\n ],\n label: 'Site Integrations',\n }\n}\n"],"names":["isAdmin","analyticsFields","smtpFields","turnstileFields","buildSiteIntegrations","additionalFields","slug","access","read","req","user","update","admin","group","fields","type","tabs","label","length"],"mappings":"AAEA,SAASA,OAAO,QAAQ,gCAA+B;AACvD,SAASC,eAAe,QAAQ,wBAAuB;AACvD,SAASC,UAAU,QAAQ,mBAAkB;AAC7C,SAASC,eAAe,QAAQ,wBAAuB;AAOvD;;;;;;;;;;;;;;;CAeC,GACD,OAAO,SAASC,sBAAsB,EACpCC,gBAAgB,EACU,GAAG,CAAC,CAAC;IAC/B,OAAO;QACLC,MAAM;QACNC,QAAQ;YACN,oEAAoE;YACpE,4EAA4E;YAC5EC,MAAM,CAAC,EAAEC,KAAK,EAAEC,IAAI,EAAE,EAAE,GAAKV,QAAQU;YACrCC,QAAQ,CAAC,EAAEF,KAAK,EAAEC,IAAI,EAAE,EAAE,GAAKV,QAAQU;QACzC;QACAE,OAAO;YACLC,OAAO;QACT;QACAC,QAAQ;YACN;gBACEC,MAAM;gBACNC,MAAM;oBACJ;wBAAEF,QAAQb;wBAAiBgB,OAAO;oBAAY;oBAC9C;wBAAEH,QAAQX;wBAAiBc,OAAO;oBAAY;oBAC9C;wBAAEH,QAAQZ;wBAAYe,OAAO;oBAAO;uBAChCZ,kBAAkBa,SAAS;wBAAC;4BAAEJ,QAAQT;4BAAkBY,OAAO;wBAAS;qBAAE,GAAG,EAAE;iBACpF;YACH;SACD;QACDA,OAAO;IACT;AACF"}
{"version":3,"sources":["../../../../src/globals/SiteSettings/fields/theme.ts"],"sourcesContent":["import type { Field } from 'payload'\n\n/**\n * Theme behavior configuration.\n *\n * These are decisions, not visuals — the plugin stores them, the client\n * template reads them and decides whether to render a toggle and which\n * mode to start in. Appearance itself stays in the template.\n */\nexport const themeFields: Field[] = [\n {\n name: 'defaultTheme',\n type: 'select',\n admin: {\n description: 'Theme applied on a visitor’s first visit.',\n },\n defaultValue: 'light',\n options: [\n { label: 'Light', value: 'light' },\n { label: 'Dark', value: 'dark' },\n ],\n required: true,\n },\n {\n name: 'allowThemeToggle',\n type: 'checkbox',\n admin: {\n description: 'Show a light/dark switch on the site.',\n },\n defaultValue: true,\n },\n]\n"],"names":["themeFields","name","type","admin","description","defaultValue","options","label","value","required"],"mappings":"AAEA;;;;;;CAMC,GACD,OAAO,MAAMA,cAAuB;IAClC;QACEC,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,aAAa;QACf;QACAC,cAAc;QACdC,SAAS;YACP;gBAAEC,OAAO;gBAASC,OAAO;YAAQ;YACjC;gBAAED,OAAO;gBAAQC,OAAO;YAAO;SAChC;QACDC,UAAU;IACZ;IACA;QACER,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,aAAa;QACf;QACAC,cAAc;IAChB;CACD,CAAA"}
{"version":3,"sources":["../../../src/globals/SiteSettings/index.ts"],"sourcesContent":["import type { Field, GlobalConfig } from 'payload'\n\nimport { generalFields } from './fields/general.js'\nimport { themeFields } from './fields/theme.js'\n\ntype BuildSiteSettingsArgs = {\n /** Extra fields injected by the client project */\n additionalFields?: Field[]\n /**\n * Fields for the \"System Pages\" tab — page assignments by role (homepage,\n * privacy policy, collection archives). Assembled by the caller, which is the\n * only place that knows which modules are enabled. The tab is omitted when\n * this is empty.\n */\n systemPageFields?: Field[]\n}\n\n/**\n * Builds the SiteSettings global.\n *\n * Composes tabs out of field groups; it deliberately doesn't know where those\n * groups come from. Earlier it imported the pages and content modules directly,\n * which meant a global — a presentation-layer concern — had an opinion about\n * blogs. Now the plugin's composition root passes fields in, and adding a new\n * kind of page assignment needs no change here.\n *\n * Uses unnamed tabs — data stays flat (siteSettings.siteName, not\n * siteSettings.general.siteName). Client-provided fields land in their own\n * \"Custom\" tab so core data paths never shift.\n */\nexport function buildSiteSettings({\n additionalFields,\n systemPageFields,\n}: BuildSiteSettingsArgs = {}): GlobalConfig {\n return {\n slug: 'site-settings',\n access: {\n read: () => true,\n },\n admin: {\n group: 'Settings',\n },\n fields: [\n {\n type: 'tabs',\n tabs: [\n {\n fields: generalFields,\n label: 'General',\n },\n {\n fields: themeFields,\n label: 'Theme',\n },\n ...(systemPageFields?.length\n ? [{ fields: systemPageFields, label: 'System Pages' }]\n : []),\n ...(additionalFields?.length ? [{ fields: additionalFields, label: 'Custom' }] : []),\n ],\n },\n ],\n label: 'Site Settings',\n }\n}\n"],"names":["generalFields","themeFields","buildSiteSettings","additionalFields","systemPageFields","slug","access","read","admin","group","fields","type","tabs","label","length"],"mappings":"AAEA,SAASA,aAAa,QAAQ,sBAAqB;AACnD,SAASC,WAAW,QAAQ,oBAAmB;AAc/C;;;;;;;;;;;;CAYC,GACD,OAAO,SAASC,kBAAkB,EAChCC,gBAAgB,EAChBC,gBAAgB,EACM,GAAG,CAAC,CAAC;IAC3B,OAAO;QACLC,MAAM;QACNC,QAAQ;YACNC,MAAM,IAAM;QACd;QACAC,OAAO;YACLC,OAAO;QACT;QACAC,QAAQ;YACN;gBACEC,MAAM;gBACNC,MAAM;oBACJ;wBACEF,QAAQV;wBACRa,OAAO;oBACT;oBACA;wBACEH,QAAQT;wBACRY,OAAO;oBACT;uBACIT,kBAAkBU,SAClB;wBAAC;4BAAEJ,QAAQN;4BAAkBS,OAAO;wBAAe;qBAAE,GACrD,EAAE;uBACFV,kBAAkBW,SAAS;wBAAC;4BAAEJ,QAAQP;4BAAkBU,OAAO;wBAAS;qBAAE,GAAG,EAAE;iBACpF;YACH;SACD;QACDA,OAAO;IACT;AACF"}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.