mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
chore(desktop): keep status bar within size budget
Problem: The compact SSH status change pushed StatusBar.tsx beyond its existing repolint file-size budget. Root cause: Equivalent status label and icon expressions were expanded across several lines in an already baselined file. Fix: Keep the same state-dependent rendering while expressing the small conditions compactly, without widening the repository baseline. Verification: - go run ./tools/repolint - pnpm exec tsx src/__tests__/statusbar-workspace.test.tsx - pnpm typecheck - pnpm exec eslint src/components/StatusBar.tsx
This commit is contained in:
1 parent
20326ae01b
commit
ecddf4802f
1 file changed
+3
-11
@@ -674,14 +674,8 @@ function RemoteStatusBarChip({
|
||||
const triggerState = isRemoteTerminalFailure(worst) ? "error" : worst.state;
|
||||
const triggerStatus = isRemoteTerminalFailure(worst) ? t("remote.status.failed") : t(`remote.status.${worst.state}`);
|
||||
const idleDisconnected = worst.state === "stopped" && !worst.error;
|
||||
const triggerLabel = idleDisconnected
|
||||
? t("remote.statusBar.disconnected")
|
||||
: t("remote.statusBar.summary", { host: worstHost.label, status: triggerStatus });
|
||||
const triggerText = idleDisconnected
|
||||
? "SSH"
|
||||
: triggerState === "connected"
|
||||
? worstHost.label
|
||||
: triggerLabel;
|
||||
const triggerLabel = idleDisconnected ? t("remote.statusBar.disconnected") : t("remote.statusBar.summary", { host: worstHost.label, status: triggerStatus });
|
||||
const triggerText = idleDisconnected ? "SSH" : triggerState === "connected" ? worstHost.label : triggerLabel;
|
||||
|
||||
return (
|
||||
<span className="statusbar__remote-wrap">
|
||||
@@ -695,9 +689,7 @@ function RemoteStatusBarChip({
|
||||
aria-expanded={open}
|
||||
title={triggerLabel}
|
||||
>
|
||||
{triggerState === "connected"
|
||||
? <span className="statusbar__remote-state-dot" aria-hidden="true" />
|
||||
: <Server size={11} aria-hidden="true" />}
|
||||
{triggerState === "connected" ? <span className="statusbar__remote-state-dot" aria-hidden="true" /> : <Server size={11} aria-hidden="true" />}
|
||||
<span className="statusbar__remote-label">{triggerText}</span>
|
||||
</button>
|
||||
<AnchoredPopover
|
||||
|
||||
Reference in new issue
Block a user