fix(remote-control): clear stale status badge on session reload

This commit is contained in:
Yejun Su 2026-03-22 00:51:10 +08:00
parent 9e92201206
commit 8cffeb9e27
No known key found for this signature in database
GPG Key ID: AD03A563F321CA44
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ export default function remoteControl(pi: ExtensionAPI) {
// ── Lifecycle ──────────────────────────────────────────────────────────────
pi.on("session_start", async (_event, ctx) => {
// Clear any stale status from before a reload
if (ctx.hasUI) ctx.ui.setStatus("remote-control", undefined);
if (pi.getFlag("remote-control") !== true) return;
const config = await readRemoteControlConfig();