Skip to content

fix: preserve false value for default_head_tags_disabled in screen renderer update(ghIssue 1413)#1416

Open
harshithRai wants to merge 2 commits into
masterfrom
ghIssue-1413
Open

fix: preserve false value for default_head_tags_disabled in screen renderer update(ghIssue 1413)#1416
harshithRai wants to merge 2 commits into
masterfrom
ghIssue-1413

Conversation

@harshithRai

@harshithRai harshithRai commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🔧 Changes

Fix default_head_tags_disabled being silently ignored when set to false in screen renderer settings. The field uses the || operator which coerces false to undefined, causing it to be omitted from the Management API request body. Changed to ?? (nullish coalescing) so that only null/undefined fall back, preserving explicit false values.

This means once default_head_tags_disabled: true was deployed, it could never be reverted to false via the CLI.

📚 References

fixes #1413

🔬 Testing

  • Added a unit test in test/tools/auth0/handlers/prompts.tests.ts that calls updateScreenRenderer with default_head_tags_disabled: false and asserts the captured API payload contains false (not undefined). This test fails on the original code and passes after the fix.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@harshithRai harshithRai changed the title fix: preserve false value for default_head_tags_disabled in screen renderer update fix: preserve false value for default_head_tags_disabled in screen renderer update(ghIssue 1413') Jul 1, 2026
@harshithRai harshithRai changed the title fix: preserve false value for default_head_tags_disabled in screen renderer update(ghIssue 1413') fix: preserve false value for default_head_tags_disabled in screen renderer update(ghIssue 1413) Jul 1, 2026
@harshithRai harshithRai marked this pull request as ready for review July 1, 2026 13:14
@harshithRai harshithRai requested a review from a team as a code owner July 1, 2026 13:14
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.33%. Comparing base (e25b8d2) to head (72f6b7d).

Files with missing lines Patch % Lines
src/tools/auth0/handlers/prompts.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1416      +/-   ##
==========================================
- Coverage   80.34%   80.33%   -0.02%     
==========================================
  Files         156      156              
  Lines        7225     7225              
  Branches     1595     1595              
==========================================
- Hits         5805     5804       -1     
  Misses        762      762              
- Partials      658      659       +1     

☔ 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.

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.

Change fails when default_head_tags_disabled is set from true to false

2 participants