Commit graph

183 commits

Author SHA1 Message Date
Evan Morikawa 8e355ba476 [client-app] fix hardcoded babelrc path for appveyor 2017-03-03 14:28:59 -08:00
Evan Morikawa 3eb05713df [client-app] update appveyor
Summary:
This updates the appveyor file to get the app building on windows too!

See https://ci.appveyor.com/project/nylas/nylas-mail-all

Test Plan: Run https://ci.appveyor.com/project/nylas/nylas-mail-all

Reviewers: juan, spang, jerm

Differential Revision: https://phab.nylas.com/D4000
2017-03-03 14:22:38 -08:00
Evan Morikawa 42a0fa033e [client-app] fix keychain issue on OSX build 2017-03-02 17:56:09 -08:00
Mark Hahnenberg 9ec7b57f9a [client-app] Add proper IMAP search backend
Summary:
Previously for IMAP we just grabbed the search text and fed it into a TEXT
query. Now we have a proper backend that generates the appropriate
search criteria according to the IMAP spec. Important to note that we
don't support 'in:' yet, which is complicated due to the way that IMAP
search is scoped to the currently selected folder.

Test Plan: Run tests, run locally and verify IMAP search still works.

Reviewers: evan, juan, spang

Reviewed By: juan, spang

Differential Revision: https://phab.nylas.com/D4071
2017-03-02 14:50:35 -08:00
Juan Tejada 04fab196f2 bump(version) 1.0.31 2017-03-02 12:10:50 -08:00
Halla Moore be805f7b5a [client-app, client-private-plugins] Update the pending send-reminders UI
Summary:
- Add an icon to threads that have reminders set
- Show the pending reminder message header in all perspectives, rather than
    just the Reminders perspective
- Add the ability to clear the reminder from the message header
- Condense the message header text

Test Plan: manual

Reviewers: evan, juan

Reviewed By: evan, juan

Subscribers: sdw

Differential Revision: https://phab.nylas.com/D4052
2017-03-02 09:52:30 -08:00
Juan Tejada 1f45c58aad [client-app] Report 100% of search performed events
Summary:
Gleb mentioned that we need the sample size of search events to be
bigger, so let's report all search events

Test Plan: manual

Reviewers: evan, gleb, mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D4077
2017-03-01 14:56:25 -08:00
Juan Tejada 6cc8d0c997 [client-app] Correctly import nylas-api-helpers 2017-03-01 14:06:00 -08:00
Evan Morikawa 53465515b0 [client-app] replace setImmediate with setTimeout as Promise scheduler
Summary:
This changes the scheduler from `setImmediate` to `setTimeout`. The HUGE
difference is that Chrome's async stack traces works with `setTimeout` but
does NOT work with `setImmediate`. These two functions are adjacent to
each other in the Node event loop, so nothing should depend on the change
in ordering.

Test Plan: manual

Reviewers: mark, spang, halla, juan

Reviewed By: spang, halla

Differential Revision: https://phab.nylas.com/D4068
2017-03-01 12:16:54 -08:00
Evan Morikawa 4de32d2828 [client-app] use new Bluebird preferred longStackTraces syntax
Summary: Bluebird changed the way you call `longStackTraces`. This uses the latest

Test Plan: manual

Reviewers: spang, halla, juan

Reviewed By: spang, halla

Differential Revision: https://phab.nylas.com/D4067
2017-03-01 12:15:46 -08:00
Evan Morikawa 756c80a7ce [client-app] remove unused async message body loading & returnsModel
Summary:
We no longer optimistically fetch messages when we load their bodies. We
always get the full message with bodies returned via the in memory delta
stream

Test Plan: manual

Reviewers: spang, halla, juan

Reviewed By: spang, halla, juan

Differential Revision: https://phab.nylas.com/D4066
2017-03-01 12:15:18 -08:00
Evan Morikawa ba1f429928 [client-app] deprecate returnsModel param for nylas-api-request
Summary:
We no longer need to use the `returnsModel` param since we get all of our
models through the in memory delta stream. There were a ton of places
unnecessarily passing `returnsModel: false` when it defaults to false in
the first place

Depends on D4057

Test Plan: manual

Reviewers: halla, spang, juan

Reviewed By: spang, juan

Differential Revision: https://phab.nylas.com/D4065
2017-03-01 12:13:08 -08:00
Evan Morikawa abaf63202c [client-app] deprecate ensureOnce for NylasAPI requests
Summary:
We no longer use the `ensureOnce` bit.

Depends on D4057

Test Plan: manual

Reviewers: spang, halla, juan

Reviewed By: halla, juan

Differential Revision: https://phab.nylas.com/D4064
2017-03-01 12:12:28 -08:00
Evan Morikawa 65ae74d21e [client-app] deprecate beforeProcessing in nylas-api-request
Summary:
This removes the last reference to a now unused `beforeProcessing` feature
of the Nylas API Request.

Depends on D4057

Test Plan: manual

Reviewers: spang, halla, juan

Reviewed By: halla, juan

Differential Revision: https://phab.nylas.com/D4063
2017-03-01 12:11:59 -08:00
Evan Morikawa fb94ff32f7 [client-app] have account store handle API auth errors
Summary:
The old  NylasAPIRequest helper class used to do all sorts of run-time
requiring to attempt to notify of auth errors when 401s and 403s came up
in a request. We now move that logic to the AccountStore where it belongs.

Depends on D4057

Test Plan: Manual

Reviewers: spang, halla, juan

Reviewed By: halla, juan

Differential Revision: https://phab.nylas.com/D4060
2017-03-01 12:11:13 -08:00
Evan Morikawa 787e13a0d2 [client-app] refactor nylas-api-request
Summary:
This greatly refactors the NylasAPIRequest object to be more single
purpose, easier to read, async-ified.

It also fixes issues where long stack traces weren't being reported bcause
`reportError` was being called before the error had time to make it
through Bluebird's rejection handler (which adds back in the long stack
traces).

This also fixes an issue where ignorable errors (like 404s,
ESOCKETTIMEDOUT) were being reporting to Sentry.

This also fixes subtle conditions where the request run would throw mixed
error types (sometimes regular `Error`s, sometimes `APIError`s).

The old class used to handle logging people out on 401s. This is now moved
to the AccountStore in a different diff.

We've also deprecated the `returnsModel` param in a separate diff.

This deprecates the `PriorityUICoordinator` since we no longer need to
worry about frequently making expensive API requests to pull down data
like we used to in the old cloud-based API.

This deprecates `ensureOnce` param in a separate diff.

Test Plan:
Manually boot app. Check regular 404s don't throw. Check requests get
through. Check special ESOCKETTIMEDOUT type errors are properly handled

Reviewers: juan, spang, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D4057
2017-03-01 12:10:38 -08:00
Mark Hahnenberg 2d2621d2f3 [client-app] Refactor search query codegen into proper backend
Summary:
Previously we were using the raw visitors that were confined to the flux
attributes directory. We're going to add more search query backends, so this
is mostly just moving things to a new, more general place.

Test Plan:
Run locally, verify parser specs still work, verify in-app search
still works.

Reviewers: spang, evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D4053
2017-03-01 11:53:03 -08:00
Juan Tejada b6a1fc5234 [client-app] Fix measurement of thread-list action metrics
Summary:
We detect when a thread is removed from the thread-list by listening to
`Actions.threadListDidUpdate`. However, we were not firing the action at
the correct moment.

Before this commit, we fired the action on the root `ThreadList`'s
`componentDidUpdate`, however did this not actually fire when the
child list actually updated/removed threads from the list.

This sort of used to work because before 396a027bcb
the root ThreadList component re-rendered all the time, so it fired the
action, but after initial sync, we would never actually report any
thread-list action metrics at all

Test Plan: manual

Reviewers: spang, halla, evan

Reviewed By: halla, evan

Differential Revision: https://phab.nylas.com/D4051
2017-02-28 14:07:52 -08:00
Juan Tejada d3381b7446 [client-app] Update changelog 2017-02-28 13:19:34 -08:00
Christine Spang 26d247bd97 [client-app] Actually fix send+archive
The previous fix only worked by coincidence. It turns out that we don't have
the right data to associate draftClientId with ChangeMailTask on task
creation, so we have to either look up this data inside the dependency
function or make the dependency check looser.

This check gets run all the time, so we chose to make the check looser
rather than putting a db call in here and changing the interface to support
an async version of isDependentOnTask().

This patch also makes it so that the fix works properly when Undo Send
is enabled.

Fixes T7889
2017-02-28 12:38:14 -08:00
Christine Spang 1d90f7f770 [client-app] Fix ChangeMailTask dependency on SendDraftTask
Because ChangeMailTask only depended on EnsureMessageInSentFolder task,
if a user sent a message & then archived it before the send completed,
the ChangeMailTask could run in between the SendDraftTask and
EnsureMessageInSentFolderTask and fail because it's
EnsureMessageInSentFolderTask that detects the new UID for the message.

Fixes T7889
2017-02-28 12:12:39 -08:00
Juan Tejada 3f726d4d0b [client-app] Update changelog 2017-02-28 12:12:10 -08:00
Juan Tejada 19d504524b bump(version) 1.0.30 2017-02-28 11:48:28 -08:00
Juan Tejada de0e30d8dd Revert "[client-app] Limit search to focused perspective"
Temporarily reverting this commit for 1.0.30 release.
See https://phab.nylas.com/T7910 for details
This reverts commit da6bc473f8.
2017-02-28 11:07:44 -08:00
Juan Tejada 0294db95cf Revert "[client-app] Properly re-index threads when their data has changed"
Temporarily reverting this commit for 1.0.30 release because it is causing
performance issues: https://phab.nylas.com/T7910

This reverts commit 5e35d39eb2.
2017-02-28 10:35:58 -08:00
Juan Tejada 5714a23501 [client-app] Remove contact support btn from red box
Summary: See title

Test Plan: manual

Reviewers: evan, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D4049
2017-02-28 10:27:58 -08:00
Juan Tejada 396a027bcb [client-app] Prevent unnecessary re-rendering of thread-list
Summary:
This commit adds a `shouldComponentUpdate` to thread-list.cjsx so that
the thread list doesn't unnecessarily /try/ to re-render when state or
props haven't actually changed.

I noticed this because the thread list was constantly calling `render`
even though it didn't render any changes to the DOM. This was caused
because it listens to `NylasSyncStatusStore` which constantly triggers,
even though the piece of state the list is interested in rarely changes,
causing unnecessary calls to the `render` loop.

Test Plan: manual

Reviewers: halla, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D4047
2017-02-28 10:04:31 -08:00
Juan Tejada 72613baf5d [client-app] Fix selecting and creating signatures in preferences
Summary:
This commit fixes 2 issues with signatures in the preferences:
- Creating a signature (via any of the create buttons) would create 2 signatures
- Trying to select accounts to associate with a signature in the preferences would not work (the account would not be selected)

This was a regression introduced in e638e94084 (diff-4f38fd25aa24b48a309354be643165d3R26)

3111c16 made it so we attempt to `activate` any Stores that are registered with
the StoreRegistry. When adding stores to `nylas-exports`, they are
automatically registered in the StoreRegistry. Given that the
`SignatureStore` is in `nylas-exports`, and consequently is registered in
the StoreRegistry, it would be `activate`d upon window boot.

However, we were also manually activating it inside `internal_packages/composer-signatures/lib/main.es6`.
This caused it to register listeners for every action **twice**. For
this reason, 2 signatures would be created when trying to create 1, and
an account would be immediately unselected after being selected int he
signatures dropdown in preferences.

(Other changes in this are just stylistic)

Test Plan: manual

Reviewers: spang, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D4043
2017-02-28 09:14:28 -08:00
Juan Tejada 5e35d39eb2 [client-app] Properly re-index threads when their data has changed
Summary:
When we detect that threads in the database have changed, if they've already
been indexed, mark them as unindexed so that the indexer picks them up and
re-indexes them with the updated data

Test Plan: manual

Reviewers: evan, spang, mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D4023
2017-02-23 17:52:09 -08:00
Juan Tejada e6b35497b8 [client-app] When reporting search metrics, clip all times to a range
Summary:
When reporting different times to mixpanel other than `actionTimeMs` via
recordPerfMetric, we also want to clip those times to a range to have
good data in mixpanel

This commit adds an extra option to recordPerfMetrics to be able to clip
data other than the default `actionTimeMs`, and uses the new option to
report search metrics

Test Plan: manual

Reviewers: spang, evan, halla, mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D4038
2017-02-23 17:42:27 -08:00
Juan Tejada f1ed46d144 [client-app] Sample metrics reporting of actions we're keeping track of
Summary:
I'm making these up based on gut feeling, so feel free to completely change
these.

Test Plan: manual

Reviewers: spang, mark, evan

Reviewed By: mark, evan

Differential Revision: https://phab.nylas.com/D4026
2017-02-23 17:40:22 -08:00
Juan Tejada 49586e2e06 [client-app] Fix passing in nylasId and accountId to report metrics
Summary: This was really broken

Test Plan: manual

Reviewers: halla, mark, evan

Reviewed By: mark, evan

Differential Revision: https://phab.nylas.com/D4021
2017-02-23 16:35:33 -08:00
Juan Tejada ad1a192b53 [client-app] Report source when reporting open times for accts window
Summary: See title

Test Plan: manual

Reviewers: mark, halla, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D4020
2017-02-23 16:17:50 -08:00
Juan Tejada aeddc92e8e [client-app] Measure and report search perf metrics
Summary: See title

Test Plan: manual

Reviewers: evan, spang, halla, mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D4019
2017-02-23 16:02:22 -08:00
Juan Tejada 7cd5128db4 [client-app] Measure and report app boot time
Summary: See title

Test Plan: manual

Reviewers: spang, mark, evan, halla

Reviewed By: mark, evan, halla

Differential Revision: https://phab.nylas.com/D4018
2017-02-23 16:01:07 -08:00
Mark Hahnenberg da6bc473f8 [client-app] Limit search to focused perspective
Summary:
Previously we would always search all mail. Now, if the user has focused
a particular folder we will limit our search to that folder. The inbox
is an exception--it will always search all mail unless the user
explicitly uses an "in:" clause.

Test Plan: Run locally, verify that searching folders returns the correct results.

Reviewers: evan, spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D4032
2017-02-23 13:36:45 -08:00
Juan Tejada 18bf86769d [client-app] Update changelog 2017-02-23 10:52:14 -08:00
Juan Tejada feda238d9c [client-app] Measure and record times for opening account windows
Summary: See title

Test Plan: manual

Reviewers: spang, halla, evan

Reviewed By: halla, evan

Differential Revision: https://phab.nylas.com/D4017
2017-02-22 17:09:42 -08:00
Juan Tejada ecf3709669 [client-app] Measure and report composer window open times
Summary: To Mixpanel and Honeycomb.

Test Plan: manual

Reviewers: spang, halla, evan

Reviewed By: halla, evan

Differential Revision: https://phab.nylas.com/D4016
2017-02-22 17:08:31 -08:00
Juan Tejada b819889b36 [client-app] Measure and report task performLocal times
Summary: See title

Test Plan: manual

Reviewers: evan, spang, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D4015
2017-02-22 16:47:15 -08:00
Juan Tejada ae9aede300 [client-app] Measure and report sending times
Summary: See title

Test Plan: manual

Reviewers: spang, halla, evan

Reviewed By: halla, evan

Differential Revision: https://phab.nylas.com/D4014
2017-02-22 16:45:08 -08:00
Juan Tejada 4c57fcfab4 [client-app] Measure and report time to select and load a thread
Summary: See title

Test Plan: manual

Reviewers: spang, halla, evan

Reviewed By: halla, evan

Differential Revision: https://phab.nylas.com/D4013
2017-02-22 16:39:34 -08:00
Juan Tejada c4ec2d6bb7 [client-app] Report thread-list action perf metrics to Mixpanel
Summary: See title

Test Plan: manual

Reviewers: spang, halla, evan

Reviewed By: halla, evan

Differential Revision: https://phab.nylas.com/D4011
2017-02-22 16:37:30 -08:00
Juan Tejada aa0bde0c41 [client-app] Add Actions.recordPerfMetric
Summary:
This action will report perf metrics to honeycomb /and/ mixpanel. This
commit also fixes up Analytics Store a little bit

Test Plan: manual

Reviewers: spang, halla, evan

Reviewed By: halla, evan

Subscribers: jerm

Differential Revision: https://phab.nylas.com/D4012
2017-02-22 16:35:38 -08:00
Evan Morikawa 7b7318b220 [client-app] update Travis
Summary:
Also see:
3a33b0ad64
which was hot-pushed to master in order to get Travis building.

We now have two travis files:

1. /.travis.yml
2. /packages/client-app/travis.yml

The first one is alwas in the private repo and runs `npm install && npm
run build-client`. This decrypts our keys and signs, builds, and uploads
to S3.

The second one is designed to live in our yet-to-be public mirror. It will
basically just run `npm install && npm test`.

That way the public one should just about ALWAYS pass (YAY!) except of
course when you break the tests or something in the installer!

Test Plan: Run on new https://travis-ci.com/nylas/nylas-mail-all

Reviewers: jerm, spang, juan

Reviewed By: spang, juan

Differential Revision: https://phab.nylas.com/D3999
2017-02-22 16:19:45 -05:00
Juan Tejada c24c5bc341 [client-app] Update changelog 2017-02-21 17:44:23 -08:00
Mark Hahnenberg 7b55691cee [client-app] Don't compute thread search index size on startup
Summary:
We did this to see if we should clear the index, which no longer makes
sense because the index never exceeds our threshold. Additionally, none
of the other search indexes do this. This was causing us to spend a ton
of time scanning the ThreadSearch table at startup.

Test Plan: Run locally, make sure things are fine

Reviewers: evan, spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D4007
2017-02-21 16:39:51 -08:00
Evan Morikawa 3a33b0ad64 [client-app] update build system 2017-02-21 17:32:22 -05:00
Juan Tejada 66873e3f9e bump(version) 1.0.29 2017-02-21 13:12:09 -08:00
Evan Morikawa 3071856a8e [client-app] symlink in babelrc and resolve links
Summary:
The prod build was failing because it couldn't find the .babelrc.

I decided to put the babelrc in the main nylas-mail repo with the
expectation that it'll need to be in the open source version too. To DRY
up this for us building, we sylink the root one to the client-app babelrc

Also since we now dereference symlinks we don't need to do the full copy
of nylas-private-resources so we don't have two error reporters floating
around

Test Plan: npm run build-client

Reviewers: juan, spang

Reviewed By: juan, spang

Differential Revision: https://phab.nylas.com/D3993
2017-02-21 16:08:59 -05:00
Christine Spang 776cf26d7a [client-app] Convert nylas-env.coffee to ES6 😓
Test Plan: unit tests + run the app

Reviewers: juan, halla, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3979
2017-02-21 12:38:36 -08:00
Juan Tejada 15bcf974d2 [client-app] For consistency, proxy marking unread thru ThreadListActionStore
Summary: Depends on D3990

Test Plan: manual

Reviewers: spang, halla, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3992
2017-02-21 12:31:07 -08:00
Juan Tejada 20f7ae47ca [client-app] For consistency, proxy starring thru ThreadListActionStore
Summary: See title

Test Plan: Depends on D3990

Reviewers: spang, halla, mark, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3991
2017-02-21 12:29:52 -08:00
Juan Tejada 19195e9686 [client-app] Measure and report times for trashing and marking as spam
Summary:
See title

Depends on D3989

Test Plan: manual

Reviewers: evan, spang, halla

Reviewed By: spang, halla

Differential Revision: https://phab.nylas.com/D3990
2017-02-21 12:26:58 -08:00
Juan Tejada 6dbbf1e094 [client-app] Measure and report times for removing labels from threads
Summary:
This commit adds new actions, `applyCategoryToThreads` and `removeCategoryFromThreads`
to be proxied and measured through the ThreadListActionsStore. These are called when
labels are added or removed via the category picker or by removing using
the label icon.

For now, we are only interested in timing actions that remove threads
from the inbox.

Test Plan: manual + reenabled unit tests for category-picker

Reviewers: spang, evan, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D3989
2017-02-21 12:13:17 -08:00
Juan Tejada fb85db0964 [client-app]: Measure and report time when dragging threads to sidebar
Summary:
This commit adds a new action, `moveThreadsToPerspective` to be proxied and
measured through the ThreadListActionsStore. This action is called when
a thread or group of threads is dragged and dropped into an item in the
sidebar.

For now, we are only interested in timing actions that remove threads
from the inbox

Depends on D3984

Test Plan: manual

Reviewers: halla, evan, spang

Reviewed By: evan, spang

Differential Revision: https://phab.nylas.com/D3985
2017-02-21 12:10:52 -08:00
Juan Tejada 90e49d31aa [client-app] Measure and report times for removing from inbox
Summary:
This commit adds a new action, `removeThreadsFromView` to be proxied and
measured through the ThreadListActionsStore

This action can encompass many different actions, e.g.:
- unstarring in starred view
- changing unread in unread view
- Moving to inbox from trash
- archiving a search result (which won't actually remove it from the thread-list)

However, for now, we are only interested in timing actions that remove threads
from the inbox

Depends on D3983

Test Plan: manual

Reviewers: halla, spang, evan

Reviewed By: spang, evan

Differential Revision: https://phab.nylas.com/D3984
2017-02-21 11:53:38 -08:00
Juan Tejada a8fbcb0c93 [client-app] Measure and report archiving times
Summary:
This commit makes so it we report perf metrics for archive actions.
To achieve this, I added a new `ThreadListActionsStore` which serves as
a proxy for thread actions, which allow us to time them.

The new store is in charge of listening to thread list actions, creating and
queueing  the appropriate tasks for any given action, and timing and
reporting action times to our MetricsReporter.

This commit only times archiving actions, and subsequent diffs will time
other relevant thread list actions.

Test Plan: manual

Reviewers: halla, spang, evan

Reviewed By: spang, evan

Differential Revision: https://phab.nylas.com/D3983
2017-02-21 11:50:55 -08:00
Juan Tejada 39c6c04bc4 [client-sync] metrics(Part 5) Rename PerformanceMonitor to GlobalTimer
Summary:
This global module wasn't really related to performance, but rather with
timing things across different processes in the app. I believe this name
is more appropriate.

Test Plan: I can still use NylasEnv.timer (instead of NylasEnv.perf)

Reviewers: spang, evan

Reviewed By: spang, evan

Differential Revision: https://phab.nylas.com/D3972
2017-02-21 11:47:33 -08:00
Evan Morikawa fd838a4280 [client-app] resolve symlinks before copying files
Summary:
In client-app/node_modules Lerna symlinks isomorphic-core to '../../'.
When we copy everything over to our tmp directory when building, we copy
over the relative symlink! Damn you lerna.

We get around this by resolving the symlinks BEFORE copying and caching
them in the installer task. Then the file copy always works.

Also, for some reason the glob {absolute} param doesn't seem to work in
the latest version. I'm manually creating an absolute path for the compile
target since it's a bit more transparent what's happening anyway.

Test Plan: `npm run build-client`

Reviewers: spang, jerm, juan, halla

Reviewed By: juan, halla

Differential Revision: https://phab.nylas.com/D3988
2017-02-21 14:36:18 -05:00
Evan Morikawa a7686bb35b [client-app] build tasks now use absolute paths
Summary:
Grunt is hardcoded to use paths relative to wherever the Gruntfile is
located. Unfortunately it also expects the grunt packages to be siblings
of that gruntfile. We can get around this by changing the relative base
path, but then the cwd is different for each tasks. This is okay as long
as we use absolute paths for various files in each of our tasks. This
updates our grunt tasks to use absolute paths

Test Plan: `npm run build-client`

Reviewers: spang, halla, jerm, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3987
2017-02-21 14:35:51 -05:00
Juan Tejada fad1671d6e [client-app] Fix delta-processor tests 2017-02-21 08:56:47 -08:00
Halla Moore 302f3b6215 [client-app, client-private-plugins] Update the reminders metadata structure
Summary:
The new send-reminders cloud-worker needs different information to check for
replies now that the sync engine is local. Make sure we save all of the
required information to the metadata. The current values are:

  - expiration: the time the reminder should be sent, if no new replies
  - folderImapNames: the folders to check for replies
  - messageIdHeaders: the Message-Id headers of messages in the thread
    (we search for In-Reply-To headers that match these values, and also
     use them to decide whether a message is a new reply or an old reply)
  - replyTo: the message to reply to when sending the reminder email
  - subject: the subject to use when sending the reminder email

Test Plan: manual

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3952
2017-02-17 19:03:07 -08:00
Evan Morikawa 12236753d5 [client-app] only show cloud deltas in the developer bar
Summary:
This removes client-sync deltas from the developerbar delta list.

We ONLY show cloud deltas now.

The connection between client-sync is no longer a network delta stream,
it's a direct function call. It makes no sense to show its status.

This now shows a single dot representing the state of the cloud delta
stream.

Test Plan: Manually connect and disconnect local cloud API and see icon change

Reviewers: halla, spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3977
2017-02-17 17:33:18 -08:00
Evan Morikawa d1b5cb9952 [client-app] allow returning of message from DOM
Summary:
SFDC's task to upload an email to salesforce needs the stripped DOM of a
Message object to call `innerText`. The API was changed to return a string
instead of the DOM. This adds a flag to request the DOM instead of a
string.

Test Plan:
Manually assert `EnsureMessageOnSalesforceTask` properly can add the plain
text to the Salesforce Task object

Reviewers: halla, mark, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3976
2017-02-17 17:32:45 -08:00
Evan Morikawa c149e9171d [client-app] fix errors with no message
Summary:
Some API Errors, like ECONNREFUSED, have no \.message.
Catch this in the error reporter

Test Plan: Manually create a non-message error and see better error message

Reviewers: spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3973
2017-02-17 17:29:33 -08:00
Evan Morikawa 9994b2b3d7 [client-app] remove rouge-committed packages folder 2017-02-17 15:08:26 -08:00
Halla Moore 57ff111925 [client-app, client-sync] Save imap folder names in the client-app
Summary:
Client-sync has the full imap folder names, but used to only pass the display
name to the application. The application needs the full imap names so that it
can pass them via metadata to cloud-workers that need to open imap boxes.

Test Plan: manual

Reviewers: evan, juan

Reviewed By: evan, juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D3951
2017-02-17 14:47:10 -08:00
Evan Morikawa ad65b7d77a [client-app] convert FocusedContactStore to es6 2017-02-17 14:17:30 -08:00
Mark Hahnenberg ebb19b4cd8 [client-app] Fix stale import
Summary: Moved a file and forgot to update this import :-/

Test Plan: Run locally

Reviewers: juan, evan, spang

Differential Revision: https://phab.nylas.com/D3970
2017-02-17 14:14:17 -08:00
Christine Spang faf44193a7 [local-sync] Differentiate sync loop & other errors by additional fingerprint info
Summary:
If an exception has the same stack trace, by default Sentry will always group
it together in the same event. We don't want to do that for sync loop
errors---e.g. 'Invalid credentials' errors should not be grouped together with
stuff like 'Too many simultaneous connections'. Creating more unique groups
will allow us to better evaluate the effect of sync & other bugfixes.

Test Plan: writing unit test right now

Reviewers: juan, mark

Subscribers:

Differential Revision: https://phab.nylas.com/D3915
2017-02-17 14:03:24 -08:00
Mark Hahnenberg 00299e446d [message-list] Add support for double-clicking inline images to open
Summary: See title

Test Plan: Run locally, verify that double clicking inline images opens them

Reviewers: evan, juan, spang

Reviewed By: juan, spang

Differential Revision: https://phab.nylas.com/D3963
2017-02-17 14:01:07 -08:00
Christine Spang 9cf703c6cd [*] Clean up some cruft
Summary: This stuff doesn't seem to be used for anything anymore and it's cluttering up the client-app dir.

Test Plan: ran the app, also did `npm start` with no ~/.nylas-dev

Reviewers: evan, juan

Reviewed By: evan, juan

Differential Revision: https://phab.nylas.com/D3961
2017-02-17 13:51:27 -08:00
Mark Hahnenberg a95ca8b07a [*] Fix electron launch args
Summary:
We were doing some incorrect processing of args passed to the main
function which was causing us to think we were launching NM by passing a
file (which creates a new draft and tries to attach that file). Since
were trying to attach 'packages/client-app', this was causing an error
dialogue to appear indicating that it wasn't possible to attach a
directory.

Test Plan: Run locally, verify no dialogue

Reviewers: evan, spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3962
2017-02-17 13:03:20 -08:00
Evan Morikawa c4a26e1dcd [*] convert everyting to rx-lite 2017-02-17 12:15:23 -08:00
Juan Tejada 5a3a105e9d [*] Move BackoffSchedulers into isomorphic-core 2017-02-17 10:11:35 -08:00
Juan Tejada d385350808 [client-app] Update changelog 2017-02-17 10:11:35 -08:00
Evan Morikawa 3113fba25b [client-app] fix module spec
This changed because we now globally require node_modules
2017-02-17 10:00:43 -08:00
Evan Morikawa 918fa0b6dd [*] move to monorepo
[*] update babel

[client-app] remove flow-typed

[client-app] Move build/package.json to main package.json

[client-app] remove spec_integration

[client-app] fix babel support

Add client-private-plugins package.json

[client-app] add node_modules to global path for private-plugins

Move client-sync dependencies to client-app root

fix electron rebuild

[*] moved to monorepo

Summary: App now runs in monorepo

Test Plan: npm test

Reviewers: juan, mark, khamidou, halla, spang

Differential Revision: https://phab.nylas.com/D3947
2017-02-16 18:46:26 -08:00
Christine Spang 25d88589ba fix(linux-build): Update rpm spec to use new package name 2017-02-16 16:58:27 -08:00
Christine Spang 2bc6b7ac0f fix(linux-build): Change package name to Nylas Mail
Need this in order to allow parallel installation of Nylas Pro and Nylas
Mail.
2017-02-16 16:07:36 -08:00
Christine Spang 15697a9064 fix(cli): s/n1/nylas-mail/ 2017-02-16 16:02:08 -08:00
Evan Morikawa 9407533f51 [client-*] Rename packages folders and update readme 2017-02-16 13:31:37 -08:00