Repository navigation
templates: move dashboard onboarding into a widget - #19149
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Content and user types templates/website/src/payload-types.ts |
Generated types update Lexical rich-text definitions, add audit relationships and media metadata, remove generateSlug fields, and update select interfaces. |
Admin, instruction, and widget types templates/website/src/payload-types.ts |
Generated types add the LLM-instructions collection, jobs-stats global, five dashboard widget types, and related record and select interfaces. |
Job and scheduled-task types templates/website/src/payload-types.ts |
Generated job types add metadata, parent-task references, processing fields, and a concurrency key. Logged task input becomes required, and scheduled-publish user uses a relationship object or null. |
GettingStarted dashboard widget templates/website/src/components/GettingStarted/*, templates/website/src/components/BeforeDashboard/index.css, templates/website/src/app/(payload)/admin/importMap.js, templates/website/src/payload.config.ts |
The configuration and import map register GettingStarted and other admin components. The widget displays setup instructions with updated styles and removal guidance. |
Ecommerce template
| Layer / File(s) | Summary |
|---|---|
Lexical and content types templates/ecommerce/src/payload-types.ts, templates/ecommerce/src/endpoints/seed/* |
Generated types define Lexical rich-text structures for content and forms. Seeded rich-text paragraphs and captions add empty textStyle values. |
Collections, relationships, and selections templates/ecommerce/src/payload-types.ts |
Generated types add audit relationships, media metadata, LLM-instruction types, and transaction processing status. They remove generateSlug fields and update selection interfaces. |
GettingStarted dashboard widget templates/ecommerce/src/components/GettingStarted/*, templates/ecommerce/src/components/BeforeDashboard/index.css, templates/ecommerce/src/app/(payload)/admin/importMap.js, templates/ecommerce/src/payload.config.ts |
The configuration and import map register GettingStarted and other admin components. The widget displays setup instructions with updated styles and removal guidance. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Feature
Suggested labels: area: templates
Suggested reviewers: patrikkozak, alessiogr
Merge Risk: 
Minimal · up to cf5e9
-
No actionable issue is established for the template updates. They appear mergeable after normal checks.
Security architecture risk: 
Low · up to cf5e9
-
The changes remain within the existing admin dashboards and preserve seed permissions. Onboarding visibility now depends on each user’s saved layout. No introduced security boundary violation was established, but concurrency and recovery guarantees for the existing destructive seed workflow were not fully verified.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- observed — Ecommerce seeding affects the application dataset rather than only the invoking user’s widget: it clears header/footer navigation and deletes records and versions across thirteen listed collections, including carts, transactions, and orders. This broad destructive scope predates the PR and remains behind the admin-role gate.
Security Findings and Attack Paths
- inferred — Multiple onboarding widget instances can provide independent seed buttons, but this does not establish a new attacker privilege or independently attackable dataset. The renamed button implementations are byte-identical to base, and authorized users already had access to the same route through separate dashboard sessions or direct requests. Cross-request reseeding guarantees remain unverified rather than an introduced finding.
Trust Boundaries and Controls
- observed — The server, not widget visibility, enforces seed authorization. Ecommerce authenticates request headers and requires the admin role; website authenticates request headers and requires a user. Both checks occur before creating the Payload request and invoking seed, and both routes are unchanged across the PR.
-
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 14 files. (2 skipped: 2 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
|
🚀 This is included in version v4.0.0-beta.6 |
Moves the onboarding block in the website and ecommerce templates below the "Welcome" heading on the admin dashboard. The block is now a card that matches the other dashboard widgets.
Changes
BeforeDashboardis now theGettingStartedwidget in both templates.beforeDashboardslot always renders above the modular dashboard (the widget grid). CSS cannot place it below the welcome heading.defaultLayoutrepeats the built-in order withgetting-startedafterwelcome.cardclass, anh2heading, and anollist with spacing tokens.importMap.jsandpayload-types.tsdefaultLayoutneeds the new widget slugs in the generated types to type-check.textStyle: ''. The regenerated rich text types require it.with-vercel-websiteis not editedwebsite, so it picks up this change on the next regeneration.References / Links
defaultLayout🤖 Written with AI