Skip to content

Conversation

@ewels
Copy link
Member

@ewels ewels commented Dec 18, 2025

Summary

  • Enable autocomplete for launchpad names and data link names to work immediately after the seqera-config node is saved, without requiring deployment
  • Use RED.nodes.node() in the frontend to get config values from editor state
  • Use RED.nodes.getCredentials() in the backend to look up saved API tokens for undeployed config nodes

Problem

Previously, when configuring nodes like workflow-launch or datalink-poll, the autocomplete functionality would only work after the seqera-config node had been deployed. This meant users had to:

  1. Create/edit the seqera-config node
  2. Deploy the entire flow
  3. Only then could they use autocomplete in other nodes

This was frustrating for new users setting up their first flow.

Solution

The autocomplete now works as soon as the seqera-config node is saved (clicking "Done" or "Update" in the config dialog). No deployment required.

Frontend changes:

  • Use RED.nodes.node(configId) to access config node properties from editor state
  • Pass baseUrl and workspaceId as query parameters to the backend

Backend changes:

  • Accept baseUrl/workspaceId from query params when config node isn't deployed
  • Use RED.nodes.getCredentials(configId) to look up saved API token
  • This works because credentials are saved immediately when the config dialog is closed

Test plan

  • Test autocomplete works immediately after selecting an existing (deployed) config
  • Test autocomplete works after creating a new config, saving it (Done), but not deploying
  • Test autocomplete with workspace ID override
  • Test graceful failure when no config is selected
  • Test graceful failure when config has no saved credentials
  • Verify all 165 existing tests still pass

🤖 Generated with Claude Code

Previously, autocomplete for launchpad names and data link names would
only work after the seqera-config node had been deployed. This was
because the backend could only retrieve config node properties via
RED.nodes.getNode(), which only returns deployed nodes.

This change enables autocomplete to work immediately after the config
node is saved (closed with Done/Update), without requiring deployment:

Frontend changes:
- Use RED.nodes.node(configId) to get config from editor state
- Pass baseUrl and workspaceId as query parameters to backend
- Use params.set() for workspace override to ensure precedence

Backend changes:
- Accept baseUrl/workspaceId from query params when config not deployed
- Use RED.nodes.getCredentials(configId) to look up saved API token
- Add explicit credentials check before making API calls

Files modified:
- nodes/workflow-launch.html
- nodes/datalink-list.html
- nodes/datalink-poll.html
- nodes/workflow-launch.js
- nodes/_utils.js

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions
Copy link

github-actions bot commented Dec 18, 2025

🐳 Docker PR Build

Status ✅ Built successfully
Commit 6364970b7efd4f8d0ef3c48c72d757610c55a5a0
Standard ghcr.io/seqeralabs/node-red-seqera:pr-31
Studios ghcr.io/seqeralabs/node-red-seqera-studios:pr-31

View workflow run

@ewels ewels linked an issue Dec 18, 2025 that may be closed by this pull request
@ewels ewels marked this pull request as draft December 18, 2025 17:09
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.

Apply Seqera config as soon as it's selected

2 participants