inkandswitch / inkandswitch/patchwork-system

HTTP-hosted tools disappear

Open
#415 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
49
Forks
6
Avg merge
2d 16h
Merged PRs (30d)
6

Description

I'm seeing this in my logs:

> installHook.js:1 Failed to import https://patchwork-tools.netlify.app/tools/notes/dist/index.js TypeError: Failed to fetch dynamically imported module: https://patchwork-tools.netlify.app/tools/notes/dist/index.js

I assume this means that some tool I installed by URL is no longer at that location. That really makes me sad! If I've had a tool, one of the real nice things about Automerge-backed tools is that I should always have that tool. Now, whether by accident or on purpose, my Patchwork is (slightly) broken because a URL changed.

What should we do about this?

I see a couple of possible answers:

Option 1) Just wait! We should stop using HTTP URLs for tools and this is a transitional moment where we're deploying that way for tactical reasons.
Option 2) Cache more aggressively. My tool should be durably written somewhere locally so that if the source goes away, I can still work. This is important for a variety of goals, such as long-term stability and offline support. Solving this problem for HTTP could also potentially solve it for other file sources.

Maybe there are other approaches? I don't know, but I wanted to log this issue and make sure the problem was recorded somewhere.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named in the issue. Start by reproducing the failed dynamic import for the logged HTTP tool URL and tracing how installed tools are loaded and retained. Done requires an agreed approach that lets an installed tool remain usable when its HTTP source disappears, including the intended offline behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.