Summary:
We used to use a progress-based spinner, but we never get any progress
updates while downloading files, so the spinner was always at 0 and
never visible.
The submodule-commit is D3609, which adds support for inline images
Test Plan: tested locally
Reviewers: evan, spang
Reviewed By: spang
Differential Revision: https://phab.nylas.com/D3610
Summary: Second attempt at not linting the error logger and tiny lint cleanup
Test Plan: run the build
Reviewers: evan, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D3591
Summary:
We weren't removing the inbox category in the search perspective, so
things weren't actually being archived.
Test Plan: Run locally
Reviewers: juan, evan
Reviewed By: evan
Maniphest Tasks: T7389
Differential Revision: https://phab.nylas.com/D3575
Summary:
We want users to know that their account is still syncing if they're
looking for a message and end up at the bottom of a thread list.
This diff changes some of the wording around the messaging when
sync isn't complete and also adds a footer at the bottom of the
syncing thread lists. Additionally, we added a "Show Progress"
link that will expand the sync details in the lower left.
Addresses T7354
Test Plan: tested locally
Reviewers: juan, evan, jackie
Reviewed By: jackie
Differential Revision: https://phab.nylas.com/D3551
Summary:
This replaces the API delta stream with a direct in-memory one
Depends on D3548
Test Plan: manual
Reviewers: halla, jackie
Reviewed By: halla, jackie
Subscribers: juan
Differential Revision: https://phab.nylas.com/D3549
Summary: Also move calculation to sync store, rename stuff a little bit
Test Plan: Manual :(
Reviewers: evan, jackie, halla
Reviewed By: jackie
Differential Revision: https://phab.nylas.com/D3547
Summary:
Depends on D3544 (K2 diff)
This commit ensures that auth notifications are showed when the
underlying sync worker fails and are cleared when an account is
successfully reconnected
To achieve this, we manually keep track and update syncStates where
appropriate via `Actions.updateAccount`, given that we have access to
N1's version of the account directly from local-sync.
Initially I was considering account delta stream to the cloud-api and the local-api, but that
just complicated things more than it helped.
This commit also fixes a bug with refreshing the gmail token in which we
we were only attempting a token refresh upon restarting the app
This addresses: T7346, T7305, T7335
Test Plan: Manual
Reviewers: halla, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D3545
Summary:
Adds a UI component to see the progress of initial sync.
(The behavior is sometimes a little strange, but I believe this is
just because of weird behavior in the NylasSyncStatusStore itself.
For instance, it sometimes never populates the `folderSyncProgress`
fields, or it never sets the progress to 1, so the bar stops at 99%)
Test Plan: tested locally
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D3536
Summary: Adds a new button in auth for native Office 365 support
Test Plan: manual
Reviewers: jackie, halla, mark, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D3532
Summary:
With the fix to the delta-processor, this is all that's needed to
get mail rules working! Some places were trying to use 'accountId'
to access an account object's id, but it needs to be 'id' instead.
Test Plan: tested locally
Reviewers: jackie
Reviewed By: jackie
Differential Revision: https://phab.nylas.com/D3525
Summary:
We were returning an array of arrays, when really we wanted an object
of arrays keyed by model type. This also involved removing an implementation
of mapObject that was overwriting underscore's implementation of it.
Test Plan: local, having others try it.
Reviewers: juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D3509
Summary:
This commit fixes processing deltas for `ProviderSyncbackRequests` and
resolution of the `SyncbackTaskAPIRequest`
Specifically:
- Fix and update field definitions for `ProviderSyncbackRequest`
- Correctly parse the error attached to any `ProviderSyncbackRequest`
- Correctly process deltas for `ProviderSyncbackRequests` inside the
delta-processor
- Fix any tasks that used `SyncbackTaskAPIRequest`, and update send to use those
Depends on D3510
Test Plan: Todo/Manual
Reviewers: jackie, halla, evan
Reviewed By: halla, evan
Differential Revision: https://phab.nylas.com/D3511
Summary:
Addresses T7275
Previously, we kept track of the sync status of each API model, and the progress
we'd made syncing all available models (e.g. all threads, messages, events, etc)
Given K2's set up, we are now keeping track of sync status per folder, i.e. what
percent of the folder's messages we've synced. This status is now reported from K2
to N1 via folder object deltas, and this commit rewrites the
NylasSyncStatusStore (in ES6) to reflect that.
The new Store keeps the sync state per account, which is the merged state of
per folder sync state, and delta connections state.
We also got rid of `CategoryStore.whenCategoriesReady` in favor of
`whenCategoryListSynced`, which is derived from the fact hat as long as we've
started syncing one folder, we've already synced the entire list of of folders/labels.
There are a couple of TODOs to be addressed in upcoming diffs:
- T7329 Restore the sidebar component to show sync progress, which was previously removed
- T7330 Figure out how to report sync progress per label, specifically, we are interested in knowing how much of the inbox we've synced, which is a label in Gmail. (This might be a non-issue if we sync the inbox very fast, first)
Depends on D3514
Test Plan: Manual
Reviewers: mark, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D3515
More spec fixes
replace process.nextTick with setTimeout(fn, 0) for specs
Also added an unspy in the afterEach
Temporarily disable specs
fix(spec): start fixing specs
Summary:
This is the WIP fix to our spec runner.
Several tests have been completely commented out that will require
substantially more work to fix. These have been added to our sprint
backlog.
Other tests have been fixed to update to new APIs or to deal with genuine
bugs that were introduced without our knowing!
The most common non-trivial change relates to observing the `NylasAPI` and
`NylasAPIRequest`. We used to observe the arguments to `makeRequest`.
Unfortunately `NylasAPIRequest.run` is argumentless. Instead you can do:
`NylasAPIRequest.prototype.run.mostRecentCall.object.options` to get the
`options` passed into the object. the `.object` property grabs the context
of the spy when it was last called.
Fixing these tests uncovered several concerning issues with our test
runner. I spent a while tracking down why our participant-text-field-spec
was failling every so often. I chose that spec because it was the first
spec to likely fail, thereby requiring looking at the least number of
preceding files. I tried binary searching, turning on and off, several
files beforehand only to realize that the failure rate was not determined
by a particular preceding test, but rather the existing and quantity of
preceding tests, AND the number of console.log statements I had. There is
some processor-dependent race condition going on that needs further
investigation.
I also discovered an issue with the file-download-spec. We were getting
errors about it accessing a file, which was very suspicious given the code
stubs out all fs access. This was caused due to a spec that called an
async function outside ot a `waitsForPromise` block or a `waitsFor` block.
The test completed, the spies were cleaned up, but the downstream async
chain was still running. By the time the async chain finished the runner
was already working on the next spec and the spies had been restored
(causing the real fs access to run).
Juan had an idea to kill the specs once one fails to prevent cascading
failures. I'll implement this in the next diff update
Test Plan: npm test
Reviewers: juan, halla, jackie
Differential Revision: https://phab.nylas.com/D3501
Disable other specs
Disable more broken specs
All specs turned off till passing state
Use async-safe versions of spec functions
Add async test spec
Remove unused package code
Remove canary spec
Summary:
Pass in more details on sending errors, so that they can be viewed
more easily by clicking "Show Details", rather than having to check
the worker window console.
Test Plan: tested locally
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D3505
This commit will correctly keep track of folder and label ids when
creating them from N1.
Previously, when we sent the request to create a folder or label to our api,
we would immediately get back a serverId because it was created optimistically
in the back end— given that K2 is strictly non-optimistic, we won’t have a serverId
until some undetermined time in the future, and we need to somehow reference
the object that /was/ optimistically created in N1 to update the ui when
we do get the server id.
Since we can deterministically generate ids for folders and labels,
we "guess" what its going to be, and include it in the props of the syncback request
returned to N1. This is the simplest solution to get thing working
correctly right now, but we’ll need to revisit this in the future for
other types of objects (drafts, contacts, events), and revisit how we
will manage optimistic updates in N1 when we merge the 2 codebases
with K2 (given that K2 was designed to be non-optimisitc).
Since message IDs are now static but there's no good way to generate
static thread IDs while syncing an account from newest message first,
we give threads the ID of any message on that thread and, when setting
metadata, look up the local thread ID by first going through the
message table.
Also changed the DeltaProcessor so it doesn’t query for models before sending out `Actions.didPassivelyReceiveCreateDeltas`, and renames it to be more clear it’s about deltas.