fix: register MCP layout in layouts:: namespace

- Change <x-layouts.mcp> to <x-layouts::mcp> in all blade views
- Change Livewire #[Layout('components.layouts.mcp')] to layouts::mcp
- Register layouts path via Blade::anonymousComponentPath in Boot
- Layout file already exists at src/Front/View/Blade/layouts/mcp.blade.php

The dot notation couldn't resolve because mcp.blade.php lives in the
package, not the app's components directory. The layouts:: namespace
is the correct pattern matching core-php's component registration.

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Snider 2026-03-05 15:38:27 +00:00
parent cd82959a0e
commit 92e2097022
12 changed files with 23 additions and 17 deletions

View file

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Core\Website\Mcp;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;
@ -25,6 +26,11 @@ class Boot extends ServiceProvider
{
$this->loadViewsFrom(__DIR__.'/View/Blade', 'mcp');
// Register mcp layout into the layouts:: namespace
$layoutsPath = dirname(__DIR__, 2).'/Front/View/Blade/layouts';
$this->loadViewsFrom($layoutsPath, 'layouts');
Blade::anonymousComponentPath($layoutsPath, 'layouts');
$this->registerLivewireComponents();
$this->registerRoutes();
}

View file

@ -1,4 +1,4 @@
<x-layouts.mcp>
<x-layouts::mcp>
<x-slot:title>{{ $server['name'] }} Analytics</x-slot:title>
<div class="mb-8">
@ -112,4 +112,4 @@
@endforeach
</flux:button.group>
</div>
</x-layouts.mcp>
</x-layouts::mcp>

View file

@ -1,4 +1,4 @@
<x-layouts.mcp>
<x-layouts::mcp>
<x-slot:title>Setup Guide</x-slot:title>
@php
@ -215,4 +215,4 @@ const data = await resp.json();</code></pre>
</div>
</div>
</div>
</x-layouts.mcp>
</x-layouts::mcp>

View file

@ -1,4 +1,4 @@
<x-layouts.mcp>
<x-layouts::mcp>
<x-slot:title>MCP Servers</x-slot:title>
<div class="mb-8">
@ -126,4 +126,4 @@
</div>
</div>
@endif
</x-layouts.mcp>
</x-layouts::mcp>

View file

@ -1,6 +1,6 @@
<x-layouts.mcp>
<x-layouts::mcp>
<x-slot:title>API Keys</x-slot:title>
<x-slot:description>Manage API keys for MCP server access.</x-slot:description>
<livewire:mcp.api-key-manager :workspace="$workspace" />
</x-layouts.mcp>
</x-layouts::mcp>

View file

@ -1,4 +1,4 @@
<x-layouts.mcp>
<x-layouts::mcp>
<x-slot:title>MCP Portal</x-slot:title>
<x-slot:description>Connect AI agents to platform infrastructure via Model Context Protocol. Machine-readable, agent-optimised, human-friendly.</x-slot:description>
@ -208,4 +208,4 @@
</flux:button>
</div>
</section>
</x-layouts.mcp>
</x-layouts::mcp>

View file

@ -1,4 +1,4 @@
<x-layouts.mcp>
<x-layouts::mcp>
<x-slot:title>{{ $server['name'] }}</x-slot:title>
<x-slot:description>{{ $server['tagline'] ?? $server['description'] ?? '' }}</x-slot:description>
@ -237,4 +237,4 @@
View Usage Analytics
</a>
</div>
</x-layouts.mcp>
</x-layouts::mcp>

View file

@ -13,7 +13,7 @@ use Core\Mcp\Services\McpMetricsService;
*
* Displays analytics and metrics for MCP tool usage.
*/
#[Layout('components.layouts.mcp')]
#[Layout('layouts::mcp')]
class McpMetrics extends Component
{
public int $days = 7;

View file

@ -18,7 +18,7 @@ use Symfony\Component\Yaml\Yaml;
* A browser-based UI for testing MCP tool calls.
* Allows users to select a server, pick a tool, and execute it with custom parameters.
*/
#[Layout('components.layouts.mcp')]
#[Layout('layouts::mcp')]
class McpPlayground extends Component
{
public string $selectedServer = '';

View file

@ -14,7 +14,7 @@ use Symfony\Component\Yaml\Yaml;
/**
* MCP Playground - interactive tool testing in the browser.
*/
#[Layout('components.layouts.mcp')]
#[Layout('layouts::mcp')]
class Playground extends Component
{
public string $selectedServer = '';

View file

@ -12,7 +12,7 @@ use Core\Mcp\Models\McpApiRequest;
/**
* MCP Request Log - view and replay API requests.
*/
#[Layout('components.layouts.mcp')]
#[Layout('layouts::mcp')]
class RequestLog extends Component
{
use WithPagination;

View file

@ -15,7 +15,7 @@ use Livewire\Component;
* Single search interface across all system components:
* MCP tools, API endpoints, patterns, assets, todos, and plans.
*/
#[Layout('components.layouts.mcp')]
#[Layout('layouts::mcp')]
class UnifiedSearch extends Component
{
public string $query = '';