Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): wake display on finalize-rejection path + make the panel banner accurate when opted out

[._.]/ Adam Eivy3c0918d2019b
diff --git a/client/src/components/loraTraining/TrainingPanel.jsx b/client/src/components/loraTraining/TrainingPanel.jsx
index e27ba21388..247cc51f96 100644
--- a/client/src/components/loraTraining/TrainingPanel.jsx
+++ b/client/src/components/loraTraining/TrainingPanel.jsx
@@ -355,15 +355,16 @@ export default function TrainingPanel({ dataset, readiness, triggerSaving, onRun
<Moon className="w-3.5 h-3.5 mt-0.5 shrink-0 text-port-accent" />
<div className="space-y-1">
<div className="text-gray-300">
- This Mac's display sleeps automatically while training, then wakes when the run finishes.
+ By default, this Mac's display is slept while training and woken when the run finishes.
</div>
<div>
On Apple Silicon, an <span className="text-gray-300">active display can crash the whole machine</span>{' '}
(GPU watchdog kernel panic) during heavy LoRA training — so PortOS puts the display to sleep for you
and the system keeps running underneath. Big runs (9B, bf16) can take hours: start one and{' '}
<span className="text-gray-300">let it run overnight</span>. Don't close the lid (that sleeps the
- whole Mac and pauses the run); just leave it be, or drive it over SSH. On by default; set
- <code className="text-gray-300">loraTraining.displaySleep: false</code> to opt out if you run headless.
+ whole Mac and pauses the run); just leave it be, or drive it over SSH. If you've set{' '}
+ <code className="text-gray-300">loraTraining.displaySleep: false</code> (e.g. headless), PortOS leaves
+ the display alone — keep it off the GPU yourself.
</div>
</div>
</div>
diff --git a/server/services/loraTraining/index.js b/server/services/loraTraining/index.js
index 800f4822ee..ca5624527d 100644
--- a/server/services/loraTraining/index.js
+++ b/server/services/loraTraining/index.js
@@ -811,6 +811,10 @@ export async function runTraining({ jobId, runId, pythonPath = null, resumeCheck
if (!resumed) wakeDisplay(settings);
})
.catch((err) => {
+ // A finalize/flush rejection is still a terminal end with no auto-resume
+ // enqueued, so wake the display here too — otherwise this error path
+ // would leave it asleep (no .then ran). No-op unless we slept it.
+ wakeDisplay(settings);
console.error(`❌ training [${shortId(jobId)}] finalize failed: ${err?.message}`);
fail(`finalize failed: ${err?.message}`);
});