Commit graph

5714 commits

Author SHA1 Message Date
Evan Morikawa 3614f1e2f2 feat(build): build DMG
Summary:
We need people to manually drag into their /Applications folders due to
OSX gatekeeper protections.

Test Plan: manual

Reviewers: juan, khamidou

Reviewed By: khamidou

Differential Revision: https://phab.nylas.com/D3756
2017-01-20 12:01:07 -08:00
Evan Morikawa ea5c9db46e bump(k2) 2017-01-20 10:25:15 -08:00
Juan Tejada 0a12608971 [local-sync] Never show red box on retryable errors
Summary:
Given that we were marking the account as errored if we've encountered
enough RetryableErrors, we would show the red box to the user when in
fact the problem was the user was offline, causing confusion

If the user is offline, we will constantly get RetryableErrors in the
sync loop, and we can't mark the account as errored in that case.

Test Plan: manual

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3752
2017-01-20 10:16:28 -08:00
Juan Tejada 5025dbe080 🎨 Error message 2017-01-19 23:33:22 -08:00
Christine Spang fb8fc9f9e8 [local-sync] typo fix 2017-01-19 19:27:50 -08:00
Karim Hamidou 9b40df95b4 [mini-feat] Display the IMAP commands we're sending when NYLAS_DEBUG is set.
Makes debugging a bit easier.
2017-01-19 16:59:27 -08:00
Juan Tejada 49bb85ff96 fix(auth) Don't show error message when auth is successful 2017-01-19 16:44:42 -08:00
Juan Tejada 9c782bd479 fix(auth) Increment timeout for requests that initiate imap connections 2017-01-19 16:06:37 -08:00
Juan Tejada 27be619642 🎨 2017-01-19 15:37:01 -08:00
Juan Tejada 1cc2f296ab update(changelog) 2017-01-19 15:30:06 -08:00
Halla Moore 0bd7ecd740 bump(version) 2017-01-19 11:39:50 -08:00
Halla Moore 336451969b bump(changelog) 2017-01-19 11:39:50 -08:00
Evan Morikawa 9095e0a091 fix(changelog): link to correct changelog 2017-01-19 11:28:50 -08:00
Juan Tejada fc19cf03c3 bump k2 2017-01-19 11:25:43 -08:00
Juan Tejada 76ce0d6e2f [local-sync]: Token error handler fix 2017-01-19 11:25:31 -08:00
Juan Tejada 83b57be19f [local-sync] Properly handle errors when refreshing tokens
Summary:
This commit ensures that we handle transient errors correctly when refreshing
tokens

Test Plan: manual

Reviewers: khamidou, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3740
2017-01-19 11:16:27 -08:00
Juan Tejada 38ea173b2b fix(error-mgmt): Add a few improvements to error management
Summary:
- Add a new button to the sync error notification to "Debug" sync. This will open the activity window and dev tools in that window. Depends on D3736
- Update the "Contact Support" link in error notifications to prepopulate the support ticket with the sync error in the account
- Make the "Check Again" button react when clicking it

Test Plan: manual

Reviewers: evan, khamidou

Reviewed By: evan, khamidou

Differential Revision: https://phab.nylas.com/D3737
2017-01-19 10:53:04 -08:00
Juan Tejada f09bc902a0 [local-sync] Add a few improvements to error management
Summary:
In the sync worker:
- Move the backoff logic inside `scheduleNextSync`, where all logic to schedule the next sync loop now lives
- If we've retried a RetryableError a bunch of times, show the error to the user, otherwise the user might think the app is not working for no reason
- Clean up logging

In the message processor:
- Report message processing errors to sentry!

Sync Process Manager:
- Listen to new `Actions.debugSync` to show the Activity Window and open dev tools

Test Plan: manual

Reviewers: khamidou, evan

Reviewed By: khamidou, evan

Differential Revision: https://phab.nylas.com/D3736
2017-01-19 10:52:21 -08:00
Evan Morikawa b9826d6685 bump(k2) 2017-01-19 10:46:33 -08:00
Mark Hahnenberg 157501130b [thread-search] Add loadFromColumn option to Attribute
Summary:
The isSearchIndexed attribute gets bulk reset when we drop the search
index, however, the JSON values were not updated to reflect the new
column values. We don't care about notifications to this field, so in
order to make bulk clearing ok this diff adds a new loadFromColumn option to
Attributes which causes the value to be loaded from the SQL table column
rather than the JSON blob.

Test Plan:
Run locally, drop the search index, make sure we load from the
column rather than the JSON when re-indexing

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3739
2017-01-19 10:22:32 -08:00
Juan Tejada b4ef3f47a7 [local-sync] Batch imap operations in syncback tasks for faster performance
Summary:
This commit makes it so our syncback tasks send as few imap commands as possible by passing a set of UIDs whenever possible. Previously, we would send 1 command per message, with a single UID, which was very wasteful given that we can pass a set of UIDs. This is especially helpful for operating on threads with a large number of messages.

Syncback actions will now group all messages in a thread by the folder they belong to, and issue a single operation on the folder box. When removing all labels from a thread (setting labels to []), we need to issue a command of the form `box.delLabels(uids, labels)`, so we also group messages by set their set of labels to issue as few commands as possible.

This commit only batches imap commands, but we can still batch syncback actions themselves, which can be implemented in a separate patch.

Test Plan: manual

Reviewers: evan, mark, spang

Reviewed By: spang

Subscribers: halla, mg

Differential Revision: https://phab.nylas.com/D3719
2017-01-19 09:53:34 -08:00
Juan Tejada 85c9439f8f fix(offline-notif): Add some offline notification improvements
Summary:
- Make the try again button react when clicked
- Don't mark as offline until after we've tried again at least 3 times

Test Plan: manual

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3738
2017-01-18 22:09:43 -08:00
Evan Morikawa 735c7faa73 fix(auth): Gmail auth screen now shows error states
Summary:
- Refactor Gmail auth functions
- Add Analytics in
- Show error states

Depends on D3735

Test Plan: manual

Reviewers: khamidou, juan

Reviewed By: khamidou, juan

Differential Revision: https://phab.nylas.com/D3732
2017-01-18 17:44:22 -08:00
Evan Morikawa 23bd05a514 fix(db): reset db if we encounter malformed error
Summary:
Very occasionally the db can become malformed for some reason. If this
happens all DB requests will fail and flood sentry with errors. This will
attempt to reset the db if we encounter this error

Depends on D3730

Test Plan: manual

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3731
2017-01-18 17:31:23 -08:00
Evan Morikawa a124b6c100 [local-sync] protection from reset action being double-fired
Summary: Double-firing protection since the DatabaseStore can now fire this

Test Plan: manual

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3730
2017-01-18 17:30:30 -08:00
Evan Morikawa 02cf6fbf6e [isomorphic-core] have IMAP auth retry
Summary: IMAP auth retries

Test Plan: manual

Reviewers: khamidou, juan

Reviewed By: khamidou, juan

Differential Revision: https://phab.nylas.com/D3735
2017-01-18 17:29:58 -08:00
Juan Tejada 4e86d26478 [*] Increment default timeout connection
Summary:
We are getting to many imap timeout connection errors because the
authTimeout was just 5 secs

Test Plan: manual

Reviewers: khamidou, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3733
2017-01-18 14:05:27 -08:00
Juan Tejada 05fd276ec7 [cloud-api] Improve auth error logging 2017-01-18 13:36:50 -08:00
Evan Morikawa dfd4693dce fix(err) re-add Draft Sending Errored event into Nylas Mail 2017-01-18 12:07:58 -08:00
Mark Hahnenberg 9120c598e7 [thread-search] Update Thread search index version
Summary:
We changed the index format (splitting participants into to and from) so
we need to update the index version so that it gets rebuilt.

Test Plan: Run locally, make sure index gets rebuilt

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3728
2017-01-18 11:31:31 -08:00
Juan Tejada 74bbfcea8b bump k2 2017-01-18 11:00:46 -08:00
Juan Tejada 9898349f23 fix(add-account) Increment delay before expanding sidebar 2017-01-18 11:00:46 -08:00
Mark Hahnenberg c695735cc2 [thread-search] Split 'participants' index into 'to' and 'from'
Summary:
Previously we indexed all participants together for a single thread.
This lead to confusing search results when people would search for
'from' and get back lots of results that were only 'to'. This diff
splits the participants index into separate to and from indices and
updates the query generator appropriately.

Fixes T7580

Test Plan: Run locally, verify from doesn't return to and vice versa.

Reviewers: evan, juan

Reviewed By: juan

Maniphest Tasks: T7580

Differential Revision: https://phab.nylas.com/D3724
2017-01-18 10:41:20 -08:00
Juan Tejada 7c99e9c55f 🎨 2017-01-18 10:35:25 -08:00
Juan Tejada e1f1b22ee2 [local-sync] Ensure all imap operations are wrapped with timeout
Summary:
Specifically, these imap connections have been known to hang when you close your laptop or go offline/online, even though we are passing a `socketTimeout` to node-imap. When they hang, everything freezes because the promise waiting for the result never resolves.

`_createConnectionPromise` wraps the operations with a timeout we implemented ourselves, and correctly rejects on timeout.

This commit wraps other imap operations that were missing. (I notices because I encountered the hanging on one of these operations)

Test Plan: manual

Reviewers: evan, mark, spang

Reviewed By: spang

Differential Revision: https://phab.nylas.com/D3720
2017-01-18 10:24:26 -08:00
Evan Morikawa fc3e891fe9 bump(version): 1.0.9 2017-01-17 16:33:16 -08:00
Evan Morikawa 6345af593d bump(changelog) 2017-01-17 16:33:02 -08:00
Juan Tejada 051011b4c3 fix(offline-notif) Make it less aggressive
Summary: Add a timeout before displaying the offline notif

Test Plan: manual

Reviewers: halla, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3727
2017-01-17 16:32:01 -08:00
Juan Tejada 8be7ce762e add comment 2017-01-17 16:31:07 -08:00
Evan Morikawa 900c3ed6aa bump(changelog) 2017-01-17 16:18:27 -08:00
Evan Morikawa 26ebb6df0d fix(db): don't assert transaction anymore 2017-01-17 16:05:02 -08:00
Juan Tejada 38fee51a13 fix(logging) Don't log error out unecessarily 2017-01-17 13:16:45 -08:00
Evan Morikawa 25727badba fix(clearbit): catch API errors 2017-01-17 12:42:40 -08:00
Evan Morikawa 3afff343cb fix(pref): remove default send preferences for now in basic 2017-01-17 12:27:45 -08:00
Halla Moore f407d5e430 rm(provider-setting): Remove duplicate "fastmail.com" 2017-01-17 08:49:21 -08:00
Halla Moore 0902d99678 fix(onboarding): Change how we determine default IMAP settings
Summary:
If we don't have IMAP settings for a particular email domain,
try to choose based on which provider was selected instead.

Fixes #3168

Test Plan: tested locally

Reviewers: spang, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3721
2017-01-17 08:47:35 -08:00
Evan Morikawa 0b700c424c bump(version): 1.0.8 2017-01-16 20:21:39 -08:00
Evan Morikawa 368cb27db7 bump(k2) 2017-01-16 20:21:28 -08:00
Juan Tejada aa53484568 fix(accounts) Make account adding look fast 2017-01-16 20:18:48 -08:00
Christine Spang 944b677d3e [local-sync] Set threading headers when uploading message to Sent folder
Summary:
We weren't, which meant that us sending with multi-send or generic IMAP
broke threading. :(

Test Plan: manual

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3718
2017-01-16 20:17:44 -08:00