Skip to content

Conversation

@krishna9358
Copy link
Contributor

…namic inputs

Summary

  • Added artifactName input with dynamic placeholder support ({{run_id}}, {{timestamp}}, {{date}}, {{time}}, {{run_name}}, {{task}}, {{dataset}})
  • Created DynamicArtifactNameInput UI component showing available placeholders with click-to-insert
  • Replaced fileName parameter with fileExtension for cleaner separation
  • Default naming pattern: {{run_id}}-{{timestamp}}

Changes

  • worker/src/components/core/artifact-writer.ts - Added input port, placeholder substitution logic
  • frontend/src/components/workflow/DynamicArtifactNameInput.tsx - New component for sidebar UI
  • frontend/src/components/workflow/ConfigPanel.tsx - Integrated custom input for artifact-writer
  • Updated tests for new input structure

Testing

  • bun run test
  • bun run lint
  • bun run typecheck
  • Additional notes:

Documentation

  • Updated the relevant doc(s) (see docs/guide.md) or checked that no updates are needed.
  • Recorded contract/architecture changes in both public docs and .ai logs when applicable.

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@krishna9358 krishna9358 changed the title feat: added the feature write the name of artifact with custom and dy… feature to write the name of artifact with custom and dynamic inputs Jan 27, 2026
Signed-off-by: Krishna Mohan <[email protected]>
@betterclever
Copy link
Contributor

Review Feedback

Issue 1: {{dataset}} placeholder is hardcoded to "default"

In worker/src/components/core/artifact-writer.ts:67, the {{dataset}} placeholder is hardcoded to return the string "default". This provides no value to users and is misleading.

Suggestion: Either remove this placeholder or properly implement it by adding dataset to the execution context.

Issue 2: {{task}} placeholder naming is confusing

The {{task}} placeholder doesn't actually return a task name - it returns the component's reference ID (node ID in the workflow). The naming is misleading for users.

Suggestion: Rename to {{node_id}} or {{component_ref}} for clarity, and update documentation accordingly.

Issue 3: {{run_name}} implementation is unintuitive

The `{{run_name}}) logic takes the last segment after a hyphen, or the first 8 characters of the run ID. This "vibe-based" logic is confusing and not predictable for users.

Suggestion: Either remove this placeholder or make it explicitly configurable (e.g., add a proper run name to the execution context).

Issue 4: Documentation mismatch

The placeholder descriptions don't match what they actually return:

  • {{dataset}} says "Dataset name" but always returns "default"
  • {{task}} says "Task name" but returns the component ref ID

Suggestion: Update documentation to match actual behavior, or fix the behavior to match the documentation.


Overall, the placeholder system needs more thoughtful design. Hardcoded values and misleading names make this feature difficult for users to understand and use effectively.

return template
.replace(/\{\{run_id\}\}/gi, context.runId)
.replace(/\{\{timestamp\}\}/gi, timestamp)
.replace(/\{\{dataset\}\}/gi, 'default')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This placeholder is hardcoded to always return "default". Either remove this placeholder or properly implement it by adding dataset to the execution context.

.replace(/\{\{run_id\}\}/gi, context.runId)
.replace(/\{\{timestamp\}\}/gi, timestamp)
.replace(/\{\{dataset\}\}/gi, 'default')
.replace(/\{\{task\}\}/gi, context.componentRef)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading name: this returns the component reference ID (node ID in workflow), not a task name. Consider renaming to node_id or component_ref for clarity.

* Supported placeholders:
* - {{run_id}} - Current run ID
* - {{timestamp}} - Unix timestamp in milliseconds
* - {{dataset}} - Dataset name (if available)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation says "Dataset name (if available)" but this actually returns the hardcoded string "default". Please either remove this placeholder or implement it properly.

* - {{run_id}} - Current run ID
* - {{timestamp}} - Unix timestamp in milliseconds
* - {{dataset}} - Dataset name (if available)
* - {{task}} - Task name (if available)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation says "Task name (if available)" but this actually returns the component reference ID. Please update the documentation or rename the placeholder.


// Extract a shorter run name from runId (last segment after last hyphen, or first 8 chars)
const runIdParts = context.runId.split('-');
const runName = runIdParts.length > 1 ? runIdParts.slice(-1)[0] : context.runId.slice(0, 8);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is confusing and unpredictable - it takes the last segment after a hyphen, or the first 8 characters of the runId. Consider removing this placeholder or adding an actual run name to the execution context.

@krishna9358
Copy link
Contributor Author

Summary

  • Removed {{dataset}} placeholder — was hardcoded to always return "default", providing no value
  • Renamed {{task}} to {{node_id}} — the old name was misleading; it returns the component's node ID in the workflow, not a task name
  • Removed {{run_name}} placeholder — used unpredictable logic (last segment after hyphen or first 8 chars), making it unreliable for users
  • Updated UI to use dropdown select — replaced collapsible button list with a cleaner dropdown for inserting placeholders

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.

3 participants