From e9a8157e7a9d7fb767a30fa79619983678cd487a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 19 Nov 2025 23:54:09 +0000 Subject: [PATCH] Fix incorrect SPA conversion instructions in CLAUDE.dist.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs/CLAUDE.dist.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/CLAUDE.dist.md b/docs/CLAUDE.dist.md index 6d4403c23..bf415c920 100644 --- a/docs/CLAUDE.dist.md +++ b/docs/CLAUDE.dist.md @@ -411,21 +411,17 @@ class Feature_Index_Action extends Spa_Action { ``` -**4. Update Controller** +**4. Update Controller - Remove server-side route entirely:** ```php -// Change #[Route] to #[SPA] -#[SPA] -public static function index(Request $request, array $params = []) { - return rsx_view(SPA); -} - -// Add Ajax endpoints +// Remove #[Route] method completely. Add Ajax endpoints: #[Ajax_Endpoint] public static function fetch_items(Request $request, array $params = []): array { return ['items' => Feature_Model::all()]; } ``` +**CRITICAL**: Do NOT add `#[SPA]` to feature controllers. The `#[SPA]` attribute only exists in the bootstrap controller (e.g., `Frontend_Spa_Controller::index`). Feature controllers should only contain `#[Ajax_Endpoint]` methods for data fetching. + **5. Update Route References** **Search entire codebase for old route references:**