refactor: tabs visibility#4302
refactor: tabs visibility#4302jog1t wants to merge 1 commit into02-24-fix_workflow_visualizer_stylesfrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: refactor: tabs visibilityGood refactor overall — the component decomposition is clean and the motivation (dynamic tab visibility based on actor feature availability) is well-reasoned. A few issues worth addressing: Bug: Potential UI Flash on Actor ConnectThere is an inconsistency in how workflow vs. database enabled state is initialized: In queryFn: () => false, // Resolves immediately as falseIn queryFn: () => new Promise<boolean>(() => {}), // Never resolvesIn if (!isWorkflowEnabled) hiddenTabs.add("workflow");
if (!isDatabaseEnabled) hiddenTabs.add("database");
Both patterns result in tabs that flash hidden → visible on connection. Consider either defaulting both to a never-resolving promise to keep tabs hidden until confirmed, or defaulting both to Dead Code: Unreachable
|

Description
This change implements dynamic tab visibility for actor details based on feature availability. The actor tabs now conditionally show or hide based on whether specific features (workflow, database, state, queue) are enabled for the actor. When tabs are hidden, the system automatically selects the first available tab from a predefined priority order. The implementation also handles the case where actors are not running by showing all tabs but with appropriate guard content.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: