Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI for setting check timeout #54

Closed
lidel opened this issue Aug 29, 2024 · 2 comments · Fixed by #57
Closed

UI for setting check timeout #54

lidel opened this issue Aug 29, 2024 · 2 comments · Fixed by #57
Labels
dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours P2 Medium: Good to have, but can wait until someone steps up

Comments

@lidel
Copy link
Member

lidel commented Aug 29, 2024

Extracted from #47

If DHT is still being mapped, or we test CID Without providers, it will wait forever, e.g. here its 15minutes before showing result to user:

2024-08-29_19-55

Proposed improvements

  • Have some sane timeout by default (e.g. 1 minute)
  • When button is pressed, start the countdown, so user knows how long test will work in the worst case
  • Have <input type="range" allowing user to adjust timeout (e.g. between 30 seconds and 15 minutes?), and pass it to backend
@lidel lidel added the need/triage Needs initial labeling and prioritization label Aug 29, 2024
@lidel
Copy link
Member Author

lidel commented Aug 29, 2024

I don't think this will happen often, I think the long wait happens only when backend was just restarted, and Amino DHT is being mapped by FullRT client.

I've added stdout informing user that the backend is not ready yet in #55:

$ ./ipfs-check
Starting ipfs-check
...
2024/08/29 20:42:34 Please wait, initializing accelerated-dht client.. (mapping Amino DHT may takes 5 or more minutes)
...
2024/08/29 20:42:34 Accelerated DHT client ready
2024/08/29 20:46:59 Backend ready and listening on [::]:3333
...
2024/08/29 20:46:59 Ready to start serving.

@lidel lidel changed the title UI for setting timeout UI for setting check timeout Aug 29, 2024
@lidel lidel added dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours P2 Medium: Good to have, but can wait until someone steps up and removed need/triage Needs initial labeling and prioritization labels Aug 29, 2024
@2color
Copy link
Member

2color commented Aug 30, 2024

Thanks for pointing this out! This is indeed a problem when you start it locally and it runs the accelerated DHT (aka FullRT) by default.

Have <input type="range" allowing user to adjust timeout (e.g. between 30 seconds and 15 minutes?), and pass it to backend

We can also implement this on the frontend with an AbortSignal https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static which we'd handle on the backend using the context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants