Repository navigation
fix(tui): keep usage state and polling in plugin setup - #5
Merged
Merged
Conversation
Preserve usage state and in-flight refresh cycles across panel remounts. Keep existing refresh deadlines and overlap protection. Stop polling and release the slot during plugin cleanup. Add lifecycle reproductions with the OpenTUI renderer and focused refresh tests.
Owner
|
Approved. Moving state and polling into Two small notes, no changes required here:
We will wire a |
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.
Problem
Usage state and polling currently belong to
Panel. When the host unmounts and remounts the panel, usage state resets to loading and a new refresh starts.The existing refresh deadline does not prevent this reset.
Changes
Panelrender shared state through accessors.This PR does not change credential resolution, sidebar layout, or pace indicators.
Behavior change
Polling now follows the plugin lifetime rather than the panel lifetime. It continues while the plugin is active, even when the panel is not mounted.
The deadline still ends the wait without cancelling the underlying load.
Verification
npm test: 15 tests pass.npm run typecheck: passes for production sources.Tests use synthetic responses, not live credentials or API requests. This reproduction demonstrates panel-remount behavior; it does not establish the cause of every reported loading issue.