Server Console initial terminal size calculations incorrect #321

Closed
opened 2026-02-05 17:25:21 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Linguardium on GitHub (Apr 26, 2025).

Originally assigned to: @notAreYouScared on GitHub.

329a29f7da/resources/views/filament/components/server-console.blade.php (L84-L88)

Current code sets the fit during loading which causes the fit addon to use incorrect sizes for resizing the terminal. This causes the console lines to overflow the terminal pane (and the terminal scrollbar...) breaking scrollbar dragging and causing text to not be visible.

Adding a load event handler here to resize once the page has loaded should fix the issue.

        fitAddon.fit(); //Fit on first load

        // adjust the terminal dimensions when the window resizes
        window.addEventListener('resize', () => {
            fitAddon.fit();
        });

        // set the initial terminal dimensions after all components load
        window.addEventListener('load', () => {
            fitAddon.fit();
        });
Originally created by @Linguardium on GitHub (Apr 26, 2025). Originally assigned to: @notAreYouScared on GitHub. https://github.com/pelican-dev/panel/blob/329a29f7daad089dd3901cc06fd68b2075cd76d0/resources/views/filament/components/server-console.blade.php#L84-L88 Current code sets the fit during loading which causes the fit addon to use incorrect sizes for resizing the terminal. This causes the console lines to overflow the terminal pane (and the terminal scrollbar...) breaking scrollbar dragging and causing text to not be visible. Adding a load event handler here to resize once the page has loaded should fix the issue. ```js fitAddon.fit(); //Fit on first load // adjust the terminal dimensions when the window resizes window.addEventListener('resize', () => { fitAddon.fit(); }); // set the initial terminal dimensions after all components load window.addEventListener('load', () => { fitAddon.fit(); }); ```
OVERLORD added the 🟢 easy label 2026-02-05 17:25:21 +03:00
Author
Owner

@lancepioch commented on GitHub (Apr 27, 2025):

Thanks, we'll look into this shortly!

@lancepioch commented on GitHub (Apr 27, 2025): Thanks, we'll look into this shortly!
Author
Owner

@Linguardium commented on GitHub (Apr 27, 2025):

Looks like this only fixes the issue on page load if the server console is the first page/main page being loaded (such as a refresh). if another page loads (such as the main sever selection page), it will still load with the wrong dimensions. another event/trigger may be the better to resolve this when the console page is fully loaded, instead.

@Linguardium commented on GitHub (Apr 27, 2025): Looks like this only fixes the issue on page load if the server console is the first page/main page being loaded (such as a refresh). if another page loads (such as the main sever selection page), it will still load with the wrong dimensions. another event/trigger may be the better to resolve this when the console page is fully loaded, instead.
Author
Owner

@ptlthg commented on GitHub (Jul 14, 2025):

I'd appreciate a fix for this, it's a tiny thing but after using the panel for the first time this is the only bug I've noticed so far.

@ptlthg commented on GitHub (Jul 14, 2025): I'd appreciate a fix for this, it's a tiny thing but after using the panel for the first time this is the only bug I've noticed so far.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#321