Skip to content

refactor: remove stale type declarations - #41812

Open
tassoevan wants to merge 9 commits into
developfrom
refactor/stale-declarations
Open

refactor: remove stale type declarations#41812
tassoevan wants to merge 9 commits into
developfrom
refactor/stale-declarations

Conversation

@tassoevan

@tassoevan tassoevan commented Aug 18, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Housekeeping pass over stale type declarations, mostly on the client side and on the ambient .d.ts files under apps/meteor/definition/externals.

  • Removed unreferenced ambient declarations — several declare module 'meteor/...' files (and a few non-Meteor ones) declared packages that are no longer imported anywhere: babel-compiler, htmljs, jalik-ufs-methods, logging, mystor-device-detection, webapp-hashing, ddp-common, less-plugin-autoprefixer, less/browser, plus dead members in accounts-base, mongodb, url and ostrio-cookies.
  • Absorbed the still-used bits into the declaration that actually needs them, so the remaining surface is smaller and closer to its use site (e.g. meteor.d.ts, webapp.d.ts).
  • Trimmed client globalsclient/definitions/global.d.ts shrank considerably; what was still referenced moved to proper modules.
  • Colocated types with their consumersIOrchestrator.ts interfaces, IAppExternalURL, ICategory, marketplace ISettings/AppInfo, and IRoutingManagerConfig (now under server/lib/omnichannel/routing/) live next to the code that uses them; service-configuration.d.ts moved under externals/meteor/.
  • Dropped the asterisk-manager dependency along with its declaration file — nothing imports it.

No behavior change: this is types and dead-declaration removal only, plus one unused runtime dependency.

Issue(s)

n/a

Steps to test or reproduce

yarn typecheck / CI build — the point is that nothing else has to change.

Further comments

The externals folder had accumulated declarations for Meteor packages that were dropped over time; keeping them around meant TypeScript happily accepted imports of modules that no longer exist. Removing them makes those mistakes compile errors again.

Task: ARCH-2381

Review in cubic

Summary by CodeRabbit

Summary by CodeRabbit

  • Refactor
    • Improved type organization for app marketplace, category, and routing features.
    • Modernized browser, authentication, and platform compatibility declarations.
    • Added support for service configuration and web application request handling.
  • Chores
    • Removed obsolete platform APIs, external declarations, and an unused integration dependency.
    • Simplified internal type usage without changing runtime behavior.

@tassoevan
tassoevan requested review from a team as code owners August 18, 2026 05:00
@dionisio-bot

dionisio-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b18e0f2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tassoevan tassoevan added this to the 8.8.0 milestone Aug 18, 2026
@tassoevan

Copy link
Copy Markdown
Member Author

/jira ARCH

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f7db58d-4a86-440b-90d9-c88005dcbaaa

📥 Commits

Reviewing files that changed from the base of the PR and between 80b6d06 and b18e0f2.

📒 Files selected for processing (1)
  • apps/meteor/client/views/marketplace/definitions/ISettings.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/views/marketplace/definitions/ISettings.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

Walkthrough

This PR moves application interfaces into dedicated definition modules, updates their consumers, removes obsolete ambient declarations, and adjusts OAuth and HTTP typings. The described runtime behavior remains unchanged.

Changes

Type declaration cleanup

Layer / File(s) Summary
Application type definitions and imports
apps/meteor/client/definitions/*, apps/meteor/client/apps/orchestrator.ts, apps/meteor/client/contexts/AppsContext.tsx, apps/meteor/client/views/marketplace/..., apps/meteor/ee/server/lib/omnichannel/routing/*
App, marketplace, and routing interfaces now use dedicated definition modules. Related imports and redundant type assertions were removed.
Ambient declaration updates
apps/meteor/client/definitions/global.d.ts, apps/meteor/definition/externals/*, apps/meteor/server/lib/cors/cors.ts
Obsolete browser, Meteor, global, MongoDB, WebApp, and external-module declarations were removed or reduced. Required Meteor, service-configuration, and WebApp declarations were added or updated.
OAuth and HTTP typing cleanup
apps/meteor/client/meteor/overrides/oauthRedirectUri.ts, apps/meteor/server/lib/http/call.ts
OAuth override options are optional records. HTTP code no longer imports URLSearchParams or uses a redundant callback assertion.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to b18e0

This change removes stale type declarations and an unused dependency without altering product behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested labels: type: chore

Suggested reviewers: d-gubert

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the removal of stale TypeScript declarations and related unused typings.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • ARCH-2381: Request failed with status code 401

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 39 files

Re-trigger cubic

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.06%. Comparing base (8e44b5c) to head (b18e0f2).
⚠️ Report is 9 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41812      +/-   ##
===========================================
- Coverage    69.07%   69.06%   -0.01%     
===========================================
  Files         4229     4229              
  Lines       166246   166247       +1     
  Branches     29611    29567      -44     
===========================================
- Hits        114829   114825       -4     
+ Misses       46268    46262       -6     
- Partials      5149     5160      +11     
Flag Coverage Δ
e2e 58.93% <100.00%> (-0.02%) ⬇️
e2e-api 45.86% <ø> (-0.02%) ⬇️
unit 70.96% <100.00%> (+<0.01%) ⬆️

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

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

@tassoevan
tassoevan force-pushed the refactor/stale-declarations branch from 80b6d06 to b18e0f2 Compare August 18, 2026 05:37
@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Aug 19, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants