Skip to content

Preserve feel expression for unresolvable values#77

Merged
nikku merged 3 commits intomainfrom
preserve-feel-expression
Mar 2, 2026
Merged

Preserve feel expression for unresolvable values#77
nikku merged 3 commits intomainfrom
preserve-feel-expression

Conversation

@nikku
Copy link
Member

@nikku nikku commented Feb 20, 2026

Proposed Changes

As a proposal built on top of #73 this PR preserves FEEL expressions for Any values, through the variable#info field. As a result it is shown during editor completion.

As per standard merging semantics different values will appear newline separated, this is covered in d435dec.

Checklist

Ensure you provide everything we need to review your contribution:

  • Contribution meets our definition of done
  • Pull request establishes context
    • Link to related issue(s), i.e. Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}
    • Brief textual description of the changes
    • Screenshots or short videos showing UI/UX changes
    • Steps to try out, i.e. using the @bpmn-io/sr tool

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Feb 20, 2026
@nikku nikku force-pushed the preserve-feel-expression branch from e26229e to 93952ec Compare February 20, 2026 21:09
@nikku nikku mentioned this pull request Feb 20, 2026
6 tasks
@nikku nikku force-pushed the cover-null-variable-type branch 9 times, most recently from 3f90a03 to f53631c Compare February 26, 2026 21:19
Base automatically changed from cover-null-variable-type to main February 26, 2026 21:21
@nikku nikku force-pushed the preserve-feel-expression branch from 93952ec to cab9598 Compare February 26, 2026 21:33
@nikku nikku changed the title Preserve feel expression Preserve feel expression for unresolvable values Feb 26, 2026
@nikku nikku marked this pull request as ready for review February 26, 2026 21:46
@nikku nikku requested review from a team, barinali, Copilot and jarekdanielak February 26, 2026 21:46
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Feb 26, 2026
@nikku
Copy link
Member Author

nikku commented Feb 26, 2026

@barinali ready for review. Consider if this is really what we need, today - as per standard merging behavior different expressions (can be long ones) will be merged (concatenated via \n) - it will be hard to impossible (?) to distinguish them.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances the variable resolution system to preserve FEEL expressions for unresolvable variables (those that resolve to Any type) by storing them in the variable#info field. This enables the editor to display the original expression during completion, improving the developer experience.

Changes:

  • Preserve FEEL expressions in the info field when variables cannot be resolved due to missing references
  • Add test coverage for merging multiple unresolvable expressions with newline separation
  • Update existing test expectations to reflect the new behavior where info contains the preserved expression

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
lib/zeebe/util/feelUtility.js Adds logic to preserve FEEL expression in info field when variable becomes Any due to unresolved references
test/spec/zeebe/Mappings.spec.js Adds new test for merging any expressions and updates existing scope test to verify preserved expression
test/fixtures/zeebe/mappings/merging.any-expression.bpmn New test fixture with two tasks outputting to same variable with different unresolvable expressions
CHANGELOG.md Documents the new feature in the unreleased section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


___Note:__ Yet to be released changes appear here._

* `FEAT`: preserve expression unresolvable values ([#77](https://github.com/bpmn-io/variable-resolver/pull/77))
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The CHANGELOG entry "preserve expression unresolvable values" could be clearer. Consider rewording to "preserve FEEL expressions for unresolvable values" or "preserve expressions in info field for Any-type variables" to better match the PR title and description.

Suggested change
* `FEAT`: preserve expression unresolvable values ([#77](https://github.com/bpmn-io/variable-resolver/pull/77))
* `FEAT`: preserve FEEL expressions for unresolvable values ([#77](https://github.com/bpmn-io/variable-resolver/pull/77))

Copilot uses AI. Check for mistakes.
@barinali
Copy link
Contributor

@barinali ready for review. Consider if this is really what we need, today - as per standard merging behavior different expressions (can be long ones) will be merged (concatenated via \n) - it will be hard to impossible (?) to distinguish them.

As discussed today, I think there is still value in demonstrating merged expressions instead of not showing anything. This is, ideally, an intermediate state and I would like it to go in the direction of camunda/camunda-modeler#5697.

@nikku nikku merged commit 2953b25 into main Mar 2, 2026
9 checks passed
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Mar 2, 2026
@nikku nikku deleted the preserve-feel-expression branch March 2, 2026 09:12
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