Skip to content

fix: preserve selected page template content - #79

Merged
chasecmiller merged 1 commit into
mainfrom
dev/fix-page-template-content
Oct 20, 2026
Merged

chasecmiller merged 1 commit into
mainfrom
dev/fix-page-template-content

Conversation

@chasecmiller

@chasecmiller chasecmiller commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

New pages created from a built-in or saved custom template currently lose all template content and open empty. Resolve the final template selection inside the create handler and remove the reactive callback that writes to an undeclared content field. Blank pages and cleared selections still create empty content.

Adds nine regression cases through the real Filament/Livewire New Page action, updates the template guide, and prepares the v1.7.0 changelog. Before the fix, six cases failed with empty saved content; all nine pass after the fix.

Validation:

  • CACHE_STORE=array vendor/bin/pest: 1,239 tests passed, 3,930 assertions.
  • bin/docs-lint: 43 pages passed.
  • Pint on changed PHP files, Composer validation, and git diff --check passed.

The existing lockfile audit reports dependency advisories, including a high-severity CommonMark advisory; this PR changes no dependencies. The lockfile is excluded from Composer distribution archives.

Refs #78. Release target: v1.7.0 (requested minor release).

Summary by CodeRabbit

  • Bug Fixes
    • New pages now preserve the selected built-in or custom template content.
    • Clearing the template selection creates a blank page.
    • Changing the template before submission uses the final selection.
  • Documentation
    • Updated page-template guidance to cover built-in, custom, blank-page, selection, and copied-content behavior.
    • Corrected the built-in landing-page template slug and option labels in examples.
  • Tests
    • Added coverage for template-based, blank, cleared-selection, and final-selection page creation scenarios.

Resolve the selected template when the New Page action creates the record instead of setting undeclared form state. Add action-level regression coverage and document the v1.7.0 fix.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T16:54:46.639967Z 9979f3e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 571fef40-1eab-4ce8-b442-e2db50e6e54a
📥 Commits

Reviewing files that changed from the base of the PR and between 3ec3b65 and 9979f3e.

📒 Files selected for processing: 4
  • CHANGELOG.md
  • docs/customization/page-templates.md
  • src/Resources/PageResource/Pages/ListPages.php
  • tests/Feature/PageCreationTest.php
+------------------------------------+
| Zero-day? Zero chance on my watch. |
+------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
✨ 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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chasecmiller
chasecmiller merged commit 6c43974 into main Oct 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant