diff --git a/src/main/relay.ts b/src/main/relay.ts index a1ffb85..93fe23f 100644 --- a/src/main/relay.ts +++ b/src/main/relay.ts @@ -525,6 +525,17 @@ export class RpcRelay extends EventEmitter { } if (changed) this.emitStatus() + + if (this.lockedPrimary !== null) { + const lockedSlot = this.claimed.findIndex( + (c) => platform.getInstanceProcess(c.index)?.executable === this.lockedPrimary + ) + if (lockedSlot > 0) { + this.discovering = false + await this.reorderForPrimary() + return + } + } } catch (err) { this.lastError = err instanceof Error ? err.message : String(err) this.emitStatus() diff --git a/src/renderer/src/components/InstanceRow.tsx b/src/renderer/src/components/InstanceRow.tsx index b49614e..28d1cf2 100644 --- a/src/renderer/src/components/InstanceRow.tsx +++ b/src/renderer/src/components/InstanceRow.tsx @@ -1,4 +1,4 @@ -import { ArrowUpToLine, Info, Lock } from 'lucide-react' +import { ArrowUpToLine, Lock, LockOpen } from 'lucide-react' import type { RelayInstance } from '../../../main/relay' import { Toggle } from './Toggle' import { Button } from './Button' @@ -57,6 +57,23 @@ export function InstanceRow({ ) + const lockButton = ( + + ) + const info = (