diff --git a/frontend/src/components/common/StatusBar.vue b/frontend/src/components/common/StatusBar.vue index b34c9e2..0c22239 100644 --- a/frontend/src/components/common/StatusBar.vue +++ b/frontend/src/components/common/StatusBar.vue @@ -53,7 +53,10 @@ Theme: {{ activeThemeName }} UTF-8 - 120×40 + + {{ sessionStore.activeDimensions.cols }}×{{ sessionStore.activeDimensions.rows }} + + 120×40 diff --git a/frontend/src/components/session/TabBar.vue b/frontend/src/components/session/TabBar.vue index 8d5f6a4..0d93d7b 100644 --- a/frontend/src/components/session/TabBar.vue +++ b/frontend/src/components/session/TabBar.vue @@ -85,11 +85,24 @@ function getSessionTags(session: Session): string[] { /** Check if the connection for this session uses the root user. */ function isRootUser(session: Session): boolean { + // Check username stored on the session object (set during connect) + if (session.username === "root") return true; + + // Fall back to checking the connection's options JSON for a stored username const conn = connectionStore.connections.find((c) => c.id === session.connectionId); if (!conn) return false; - // TODO: Get actual username from the credential or session - // For now, check mock data — root user detection will come from the session/credential store - return false; + + if (conn.options) { + try { + const opts = JSON.parse(conn.options); + if (opts?.username === "root") return true; + } catch { + // ignore malformed options + } + } + + // Also check if "root" appears in the connection tags + return conn.tags?.includes("root") ?? false; } /** Return Tailwind classes for environment tag badges. */ diff --git a/frontend/src/components/terminal/TerminalView.vue b/frontend/src/components/terminal/TerminalView.vue index da78db5..3be2e5f 100644 --- a/frontend/src/components/terminal/TerminalView.vue +++ b/frontend/src/components/terminal/TerminalView.vue @@ -9,6 +9,7 @@