Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: memory available machine stats (#4053)

Akshay Agrawale00c384058c5
diff --git a/frontend/src/components/editor/chrome/wrapper/machine-stats.tsx b/frontend/src/components/editor/chrome/wrapper/machine-stats.tsx
index d2ae9f451b..16c3a48172 100644
--- a/frontend/src/components/editor/chrome/wrapper/machine-stats.tsx
+++ b/frontend/src/components/editor/chrome/wrapper/machine-stats.tsx
@@ -84,7 +84,7 @@ const MemoryUsageBar: React.FC<{
kernel: UsageResponse["kernel"];
server: UsageResponse["server"];
}> = ({ memory, kernel, server }) => {
- const { percent, total, used } = memory;
+ const { percent, total, available } = memory;
const roundedPercent = Math.round(percent);
return (
<Tooltip
@@ -92,8 +92,8 @@ const MemoryUsageBar: React.FC<{
content={
<div className="flex flex-col gap-1">
<span>
- <b>computer memory:</b> {asGB(used)} / {asGB(total)} GB (
- {roundedPercent}%)
+ <b>computer memory:</b> {asGB(total - available)} / {asGB(total)} GB
+ ({roundedPercent}%)
</span>
{server?.memory && (
<span>