← 输入框|github.com|刷新
Skip to content

web: stop a pending close from clearing a reopened deployment panel - #13

Merged
yekta merged 1 commit into
masterfrom
fix/deployment-panel-unknown-state
Oct 17, 2026
Merged

yekta merged 1 commit into
masterfrom
fix/deployment-panel-unknown-state

Conversation

@yekta

@yekta yekta commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Fixes UNB-370: https://ricrac.app/unbind/issue/UNB-370

Sometimes clicking a deployment card opened the panel with the "Unknown" state.

Cause

  • When the panel closes, a timer starts. It clears the current deployment after the drawer animation ends (drawerAnimationMs).
  • Opening a deployment never cancelled that timer. If you reopened the panel shortly after closing it, the timer still fired, cleared the deployment and left the panel in the "Unknown" state.

Fix

  • The effect in deployment-panel-provider.tsx now returns a cleanup function that clears the timer. Selecting a deployment cancels any pending clear.
  • This replaces the useRef that used to hold the timeout, so the effect is shorter.

Closing the panel starts a timer that clears the current deployment once the drawer animation ends. Opening a deployment did not cancel that timer, so reopening the panel shortly after closing it let the timer fire and blank the deployment, and the panel showed the "Unknown" state.

The timer is now cleared in the effect cleanup, so selecting a deployment cancels any pending clear.
@yekta
yekta merged commit a9241e0 into master Oct 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant