Merged
Conversation
cstns
reviewed
Mar 16, 2026
cstns
approved these changes
Mar 17, 2026
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.
Description
Adds support for creating new flow tabs via automation.
This PR lead to a need for "command and await" functionalilty and re-use of import logic. For that reason, it also adds a new abstraction
RedOps(for Node-RED operations) which refactors handles the command and wait and hosts the refactored flow import logic.The changes improve modularity, enable asynchronous action handling, and extend the automation capabilities for Node-RED flows.
Core abstractions and refactoring:
RedOpsclass inredOps.jsto encapsulate Node-RED operations such as validating flow strings, invoking actions, and waiting for events. Flow validation and action invocation logic previously inExpertCommsare now moved to this class. ([resources/redOps.jsR1-R111](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-bce14e6301073e2e83f84d706245cb0e56d8015087e546ee1b9292b1095ede61R1-R111))ExpertActionsInterfaceandExpertAutomationsto use the newRedOpsabstraction, initializing it and delegating relevant operations to it. ([resources/expertActionsInterface.jsR1-R16](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-084ec314ef40d6a2ff14b9d8308f400d3e188ab7770c04621a80df19e3ec30b7R1-R16))Automation and flow handling improvements:
automation/add-flow-tabinExpertAutomations, including support for an optional title. Implemented theaddFlowTabmethod to create new flow tabs, either via a core action or by importing a flow with a custom label. ([[1]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-b89bcd54930b5abba7a5ccddc78ddc849b36e62d572f817a4aa31d49900cf09dR8-R11),[[2]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-b89bcd54930b5abba7a5ccddc78ddc849b36e62d572f817a4aa31d49900cf09dR89-R99),[[3]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-b89bcd54930b5abba7a5ccddc78ddc849b36e62d572f817a4aa31d49900cf09dR180-R231),[[4]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-b89bcd54930b5abba7a5ccddc78ddc849b36e62d572f817a4aa31d49900cf09dR296-R301))ExpertCommstoExpertAutomationsand updating the invocation to support new options and error handling. ([[1]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-b89bcd54930b5abba7a5ccddc78ddc849b36e62d572f817a4aa31d49900cf09dR180-R231),[[2]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-637659b6869108e05c4538455e7101b71e09643c68b841248750f09e14dbc35aL539-R552))Asynchronous action handling:
invokeActionmethods inExpertActionsInterfaceandExpertAutomationsto be asynchronous, allowing for actions that require waiting for events or responses. UpdatedExpertCommsto handle async action invocation and properly await results. ([[1]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-084ec314ef40d6a2ff14b9d8308f400d3e188ab7770c04621a80df19e3ec30b7L21-R27),[[2]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-b89bcd54930b5abba7a5ccddc78ddc849b36e62d572f817a4aa31d49900cf09dL185-R249),[[3]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-637659b6869108e05c4538455e7101b71e09643c68b841248750f09e14dbc35aL550-R561),[[4]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-637659b6869108e05c4538455e7101b71e09643c68b841248750f09e14dbc35aL330-R343),[[5]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-637659b6869108e05c4538455e7101b71e09643c68b841248750f09e14dbc35aL498-R508))Naming and interface changes:
nodeRedAutomationHelpertonrAutomationsinExpertCommsfor clarity, and updated all references accordingly. ([[1]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-637659b6869108e05c4538455e7101b71e09643c68b841248750f09e14dbc35aL74-R74),[[2]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-637659b6869108e05c4538455e7101b71e09643c68b841248750f09e14dbc35aL124-R124),[[3]](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-637659b6869108e05c4538455e7101b71e09643c68b841248750f09e14dbc35aL204-R204))Testing updates:
expertAutomations.test.jsto reflect the new supported actionautomation/add-flow-tab. ([test/unit/resources/expertAutomations.test.jsL67-R68](https://github.com/FlowFuse/nr-assistant/pull/192/files#diff-e7d4959cdf64517d5730ac48875efaee722475ceccf92228d6c086bf67ee6af1L67-R68))These changes collectively improve modularity, enable more robust automation features, and lay the groundwork for future extensibility.
Related Issue(s)
closes #171
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel