-
Notifications
You must be signed in to change notification settings - Fork 325
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
feat: precached webui works in offline mode #782
Merged
Merged
Conversation
This file contains 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
lidel
commented
Oct 9, 2019
@@ -25,7 +25,6 @@ const chromeDefaultOpts = { | |||
Swarm: [ | |||
// optional ws-star signaling provides a backup for non-LAN peer discovery | |||
// (this will be removed when autorelay and DHT are stable in js-ipfs) | |||
'/dns4/ws-star1.par.dwebops.pub.com/tcp/443/wss/p2p-websocket-star', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was just a dev alias for ws-star.discovery.libp2p.io
lidel
force-pushed
the
feat/offline-webui
branch
from
October 11, 2019 16:41
ba37975
to
15f2be7
Compare
For now we add a TAR with Web UI as a PoC. Next step is to make it more generic. There should be a list of CIDs that should be recursively precached and added to node during the boot.
- async import of TAR archives - streaming where possible - makes webui open instantly in Chromium Known Issue: /api/v0/add does not work with latest js-ipfs, needs to be addressed before merging this to master.
lidel
force-pushed
the
feat/offline-webui
branch
from
October 15, 2019 12:03
15f2be7
to
073f058
Compare
lidel
force-pushed
the
feat/offline-webui
branch
2 times, most recently
from
October 16, 2019 11:17
ce27b0a
to
e5572f8
Compare
lidel
force-pushed
the
feat/offline-webui
branch
2 times, most recently
from
October 16, 2019 13:45
6aac086
to
625a826
Compare
5 tasks
hugomrdias
approved these changes
Oct 16, 2019
🎉🌈🍧⛄️
…On Thu, Oct 17, 2019 at 3:21 PM Marcin Rataj ***@***.***> wrote:
Merged #782 <#782>
into master.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#782>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMHN2VSMBVZNSE5ANRW6TQPDQPVANCNFSM4I5UNB3A>
.
|
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.
This PR adds precache logic for Web UI which is executed when IPFS API client (or full node) starts.
The main purpose is to make Web UI load instantly in Brave and work in offline environments.
closes #765, closes #682, part of #716 🦁
How does it work?
During the build .tar archives are placed in
add-on/dist/precache
.This makes them available to fetch over
*-extension://{extension-id}/dist/precache/*
URLs.Right now we have only one archive: a 22MB file with release version of Web UI.
When IPFS client starts, preache logic is executed:
*-extension://{extension-id}/dist/precache/*.tar
Checklist
(keeps a single place to update instead of two)
Known Issues
/api/v0/add
does not work with latest js-ipfs (and we can't use older version due to gc-lock bug breaking precache process)