Files
ipal-kit/docs/agent/skills/iapl-nav/SKILL.md
T
Radosław SmolińskiandClaude Opus 5.5 21ef0fdeb0 1.18.0 (owner's decisions Q3, Q4, Q5): writes that keep others' saves, access answers announced, drafts out of related documents
- Q3: the integration status (emailStatus, turnstileStatus) is written alone through the
  database adapter (writeGlobalFields, exported): a visitor's form submit no longer puts back an
  admin's SMTP or Turnstile change saved at the same moment. addToCookieList reads the list again
  right before writing and works the change out again when an editor's save changed it (up to 5
  times). Both races reproduced exactly in test/statusWrites.test.ts, on the three adapters.
- Q4: cookieScanner.access and the doctor's access go through accessAllowed: any truthy answer
  still allows, an answer that is not a boolean is reported once per option; strict (only true)
  is announced for 1.19.0.
- Q5: related documents that are drafts are left out of what the public helpers answer
  (resolveRoute, getSettings, getArchiveEntries, the 404 page, llms-full; Markdown and MCP through
  resolveRoute): null alone, removed from a list, value null in a polymorphic one. A preview keeps
  them; draftRelations: 'keep' keeps the old behaviour. withoutDraftRelations,
  applyDraftRelations exported.
- Docs: content.md, frontend.md, integrations.md, cookie-scanner.md, security.md, AGENT.md;
  iapl-nav and iapl-doctor skills.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 11:15:13 +01:00

2.7 KiB

name, description
name description
iapl-nav Builds the site header, footer, mobile menu and company data in an IAPL project — Header/Footer/Company globals with buildLinkField from the plugin, server-side link resolution (resolveNav from the plugin), a small client MobileNav, legal links from System pages, revalidation on change. Use when creating or changing navigation, menu, header, footer, contact details, social links or the company global.

iapl-nav

Ready code: resources/nav-code.md (this skill). Rules: AGENT.md §6.8. Requires the UI primitives from ../iapl-block/resources/section-code.md (like the iapl-block skill, step 0).

Plan (write it down, then go straight to code — AGENT.md §0a)

  • menu items (one submenu level, no deeper), CTA in the header (links),
  • footer columns, note,
  • Company model for the market in AGENTS.md (PL: NIP/REGON, AU: ABN, US: EIN…),
  • a11y labels (menu button etc.) — fields in the admin panel.

Code

  1. src/globals/Header.ts, Footer.ts — from §6.8; Company.ts — company data (localized texts), access.read: () => true.
  2. On every global: hooks: { afterChange: [buildGlobalRevalidateHook({ revalidatePath })] } (revalidatePath from next/cache, hooks.md) — it calls revalidatePath('/', 'layout') and already skips the call outside the Next server (seed, migration) and with context.disableRevalidate. buildRevalidateHook is for collections. The plugin's own globals refresh themselves with iapl({ revalidatePath }).
  3. Menu: await resolveNav(header.navItems, locale) from lib/content (plugin) — links resolved on the server to { href, label, internal, newTab, targetProps, children }. Do not create lib/navigation.ts.
  4. src/components/layout/Header.tsx, Footer.tsx (server), MobileNav.tsx ('use client', open state only, data via props, import type { NavItem } from '@intecion/ipal-kit').
  5. Legal links in the footer from the System pages roles: getSystemLinks(locale) (href + page title) — not as manual items. Copyright year from code, name from Company.
  6. Logo from Site settings via <Media> — do not duplicate the field in Header.
  7. Wire it in src/app/(frontend)/[locale]/layout.tsx (fetch the globals through cached getters in lib/, pass them as props).

Verification

The iapl-audit skill. By hand: a menu item added in the panel is visible right after saving; the mobile menu works with the keyboard (Tab, Enter, Esc). A menu item that points at a page never published is not shown (since 1.18.0 the helpers leave draft pages out; createContentHelpers({ draftRelations: 'keep' }) shows it as before): publish the page and the item appears.