Repository navigation
refactor(web): defer tldts load for MCP favicon URL blur - #42486
Merged
crazywoola merged 1 commit intoSep 23, 2026
Merged
Conversation
Dynamically import tldts when create-mode MCP server URL blurs so the Integrations entry no longer statically pulls the domain parser. Guard async blur handlers against stale completions when the URL changes quickly.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #42486 +/- ##
=======================================
Coverage 87.47% 87.47%
=======================================
Files 5468 5468
Lines 316809 316817 +8
Branches 63506 63511 +5
=======================================
+ Hits 277127 277134 +7
- Misses 34300 34301 +1
Partials 5382 5382
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
crazywoola
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Fixes #<issue number>.Fixes #42440.
Summary
The Integrations bundle statically imported
tldtsthrough the MCP modal form hook (use-mcp-modal-form.ts), even for users who never open MCP create/edit UI. That hook only needsgetDomainwhen create-mode server URL blur runs, to build the Google favicon URL.This PR:
import { getDomain } from 'tldts'sotldtsis not part of the static dependency graph for the Integrations entry.tldtswithawait import('tldts')insidehandleUrlBlurafter URL validation, preserving registrable-domain semantics (getDomain, not rawURL.hostname).getDomainreturns no domain.MCP UI modules may still ship in the Integrations chunk via existing static section imports; this change specifically defers the ~300KB
tldtsparser until favicon lookup runs, matching the issue acceptance criteria.Screenshots
N/A — bundle-size / network change only; no UI change.
Testing
npx vp test --project unit app/components/tools/mcp/hooks/__tests__/use-mcp-modal-form.spec.ts(53 tests)vp check --fixon staged TS filesChecklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods