Skip to content

Conversation

@notAreYouScared
Copy link
Member

Should Fix #1241

This should be tested across multiple systems / multiple people should test this.

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

📝 Walkthrough

Walkthrough

The PanelProvider panel configuration was modified to conditionally disable SPA mode on the server console route. The spa() method now accepts a callback that returns false when the current route matches filament.server.pages.console, while keeping SPA enabled for all other routes.

Changes

Cohort / File(s) Summary
SPA mode conditional configuration
app/Providers/Filament/PanelProvider.php
Modified spa() wiring to conditionally disable SPA mode on the console route via callback that checks if current route matches filament.server.pages.console

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix console duplicating with spa' directly corresponds to the changeset which disables SPA on the console route to fix console duplication issues.
Description check ✅ Passed The description references issue #1241 about server console duplication on navigate back, which directly relates to the code changes made in this PR.
Linked Issues check ✅ Passed The code change conditionally disables SPA mode on the console route, which addresses the root cause of console duplication when navigating back to the console page.
Out of Scope Changes check ✅ Passed The changes are limited to conditionally disabling SPA on the console route to fix the console duplication issue, with no unrelated modifications detected.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a391d21 and b73f52e.

📒 Files selected for processing (1)
  • app/Providers/Filament/PanelProvider.php (1 hunks)
🔇 Additional comments (1)
app/Providers/Filament/PanelProvider.php (1)

30-32: Confirm Filament v4 spa() callback support + guard for “no current route” scenarios

This matches the desired behavior (disable SPA only for the console route), but please verify Filament v4’s Panel::spa() accepts a Closure and that it’s evaluated per-request (not eagerly during service provider boot). Also consider defensively handling cases where there’s no matched route yet (e.g., early middleware/edge contexts) to avoid surprises.

Suggested tweak (purely defensive):

-            ->spa(fn () => !request()->routeIs('filament.server.pages.console'))
+            ->spa(fn (): bool => ! (request()->route()?->named('filament.server.pages.console') ?? false))

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 and usage tips.

@rmartinoscar
Copy link
Member

It does fix the spa issue where the console would get duplicated however the websocket still gets duped.

@notAreYouScared
Copy link
Member Author

It does fix the spa issue where the console would get duplicated however the websocket still gets duped.

How so? Enable Preserve Log in dev tools, and look at the old websockets; they don't have any data coming in, so how is it duplicated?

@notAreYouScared notAreYouScared merged commit 59f0fe1 into main Dec 14, 2025
25 checks passed
@notAreYouScared notAreYouScared deleted the charles/fix-duplicate-console branch December 14, 2025 02:50
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server console duplication on navigate back

3 participants