Skip to content

Conversation

bitsbyritik
Copy link

/claim #1696

Issue:
TypeScript dependencies were re-downloaded every time a package was saved or the editor loaded, causing unnecessary network requests and slower editor performance.

This PR:

  • Adds localStorage caching for ATA fetcher responses.
  • Restores cached TS/TSX/DTS files on ATA initialization.
  • Caches newly received TypeScript files locally.
  • Uses a TTL to avoid stale cache.
  • Falls back to network fetch if cache is missing or expired.
2025-09-27.13-17-40.mp4

Benefit: Faster editor startup, reduced network usage, and smoother developer experience while keeping dependencies up-to-date automatically.

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the delay reviewing this, you can get faster reviews by pinging on the #reviewme channel in discord (https://tscircuit.com/join)

This looks good and i will be testing it. Something that would make it slightly better is moving (as much as possible) the implementation out of the CodeEditor file, since this files seems to grow infinitely all the time

What other people have done is introduced a useAtaManager hook which manages the ata instance

thanks, will do a deeper review

Copy link

github-actions bot commented Oct 2, 2025

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Oct 2, 2025
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.

2 participants