Skip to content

Commit 88de10c

Browse files
committed
drop inline nest banner placeholder, return Top widgets for nest
1 parent 86829f9 commit 88de10c

2 files changed

Lines changed: 10 additions & 31 deletions

File tree

app/Filament/Server/Pages/Console.php

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ class Console extends Page
4949

5050
public ContainerStatus $status = ContainerStatus::Offline;
5151

52-
public ?string $nestNotice = null;
53-
5452
protected FeatureService $featureService;
5553

5654
public function mount(): void
@@ -61,12 +59,10 @@ public function mount(): void
6159
try {
6260
$server->validateCurrentState();
6361
} catch (ServerStateConflictException $exception) {
64-
// nest conflicts render inline so the warning stays on this page
65-
// and does not leak to the dashboard via the session banner
66-
// queue. all other conflicts still use the global AlertBanner.
62+
// skip the session banner for nest conflicts, the nest manager
63+
// plugin renders an inline NestNotice widget at the top of the
64+
// page with brand-voice copy and the wake button.
6765
if ($server->status === ServerState::Nest) {
68-
$this->nestNotice = $exception->getMessage();
69-
7066
return;
7167
}
7268

@@ -128,18 +124,16 @@ public static function registerCustomWidgets(ConsoleWidgetPosition $position, ar
128124
*/
129125
public function getWidgets(): array
130126
{
131-
// nest evicted servers have node_id=null so the console + chart widgets
132-
// would crash on $server->node->getConnectionAddress(). hide every
133-
// widget while the volume is roosting, the conflict banner from
134-
// mount() is enough until the nest manager plugin's NestNotice
135-
// component lands in phase f. plugin widgets registered via
136-
// registerCustomWidgets (top/aboveConsole/belowConsole/bottom slots)
137-
// are also skipped, including any telemetry or accounting hooks that
138-
// expect to run on every console render.
127+
// nest evicted servers have node_id=null so the panel-core widgets
128+
// (ServerOverview, ServerConsole, *Chart) crash on $server->node->X.
129+
// return only the Top-slot plugin widgets, which is where the nest
130+
// manager plugin registers NestNotice. AboveConsole / BelowConsole /
131+
// Bottom plugin widgets are also skipped because they typically
132+
// depend on a live wings node.
139133
/** @var Server $server */
140134
$server = Filament::getTenant();
141135
if ($server->status === ServerState::Nest) {
142-
return [];
136+
return static::$customWidgets[ConsoleWidgetPosition::Top->value] ?? [];
143137
}
144138

145139
$allWidgets = [];

resources/views/filament/server/pages/console.blade.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
<x-filament-panels::page class="fi-console-page">
2-
@if ($nestNotice)
3-
{{-- inline nest notice instead of the global AlertBanner so the
4-
message stays scoped to the console page. phase F replaces this
5-
with the NestNotice component that also surfaces the wake button. --}}
6-
<div class="fi-section rounded-xl p-4 border border-warning-600/30 bg-warning-50/10">
7-
<div class="flex items-start gap-3">
8-
<x-filament::icon icon="tabler-snowflake" class="size-5 text-warning-500 mt-0.5" />
9-
<div>
10-
<p class="font-semibold text-warning-600 dark:text-warning-400">Warning</p>
11-
<p class="text-sm text-gray-700 dark:text-gray-300">{{ $nestNotice }}</p>
12-
</div>
13-
</div>
14-
</div>
15-
@endif
16-
172
<x-filament-widgets::widgets
183
:columns="$this->getColumns()"
194
:data="$this->getWidgetData()"

0 commit comments

Comments
 (0)