feat: per-instance reload + manual hibernate/wake from sidebar context menu#12
Open
Teamingzooper wants to merge 1 commit into
Open
feat: per-instance reload + manual hibernate/wake from sidebar context menu#12Teamingzooper wants to merge 1 commit into
Teamingzooper wants to merge 1 commit into
Conversation
…t menu
Right-click on any sidebar instance now offers context-aware actions
that act on THAT instance, not just the active one.
Changes:
- New ViewService methods: reloadInstance(id), hibernateInstance(id),
wakeInstance(id). All idempotent and safe-on-unknown-id.
- reloadInstance: ensures the view exists (waking it if hibernated)
and reloads. Works on background instances too.
- hibernateInstance: same teardown path as the periodic sweep, but
triggered manually. Skipped if the instance is the active one or
has no live view.
- wakeInstance: rebuilds a hibernated view in the background without
activating it. Useful for "warming up" before a switch.
- Three new IPC channels (nexus:instances:reload,
nexus:instances:hibernate, nexus:instances:wake), all with Zod-validated
instanceId input. preload + nexus.d.ts updated.
- Renderer store gets matching actions with optimistic updates of the
hibernatedInstances set.
- Sidebar context menu:
- "Reload" now reloads in place (no forced activation), making it
useful for refreshing background tabs.
- "Hibernate now" appears below Mute when the hibernate feature is
enabled AND the instance is not currently active.
- "Wake" appears in place of Hibernate when the instance is asleep.
178/178 tests still pass, typecheck + build clean.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Right-click any sidebar instance now exposes actions that operate on that instance rather than the active one. Pairs nicely with #10 (auto-hibernate) — once you have hibernation on, you can manually trigger it for a specific instance instead of waiting for the timer.
What changes in the context menu
Architecture
Three new `ViewService` methods, all idempotent and safe-on-unknown-id:
Three matching IPC channels (`nexus:instances:reload`, `nexus:instances:hibernate`, `nexus:instances:wake`), Zod-validated input.
Renderer store gets matching actions with optimistic updates of the `hibernatedInstances` slice so the 💤 indicator flicks on/off immediately.
Test plan
🤖 Generated with Claude Code