Skip to content

Fix null conditionals in search attribute filter#3351

Merged
laurakwhit merged 2 commits intomainfrom
fix/null-conditionals-in-workflow-query
Apr 29, 2026
Merged

Fix null conditionals in search attribute filter#3351
laurakwhit merged 2 commits intomainfrom
fix/null-conditionals-in-workflow-query

Conversation

@laurakwhit
Copy link
Copy Markdown
Collaborator

@laurakwhit laurakwhit commented Apr 29, 2026

Description & motivation 💭

When selecting Is null / Is not null in the Workflow search attribute filter it should now create the correct query. The filter was either being dropped (because value === '') or emitting a malformed statement with the empty value interpolated in it.

Behavior was introduced when value was set to empty string here.

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

Go to /workflows > + Add Filter > select a Keyword search attribute

  • Select Is null and verify it updates the query correctly
  • Select Is not null and verify it updates the query correctly

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@laurakwhit laurakwhit requested a review from a team as a code owner April 29, 2026 00:09
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Apr 29, 2026 0:09am

Request Review

@@ -326,7 +326,7 @@
active={localFilter.conditional === option.value}
on:click={() => {
if (isNullConditional(option.value)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • ⚠️ Type 'null' is not assignable to type 'string'.

@temporal-cicd
Copy link
Copy Markdown
Contributor

temporal-cicd Bot commented Apr 29, 2026

Warnings
⚠️

📊 Strict Mode: 3 errors in 2 files (0.3% of 1001 total)

src/lib/utilities/query/filter-workflow-query.ts (2)
  • L119:2: Type '(string | undefined)[]' is not assignable to type 'string[]'.
  • L137:12: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'.
src/lib/components/workflow/filter-bar/dropdown-filter-chip.svelte (1)
  • L328:12: Type 'null' is not assignable to type 'string'.

Generated by 🚫 dangerJS against 397d92a

Copy link
Copy Markdown
Contributor

@GraceGardner GraceGardner left a comment

Choose a reason for hiding this comment

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

Thanks for getting this in

@laurakwhit laurakwhit merged commit 219cfee into main Apr 29, 2026
20 checks passed
@laurakwhit laurakwhit deleted the fix/null-conditionals-in-workflow-query branch April 29, 2026 15:33
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.

2 participants