Commit graph

19 commits

Author SHA1 Message Date
Scott Nonnenberg
26c273618a
Refactor: db tasks to database.js, log delete to modules/logs.js 2018-03-14 14:42:15 -07:00
Scott Nonnenberg
9acb189650
Remove config after unlink, clear db when linked with new number 2018-03-14 14:42:13 -07:00
Scott Nonnenberg
426dab85a2
New design for import/install, 'light' import (#2053)
- A new design for the import flow. It features:
  - Icons at the top of every screen
  - Gray background, blue buttons, thinner text
  - Simpler copy
- A new design for the install flow. It features:
  - Immediate entry into the QR code screen
  - Animated dots to show that we're loading the QR code from the server
  - Fewer screens: 1) QR 2) device name 3) sync-in-progress
- When not set up, the app opens directly into the install screen, which has been streamlined. The `--import` command-line argument will cause the app to open directly into the import flow.
- Support for two different flavors of builds - the normal build will open into the standard registration flow, and the import flavor will be exactly the same except during setup it will open directly into the import flow.
- A new design for the (dev-only) standalone registration view
- When these install sequences are active, the OS File menu has entries to allow you to switch the method of setup you'd like to use. These go away as soon as the first step is taken in any of these flows.
- The device name (chosen on initial setup) is now shown in the settings panel
- At the end of a light import, we hand off to the normal device link screen, starting at the QR code. On a full import, we remove the sensitive encryption information in the export to prevent conflicts on multiple imports.
- `Whisper.Backup.exportToDirectory()` takes an options object so you can tell it to do a light export.
- `Whisper.Backup.importFromDirectory()` takes an options object so you can force it to load only the light components found on disk. It also returns an object so you can tell whether a given import was a full import or light import.
- On start of import, we build a list of all the ids present in the messages, conversations, and groups stores in IndexedDB. This can take some time if a lot of data is in the database already, but it makes the subsequent deduplicated import very fast.
- Disappearing messages are now excluded when exporting
- Remove some TODOs in the tests
2018-02-22 10:40:32 -08:00
Scott Nonnenberg
66aa76e501
Log out information from DOMException when import fails (#1923)
This should give us the information we're looking for when imports fail
mysteriously!

https://developer.mozilla.org/en-US/docs/Web/API/DOMException
2018-01-04 16:26:41 -08:00
Scott Nonnenberg
abb83a895e
Move to e.target.error, transaction/request.error didn't work (#1785)
* Pull error properly from the indexeddb request

* Move to e.target.error, transaction/request.error didn't work
2017-11-21 15:24:04 -08:00
Scott Nonnenberg
bd65932d94
Import: Better onerror logging, save attachments serially (#1768)
* Import: Proper error handling and reporting from IndexedDB APIs

* Import: Load attachments one at a time, not per-conversation
2017-11-14 16:40:43 -08:00
Scott Nonnenberg
cae2b10af6
Increase web request timeout, drop failed delivery receipts (#1699)
Increase web request timeout, drop failed delivery receipts, export error logging
2017-11-07 10:49:10 -08:00
Scott Nonnenberg
845291c51e
Wait for IndexedDB transactions to complete for import scale (#1698)
* No longer reference 'Chrome App' on the start screen

* Imports are only complete when IndexedDB transaction is complete
2017-11-07 10:19:18 -08:00
Scott Nonnenberg
e2d9d855fb Fully eliminate debug from imported data (#1556)
FREEBIE
2017-10-11 14:41:32 -07:00
Scott Nonnenberg
3c45e9c350 Remove 'debug' from the list of stores we import (#1532)
Now that we log to disk, we no longer need the debug object store from
the Chrome export.

FREEBIE
2017-10-03 11:06:47 -07:00
Scott Nonnenberg
413fba80af
Separate dir selection from import, better import button text
This allows us to show the 'import in progress' screen only when the
user has successfully selected a directory.

FREEBIE
2017-09-14 17:02:46 -07:00
Scott Nonnenberg
ba347744ff
Import: choice on first startup, workflow, ported to Node.js fs API
FREEBIE
2017-09-14 17:02:43 -07:00
Scott Nonnenberg
cc6dcf67b7 Export: Limit attachment filename length, + convo date, + tests (#1439)
* Export: limit attachment names to 30 chars, tests for helper fns

Also, reintroduce last contact date in conversation dir name

FREEBIE

* MessageView tests: Fix failures during blanket coverage run

FREEBIE
2017-09-06 18:20:42 -07:00
Scott Nonnenberg
07abe2639f Export: Properly generate directory names for nameless groups (#1421)
FREEBIE
2017-09-01 07:33:30 -07:00
Scott Nonnenberg
94b63c39fd
Export: Remove " as one of the allowed characters in filenames
Turns out that it's not allowed on windows.

FREEBIE
2017-08-31 23:25:49 -07:00
Scott Nonnenberg
3f7fbd93d5 Export: Better disambiguate conversation directory names (#1409)
FREEBIE
2017-08-30 13:23:07 -07:00
Scott Nonnenberg
548586b934 Chrome export fixes: too-long names, redact group ids (#1402)
* On export, don't print out entire group id, just last three chars

FREEBIE

* Export: Limit conversation dirs to 30 characters of original name

FREEBIE

* Redact groups ids on import as well

FREEBIE

* InboxView: Protect against nonexistent loading screen

FREEBIE
2017-08-30 09:30:21 -07:00
Scott Nonnenberg
d31d1712b1
Bullet-proofing export scenarios: null attachments, no msgreceiver
FREEBIE
2017-08-28 13:20:53 -07:00
Scott Nonnenberg
c0cd733139 Full export, migration banner, and full migration workflow - behind flag (#1342)
* Add support for backup and restore

This first pass works for all stores except messages, pending some scaling
improvements.

// FREEBIE

* Import of messages and attachments

Properly sanitize filenames. Logging information that will help with
debugging but won't threaten privacy (no contact or group names),
where the on-disk directories have this information to make things
human-readable

FREEBIE

* First fully operational single-action export and import!

FREEBIE

* Add migration export flow

A banner alert leads to a blocking ui for the migration. We close the socket and
wait for incoming messages to drain before starting the export.

FREEBIE

* A number of updates for the export flow

1. We don't immediately pop the directory selection dialog box, instead
  showing an explicit 'choose directory' button after explaining what is
  about to happen
2. We show a 'submit debug log' button on most steps of the process
3. We handle export errors and encourage the user to double-check their
  filesystem then submit their log
4. We are resilient to restarts during the process
5. We handle the user cancelling out of the directory selection dialog
  differently from other errors.
6. The export process is now serialized: non-messages, then messages.
7. After successful export, show where the data is on disk

FREEBUE

* Put migration behind a flag

FREEBIE

* Shut down websocket before proceeding with export

FREEBIE

* Add MigrationView to test/index.html to fix test

FREEBIE

* Remove 'Submit Debug Log' button when the export process is complete

FREEBIE

* Create a 'Signal Export' directory below user-chosen dir

This cleans things up a bit so we don't litter the user's target
directory with lots of stuff.

FREEBIE

* Clarify MessageReceiver.drain() method comments

FREEBIE

* A couple updates for clarity - event names, else handling

Also the removal of wait(), which wasn't used anywhere.

FREEBIE

* A number of wording updates for the export flow

FREEBIE

* Export complete: put dir on its own line, make text selectable

FREEBIE
2017-08-28 13:06:10 -07:00