Skip to content

fix: project filter was not properly saved in webhook modal#2834

Merged
rmnbrd merged 1 commit into
stagingfrom
fix/project-filter-webhook
Jul 24, 2026
Merged

fix: project filter was not properly saved in webhook modal#2834
rmnbrd merged 1 commit into
stagingfrom
fix/project-filter-webhook

Conversation

@lmillie-qovery

Copy link
Copy Markdown
Contributor

Issue reported in Pylon ticket 4551
Root cause: in libs/shared/ui/src/lib/components/inputs/input-tags/input-tags.tsx, the InputTags component (used for the webhook "Project name filter" and the settings "Contact emails" field) only committed typed text into the tags array when the user pressed Enter. There was no commit on blur or before submit. So if you typed a project name and clicked Save directly (a very natural thing to do — the "press Enter" hint is easy to miss), the text sitting in the input was silently discarded, and the value never made it into project_names_filter. The saved webhook came back with an empty (or unchanged) filter, which looked like the value "disappeared."

Confirmed by tracing the whole path (form defaults, submit handler, API payload, cache invalidation) — everything else was correct; the existing passing tests only ever simulated pressing Enter, which is why this never surfaced.

Fix: added an onBlur handler on the tag input that commits any pending typed value (same logic as Enter, factored into a shared commitTag helper) in input-tags.tsx:58-88,128. Since blur fires on mousedown before the Save button's click handler runs, this covers exactly the "type then click Save" flow.

Added a regression test in webhook-crud-modal.spec.tsx that types a project filter without pressing Enter and asserts it's still included in the edit payload. All 17 webhook tests and the 6 InputTags unit tests pass.

@RemiBonnet

Copy link
Copy Markdown
Member

Qovery Preview

Qovery can create a Preview Environment for this PR.
To trigger its creation, please post a comment with one of the following command.

Command Blueprint environment
/qovery preview cc1de7de-94e5-40f8-8e45-bc8986d9dfec storybook
/qovery preview 964984c5-fba6-4371-88d3-a5daf99642ab test-prod
/qovery preview 28c47145-c8e7-4b9d-8d9e-c65c95b48425 staging
/qovery preview {all|UUID1,UUID2,...} To preview multiple environments

This comment has been generated from Qovery AI 🤖.
Below, a word from its wisdom :

Programs must be written for people to read, and only incidentally for machines to execute

@nx-cloud

nx-cloud Bot commented Jul 23, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 79a354e

Command Status Duration Result
nx run console:build --parallel=3 --configurati... ✅ Succeeded 59s View ↗
nx affected --target=test --parallel=3 --config... ✅ Succeeded 3m 20s View ↗
nx affected --target=lint --parallel=3 ✅ Succeeded 2m 39s View ↗
nx-cloud record -- yarn nx format:check ✅ Succeeded 5s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-23 15:46:29 UTC

@lmillie-qovery

Copy link
Copy Markdown
Contributor Author

/qovery preview 28c47145-c8e7-4b9d-8d9e-c65c95b48425

@RemiBonnet

Copy link
Copy Markdown
Member

Qovery Preview

A preview environment was automatically created via Qovery.
Click on the link below to follow its deployment and use it.
👉 [PR] staging - fix: project filter was not properly saved in webhook modal - 2026-07-23T15:41:39Z

Another comment will be posted when deployments are finished

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.40%. Comparing base (fe2ee47) to head (79a354e).

Files with missing lines Patch % Lines
...rc/lib/components/inputs/input-tags/input-tags.tsx 60.00% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #2834      +/-   ##
===========================================
- Coverage    48.18%   47.40%   -0.78%     
===========================================
  Files         1267     1183      -84     
  Lines        27075    25618    -1457     
  Branches      7890     7634     -256     
===========================================
- Hits         13046    12145     -901     
+ Misses       11809    11414     -395     
+ Partials      2220     2059     -161     
Flag Coverage Δ
unittests 47.40% <60.00%> (-0.78%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RemiBonnet

Copy link
Copy Markdown
Member

Qovery Preview

Your preview environment has been successfully deployed !
Click on the link below to open your service:
👉 console

@rmnbrd
rmnbrd enabled auto-merge (squash) July 24, 2026 09:45

@rmnbrd rmnbrd left a comment

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.

LGTM ✅

@rmnbrd
rmnbrd merged commit 4d927e5 into staging Jul 24, 2026
6 of 7 checks passed
@rmnbrd
rmnbrd deleted the fix/project-filter-webhook branch July 24, 2026 09:46
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