Add usage analytics via @microsoft/clarity across the frontend app and the
login page. ClarityAnalytics loads the tracking script only in production
builds (never local dev), keyed by NEXT_PUBLIC_CLARITY_ID; unset disables it.
Mounts it in both the (frontend) root layout and the standalone login layout
so both surfaces are covered without touching the admin panel.
Default compose model moves to unsloth/gemma-4-26B-A4B-it-qat-GGUF (migration rewrites plugin_ai_instructions columns + enum). Strip markdown code fences from plain-text fallbacks so Gemma's JSON-flavored answers still render as prose. Pin a bun patchedDependencies patch for @ai-stack/payloadcms (activeFieldPath context) which requires the patches/ directory alongside package.json and bun.lock. Note: the change_ai_model migration also carries the new map permission enum values from the map permission split.
- forms collection: targeting group (all/users/roles/qualifications), activeFrom/activeUntil window, radio/date field blocks enabled
- form-submissions: server-side user attribution, expiry and audience gates, one attempt per user
- forms/submissions permissions in the Surveys registry group + admin role seed grants
- frontend /surveys list and /surveys/[id] take page with client block renderer
- register the pending role permission enum values migration
Payload config seeds AI Compose instructions statically so wiped prompt tables rebuild without LLM calls; sync-prod pairs with that per the config comment. Adds lexical deps and changelog entries.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
WikiTemplates gains two fields: an optional css code field injected on
pages that use the template (selectors auto-scoped to a hash-based
.ptf-tpl-* class so templates never collide with each other or the app
shell), and a developer-only html field rendered verbatim (sanitized)
in place of the markdown body when transcluded.
- templateCss.ts scopes/sanitizes CSS, incl. nested at-rules; pages
and the editor live preview inject scoped styles and drop the Card
chrome in favor of a full-width article
- templateHtml.ts sanitizes HTML and splits prepared markdown around
expansion sentinels so raw HTML renders without rehype-raw
- templates.ts adds extractTemplateNames/extractPlaceholders/
extractDirectiveNames; prepareMarkdown threads an htmlTemplates map
- markdown pipeline gains rehype-highlight for fenced code blocks
- styles.css adds wiki prose typography + infobox demo styling
- docs: demo article and Infobox template authoring guide
Service layer (createPage/updatePage/restoreRevision/setPageLockdown/
deletePage, slugification, template expansion, wikilink preprocessing,
category constants) plus the client-safe markdown rendering pipeline
(react-markdown + remark-gfm + remark-directive) shared by the server
component and the editor's live preview. Adds the three markdown
dependencies to package.json and bun.lock.
Bump radix-ui primitives, tailwindcss/postcss, graphql, nodemailer,
drizzle-kit, eslint, prettier, @types/node and other runtime/dev deps.
The refreshed lockfile also carries entries for two new packages
(@payloadcms/plugin-mcp, prompt) whose package.json additions land
together with their features in follow-up commits.
- NarrativeEvents collection redesigned with flowData JSON (React Flow format)
- Custom admin field component: NarrativeFlowEditor with @xyflow/react
- Three node types: NarrativeBeat (blue), Choice (amber), Outcome (emerald)
- NodeEditDialog with type-specific forms replacing prompt() editing
- Right-click context menu (Delete node/edge with Radix primitives)
- Dynamic handles on Choice nodes (one per option)
- Dark-themed canvas with MiniMap, Controls, and animated edges
- All changes sync bidirectionally with Payload form state
- AGENTS.md updated with architecture docs
- Added Google Fonts import for `Geist` and `Geist Mono` to `styles.css`.
- Aligned, cleaned styling variables and properties consistently.
- Updated `seedUsers.ts` to include a developer role.
- Introduced `bun.lock` file for dependency management.