Skip to content

chore(types): enable strictNullChecks in base config with explicit null guards in server/config/core [WPB-23695]#20510

Merged
screendriver merged 1 commit intodevfrom
strict-null
Feb 26, 2026
Merged

chore(types): enable strictNullChecks in base config with explicit null guards in server/config/core [WPB-23695]#20510
screendriver merged 1 commit intodevfrom
strict-null

Conversation

@screendriver
Copy link
Collaborator

@screendriver screendriver commented Feb 26, 2026

TaskWPB-23695 [Web] Enable strict TypeScript mode

Pull Request

Summary

  • enable strictNullChecks in base TypeScript config
  • fix strict-null regressions in server, config-lib, and core-lib with explicit null/undefined checks (no implicit truthy/falsy checks in touched code)
  • improve unhandled rejection type logging with explicit type narrowing
  • add/update tests for new null-handling behavior:
    • client build date parsing when version is missing
    • server config defaults when URLs are missing
    • link preview audit upload with missing title
    • browser util test helper null safety
  • keep webapp temporarily opted out via local strictNullChecks: false override due to existing nullability backlog and unresolved module typing in webapp:type-check

Security Checklist (required)

  • External inputs are validated & sanitized on client and/or server where applicable.
  • API responses are validated; unexpected shapes are handled safely (fallbacks or errors).
  • No unsafe HTML is rendered; if unavoidable, sanitization is applied and documented where it happens.
  • Injection risks (XSS/SQL/command) are prevented via safe APIs and/or escaping.

Accessibility (required)

Standards Acknowledgement (required)


Screenshots or demo (if the user interface changed)

Notes for reviewers

  • Trade-offs:
  • Follow-ups (linked issues):
  • Linked PRs (e.g. web-packages):

@screendriver screendriver changed the title chore(types): enable strictNullChecks in base config with explicit null guards in server/config/core - enable strictNullChecks in base TypeScript config - fix strict-null regressions in server, config-lib, and core-lib with explicit null/undefined checks (no implicit truthy/falsy checks in touched code) - improve unhandled rejection type logging with explicit type narrowing - add/update tests for new null-handling behavior: - client build date parsing when version is missing - server config defaults when URLs are missing - link preview audit upload with missing title - browser util test helper null safety - keep webapp temporarily opted out via local strictNullChecks: false override due to existing nullability backlog and unresolved module typing in webapp:type-check [WPB-23695] chore(types): enable strictNullChecks in base config with explicit null guards in server/config/core [WPB-23695] Feb 26, 2026
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 45.40%. Comparing base (2b43bae) to head (9b58ce8).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...braries/core/src/linkPreview/LinkPreviewService.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #20510      +/-   ##
==========================================
+ Coverage   45.38%   45.40%   +0.01%     
==========================================
  Files        1637     1637              
  Lines       40363    40364       +1     
  Branches     8333     8334       +1     
==========================================
+ Hits        18319    18326       +7     
+ Misses      20108    20101       -7     
- Partials     1936     1937       +1     
Flag Coverage Δ
app_webapp 43.59% <ø> (ø)
lib_api_client 50.17% <ø> (ø)
lib_core 59.05% <50.00%> (+0.18%) ⬆️

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

Files with missing lines Coverage Δ
...braries/core/src/linkPreview/LinkPreviewService.ts 75.00% <50.00%> (+56.81%) ⬆️
🚀 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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

🔗 Download Full Report Artifact

🧪 Playwright Test Summary

  • Passed: 10
  • Failed: 0
  • Skipped: 4
  • 🔁 Flaky: 0
  • 📊 Total: 14
  • Total Runtime: 84.9s (~ 1 min 25 sec)

…ll guards in server/config/core

- enable strictNullChecks in base TypeScript config
- fix strict-null regressions in server, config-lib, and core-lib with
explicit null/undefined checks (no implicit truthy/falsy checks in
touched code)
- improve unhandled rejection type logging with explicit type narrowing
- add/update tests for new null-handling behavior:
  - client build date parsing when version is missing
  - server config defaults when URLs are missing
  - link preview audit upload with missing title
  - browser util test helper null safety
- keep webapp temporarily opted out via local strictNullChecks: false
override due to existing nullability backlog and unresolved module
typing in webapp:type-check
@sonarqubecloud
Copy link

@screendriver screendriver added this pull request to the merge queue Feb 26, 2026
Merged via the queue into dev with commit b1a432f Feb 26, 2026
19 checks passed
@screendriver screendriver deleted the strict-null branch February 26, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants