Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

refactor(ui): run Terminal/Logs as a flush workspace on the shared shell

Juan Denis9b27b2e36201
diff --git a/docs/screenshots/terminal-logs.png b/docs/screenshots/terminal-logs.png
new file mode 100644
index 00000000..e3bec950
Binary files /dev/null and b/docs/screenshots/terminal-logs.png differ
diff --git a/frontend/src/pages/Terminal.jsx b/frontend/src/pages/Terminal.jsx
index c8378d51..4552cde2 100644
--- a/frontend/src/pages/Terminal.jsx
+++ b/frontend/src/pages/Terminal.jsx
@@ -10,7 +10,8 @@ import LogToolbar from '../components/log-viewer/LogToolbar';
import LogContent from '../components/log-viewer/LogContent';
import { formatBytes, logKindFromPath } from '../components/log-viewer/logHelpers';
import { formatBytes as formatMemory } from '@/utils/formatBytes';
-import { Pill, PageTopbar } from '../components/ds';
+import { Pill } from '../components/ds';
+import PageLayout from '../layouts/PageLayout';
import { Button } from '@/components/ui/button';
import {
FileText, Clock, AlertCircle, Search, X, RefreshCw, AlertTriangle, Activity,
@@ -38,17 +39,22 @@ const Terminal = () => {
const [activeTab] = useTabParam('/terminal', VALID_TABS);
return (
- <div className="page-container page-container--full-bleed terminal-page">
- <PageTopbar navLabel="Logs" tabs={TERMINAL_TABS} />
-
- <div className="tab-content">
- {activeTab === 'shell' && <TerminalShellTab />}
- {activeTab === 'logs' && <LogFilesTab />}
- {activeTab === 'journal' && <JournalTab />}
- {activeTab === 'processes' && <ProcessesTab />}
- {activeTab === 'services' && <ServicesTab />}
- </div>
- </div>
+ // A full-bleed workspace, like the File Manager: the console panes fill
+ // the content region edge-to-edge rather than floating as a rounded card
+ // inside a padded well.
+ <PageLayout
+ fill
+ className="terminal-page"
+ contentClassName="tab-content"
+ navLabel="Logs"
+ tabs={TERMINAL_TABS}
+ >
+ {activeTab === 'shell' && <TerminalShellTab />}
+ {activeTab === 'logs' && <LogFilesTab />}
+ {activeTab === 'journal' && <JournalTab />}
+ {activeTab === 'processes' && <ProcessesTab />}
+ {activeTab === 'services' && <ServicesTab />}
+ </PageLayout>
);
};
diff --git a/frontend/src/styles/pages/_terminal.scss b/frontend/src/styles/pages/_terminal.scss
index 26a66b5f..ded0c414 100644
--- a/frontend/src/styles/pages/_terminal.scss
+++ b/frontend/src/styles/pages/_terminal.scss
@@ -828,24 +828,16 @@ $lk-default: #646b7a;
50% { opacity: 0.35; transform: scale(0.65); }
}
-// Full-bleed terminal/logs: fill the content region like the Servers ops view
-// instead of a fixed `calc(100vh - …)`. The page is a flex column; the Radix
-// Tabs panel and the inner panes stretch to fill the available height.
-.terminal-page.page-container--full-bleed {
- height: 100%;
- min-height: 0;
- display: flex;
- flex-direction: column;
- // No top padding — the topbar pins flush to the top like the tab-group
- // pages (Marketplace/Domains); only inset the sides and bottom.
- padding: 0 $space-4 $space-4;
- overflow: hidden;
-
- > .sk-topbar { flex-shrink: 0; }
-
- // The routed sections now render straight into .tab-content (no shadcn
- // Tabs wrapper); it fills the height and the active pane flexes to fit.
- > .tab-content {
+// Terminal / Logs is a full-bleed WORKSPACE, not a page of cards: it renders
+// through layouts/PageLayout in `fill` mode, so the shell already gives it a
+// pinned top bar over a region it manages itself. All this has to do is let the
+// console panes fill that region.
+//
+// They used to be rounded, bordered cards floating inside a `0 16px 16px` inset
+// — the only page in the app framed that way, which read as stray padding plus
+// stray corners. Flush edges instead, exactly like the File Manager.
+.terminal-page {
+ .tab-content {
flex: 1;
min-height: 0;
display: flex;
@@ -854,11 +846,24 @@ $lk-default: #646b7a;
.term-shell,
.lv-page:not(.fullscreen),
- .proc-page,
+ .proc-page {
+ flex: 1;
+ height: auto;
+ min-height: 0;
+ // The pane IS the content region now — an outer border and radius would
+ // draw a card edge against the region edge. Internal dividers stay.
+ border: 0;
+ border-radius: 0;
+ }
+
+ // Services is a scrolling card grid rather than a console pane, so it
+ // re-pads itself to the reading inset instead of running to the edges.
.svc-page {
flex: 1;
height: auto;
min-height: 0;
+ overflow-y: auto;
+ padding: $space-5 $space-4 $space-8;
}
}