Commit graph

5377 commits

Author SHA1 Message Date
Mark Hahnenberg 51f5ca5f9d [config] Refactor config to fail faster
Summary:
We're having some strange issues regarding corruption of the config
settings at runtime. This diff refactors the code to be more
straightforward and to be louder when things don't go as expected.

Test Plan: Run locally

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3828
2017-02-02 16:11:52 -08:00
Evan Morikawa 5dea41dc34 feat(db): extract db setup and don't send sync errors to config 2017-02-02 15:57:13 -08:00
Evan Morikawa a94e1a0127 bump(k2) 2017-02-02 15:41:41 -08:00
Juan Tejada d46cfc1cb4 feat(specs) Clean up local-sync database after each spec
Summary: Clean up k2's test database after each spec. Depends on D3826

Test Plan: unit

Reviewers: evan, halla, spang

Reviewed By: halla, spang

Differential Revision: https://phab.nylas.com/D3827
2017-02-02 14:52:22 -08:00
Juan Tejada cb9faea6f0 [local-sync] Small restructuring of local-sync specs
Summary: Make them map the same directory structure of `src`

Test Plan: unit

Reviewers: evan, halla, spang

Reviewed By: halla, spang

Differential Revision: https://phab.nylas.com/D3826
2017-02-02 14:48:26 -08:00
Evan Morikawa eac2346455 Revert "feat(config): move config to database"
This reverts commit 2112118332.
2017-02-01 18:04:58 -08:00
Halla Moore 288f6bfcdb fix(SyncActivity): Add keys to ellipsis components
Summary: Just a quick fix to remove the warning in the console

Test Plan: manual

Reviewers: mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D3823
2017-02-01 14:06:33 -08:00
Evan Morikawa 2112118332 feat(config): move config to database
Summary: Move config to the database

Test Plan:
Launch app before commit.
Launch on commit.
Confirm all settings and accounts stay the same.
Console.logged progress

Reviewers: mark, halla, spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3820
2017-02-01 13:36:30 -08:00
Christine Spang bf8818d208 fix(sync-status): Use sync progress from K2
Summary:
Sister diff to D3817

syncState on folders may contain arbitrarily long arrays of UIDs
(particularly, failedUIDs). If we serialize this JSON column to
edgehill.db, we can end up serializing very large objects when
persisting the local task queue. When the queue contains many tasks,
this can balloon the JSON blob to megabytes, causing the main window and
the worker window to become unresponsive.

The UI doesn't need to know about IMAP bookkeeping internals, so
serialize the sync progress instead of the sync state. This has the
advantages that (1) we don't need to worry about future keys added
to the syncState being large and (2) when we add Exchange support
we already have an abstraction for sync progress.

Test Plan: manual

Reviewers: juan, mark, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D3819
2017-02-01 07:16:35 -08:00
Christine Spang c6f371aa0f [local-sync] Serialize category sync progress to edgehill rather than syncState
Summary:
syncState on folders may contain arbitrarily long arrays of UIDs
(particularly, failedUIDs). If we serialize this JSON column to
edgehill.db, we can end up serializing very large objects when
persisting the local task queue. When the queue contains many tasks,
this can balloon the JSON blob to megabytes, causing the main window and
the worker window to become unresponsive.

The UI doesn't need to know about IMAP bookkeeping internals, so
serialize the sync progress instead of the sync state. This has the
advantages that (1) we don't need to worry about future keys added
to the syncState being large and (2) when we add Exchange support
we already have an abstraction for sync progress.

Test Plan: manual

Reviewers: juan, mark, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D3817
2017-02-01 07:15:33 -08:00
Evan Morikawa e4ce1f8e1e bump(version): 1.0.20 2017-02-01 06:58:37 -08:00
Evan Morikawa 7223b6b833 bump(k2) 2017-02-01 06:57:41 -08:00
Evan Morikawa efba50bd9f [local-sync] properly cleanup broken messages 2017-02-01 06:57:30 -08:00
Evan Morikawa 0777c81e34 bump(k2) 2017-02-01 06:24:17 -08:00
Evan Morikawa 04ff46eb04 [local-sync] fix cleanup of sent messages 2017-02-01 06:24:03 -08:00
Evan Morikawa 4de572bff5 bump(changelog) 2017-01-31 18:04:30 -08:00
Evan Morikawa 2a543ac8de bump(version): 1.0.19 2017-01-31 18:01:30 -08:00
Evan Morikawa 7a8fb26773 bump(k2) 2017-01-31 18:01:09 -08:00
Evan Morikawa 47f1f440d7 [local-sync] fixed issue where single digit date would create dupes 2017-01-31 18:00:42 -08:00
Mark Hahnenberg 4a70eb563c [composer] s/console.warning/console.warn/
Summary: See title

Test Plan: yolo

Reviewers: juan

Differential Revision: https://phab.nylas.com/D3818
2017-01-31 16:38:51 -08:00
Evan Morikawa 5d7b7574b9 bump(k2) 2017-01-31 16:35:51 -08:00
Juan Tejada 4769d4d476 [local-sync] Save error when clearing tasks INPROGRESS 2017-01-31 15:59:56 -08:00
Juan Tejada 70477f54f5 Properly handle non-api errors in account delta conn 2017-01-31 12:45:57 -08:00
Juan Tejada b47e39e229 [local-sync] Imrpove error handling in delta connections
Summary:
We were mostly ignoring errors in our delta streaming connections. This
commit makes it so that if we get an authentication error from n1Cloud we mark the
account as invalid so users know to re authenticate, and can properly receive metadata deltas

If the error is not an authentication error, it automatically retries
the delta connection.

Addresses T7744

Test Plan: manual

Reviewers: evan, spang, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D3813
2017-01-31 12:07:27 -08:00
Evan Morikawa 83744c73d0 Add redis back into pm2 2017-01-31 10:57:24 -08:00
Juan Tejada 7029653c00 [local-sync] Retry syncback tasks that throw retryable errors
Summary:
This will prevent us from showing error messages to the user when we
can automatically recover from the error

Test Plan: manual-- throw error from syncback task, check expected results

Reviewers: evan, mark, spang

Reviewed By: spang

Differential Revision: https://phab.nylas.com/D3812
2017-01-31 10:54:18 -08:00
Juan Tejada 71959b44fb [local-sync] Account for additional IMAP retryable errors
Summary:
There are 2 types of IMAP errors that need to be treated as retryable. See code
comments as to why.

Test Plan: manual

Reviewers: khamidou, evan, spang

Reviewed By: spang

Differential Revision: https://phab.nylas.com/D3811
2017-01-31 10:53:43 -08:00
Juan Tejada 6aa5ad509a 🎨 remove outdated comments 2017-01-30 22:28:38 -08:00
Juan Tejada 952bedf794 bump(k2) 2017-01-30 22:00:17 -08:00
Juan Tejada 9abcf7e8d8 [local-sync] Report permanent sync errors to sentry 2017-01-30 21:59:03 -08:00
Halla Moore 091ebe9de6 update(docs): Add note about Linux dependencies 2017-01-30 16:14:48 -08:00
Evan Morikawa 9bc87c1ba1 bump(electron): bump electron to 1.4.15 2017-01-30 15:55:13 -08:00
Evan Morikawa 1d6f634e1c fix(ci): add linux dependencies for keyboard-layout plugin build
https://github.com/atom/keyboard-layout/issues/27
2017-01-30 15:40:52 -08:00
Evan Morikawa 96152f9449 bump(version): 1.0.18 2017-01-30 15:23:57 -08:00
Evan Morikawa cbde218488 bump(changelog): 1.0.18 2017-01-30 15:23:41 -08:00
Mark Hahnenberg 173ac2bd1a [composer] Fix weird refocusing when plugins load
Summary:
We weren't properly keeping track of the focus state in the ComposerView which
would cause us to lose track of what was focused when plugins were eventually
loaded.

Test Plan: Run locally, verify that we don't lose focus

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3801
2017-01-30 14:42:41 -08:00
Mark Hahnenberg 70a04aff19 [composer] Fix autoclearing of participants field in composer
Summary:
Occasionally, if the composer plugins took too long to load, the user would
start typing only to have their text blown away when the plugins finally came in.
This was caused by carelessly overwriting the TokenizingTextField's stored
inputValue state in componentWillReceiveProps. Now we don't do that!

Test Plan: Run locally, make sure things don't get blown away

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3806
2017-01-30 13:44:27 -08:00
Mark Hahnenberg aa384567f0 [perf] Fix CSS animation for ellipses in "Syncing your mailbox"
Summary:
This animation was changing the width of the after pseudoelement, which was
causing a lot of repainting and layout to occur in the very bottom corner of
the screen. This in turn caused an idle window to use 50-70% CPU all the
time during initial sync. The fix is to change the after element to three
spans and modify the animation to alter their opacity which avoids having to
do style and layout reflows due to width changes. It also looks slightly cooler
IMHO :-) An idle main window now sits around 8% CPU on my laptop.

Test Plan: Run locally, verify that CPU is lower.

Reviewers: evan, juan

Reviewed By: juan

Subscribers: halla

Differential Revision: https://phab.nylas.com/D3810
2017-01-30 13:43:12 -08:00
Michael Grinich 8bd013e9e9 Update docs config
- Don't ignore built class docs
- pin requirement versions for docs
- update docs build instructions
- update repo URL
2017-01-30 13:05:36 -08:00
Evan Morikawa bf0aa51148 fix(rename): update nylas/N1 to nylas/nylas-mail Github references 2017-01-30 11:50:39 -08:00
Evan Morikawa e2d201c4b7 [*] update nylas/N1 to nylas/nylas-mail GitHub link 2017-01-30 11:50:15 -08:00
Evan Morikawa 4fadcfdc89 fix(rename): remove n1-next references & update changelog link 2017-01-30 11:40:03 -08:00
Juan Tejada ab5e5af7a9 bump(k2) 2017-01-30 11:39:18 -08:00
Michael Grinich 70acab2665 Update README.md 2017-01-30 03:18:52 -08:00
Michael Grinich d51a99d020 Add built docs 2017-01-30 02:49:48 -08:00
Forbes Lindesay 7347861f06 Add the GitHub community plugin (#3197) 2017-01-30 02:47:35 -08:00
Richard Lai ca0d9eb0a4 Fix typo (#3173) 2017-01-30 02:47:28 -08:00
Paul Xu 6df5f68ff1 Normalized size of buttons in preferences (fixes #2753) (#3112)
Normalized size of buttons across signature, accounts and mail rules preferences. Also make signature pane same size as other preference panels
2017-01-30 02:47:15 -08:00
John Oksasoglu dad69b272f Fix link to Flux diagram in Architecture.md (#3147)
It looks like the location of the Flux architecture diagrams got moved around on the Flux docs; this change updates the link here to the new location of the diagram.
2017-01-30 02:46:58 -08:00
Michael Grinich 6e1ba41686 Merge branch 'master' into n1-next 2017-01-30 02:45:57 -08:00