Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the email match should be case insensitive when selecting the alias #3473

Open
wants to merge 5,201 commits into
base: master
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Mar 14, 2017

  1. [client-app] Make resetEmailCache work without forcing re sign-in

    Summary:
    This commit makes it so `resetEmailCache` works as expected, i.e. it
    removes all databases, without forcing the user to re sign-in to their
    accounts or NylasID
    
    Previously, this method removed the database without removing the
    accounts, left users in an un-authed state that was hard to recover
    from. This was fixed in D4212 which makes sure that when we get a new
    identity, sync and deltas are restarted
    
    However, resetEmailCache would still force you to log in to yoru NylasID
    because it was deleted from the database. However, if we reuse the
    command `application:relaunch-to-initial-windows` instead of manually
    deleting the database, we can relaunc the app while preserving the users
    NylasID session, so they don't have to sign back in manually.
    
    Test Plan: manual
    
    Reviewers: evan, spang, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4215
    jstejada committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    f157ddb View commit details
    Browse the repository at this point in the history
  2. [client-app] Restart sync when computer awakes from sleep

    Summary:
    Use electron's `powerMonitor` module to detect when the computer resumes
    from sleep, and restart the sync loop when that happens in order to
    sync the inbox immediately, in case we received any new mail events
    while the computer was asleep
    
    Test Plan: manual
    
    Reviewers: evan, spang, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4216
    jstejada committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    7fc1e04 View commit details
    Browse the repository at this point in the history
  3. bump(version): 1.0.38

    Nylas Coffee Machine committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    3c88f90 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    30792a4 View commit details
    Browse the repository at this point in the history
  5. [client-app] only upload 7 characters of the commit hash

    Summary:
    On windows running `git rev-parse --short HEAD` does in fact now give you
    9 characters instead of 7 like it does on Mac. This will ensure that
    builds get uploaded to the same folder and help ensure we don't post a
    version that doesn't exist on the release page.
    
    Test Plan: Manual
    
    Reviewers: juan, halla, spang
    
    Reviewed By: spang
    
    Differential Revision: https://phab.nylas.com/D4217
    emorikawa committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    af7d8c9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    87acb23 View commit details
    Browse the repository at this point in the history
  7. bump(version): 1.0.39

    Nylas Coffee Machine committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    27927e1 View commit details
    Browse the repository at this point in the history
  8. [client-app] "two panel" -> "Reading Pane On"

    Summary: Minor copy change via Sachin
    
    Test Plan: manual
    
    Reviewers: juan, spang, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4218
    emorikawa committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    5b33cc1 View commit details
    Browse the repository at this point in the history
  9. [send-later] Add support for attachments

    Summary:
    This is going to be a diff way shorter than the previous one! Basically, it adds a new endpoint, `/blobs` to our API to store send later attachments. When a user schedules a draft to be sent, we send all attachments to this endpoint. Separately, we store the rest of the message as metadata.
    
    When it's time to send the message, we fetch the attachments from S3, fetch the metadata and merge them together to get a message we can send.
    
    Test Plan: Tested manually. Will make a final QA pass before landing.
    
    Reviewers: juan, halla, evan
    
    Reviewed By: halla, evan
    
    Differential Revision: https://phab.nylas.com/D4196
    khamidou committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    3a92eaf View commit details
    Browse the repository at this point in the history
  10. [client-app] upload nupkg for Windows autoupdater

    Summary: We need to upload the nupkg for the Windows autoupdater to work
    
    Test Plan: manual
    
    Reviewers: juan, spang, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4219
    emorikawa committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    613ee2b View commit details
    Browse the repository at this point in the history
  11. [client-app] update files ignored in build

    Summary:
    The ignore list was very old. It included several dozen MB of docs_src and
    other crap in our builds
    
    Test Plan: manual
    
    Reviewers: halla, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4213
    emorikawa committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    b3681e6 View commit details
    Browse the repository at this point in the history
  12. [client-app] don't bootsrap cloud stuff when building the client

    Summary:
    We don't need to spend the time running script/bootstrap in our cloud-*
    folders!
    
    Test Plan: manual
    
    Reviewers: spang, juan, halla
    
    Reviewed By: juan, halla
    
    Differential Revision: https://phab.nylas.com/D4214
    emorikawa committed Mar 14, 2017
    Configuration menu
    Copy the full SHA
    093f315 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2017

  1. bump(version): 1.0.40

    Nylas Coffee Machine committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    c8e31a7 View commit details
    Browse the repository at this point in the history
  2. [iso-core] Upgrade nodemailer

    Summary:
    We were using a version that was ~9 months old and a lot of development has
    happened since.
    
    v3 is not compatible w/v2, but it looks like we aren't using any of the
    features that had breaking changes:
    
        http://nodemailer.com/about/migrate/
    
    I chose not to switch to the new built-in OAuth2 token refresh support
    because we already have a mechanism for refreshing oauth tokens and
    adding a different implementation specifically for SMTP would introduce
    more opportunities for bugs.
    
    Since mailcomposer is no longer a dependency of nodemailer, I added this
    dependency as well.
    
    Test Plan: manual - sent a message, sent a message w/an attachment
    
    Reviewers: evan, khamidou, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4201
    spang committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    e798e50 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2017

  1. bump(version): 1.0.41

    Nylas Coffee Machine committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    4079fd4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f4b01b3 View commit details
    Browse the repository at this point in the history
  3. bump(version): 1.0.42

    Nylas Coffee Machine committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    67f9d26 View commit details
    Browse the repository at this point in the history
  4. [client-sync] Only update lastReceivedDate if the message was actuall…

    …y received
    
    Summary:
    We don't want to bump threads to the top of the inbox when a user sends a
    reply. We originally used `!isSent` to prevent this, but that was removed in
    a diff that made sure messages showed up in the inbox when users send emails
    to themselves. In order to implement both of these cases properly, this diff
    introduces `isReceived` and uses that to determine whether lastReceivedDate
    should be updated. Addresses T7991.
    
    Also changes the order of some `or` statements, so that we actually check that
    the variable exists before comparing against it.
    
    Test Plan: manual
    
    Reviewers: evan, juan, spang
    
    Reviewed By: spang
    
    Differential Revision: https://phab.nylas.com/D4226
    Halla Moore committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    4492b73 View commit details
    Browse the repository at this point in the history
  5. [client-app] Don't show non-existent children on folder creation

    Summary:
    Previously, after creating a new folder, the UI would indicate that the new
    folder had children, even though it didn't. This was caused by duplicate models
    in our `MutableQueryResultSet` for the user's categories. Basically, we would
    sync the server version of the folder before the `SyncbackTask` for the new
    folder returned its `serverId`. Without the `serverId`, the synced version of
    the folder couldn't yet be tied to the optimistic folder, so a second row was
    created in the database. This second row is removed when the `syncbackTask`
    does return the `serverId`, because we persist the optimistic folder with a
    `REPLACE INTO` query. (This deletes other rows with the same id.) However,
    since this was done inside a `persist` change with the `serverId` and no
    `unpersist` was ever recorded for the `clientId`, our `MutableQueryResultSet`
    never removed the `clientId` model.
    
    To address this, this diff adds a check in `updateModel` to see if the
    `serverId` is being added. If it is, and both the `serverId` and `clientId`
    exist in the `_ids` list, we remove the `clientId`.
    
    The children indicator does still briefly show up while there are still two
    separate rows for that folder in the database. If we want to get rid of this
    completely, we would have to ensure that we do not sync the folder before the
    `syncbackTask` returns the `serverId`. However, this would probably be pretty
    involved, and for not much gain. This fix is much simpler and reduces most of
    the issue.
    
    Test Plan: manual
    
    Reviewers: juan, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4228
    Halla Moore committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    73e990f View commit details
    Browse the repository at this point in the history
  6. Revert "[iso-core] Upgrade nodemailer"

    This reverts commit e798e50.
    
    Reason for revert: breaks Send Later. Needs more testing.
    spang committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    e87bea7 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2017

  1. bump(version): 1.0.43

    Nylas Coffee Machine committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    27355c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f1572f4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64e6fef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eb64ae6 View commit details
    Browse the repository at this point in the history
  5. [client-sync] Add error handling when creating syncback requests

    Summary: see title. also convert to es6
    
    Test Plan: manual
    
    Reviewers: evan, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4225
    jstejada committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    6532d3c View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2017

  1. [deploy-it] temp override for deploy branch rules

    for ei-prod only.  I set up the ei EB env as prod level, but
    have been working on launch changed in master branch. Easy enough to undo,
    but I didn't wan't to mess with prod branch until done because
    the launch scripts affect all the n1cloud-related environments.
    jerm committed Mar 18, 2017
    Configuration menu
    Copy the full SHA
    180f92b View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2017

  1. bump(version): 1.0.44

    Nylas Coffee Machine committed Mar 20, 2017
    Configuration menu
    Copy the full SHA
    d5b8e19 View commit details
    Browse the repository at this point in the history
  2. [cloud-api] Fix query for delta stream transactions

    Summary:
    When querying transactions for the delta stream, if no cursor is provided,
    we should default to 0. Otherwise this will generate a query like:
    ```
    WHERE `transaction`.`id` > ‘null’
    ```
    Which is obviously wrong
    
    Test Plan: manual
    
    Reviewers: evan, halla, spang
    
    Reviewed By: spang
    
    Differential Revision: https://phab.nylas.com/D4242
    jstejada committed Mar 20, 2017
    Configuration menu
    Copy the full SHA
    3909c88 View commit details
    Browse the repository at this point in the history
  3. [client-app] Fix passing cursor to delta streams

    Summary:
    Currently, when we auth an account for the first time in Nylas Mail (or
    we blow away the database), the app is going to request transactions
    since cursor `null` from the /delta/streaming endpoint and from the local-sync
    delta observable, instead of requesting transactions since cursor `0`
    
    This is due to a subtle bug with the use of default values when
    destructuring an object. Our coded did the following:
    ```
    const {cursor = 0} = this._state
    ```
    Which at a glance seems correct. However, this will only work as
    expected if `this._state` has the following shape:
    ```
    {cursor: undefined}
    ```
    And unfortunately, our `this._state` looked like this when authing an
    account for the first time:
    ```
    {cursor: null}
    ```
    
    Which would make `cursor === null` instead of `0`.
    This is because when using default values, null is considered an
    intentional argument/value, as opposed to not passing any argument/value
    (which will mean that the argument is undefined).
    
    This was a regression introduced in d60a23c and 8bc2ec5
    
    Test Plan: manual, will add regression test in upcoming diff
    
    Reviewers: evan, spang, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4243
    jstejada committed Mar 20, 2017
    Configuration menu
    Copy the full SHA
    3554fb2 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2017

  1. Configuration menu
    Copy the full SHA
    17da34c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d025aaf View commit details
    Browse the repository at this point in the history
  3. bump(version): 1.0.45

    Nylas Coffee Machine committed Mar 21, 2017
    Configuration menu
    Copy the full SHA
    3b3057f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6048d6a View commit details
    Browse the repository at this point in the history
  5. [client-app] Don't report non-reportable errors in delta connection

    Summary:
    Previously, the logic for deciding wether to report an APIError lived
    inside NylasAPIRequest and depended on an array of ignorable
    statusCodes. However, when handling APIErrors, NylasAPIRequest would
    convert special error codes (for offline errors) into a statusCode of 0,
    which would automatically be ignored.
    
    Given that the delta streaming connection didn't convert status codes to
    0, it wouldn't actually ignore the error and end up reporting it,
    flooding sentry.
    
    This commit makes it so that that logic lives inside APIError, and
    anyone who handles APIErrors can check wether to report them or not,
    including the delta streaming connection
    
    Test Plan: manual :(
    
    Reviewers: spang, evan, halla
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4235
    jstejada committed Mar 21, 2017
    Configuration menu
    Copy the full SHA
    6ea9ab3 View commit details
    Browse the repository at this point in the history
  6. [client-app] Correctly sign out of NylasID

    Summary:
    This fixes T7995.
    
    Previously, attempting to log out from your NylasID would just
    automatically sign you back in with the same NylasID because the webview
    session was preserved.
    
    Now, instead of relaunching the windows, we restart the app to clear the
    webview session
    
    Test Plan: manual
    
    Reviewers: halla, evan
    
    Reviewed By: evan
    
    Maniphest Tasks: T7995
    
    Differential Revision: https://phab.nylas.com/D4224
    jstejada committed Mar 21, 2017
    Configuration menu
    Copy the full SHA
    8f5d367 View commit details
    Browse the repository at this point in the history
  7. [client-app] 🎨 comment

    jstejada committed Mar 21, 2017
    Configuration menu
    Copy the full SHA
    65f9f8c View commit details
    Browse the repository at this point in the history
  8. [client-sync] Refactor sync worker IMAPConnectionPool callbacks

    Summary: In preparation for removing timeout handling from the IMAPConnectionPool.
    
    Test Plan: Run locally
    
    Reviewers: spang, evan, juan
    
    Reviewed By: evan, juan
    
    Differential Revision: https://phab.nylas.com/D4245
    Mark Hahnenberg committed Mar 21, 2017
    Configuration menu
    Copy the full SHA
    2fe8bee View commit details
    Browse the repository at this point in the history
  9. [client-app] Fix DraftFactory specs

    Summary: Using `await` instead of `advanceClock()` fixes all the things!
    
    Test Plan: Ran the spec file
    
    Reviewers: evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4248
    Halla Moore committed Mar 21, 2017
    Configuration menu
    Copy the full SHA
    b849793 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2017

  1. Fix build condition

    On the server the env var is defined but set to false.
    khamidou committed Mar 22, 2017
    Configuration menu
    Copy the full SHA
    1f9c512 View commit details
    Browse the repository at this point in the history
  2. Switch type of Metadata value column

    Summary:
    Found a funny send-later bug I didn't catch when testing on staging: sometimes the data we're saving in the metadata table overflows. That's because MySQL's TEXT column are at most 64k, which is easy to reach when you have a draft + clearbit information and additional stuff.
    
    To work around this, I decided to switch the database type of the metadata table to LONGTEXT. Since it can store 4Gb of text, we should be good. This diff makes those code changes. Obviously, we'll have to run migrations both on staging and prod.
    
    Test Plan: Ran a basic smoke test. Shouldn't break anything.
    
    Reviewers: juan, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4250
    khamidou committed Mar 22, 2017
    Configuration menu
    Copy the full SHA
    3e3b0b8 View commit details
    Browse the repository at this point in the history
  3. [client-app] Ensure files get transferred in forwarded messages

    Summary:
    We need to download the files and then treat them as uploads. Rather
    than using an actual Upload object, which would require another data
    transfer, we create an object with all the necessary Upload-like
    properties and point it to the downloaded file.
    
    Addresses part of T7960
    
    Test Plan: Manual, some specs
    
    Reviewers: evan, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4249
    Halla Moore committed Mar 22, 2017
    Configuration menu
    Copy the full SHA
    470e656 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2017

  1. [client-app] Rename downloadDataForFile(s) -> getDownloadDataForFile(s)

    Summary:
    The original name seems like it's initiating the download, when really
    it's just returning the data of an already in-progress/completed
    download.
    
    Test Plan: Manual, specs
    
    Reviewers: evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4251
    Halla Moore committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    9caefdc View commit details
    Browse the repository at this point in the history
  2. bump(version): 1.0.46

    Nylas Coffee Machine committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    ce17f70 View commit details
    Browse the repository at this point in the history
  3. [client-app] Record file download times

    Summary:
    We'd like to get an idea of how long the client app is having to wait
    when requesting a file. Waiting can cause things like inline image
    attachments to appear very slow to load.
    
    Test Plan: Run locally
    
    Reviewers: evan, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4255
    Mark Hahnenberg committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    e13d483 View commit details
    Browse the repository at this point in the history
  4. [client-sync] Don't handle IMAP timeouts in the connection pool

    Summary:
    Different clients can have different policies for retrying after
    timeouts.
    
    Test Plan: Run locally, run tests
    
    Reviewers: evan, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4247
    Mark Hahnenberg committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    4ef8e76 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1298d4c View commit details
    Browse the repository at this point in the history
  6. [client-app] Consolidate file download metric reporting

    Summary: See title
    
    Test Plan: manual
    
    Reviewers: gleb, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4256
    jstejada committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    09b88a7 View commit details
    Browse the repository at this point in the history
  7. [client-app] Report hard crashes using Electron's built-in crash repo…

    …rter
    
    Summary:
    I had a bit of downtime this morning so I decided to look into how to store Electron crash data. Electron, like Chromium, stores crash data in an arcane file format named minidump.
    
    There's a bunch of services you can use to store files formatted in this format, like Mozilla's Socorro or zcbenz's own mini-breakpad-server but they're all pretty hard to install. Luckily, it turns out there's a Ruby gem to process minidump files and send them to Sentry! Seeing that, I whipped up a quick sinatra service and hosted it on Heroku – you can take a look at the source code here if you're curious: https://github.com/khamidou/electron-breakpad-sentry
    
    This diff adds the client-side code we need to start sending crash reports.
    
    Test Plan: Tested manually.
    
    Reviewers: juan, evan
    
    Reviewed By: juan, evan
    
    Maniphest Tasks: T7926
    
    Differential Revision: https://phab.nylas.com/D4259
    khamidou committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    a8aee89 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2017

  1. bump(version): 1.0.47

    Nylas Coffee Machine committed Mar 24, 2017
    Configuration menu
    Copy the full SHA
    c5af73f View commit details
    Browse the repository at this point in the history
  2. [ei] Update changelog

    jstejada committed Mar 24, 2017
    Configuration menu
    Copy the full SHA
    cd6d04c View commit details
    Browse the repository at this point in the history
  3. [client-app] Correctly remove inline images with x button

    Summary:
    Before this commit, it was impossible to remove inline images via the x
    button
    
    Test Plan: manual
    
    Reviewers: mark, halla
    
    Reviewed By: mark, halla
    
    Differential Revision: https://phab.nylas.com/D4257
    jstejada committed Mar 24, 2017
    Configuration menu
    Copy the full SHA
    4373877 View commit details
    Browse the repository at this point in the history
  4. [client-app] Don't try to restart sync on every IdentityStore change

    Summary:
    The IdentityStore can trigger any number of times, but we only want to
    start sync if we previously didn't have an identity available
    
    Test Plan: manual
    
    Reviewers: spang, evan, halla
    
    Reviewed By: evan, halla
    
    Differential Revision: https://phab.nylas.com/D4246
    jstejada committed Mar 24, 2017
    Configuration menu
    Copy the full SHA
    41ad424 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ae1c667 View commit details
    Browse the repository at this point in the history
  6. [client-app] Reindex threads when they're updated

    Summary:
    We weren't doing that, so we would have accurate search index info for
    threads when they were, e.g., moved to another folder.
    
    Test Plan: Run locally
    
    Reviewers: spang, evan, juan
    
    Reviewed By: evan, juan
    
    Differential Revision: https://phab.nylas.com/D4260
    Mark Hahnenberg committed Mar 24, 2017
    Configuration menu
    Copy the full SHA
    11aa686 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2017

  1. bump(version): 1.0.48

    Nylas Coffee Machine committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    8a3e47d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9216ef1 View commit details
    Browse the repository at this point in the history
  3. [iso-core] Add indexes from SQL review

    Summary:
    These only really matter for n1cloud, and are being added manually in
    production, so no migration file necessary. I am adding them to the
    model definitions to prevent them getting out of sync with production
    for development.
    
    See T7999 for full SQL review
    
    Test Plan: ship it
    
    Reviewers: evan, khamidou, juan
    
    Reviewed By: juan
    
    Subscribers: vlad, jerm
    
    Differential Revision: https://phab.nylas.com/D4230
    spang committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    951c874 View commit details
    Browse the repository at this point in the history
  4. [cloud-api] Timeout streaming API connections every 15 minutes

    Summary: Should help a fair bit with our redis connection pileup.
    
    Test Plan: Tested manually.
    
    Reviewers: mark, spang, juan, evan
    
    Reviewed By: mark, spang, evan
    
    Differential Revision: https://phab.nylas.com/D3916
    jstejada committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    88dd952 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b703657 View commit details
    Browse the repository at this point in the history
  6. [client-app] Retry queries when database is locked

    Summary:
    We still don't know exactly what scenarios cause us to get 'database is
    locked' errors, but generically this means that we have multiple
    processes trying to access the database at the same time. In an attempt
    to handle this gracefully, this diff makes it so that we retry the
    queries in these cases. Theoretically, the database should free up once
    the other process is done using it, and the erroring process just needs
    to wait its turn. We still throw an error after 5 retries, so if there's
    a larger issue, we'll still be able to tell in Sentry.
    
    Addresses T7992
    
    Test Plan:
    I opened a transaction in the worker window and then tried to
    do the same in the main window. If I didn't release the transaction in
    the worker window, the main window eventually errored. If I did release
    the transaction, the main window continued creating its own transaction.
    
    Reviewers: mark, juan, evan
    
    Reviewed By: juan, evan
    
    Differential Revision: https://phab.nylas.com/D4254
    Halla Moore committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    7355527 View commit details
    Browse the repository at this point in the history
  7. [client-sync] Report latest sync activity

    Summary:
    Add infrastructure to report and retrieve the latest sync activity, and
    start reporting when we download a message or detect that a folder
    has no new messages. This will be used to detect if the sync loop is
    stuck. Part of T7681.
    
    Test Plan: manual, specs
    
    Reviewers: evan, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4261
    Halla Moore committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    b6887e3 View commit details
    Browse the repository at this point in the history
  8. [client-sync] Detect when sync workers are stuck

    Summary:
    Periodically check the latest sync activity times to determine if a sync
    worker has been inactive for too long. If it has been too long, discard
    the worker and create a new one for that account. Part of T7681.
    
    Test Plan: manual, specs
    
    Reviewers: evan, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4262
    Halla Moore committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    619c69a View commit details
    Browse the repository at this point in the history
  9. [client-app] Detect when the worker window is unavailable

    Summary:
    Periodically ping client-sync's /health endpoint and store the latest
    sync activity. If we get an ECONNREFUSED error, the worker window is
    unavailable. Report the last known activity and restart the worker
    window. Part of T7681.
    
    Test Plan: manual, specs
    
    Reviewers: evan, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4263
    Halla Moore committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    73f0f3e View commit details
    Browse the repository at this point in the history
  10. [client-app, client-sync] Add specs for detecting stuck sync/worker w…

    …indow
    
    Summary: See title. Part of T7681.
    
    Test Plan: ran the specs
    
    Reviewers: evan, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4264
    Halla Moore committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    4ad4596 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2017

  1. [client-app] only re-install for optional deps on mac

    Evan Morikawa committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    44e51a0 View commit details
    Browse the repository at this point in the history
  2. [client-app] remap windows dev shortcuts

    Evan Morikawa committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    fc5645b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ddee8b8 View commit details
    Browse the repository at this point in the history
  4. [client-app] add better documentation to windows update

    Evan Morikawa committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    83cab70 View commit details
    Browse the repository at this point in the history
  5. [client-sync] Change where we report sync activity

    Summary:
    These locations will provide enough activity for monitoring and are also
    more helpful in helping us debug what the sync loop was doing when it
    got stuck.
    
    Test Plan: manual
    
    Reviewers: juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4274
    Halla Moore committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    adff689 View commit details
    Browse the repository at this point in the history
  6. bump(version): 1.0.49

    Nylas Coffee Machine committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    60549fe View commit details
    Browse the repository at this point in the history
  7. [client-app] Fix importing SyncActivity

    In some places we were not accessing `.default` when using `require`,
    and when using `import` we couldn't really destructure unless we
    accessed `.default` too, or if the functions were regular exports
    instead of properties on a default exported object.
    
    This was causing our sync loop to error.
    
    To remain consistent, we always just `require` or `import` the
    SyncActivity singleton and access that
    jstejada committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    caf5380 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1a1db50 View commit details
    Browse the repository at this point in the history
  9. [client-app] Fix runtime error in FetchMessagesInFolderTask

    We were accessing `this._db.accountId` before `this._db` was set, which
    caused an error when attempting to run the task
    jstejada committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    ff9d49e View commit details
    Browse the repository at this point in the history
  10. bump(version): 1.0.50

    Nylas Coffee Machine committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    cc61b32 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    254b8df View commit details
    Browse the repository at this point in the history
  12. [client-app] change file description on Windows

    Evan Morikawa committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    da74dc2 View commit details
    Browse the repository at this point in the history
  13. [client-sync] Implement the /contacts/rankings endpoint

    Summary:
    Prior to Nylas Mail, the Nylas Cloud API provided an endpoint that
    returned rankings for contacts which it computed based on how frequently
    and how recently a user sent mail to a recipient. This diff reimplements
    that functionality in Nylas Mail. This should improve contact
    auto-complete when composing emails to frequently contacted recipients.
    
    Test Plan: Run locally, verify that frequent contacts are suggested earlier
    
    Reviewers: spang, evan, juan
    
    Reviewed By: evan, juan
    
    Maniphest Tasks: T7948
    
    Differential Revision: https://phab.nylas.com/D4253
    Mark Hahnenberg committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    60e6113 View commit details
    Browse the repository at this point in the history
  14. [client-sync] Don't throttle while syncing first 500 threads

    Summary:
    We want to get to a usable inbox as quickly as possible, and throttling
    prevents this. We should basically only be throttling for historical
    mail syncing.
    
    Test Plan: Run initial sync benchmark, it's 117% faster on battery
    
    Reviewers: evan, juan, spang
    
    Reviewed By: juan, spang
    
    Differential Revision: https://phab.nylas.com/D4266
    Mark Hahnenberg committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    0508180 View commit details
    Browse the repository at this point in the history
  15. [client-app] Report battery state changes to Mixpanel

    Summary:
    This diff will give us insight into how people use Nylas Mail on their
    computers with respect to how mobile they are (i.e. whether they use NM
    on battery or plugged in).
    
    Test Plan: Run locally
    
    Reviewers: evan, spang, juan
    
    Reviewed By: juan
    
    Subscribers: gleb
    
    Differential Revision: https://phab.nylas.com/D4267
    Mark Hahnenberg committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    da018c3 View commit details
    Browse the repository at this point in the history
  16. [client-sync] Also prioritize sent label for initial Gmail sync

    Summary:
    Sent mail is important for initial sync because it's used for contact
    ranking. Prior to this diff we would delay syncing sent mail because we
    would prioritize the inbox label over all other labels (including sent).
    This diff includes the sent folder in the initial set of messages to sync.
    
    Test Plan: Run locally, verify we get sent mail quickly
    
    Reviewers: evan, spang, juan
    
    Reviewed By: spang
    
    Differential Revision: https://phab.nylas.com/D4268
    Mark Hahnenberg committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    d6a2b69 View commit details
    Browse the repository at this point in the history
  17. [dev] Only bootstrap specific pkgs in postinstall for faster installs

    Summary:
    This commit makes it so postinstall.es6 only bootstraps the packages we
    are interested in based on a new env variable, `INSTALL_TARGET`.
    
    `INSTALL_TARGET` can be set to `cloud`, `client` or `all`, or not set at all,
    and our postinstall will bootstrap the packages accordingly. This will make
    build and deploy times faster.
    
    Test Plan: manual
    
    Reviewers: spang, halla, evan, khamidou
    
    Reviewed By: evan, khamidou
    
    Differential Revision: https://phab.nylas.com/D4271
    jstejada committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    b8883cd View commit details
    Browse the repository at this point in the history
  18. [dev] Correctly ignore node_modules in .ebignore for faster deploys

    Summary: See lovell/sharp#373 (comment)
    
    Test Plan: manual
    
    Reviewers: khamidou, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4273
    jstejada committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    e347ba2 View commit details
    Browse the repository at this point in the history
  19. [client-sync] 🎨 typo

    jstejada committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    cfb5c20 View commit details
    Browse the repository at this point in the history
  20. [client-app] Correctly listen for new mail in between sync loops

    Summary:
    When using the IMAPConnectionPool in the sync-worker, we requested 2
    connections from the pool: 1 to listen for new mail, and 1 to actually
    operate on the mailbox. These 2 connections would be closed and returned
    to the pool at the end of each sync loop iteration.
    
    However, we never want to close the connection to listen for new mail.
    Closing this connection caused us to not listen for new mail in between
    sync loops, which was especially noticeable when initial sync was done
    because the delay between sync loops is 5 minutes.
    
    This commit makes it so we request the 2 connections separately from the
    connection pool, and keep the listener connection always open until we
    dispose of the sync-worker.
    
    Test Plan:
    manually make sure that I got new mail event listeners in between
    sync loops :(
    
    Reviewers: evan, spang, halla, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4276
    jstejada committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    76234ea View commit details
    Browse the repository at this point in the history
  21. [cloud-api] Verify SMTP credentials in /auth endpoint

    Summary:
    This patch will prevent users from being able to connect accounts which sync
    mail but fail to send.
    
    This commit includes a couple pieces:
    * Adds a call to nodemailer's `verify()` function in the /auth endpoint
    * Adds Error object conversion for SMTP errors. Since we don't implement our
      own connection object or connection pool for SMTP, we simply wrap the couple
      places we call functions from nodemailer that connect to SMTP, namely
      SendmailClient's _send() and the new verify() call in /auth.
    * Moves RetryableError to the 'errors' module since it's now a base class for
      retryable IMAP //and// SMTP errors.
    * Moves the main `smtpConfig()` logic which used to live on the Account model
      into AuthHelpers so it can be shared between the Account model and the verify
      code.
    * Converts a few different places to use `import` syntax instead of
      `require` syntax for module imports. Apologies for not splitting this out
      into a separate diff—would have been a fair amount of work and looks not too
      difficult to skim over in the context of the rest of the patch.
    * Fixing a bug in a previous commit where erroring sends would crash because of
      using `this._transporter.options` instead of `this._transporter.transporter.options`
    
    Test Plan: manual
    
    Reviewers: evan, halla, juan
    
    Reviewed By: halla, juan
    
    Differential Revision: https://phab.nylas.com/D4200
    spang committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    a57e4bd View commit details
    Browse the repository at this point in the history
  22. [client-sync] Fix runtime error introduced in 08975c0

    Summary:
    If `gmailInitialUIDsRemaining` was defined, we need to set `initialUids`
    to that value. We were previously setting it to a key in
    `folder.syncState` that didn't exist, which caused a runtime error.
    
    This was introduced in https://github.com/nylas/nylas-mail-all/commit/d6a2b6935cddefb7ab8f4f99d6ce118fd6191aab
    
    Test Plan: manual
    
    Reviewers: spang, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4279
    jstejada committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    6202a46 View commit details
    Browse the repository at this point in the history
  23. [client-app] properly relaunch windows on autoupdate

    Evan Morikawa committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    212dd44 View commit details
    Browse the repository at this point in the history
  24. [client-app] add SHOW_HOT_WINDOW env for prod debugging of window lau…

    …nches
    Evan Morikawa committed Mar 28, 2017
    Configuration menu
    Copy the full SHA
    9a7ce16 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    e9be716 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    a214d91 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2017

  1. Configuration menu
    Copy the full SHA
    f0cd18e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9eabfa5 View commit details
    Browse the repository at this point in the history
  3. [client-sync] Make sure to attach route files ending in .es6 to local…

    …-api
    
    Summary:
    This prevented the /health endpoint from being available in the
    local-api
    
    Test Plan: manual
    
    Reviewers: mark, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4280
    jstejada committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    ca50e6c View commit details
    Browse the repository at this point in the history
  4. bump(version): 1.0.51

    Nylas Coffee Machine committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    8e7e8ef View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7e123d4 View commit details
    Browse the repository at this point in the history
  6. [dev] Default billing server URL to staging for development, allow ov…

    …erride
    
    Summary:
    By default, the 'local'/'development' environment assumes that all services
    are running locally. This makes sense.
    
    However, if you're not making changes to auxiliary services such as
    billing.nylas.com and hence do not have them running locally, firing up
    Nylas Mail with the 'local' env will not work. It's a bit of a pain to
    get a local billing service running locally, especially if you're not
    making any changes to that service. To ease development, change the
    default billing URL during development to staging, and allow manually
    overriding the billing server URL to point to localhost in the case
    that you're making changes to the billing service also.
    
    To override the billing URL for local development, run like this:
    
        npm run cloud -- --env billing_local
        BILLING_URL=http://billing.lvh.me:5555 npm start
    
    This is both a problem that I've run into during development as well as
    (my hunch) why Karim accidentally landed a global override of the
    billing server URL.
    
    Test Plan: manual
    
    Reviewers: evan, khamidou, halla, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4202
    spang committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    c2a0df1 View commit details
    Browse the repository at this point in the history
  7. [client-app] Reindex threads when they're updated

    This commit is the same as 7d409f5.
    
    This commit was accidentally reverted in 95ec679, because I (juan) was being
    dumb. So I'm re-committing here.
    
    Summary:
    We weren't doing that, so we would have accurate search index info for
    threads when they were, e.g., moved to another folder.
    
    Test Plan: Run locally
    
    Reviewers: spang, evan, juan
    
    Reviewed By: evan, juan
    
    Differential Revision: https://phab.nylas.com/D4260
    Mark Hahnenberg authored and jstejada committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    69aa71e View commit details
    Browse the repository at this point in the history
  8. [client-sync] Fix "in:" for IMAP search

    Summary:
    Prior to this diff, the "in:" search query syntax didn't work for IMAP.
    This diff implements "in:" by changing the IMAP search backend to take
    folder context into account and emit the appropriate queries for each
    folder. Queries that include "in:foo" will replace the corresponding AST
    nodes with 'ALL' or 'NOT ALL' depending on whether or not the current folder
    is "foo". We also now filter which folders we search based on which
    folders are referenced in the query.
    
    Test Plan: Run locally, verify that in: works quickly
    
    Reviewers: evan, juan, spang
    
    Reviewed By: juan, spang
    
    Differential Revision: https://phab.nylas.com/D4284
    Mark Hahnenberg committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    78b9cf8 View commit details
    Browse the repository at this point in the history
  9. [client-app] don't trigger your own opens & link clicks

    Summary:
    We weren't stripping link and open items from messages we sent properly.
    While we stripped it from the first outgoing message, when the sync loop
    came back around it would have them back in. This adds it in the message
    processor to extra ensure that ANYTHING that comes from us (or one of our
    aliases) gets the open/link tracking stripped
    
    Test Plan: New tests
    
    Reviewers: juan, halla
    
    Reviewed By: juan, halla
    
    Differential Revision: https://phab.nylas.com/D4287
    emorikawa committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    d8e22aa View commit details
    Browse the repository at this point in the history
  10. [client-app] ensure gmail msg to 1 person get tracking stripped

    Summary:
    The problem actually was that we weren't applying the transform for Gmail
    messages sent to 1 recipient
    
    Test Plan: manual
    
    Reviewers: halla, juan
    
    Reviewed By: halla, juan
    
    Differential Revision: https://phab.nylas.com/D4291
    emorikawa committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    9d15ff7 View commit details
    Browse the repository at this point in the history
  11. [client-app] Don't delay db queries unless we are retrying

    Summary:
    After introducing retry logic, we would always defer db queries to the
    next tick even if there was no retry delay present.
    
    This would cause almost all db queries take more than 100ms even if the
    actual db operation was really fast. This affected app performance
    negatively
    
    Test Plan: manual
    
    Reviewers: evan, halla, mark
    
    Reviewed By: halla, mark
    
    Differential Revision: https://phab.nylas.com/D4282
    jstejada committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    745dac7 View commit details
    Browse the repository at this point in the history
  12. [client-app] Reduce max retry delay for db queries

    Summary:
    This commit makes it so that when we retry database queries after
    encountering a db locked error, we back off for at most 500ms, instead
    of the current max of 3s. This meant that a single query could
    potentially take 3+ seconds and block the transaction queue for that long.
    
    Test Plan: manual
    
    Reviewers: evan, mark, halla
    
    Reviewed By: mark, halla
    
    Differential Revision: https://phab.nylas.com/D4283
    jstejada committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    8e03ca6 View commit details
    Browse the repository at this point in the history
  13. [client-app] Improve logging for background database queries

    Summary:
    - Rename `databaseAgent` usage to `background`, in the code and in the logs, which I
    believe is less confusing. Often times found myself asking what was this agent thing in
    the logs.
    - Make messaging more explicit
    
    Test Plan: manual
    
    Reviewers: evan, mark, halla
    
    Reviewed By: mark, halla
    
    Differential Revision: https://phab.nylas.com/D4285
    jstejada committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    d26a3e7 View commit details
    Browse the repository at this point in the history
  14. [client-app] Improve logging for queries

    Summary:
    This commit makes a few changes to how we log database queries:
    
    - We log queries in 2 different places now:
      - When `DatabaseStore._executeLocally` takes longer than 100ms. This might be due to the actual db operation taking long, or it might be due to our retry logic, or potentially other factors.
      - When the actual raw database operation takes more than 100ms.
    - When raw database queries take more than 100ms, we log out the query plan if it is a `SELECT` query and we are in dev mode.
    - If `DEBUG_TO_LOG` is true, we always log all queries (including background queries)
    
    Test Plan: manual
    
    Reviewers: mark, halla, evan
    
    Reviewed By: halla, evan
    
    Differential Revision: https://phab.nylas.com/D4288
    jstejada committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    ec51e98 View commit details
    Browse the repository at this point in the history
  15. [client-app] Log duration of db ANALYZE query

    Summary: See title
    
    Test Plan: manual
    
    Reviewers: mark, halla, evan
    
    Reviewed By: halla, evan
    
    Differential Revision: https://phab.nylas.com/D4290
    jstejada committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    caac7cd View commit details
    Browse the repository at this point in the history
  16. [client-app] Fix references to RetryableError imports

    Summary: See title
    
    Test Plan: manual
    
    Reviewers: spang, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4292
    jstejada committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    c7e4c2b View commit details
    Browse the repository at this point in the history
  17. [client-app] Add initial sync benchmarking script

    Summary:
    We want to be able to benchmark initial sync, so this diff adds two
    scripts. The first, drop-stuff.sh, drops all data from the app and sync
    databases that isn't related to account credentials. The second,
    benchmark-initial-sync.sh, runs a fixed number of iterations (current 5) that
    invokes drop-stuff.sh then opens the app, waits a fixed amount of time
    (currently 120 seconds), and then kills the app and measures how many messages
    it synced which it prints to the console. This is sufficient for us to start
    measuring how quickly we can sync messages. This diff also includes the
    sqlite3 amalgamation which drop-stuff.sh requires to function correctly
    due to depending on the FTS5 extension which doesn't come built-in on
    some platforms.
    
    Test Plan: Run benchmark locally
    
    Reviewers: evan, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4275
    Mark Hahnenberg committed Mar 29, 2017
    Configuration menu
    Copy the full SHA
    fa50657 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2017

  1. [client-app] Fix thread reindexing loop

    Summary:
    We would mark modified threads for reindexing, the thread search indexer
    would reindex them, which would trigger a notification that the thread
    had been modified, so we would mark the thread for reindexing, ...
    
    Now we keep track in memory of which threads we've marked for reindexing
    so we avoid re-marking them when the update notification arrives later.
    
    Test Plan:
    Run locally, verify same threads aren't getting continuously
    reindexed and that the in-memory set doesn't grow unboundedly
    
    Reviewers: spang, juan, evan
    
    Reviewed By: juan, evan
    
    Differential Revision: https://phab.nylas.com/D4289
    Mark Hahnenberg committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    df1acb8 View commit details
    Browse the repository at this point in the history
  2. bump(version): 1.0.52

    Nylas Coffee Machine committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    5196f0e View commit details
    Browse the repository at this point in the history
  3. [client-app] Add better DB logging with ENABLE_SEQUELIZE_DEBUG_LOGGING

    Summary:
    This adds better logging to the DB
    
    You can use `ENABLE_SEQUELIZE_DEBUG_LOGGING=true` and
    `ENABLE_RXDB_DEBUG_LOGGING=true` to spit out the raw queries of both DBs.
    
    Test Plan: manual
    
    Reviewers: mark, halla, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4294
    emorikawa committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    2b67f13 View commit details
    Browse the repository at this point in the history
  4. [client-app] Add silent flag to DB persists for thread indexing

    Summary:
    Every persistModel would trigger a large number of downstream updates.
    These weren't necessary for thread indexing and causing a lot of
    unnecessary DB thrashing. This adds a `silent` flag to `persistModel` and
    its ilk that just does the write.
    
    significantly improve performance, and also contribute to T8046
    
    Test Plan: manual
    
    Reviewers: spang, mark, halla, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4295
    emorikawa committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    b72e082 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2d1a371 View commit details
    Browse the repository at this point in the history
  6. [client-sync] Interrupt long-running syncback tasks

    Summary:
    Interrupt retryable syncback tasks that are taking too long so that we can
    return control to the sync loop. The sync loop will retry the task later.
    This diff adds a `forceReject` param to `interrupt()` so that we can return
    control immediately instead of waiting for the current operation to finish
    (for instance, the syncback task could be stuck in an imap operation, and a
    normal interrupt would still have to wait for that to finish before returning
    control to the callee)
    
    Part of T7978
    
    Test Plan: specs
    
    Reviewers: evan, spang, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4269
    Halla Moore committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    c11a7ff View commit details
    Browse the repository at this point in the history
  7. [client-sync] Convert syncback tasks to interruptible generators

    Summary:
    Make `run()` functions generators and change most awaits to yields
    
    Part of T7978
    
    Test Plan: specs from D4269, but really needs some heavy QA
    
    Reviewers: evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4270
    Halla Moore committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    4c1af8f View commit details
    Browse the repository at this point in the history
  8. [client-app] Add search support for "has:attachment"

    Summary: See title
    
    Test Plan: Run locally, verify that attachments are returned
    
    Reviewers: spang, evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4293
    Mark Hahnenberg committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    5c08018 View commit details
    Browse the repository at this point in the history
  9. [client-app] Add script that benchmarks new commits

    Summary:
    We want to setup the initial sync benchmark to run automatically with each
    commit on a separate machine. This script does just that and dumps the
    results to a directory. We can then have a separate script process them
    and upload them to whichever service we want.
    
    Test Plan: Run locally
    
    Reviewers: evan, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4296
    Mark Hahnenberg committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    9270ff6 View commit details
    Browse the repository at this point in the history
  10. [client-sync] Report metrics about SyncbackTask runs

    Summary:
    Report how long they take and if they're stopped (due to timeout).
    
    Part of T7978
    
    Test Plan: manual
    
    Reviewers: evan, juan
    
    Reviewed By: evan, juan
    
    Differential Revision: https://phab.nylas.com/D4272
    Halla Moore committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    a776e6d View commit details
    Browse the repository at this point in the history
  11. [client-sync] Add provider to syncbackTask perf metric

    Halla Moore committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    f5f5b60 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2017

  1. [client-app] use debug library for DB

    Summary:
    Use the wonderful `debug` library instead of all our random flags.
    You can now do things like: `DEBUG="app:*,sync:*" npm start` to print out
    everything.
    
    Test Plan: manual
    
    Reviewers: mark, halla, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4297
    emorikawa committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    f9c0a93 View commit details
    Browse the repository at this point in the history
  2. [client-app] rename DatabaseTransaction -> DatabaseWriter

    Summary: Renamed in prep for next few diffs
    
    Test Plan: manual
    
    Reviewers: juan, mark, spang, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4302
    emorikawa committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    559ecb1 View commit details
    Browse the repository at this point in the history
  3. [client-app] add DatabaseStore.write which doesn't use Transactions

    Summary:
    Creates a new `DatabaseStore.write` method alongside
    `DatabaseStore.inTransaction` that doesn't always wrap trivial queries in
    a transaction. SQLite does this automatically.
    
    Test Plan: manual
    
    Reviewers: spang, mark, halla, juan
    
    Reviewed By: halla, juan
    
    Differential Revision: https://phab.nylas.com/D4303
    emorikawa committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    ae278fa View commit details
    Browse the repository at this point in the history
  4. bump(version): 1.0.53

    Nylas Coffee Machine committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    13ac2fa View commit details
    Browse the repository at this point in the history
  5. [client-sync] Fix the new syncback-task structure

    Summary:
    - Change files to .es6 so they recognize the syntax
    - Pass arguments down to _run()
    - Make sure the responses get returned
    
    Test Plan: manual, even though that somehow failed before. :(
    
    Reviewers: evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4309
    Halla Moore committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    c6a339d View commit details
    Browse the repository at this point in the history
  6. [client-sync] Properly wrap the SyncWorker arg in an object

    The argument structure for runTask() changed and needs it this way.
    Halla Moore committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    ae2e212 View commit details
    Browse the repository at this point in the history
  7. [client-sync] Wrap more syncWorker args

    Turns out the SyncWorker isn't the only one who initiates SyncTasks
    Halla Moore committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    af6e6e6 View commit details
    Browse the repository at this point in the history
  8. [client-app] Don't hit contact rankings endpoint until account is ready

    Summary:
    This prevents us from hitting the endpoint before the database for that
    account is initialized and it's actually syncing.
    
    Before this commit, we would throw errors upon adding an account
    
    Test Plan: manually add, remove accounts, run benchmark script
    
    Reviewers: mark, halla, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4305
    jstejada committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    58cf02a View commit details
    Browse the repository at this point in the history
  9. [client-app] Ensure sync worker can never continue running after bein…

    …g destroyed
    
    Summary:
    Previously, it was possible for the sync worker to continue running after being
    interrupted, e.g. it would break out of `performSync` and then try to run
    `onSyncCompleted`. This is fine if we were just interrupting to restart the loop,
    but when we stop it we don't want it to continue running anything at all.
    
    This also refactors the syncworker to have a single `destroy` method, which sets
    a `destroyed` flag and uses that one exclusively instead of the `stopped` flag.
    
    Test Plan: manually check it works
    
    Reviewers: spang, halla, mark, evan
    
    Reviewed By: mark, evan
    
    Differential Revision: https://phab.nylas.com/D4307
    jstejada committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    9181914 View commit details
    Browse the repository at this point in the history
  10. [client-app] Don't imeout removing sync worker when removing an account

    Summary:
    Most of the times when removing a sync worker (i.e. when removing an
    account), we would see database errors in the console. This happened
    because more often than not we would interrupt in the middle of message
    processing, but `processMessage` is not interruptible, which means that
    the worker would be interrupted right after processing its current
    message. However, if `processMessage` would take more than 500ms (the
    current timeout for stopping the worker), we would destroy the database
    before processing was done and it would throw a bunch of errors.
    
    To fix this, we just don't set a timeout when removing the worker as a consequence
    of removing an account. However, when we are removing the worker when we
    detect that it is stuck, we set a time out of 5 seconds.
    
    Test Plan: manually test removing accounts, verify that it doesn't error
    
    Reviewers: mark, halla, evan
    
    Reviewed By: halla, evan
    
    Differential Revision: https://phab.nylas.com/D4308
    jstejada committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    590b17a View commit details
    Browse the repository at this point in the history
  11. [client-app] delay building new hot window to improve win perf

    Summary:
    This improves window open times by about 70ms
    We would spend a very long time in the backend browser process building a
    new hot window when we didn't need to do that until much later
    
    Test Plan: manual
    
    Reviewers: halla, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4311
    emorikawa committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    4deef8b View commit details
    Browse the repository at this point in the history
  12. [client-sync] Simplify Contact ranking query

    Summary:
    We were using a couple of left outer joins to avoid checking whether we
    should be joining on Labels or Folders. We can greatly simplify the query
    by just checking which we should use and issuing the correct inner join.
    
    Test Plan: Run locally, verify contact ranking still works.
    
    Reviewers: spang, juan, evan
    
    Reviewed By: juan, evan
    
    Differential Revision: https://phab.nylas.com/D4310
    Mark Hahnenberg committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    0205ac3 View commit details
    Browse the repository at this point in the history
  13. bump(version): 1.0.54

    Nylas Coffee Machine committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    328ea42 View commit details
    Browse the repository at this point in the history
  14. [client-app] remove the ANALYZE in favor of pragma.optimize

    Summary:
    Removes some VERY long running `ANLAYZE` queries. Was taking up to 50
    seconds on my 9GB database on every boot
    https://sqlite.org/pragma.html#pragma_optimize
    
    Test Plan:
    I tested to make sure the app still quits quickly. It does. The SQLite
    docs also say this should be fast.
    
    Reviewers: halla, spang, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4314
    emorikawa committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    e6b399e View commit details
    Browse the repository at this point in the history
  15. [client-app] Remove getUnindexedAccounts

    Summary: It was really slow, and we no longer need it.
    
    Test Plan: Run locally, verify that we no longer do that super slow query
    
    Reviewers: evan, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4312
    Mark Hahnenberg committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    f6a0ead View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c4763d4 View commit details
    Browse the repository at this point in the history
  17. [client-sync] Split Contact ranking query

    Summary:
    We were using a join for the contact ranking query and for whatever
    reason on large databases this was extremely slow in SQLite. This diff
    splits the query into first finding the sent Folder/Label and then
    searching for non-draft Messages in that category.
    
    Test Plan: Run locally, verify the query is faster
    
    Reviewers: juan, evan, spang
    
    Reviewed By: spang
    
    Differential Revision: https://phab.nylas.com/D4315
    Mark Hahnenberg committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    70bb602 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    1864a2d View commit details
    Browse the repository at this point in the history
  19. [client-app] don't override existing bodies on K2

    Summary:
    Bodies that already exist on K2 shouldn't be overridden.
    See the comment for how this caused open/link tracking to fail in certain
    cases when a lot of messages were being sent
    
    Test Plan: manual
    
    Reviewers: halla, mark, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4319
    emorikawa committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    96685be View commit details
    Browse the repository at this point in the history
  20. bump(version): 1.0.55

    Nylas Coffee Machine committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    7e0194e View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2017

  1. [client-app] Remove unecessary db setup for mail rules

    Summary: This shaves off ~150ms trying to issue this query
    
    Test Plan: manual
    
    Reviewers: evan, spang, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4317
    jstejada committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    be237d0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    020fd79 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2017

  1. Configuration menu
    Copy the full SHA
    b01976f View commit details
    Browse the repository at this point in the history
  2. [client-app] enable snooze, send later, reminders on 1.0.56

    Summary: This enables packages on 1.0.56
    
    Test Plan: manual
    
    Reviewers: juan, halla
    
    Reviewed By: juan, halla
    
    Differential Revision: https://phab.nylas.com/D4320
    emorikawa committed Apr 3, 2017
    Configuration menu
    Copy the full SHA
    11684c6 View commit details
    Browse the repository at this point in the history
  3. [client-app] add feature limits to reminders and send later

    Summary:
    This adds feature limit modals (graphics pending) for reminders and send
    later
    
    Test Plan: manual
    
    Reviewers: juan, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4322
    emorikawa committed Apr 3, 2017
    Configuration menu
    Copy the full SHA
    368201f View commit details
    Browse the repository at this point in the history
  4. [client-app] re-setup IdentityStore in new window

    Summary:
    Before this patch, the IdentityStore would initialize in our empty hot
    window. However, hot windows don't receive any `action-bridge-message`s,
    which include DB updates. Since the hot window loads first, it was with a
    stale verison of the Identity. The main window fetches a fresh identity,
    but that fresh update failed to get to new composers because the hot
    window wasn't listening to changes to the DB.
    
    This makes it such that the IdentityStore properly boots up when the
    window props change.
    
    Test Plan: manual
    
    Reviewers: halla, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4327
    emorikawa committed Apr 3, 2017
    Configuration menu
    Copy the full SHA
    2f082f8 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2017

  1. [client-sync] Don't assign duplicate roles in folder fetch

    Summary:
    Check that there aren't any other categories with a role before we try
    to assign it to the current category.
    
    Addresses T7835
    
    Test Plan: manual
    
    Reviewers: juan, evan, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4298
    Halla Moore committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    7079b21 View commit details
    Browse the repository at this point in the history
  2. [client-app] Fix sqlite build for older versions of clang

    Summary: See title
    
    Test Plan: Run locally on older version of clang
    
    Reviewers: juan, spang, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4329
    Mark Hahnenberg committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    7818f42 View commit details
    Browse the repository at this point in the history
  3. bump(version): 1.0.56

    Nylas Coffee Machine committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    dfde1b9 View commit details
    Browse the repository at this point in the history
  4. bump(version): 2.0.0

    emorikawa committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    f6bc2c4 View commit details
    Browse the repository at this point in the history
  5. [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/D4328
    Mark Hahnenberg committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    e06f729 View commit details
    Browse the repository at this point in the history
  6. [client-app] Remove sudo from benchmark-initial-sync.sh

    Summary:
    We created the process so we can also kill it with no problems. This
    makes it easier to automatically run benchmarks without human
    intervention.
    
    Test Plan: Run locally
    
    Reviewers: spang, evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4332
    Mark Hahnenberg committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    f629818 View commit details
    Browse the repository at this point in the history
  7. [client-sync] Fix mail listener imap connection

    Summary:
    Given that we keep the imap mail listener conenction open outside of the
    imap connection pool, it might close itself after a while or after
    putting your computer to sleep.
    
    Previously, if we had the connection object we just assumed it was
    connected and proceeded with sync, and if it wasn't, we would fall into
    an error loop in the sync worker preventing it from syncing at all (T8065)
    
    To fix this, we just call `connect` every time to ensure the connection is open.
    (This was the case before we introduced the connection pool)
    
    Test Plan: manual
    
    Reviewers: mark, spang, halla, evan
    
    Reviewed By: halla, evan
    
    Differential Revision: https://phab.nylas.com/D4334
    jstejada committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    7dec807 View commit details
    Browse the repository at this point in the history
  8. [client-sync] Ensure we use refreshed access token for mail listener …

    …conn
    
    Summary:
    Before this commit, we would just establish a single mail listener imap
    connection and never check if we needed to re-connect it due to an
    expired access token. Even though we correctly refreshed the access
    token at the beggining of each sync loop (hidden under
    `ensureSMTPConnection`), we would never re-establish the mail listener
    connection with the new access token.
    
    This would cause the app to enter an `Invalid Credentials` error loop in
    the sync loop, preventing from syncing any mail at all (T8064)
    
    Test Plan: manual
    
    Reviewers: spang, halla, mark, evan
    
    Reviewed By: mark, evan
    
    Differential Revision: https://phab.nylas.com/D4338
    jstejada committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    a461490 View commit details
    Browse the repository at this point in the history
  9. [client-app] Fix benchmark script

    Summary:
    We weren't changing into the directory of the git repository, so running
    the script from anywhere but inside the git repo didn't work. We also
    weren't pulling before checking for the latest commit. Now we do both of
    these things.
    
    Test Plan: Run locally
    
    Reviewers: spang, juan, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4339
    Mark Hahnenberg committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    4eef086 View commit details
    Browse the repository at this point in the history
  10. [scripts] Add script to upload benchmark data to Google Sheets

    Test Plan: ran locally (need client secret for this)
    
    Reviewers: mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4343
    spang committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    bd933f1 View commit details
    Browse the repository at this point in the history
  11. [client-app] Add script to run benchmarks once per day at specified time

    Summary: See title
    
    Test Plan: Run locally
    
    Reviewers: juan, evan, spang
    
    Reviewed By: spang
    
    Differential Revision: https://phab.nylas.com/D4345
    Mark Hahnenberg committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    00e1df8 View commit details
    Browse the repository at this point in the history
  12. [scripts] Batch upload each row

    Makes the script like 4x faster.
    spang committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    2095f09 View commit details
    Browse the repository at this point in the history
  13. [client-app] Prevent from making any requests when NylasID isn't present

    Summary:
    Sometimes, when logging out of your NylasID and restarting the app, we
    would continue making some requests from the worker window that required a
    NylasID. This would make the app enter a restart loop and become
    completely unresponsive because when we made a request without a
    NylasID, we would force the user to log out and restart the app, and
    then we would again make the requests without the id, ad infinitum.
    
    To fix this, we make sure we have a NylasID before making any requests
    that require it
    
    Test Plan: manual
    
    Reviewers: halla, evan
    
    Reviewed By: halla, evan
    
    Differential Revision: https://phab.nylas.com/D4344
    jstejada committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    d1b81b6 View commit details
    Browse the repository at this point in the history
  14. [client-app] Make sure to fetch latest update url every time we check…

    … for updates
    
    Summary:
    Previously, is you signed out of your NylasID, you would not pick up new
    updates because we never updated the autoupdater url to use the new id.
    
    Test Plan: manual
    
    Reviewers: mark, halla, evan
    
    Reviewed By: halla, evan
    
    Differential Revision: https://phab.nylas.com/D4346
    jstejada committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    7d99567 View commit details
    Browse the repository at this point in the history
  15. [client-app] Allow the packageMigrationManager to re-enable packages

    Summary:
    Remove packages from the disabled package list when they have been
    migrated to be enabled by default.
    
    Also, the last migration would not have worked properly anyways because
    the daily channel was already on 1.0.56, and we check for greater-than
    rather than equal-to. Bump that version to match the next update.
    
    Test Plan: manual
    
    Reviewers: juan, evan
    
    Reviewed By: juan, evan
    
    Differential Revision: https://phab.nylas.com/D4335
    Halla Moore committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    2b39af5 View commit details
    Browse the repository at this point in the history
  16. [client-app] Fix the unapply transformation for overlaid components

    Summary:
    The unapply transformation was incorrectly passing the props parameter
    to buildAnchorTag() as a string, even though it expects an object.
    buildAnchorTag() goes on to stringify this parameter, which causes extra
    surrounding quotations and escape slashes in front of all the other
    quotations. The unapply transform is applied on several re-renders,
    which causes the number of escape characters to unboundedly increase.
    Firstly, this was causing inline images to not appear properly in the
    draft, and secondly, the large number of escape characters was making
    the draft body large enough to make the app unresponsive.
    
    This generally wasn't an issue because the unapply transformation is
    only applied when there has been an apply transformation, and this is
    triggered by the SyncbackDraftTask. This task was previously only queued
    upon send, in which case the user never re-opens the draft. Now,
    enabling send-later on a draft will queue the task, and these issues
    appear if the user re-opens the draft for editing.
    
    This diff makes it so that the unapply transform passes in the props as
    an object, like the buildAnchorTag function expects.
    
    Test Plan: manual
    
    Reviewers: evan, juan
    
    Reviewed By: evan, juan
    
    Differential Revision: https://phab.nylas.com/D4348
    Halla Moore committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    5c8915f View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2017

  1. [client-sync] 🎨 sync worker

    Summary: Just renaming some stuff
    
    Test Plan: manual
    
    Reviewers: mark, spang, evan, halla
    
    Reviewed By: spang, evan, halla
    
    Differential Revision: https://phab.nylas.com/D4342
    jstejada committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    2949ecf View commit details
    Browse the repository at this point in the history
  2. [iso-core] Remove unused vars from IMAPConnectionPool

    Summary: see title
    
    Test Plan: manual
    
    Reviewers: mark, halla, spang, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4357
    jstejada committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    f8d84a7 View commit details
    Browse the repository at this point in the history
  3. [client-app] Add better logging when restarting stuck sync worker

    Summary: see title
    
    Test Plan: manual
    
    Reviewers: halla, mark, spang, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4358
    jstejada committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    d75a5ee View commit details
    Browse the repository at this point in the history
  4. [client-sync] 🎨 logging

    jstejada committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    a3072f6 View commit details
    Browse the repository at this point in the history
  5. [cloud-*] log errors according to bunyan specs

    Summary:
    According to bunyan, https://github.com/trentm/node-bunyan, errors are
    treated special. They either need to be the first argument of a log, or
    they need to be attached to the special `err` (NOT `error`) key of the
    logger object.
    
    Test Plan: manual
    
    Reviewers: halla, juan, spang
    
    Reviewed By: halla, juan, spang
    
    Differential Revision: https://phab.nylas.com/D4337
    emorikawa committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    08a697e View commit details
    Browse the repository at this point in the history
  6. [cloud-*] remove old SignalFX reporter & add docs

    Summary:
    This removes the old SignalFX reporter that we weren't using
    Adding documentation around logging
    
    Test Plan: manual
    
    Reviewers: juan, halla, spang
    
    Reviewed By: juan, halla, spang
    
    Differential Revision: https://phab.nylas.com/D4341
    emorikawa committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    78a1570 View commit details
    Browse the repository at this point in the history
  7. [client-sync] Prevent IMAP connection leaking in sync worker

    Summary:
    When the sync worker got stuck inside `performSync`, we would never
    release the connection back to the connection pool. We would then try to
    start a new sync worker, and it would claim a new connection. If this
    happened enough times, we would eventually exhaust the whole pool and
    keep the sync worker blocked forever.
    
    Test Plan: manual
    
    Reviewers: evan, spang, halla, mark
    
    Reviewed By: halla, mark
    
    Differential Revision: https://phab.nylas.com/D4359
    jstejada committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    5269c11 View commit details
    Browse the repository at this point in the history
  8. [iso-core] IMAPConnectionPool now correctly disposes connections `onD…

    …one`
    
    Summary:
    Previously, calling the IMAPConnectionPool `onDone` callback when checking out a connection would just return the connection to the pool without re-establishing it the next time we checked it out of the pool.
    
    When the `onDone` callback was called in an error scenario, this had the unintended consequence of returning a bad connection to the pool, and then re-using this bad connection. The only scenario when the connection was re-established was if `onConnected` threw an error, but if the connection was kept open outside the scope of onConnected, this logic would never run.
    
    To make things simpler and more consistent, `onDone` will always destroy all connections and connections will always be re-established from scratch every time they are checked out of the pool. The pool acts more as a limit to the number of connections per account, than an actual shared pool of connections.
    
    Test Plan: manual
    
    Reviewers: evan, spang, halla, mark
    
    Reviewed By: halla, mark
    
    Differential Revision: https://phab.nylas.com/D4360
    jstejada committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    f708e3a View commit details
    Browse the repository at this point in the history
  9. bump(version): 2.0.1

    Nylas Coffee Machine committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    3653a66 View commit details
    Browse the repository at this point in the history
  10. [client-sync] Fix runtime error when getting sync activity for account

    Summary:
    Make sure SyncActivity.getLastSyncActivityForAccount returns a sensible
    default to prevent runtime errors when the SyncProcessManager uses it
    
    Test Plan: manual
    
    Reviewers: evan, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4366
    jstejada committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    fc7856b View commit details
    Browse the repository at this point in the history
  11. [client-sync] Fix syncWorker arg

    Summary: It needs to be wrapped in an object.
    
    Test Plan: manual
    
    Reviewers: evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4367
    Halla Moore committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    d9a9d66 View commit details
    Browse the repository at this point in the history
  12. [client-app] Some final benchmark fixes

    Summary: See title
    
    Test Plan: Run on the coffee machine
    
    Reviewers: juan, evan, spang
    
    Reviewed By: spang
    
    Differential Revision: https://phab.nylas.com/D4368
    Mark Hahnenberg committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    9659467 View commit details
    Browse the repository at this point in the history
  13. [client-app] Updates to feature limiting

    This is a squash of a bunch of commits releated to feature limiting.
    Includes making the upgrade path seamless by accessing billing through a
    WebView and making sure that the feature is enabled after upgrading, or
    canceled if the upgrade path is stopped by the user in any way.
    
    Included diffs
    ---------------
    Differential Revision: https://phab.nylas.com/D4078
    Differential Revision: https://phab.nylas.com/D4136
    Differential Revision: https://phab.nylas.com/D4137
    Differential Revision: https://phab.nylas.com/D4143
    Differential Revision: https://phab.nylas.com/D4147
    Differential Revision: https://phab.nylas.com/D4171
    Differential Revision: https://phab.nylas.com/D4173
    emorikawa authored and Halla Moore committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    4904a9a View commit details
    Browse the repository at this point in the history
  14. bump(version): 2.0.2

    Halla Moore committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    b5a19dd View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2017

  1. [*] Revamp SSL options (including user-facing)

    Summary:
    Previously, the generic IMAP auth screen presented one security option to
    users: "Require SSL". This was ambiguous and difficult to translate into
    the correct security options behind the scenes, causing confusion and problems
    connecting some accounts.
    
    This patch does the following:
    * Separates security settings for IMAP and SMTP, as these different protocols
      may also require different SSL/TLS settings
    
    * Reworks the generic IMAP auth page to allow specifying security settings
      with higher fidelity. We looked at various different email apps and decided
      that the best solution to this problem was to allow more detailed
      specification of security settings and to ease the burden of more options
      by having sane defaults that work correctly in the majority of cases.
      This new screen allows users to pick from "SSL / TLS", "STARTTLS", or "none"
      for the security settings for a protocol, and also to instruct us that
      they're OK with us using known insecure SSL settings to connect to their
      server by checking a checkbox.
    
      We default to port 993 / SSL/TLS for IMAP and port 587 / STARTTLS for SMTP.
      These are the most common settings for providers these days and will work
      for most folks.
    
    * Significantly tightens our default security. Now that we can allow folks to
      opt-in to bad security, by default we should protect folks as best we can.
    
    * Removes some now-unnecessary jank like specifying the SSLv3 "cipher"
      in some custom SMTP configs. I don't think this was actually necessary
      as SSLv3 is a protocol and not a valid cipher, but these custom
      configs may have been necessary because of how the ssl_required flag was
      linked between IMAP and SMTP before (and thus to specify different
      settings for SMTP you'd have to override the SMTP config).
    
    * Removes hard-coding of Gmail & Office365 settings in several
      locations. (This was a major headache while working on the patch.)
    
    This depends on version 2.0.1 of imap-provider-settings, which has major
    breaking changes from version 1.0. See commit for more info:
    nylas/imap-provider-settings@9851054
    
    Among other things, I did a serious audit of the settings in this file and
    "upgraded" a few servers which weren't using the SSL-enabled ports for their
    provider to the secure ones. Hurray for nmap and openssl.
    
    Test Plan: manual
    
    Reviewers: evan, mark, juan, halla
    
    Reviewed By: juan, halla
    
    Differential Revision: https://phab.nylas.com/D4316
    spang committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    cfe2971 View commit details
    Browse the repository at this point in the history
  2. bump(version): 2.0.3

    Nylas Coffee Machine committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    68b5550 View commit details
    Browse the repository at this point in the history
  3. bump(version): 2.0.4

    Nylas Coffee Machine committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    bb03d3c View commit details
    Browse the repository at this point in the history
  4. [isomorphic-core] Ensure IMAPConnPool uses updated account credentials

    Summary:
    Previously, we would initialize an `AccountPool` with an account
    instance and reference the account as an instance variable. Then,
    every time we created a connection, we used the account we had a
    reference to obtain the credentials.
    
    However, if the credentials on the account changed, e.g. when we refresh
    the access token for gmail accounts, the connection pool would never
    realize that the account had new credentials and always try to create
    the connection with the old credentials, causing the sync worker to
    enter an error loop of `Invalid credentials` errors
    
    To fix this, we could reload the account every time we try to create a
    connection, but it seems that the fresh credentials should just be
    passed every time we create connections without the pool having to be
    aware of potential changes under the rug.
    
    This commit makes it so the pool no longer holds a reference to the
    account, but rather it is passed in every time we check out a connection
    
    Test Plan: manual. how did this even work before? :(
    
    Reviewers: evan, halla, spang, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4370
    jstejada committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    8633058 View commit details
    Browse the repository at this point in the history
  5. [iso-core, cloud-*] move generate XOAuth2 & fix first auth usage

    Summary:
    We were not generating the XOAuth2 token on the first go when connecting
    accounts. This would cause the first send later to fail. Since this
    happens in ISO core, we needed to move the function out of cloud-core and
    import from other places that use it
    
    Test Plan: Manual
    
    Reviewers: khamidou, juan, halla, spang
    
    Reviewed By: spang
    
    Differential Revision: https://phab.nylas.com/D4375
    emorikawa committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    2ee67d2 View commit details
    Browse the repository at this point in the history
  6. bump(version): 2.0.5

    Nylas Coffee Machine committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    50c0329 View commit details
    Browse the repository at this point in the history
  7. [client-app] Always fetch and update identity regardless of env

    Summary:
    This was annoying because we wouldn't fetch the identity when running `local`
    env which produced all sorts of errors
    
    Test Plan: manual
    
    Reviewers: evan, spang, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4380
    jstejada committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    5880f2a View commit details
    Browse the repository at this point in the history
  8. [dev] Ensure daily script grabs current version after pulling latest …

    …changes
    
    Summary: see title
    
    Test Plan: manual
    
    Reviewers: halla, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4378
    jstejada committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    10d199f View commit details
    Browse the repository at this point in the history
  9. bump(version): 2.0.6

    Nylas Coffee Machine committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    3074ee2 View commit details
    Browse the repository at this point in the history
  10. [cloud-*] Switch MySQL charset to utf8mb4

    Summary:
    We need this in order to be able to store 4-byte emoji and other
    extended unicode characters in the database.
    
    Test Plan: deploy to staging - need the change that sets the connection charset on staging :(
    
    Reviewers: khamidou, juan, evan
    
    Reviewed By: juan, evan
    
    Differential Revision: https://phab.nylas.com/D4387
    spang committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    d09312c View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2017

  1. [iso-core, cloud-*] catch JSON parse errors in DB columns

    Summary:
    MySQL would insert bad JSON due to emoji errors. This would cause JSON
    parse errors and prevent us from ever reading objects from the DB. We now
    catch and return null instead with an error which will at least let the
    query complete to let us isolate and deal with the malformed obeject (like
    destroy it)
    
    Test Plan: manual
    
    Reviewers: spang, halla, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4389
    emorikawa committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    236c71e View commit details
    Browse the repository at this point in the history
  2. [cloud-workers] [send-later] Fix send later token expiration

    Summary:
    Fixes T8076. So, the Gmail OAuth API returns us an expiration time in milliseconds, but we convert it to seconds everywhere, except in the cloud-api. This caused us to never refresh tokens because we'd be comparing seconds to milliseconds.
    
    Fix this by converting the `expiry_date` from our credentials to seconds.
    
    Test Plan: Tested manually. Will do more testing tomorrow, after my credentials expire.
    
    Reviewers: evan, juan
    
    Reviewed By: evan, juan
    
    Maniphest Tasks: T8076
    
    Differential Revision: https://phab.nylas.com/D4390
    khamidou committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    0131837 View commit details
    Browse the repository at this point in the history
  3. bump(version): 2.0.7

    jstejada committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    17ade15 View commit details
    Browse the repository at this point in the history
  4. [client-app] Ensure SyncbackMetadataTask dependency to prevent versio…

    …n conflicts
    
    Summary:
    Previously, SyncbackMetadataTasks for the same plugin did not depend on
    each other, so they could try to modify the same piece of metadata
    concurrently, which would likely produce version conflict errors.
    
    This was happening with send reminders because we were queuing 2 of
    these tasks back to back upn send success. Adding this dependency fixes
    the version conflict errors when setting the metadata
    
    Test Plan: manual
    
    Reviewers: evan, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4393
    jstejada committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    7630103 View commit details
    Browse the repository at this point in the history
  5. bump(version): 2.0.8

    Nylas Coffee Machine committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    a30e63c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3befaf2 View commit details
    Browse the repository at this point in the history
  7. [client-sync] Increase sqlite page_size and cache_size

    Summary:
    The defaults are a little low. edgehill.db already does this. There's no
    obvious effect on smaller dbs, but we should at least make the two
    consistent.
    
    Test Plan: Run locally
    
    Reviewers: spang, evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4395
    Mark Hahnenberg committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    b323e38 View commit details
    Browse the repository at this point in the history
  8. [client-sync] Transaction-ify processMessage

    Summary:
    We do lots of writes while processing a single message. To reduce the
    write churn from lots of mini-transactions, this diff threads one
    overarching transaction to everything in processMessage.
    
    Test Plan: Run locally
    
    Reviewers: spang, evan, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4394
    Mark Hahnenberg committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    c808438 View commit details
    Browse the repository at this point in the history
  9. [client-app] Add benchmark mode

    Summary:
    There are some settings that apply to dev and prod modes that we don't want
    to use while benchmarking. E.g. the folder where we store messages,
    whether we generate long stack traces in our bluebird promises, etc.
    This diff adds a benchmark mode so that we can change these settings to
    something that works better for benchmarking.
    
    Test Plan: Run locally, verify it works
    
    Reviewers: evan, juan, spang
    
    Reviewed By: juan, spang
    
    Differential Revision: https://phab.nylas.com/D4374
    Mark Hahnenberg committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    be4b0d7 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2017

  1. [isomorphic-core] Handle weird MIME edge case with @ symbol

    Summary:
    Something weird happens with the mime building when the participant name
    has an @ symbol in it (e.g. a name and email of [email protected] turns
    into 'hello@ <gmail.com [email protected]>'), so replace it with
    whitespace.
    
    Test Plan: manual
    
    Reviewers: evan, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4363
    Halla Moore committed Apr 10, 2017
    Configuration menu
    Copy the full SHA
    e8957b7 View commit details
    Browse the repository at this point in the history
  2. [client-app] Fix delta streaming connection retries

    Summary:
    Previously, every time our NylasLongConnection changed its status to
    `connected`, we would reset our backoff scheduler, assuming that
    every time our status changed to `connected` it meant that we would not
    receive any errors.
    
    However, if our backend is down or overloaded (or returning 401s like in
    our recent outage), we would do the following:
    
    1. Establish connection, change status to `connected`
    2. Reset backoff scheduler
    3. Receive error
    4. Close connection
    5. Schedule next retry using backoff scheduler. Delay will be 1s or less, because scheduler was reset in 2.
    6. Retry after delay,
    7. Repeat from 1., ad infinitum
    
    This caused us to consistantly hammer our servers and render our
    exponential backoff useless.
    
    This commit makes it so we conly reset the backoff scheduler when we
    actually receive deltas, and increments the max backoff to 10 minutes
    
    Test Plan:
    run against local n1Cloud, manually return 401s from the api, verify that we
    didn't backoff at all before this diff, verify that we backoff correctly after
    this diff
    
    Reviewers: mark, spang, halla
    
    Reviewed By: mark, spang, halla
    
    Differential Revision: https://phab.nylas.com/D4401
    jstejada committed Apr 10, 2017
    Configuration menu
    Copy the full SHA
    07d576d View commit details
    Browse the repository at this point in the history
  3. [client-app] Re-add imap to the onboarding accounts page

    Summary:
    Put the IMAP option back on the provider selection page within
    onboarding. Also remove the 'hidden' property on account types since I
    don't think we'll be using it for any other providers, and remove the
    'Add Custom IMAP Account' from the application menu.
    
    Addresses T8097
    
    Test Plan: Manual
    
    Reviewers: spang, mark, juan
    
    Reviewed By: mark, juan
    
    Differential Revision: https://phab.nylas.com/D4402
    Halla Moore committed Apr 10, 2017
    Configuration menu
    Copy the full SHA
    c6db6c3 View commit details
    Browse the repository at this point in the history
  4. [client-sync] Poll for gmail attribute changes from `_mailListenerIMA…

    …PConn`
    
    Summary:
    Normally, the imap connection emits an 'update' event when there are any
    flag changes. Gmail, however, only emits the 'update' event when there
    are new or removed messages. If there's a fairly large batch size being
    synced in the sync loop, we don't want to wait until the end of that to
    check if the highestmodseq has changed. To get around this, this diff
    updates the new mail listener connection to periodically poll for the
    highestmodseq and trigger the same update handler when changes are
    detected.
    
    Test Plan: manual
    
    Reviewers: evan, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4397
    Halla Moore committed Apr 10, 2017
    Configuration menu
    Copy the full SHA
    15c3e32 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2017

  1. bump(version): 2.0.9

    Nylas Coffee Machine committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    a412580 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6f8f16 View commit details
    Browse the repository at this point in the history
  3. [client-sync] Don't report stuck sync processes to Sentry

    Summary: Just to mixpanel. Addresses T8095
    
    Test Plan: Meh
    
    Reviewers: mark, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4403
    Halla Moore committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    f82c72a View commit details
    Browse the repository at this point in the history
  4. [*] MessageFactory -> MessageUtils, SendUtils -> ModelUtils

    Summary: Rename some util files
    
    Test Plan: manual
    
    Reviewers: evan, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4364
    Halla Moore committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    379edfe View commit details
    Browse the repository at this point in the history
  5. [isomorphic-core] Move buildMime to MessageUtils, add includeBcc option

    Summary:
    Since buildMime isn't always used explictly for the send operation (we
    mostly use it for stuffing the sent folder, which is a separate
    operation), move it to MessageUtils. Additionally, add an includeBcc
    option. We don't want the BCC header to be visible on outbound messages,
    but it needs to be present on the version that is saved to the sent
    folder.
    
    When we weren't including the BCC header in the sent folder version, we
    were getting an id mismatch between our optimistic message and the
    message that gets processed by the sync loop (because we include the bcc
    participants when computing the id hash). When the sent message was a
    reply, the optimistic message included the threadId, and this had the
    side effect of leaving both versions of the sent message in the thread.
    Since the optimistic message never receieved it's imap UID, any action
    performed on the thread would fail with the missing UID error as seen in
    T7941. Adding this BCC header will allow us to compute the proper id
    hash and reconcile the synced message with the optimistic message.
    
    Test Plan: manual
    
    Reviewers: evan, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4365
    Halla Moore committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    840ebeb View commit details
    Browse the repository at this point in the history
  6. [isomorphic-core] Add missing .default to require

    Halla Moore committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    6159402 View commit details
    Browse the repository at this point in the history
  7. [client-app] Fix SyncbackMetadataTask dependency

    Summary:
    Add a sequentialId check in isDependentOnTask() so that the first
    SyncbackMetadataTask won't get blocked on other SyncbackMetadataTasks
    in the queue for the same pluginId.
    
    Addresses T8112
    
    Test Plan: Manual
    
    Reviewers: spang, mark, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4404
    Halla Moore committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    d226eaf View commit details
    Browse the repository at this point in the history
  8. [client-sync] Ensure allmail folder exists before trying to access it

    Summary:
    When checking for flag updates for gmail accounts, when syncing for the
    first time the all mail folder won't be available because we haven't
    fetched the folder list, so it will throw a runtime error
    
    Test Plan: manual
    
    Reviewers: mark, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4405
    jstejada committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    0525767 View commit details
    Browse the repository at this point in the history
  9. bump(version): 2.0.10

    Nylas Coffee Machine committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    545f6a3 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    58d2274 View commit details
    Browse the repository at this point in the history
  11. [client-app] Rate limit database malformed error reports to sentry

    Summary:
    We were reporting 1m+ of these events, heavily contributing towards our
    quota
    
    Test Plan: manual
    
    Reviewers: halla, mark
    
    Reviewed By: halla, mark
    
    Differential Revision: https://phab.nylas.com/D4406
    jstejada committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    8d9b247 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2017

  1. Revert "[client-sync] Transaction-ify processMessage"

    Summary:
    This reverts commit c808438.
    
    Adding an overarching transaction to `processMessage` is causing
    database locked errors when processing deltas, specifically when trying
    to write to the Transaction table, given that that write happens
    asynchronously inside the execution of `processMessage`, but doesn't
    have access to its transaction. See T8117
    
    Given that the performance gains from wrapping messgae processing in a
    transaction were not significant, let's revert this to prevent db
    locking issues
    
    Test Plan: manual
    
    Reviewers: halla, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4411
    jstejada committed Apr 12, 2017
    Configuration menu
    Copy the full SHA
    d30559a View commit details
    Browse the repository at this point in the history
  2. [client-app] Fix unhandled rejection handling (fix ipc parse error)

    Summary:
    Previously, we were listening for unhanlded rejections on both the
    `window` and the `process`. However, the window handler didn't receive
    an error as a parameter, but rather a window event. When trying to
    report this event and sending it over IPC we would get an ipc parse
    error.
    
    This commit makes it so we correctly report the error instead of the
    window event.
    
    Test Plan: manual
    
    Reviewers: mark, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4412
    jstejada committed Apr 12, 2017
    Configuration menu
    Copy the full SHA
    b6771ea View commit details
    Browse the repository at this point in the history
  3. [client-app] Don't double report unhandled rejections

    Summary:
    We listen for unhandled rejections on both the `process` and the `window`. From
    my understanding, both are necessary because some errors might escape
    one or the other. However, most errors get caught by both handlers, so
    we don't want to double report them to sentry (or the console).
    
    To prevent this, this commit debounces the unhandled rejection handler
    for a very short time so that the same error only gets reported once.
    Additionally, it rate limits reports to sentry based on the stack trace
    
    Test Plan: manual
    
    Reviewers: mark, halla
    
    Reviewed By: mark, halla
    
    Differential Revision: https://phab.nylas.com/D4413
    jstejada committed Apr 12, 2017
    Configuration menu
    Copy the full SHA
    1bf453d View commit details
    Browse the repository at this point in the history
  4. Revert "[client-sync] Poll for gmail attribute changes from `_mailLis…

    …tenerIMAPConn`"
    
    This reverts commit 15c3e32.
    
    See https://phab.nylas.com/D4410 for details on why it was reverted
    jstejada committed Apr 12, 2017
    Configuration menu
    Copy the full SHA
    811843f View commit details
    Browse the repository at this point in the history
  5. [client-sync] Dispose of mail listener connection before getting new one

    Summary:
    When we had to refresh our credentials for the mail listener connection we
    weren't disposing of the old connection which caused us to slowly leak
    connections from the IMAP connection pool, eventually requiring a
    restart. Now we always dispose of the connection prior to requesting a
    new one from the pool.
    
    Test Plan: Run locally always refreshing credentials, verify we don't get stuck
    
    Reviewers: spang, evan, halla, juan
    
    Reviewed By: halla, juan
    
    Subscribers: halla
    
    Differential Revision: https://phab.nylas.com/D4414
    Mark Hahnenberg committed Apr 12, 2017
    Configuration menu
    Copy the full SHA
    8d4ef16 View commit details
    Browse the repository at this point in the history
  6. bump(version): 2.0.11

    Nylas Coffee Machine committed Apr 12, 2017
    Configuration menu
    Copy the full SHA
    3396254 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e4dcfa4 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2017

  1. [*] Remove useless docs

    Summary:
    This makes grepping the codebase really painful. We don't need these
    docs here
    
    Test Plan: manual
    
    Reviewers: mark halla spang evan
    
    Subscribers:
    jstejada committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    664da98 View commit details
    Browse the repository at this point in the history
  2. [client-app] Prevent old N1 config from getting wiped when installing…

    … Nylas Mail
    
    Summary:
    Due to a legacy migration system, users that had previously installed
    old N1 (1.5.0) would get their N1 config wiped after installing Nylas
    Mail (2.0) in most cases.
    
    See https://github.com/nylas/nylas-mail/blob/n1-pro/src/browser/nylas-pro-migrator.es6 for details
    
    Fixes T8096
    
    Test Plan: manual
    
    Reviewers: halla, spang, mark
    
    Reviewed By: mark
    
    Maniphest Tasks: T8096
    
    Differential Revision: https://phab.nylas.com/D4417
    jstejada committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    9c889c7 View commit details
    Browse the repository at this point in the history
  3. [client-app] Fix runtime error in FetchFolderList

    Summary: See title
    
    Test Plan: manual
    
    Reviewers: mark, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4418
    jstejada committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    d5a2afd View commit details
    Browse the repository at this point in the history
  4. [client-app] Prevent NM from overwriting N1 binary on windows

    Summary:
    This changes the `name` option we pass to `electron-windows-installer`,
    which makes it so that the app is installed under
    `AppData\Local\NylasMail` instead of `AppData\Local\Nylas` where the
    old N1 binary lives
    
    Test Plan: manually tested the builds from `ci-test-4` branch on the surface machine
    
    Reviewers: mark, spang, khamidou, halla
    
    Reviewed By: khamidou, halla
    
    Differential Revision: https://phab.nylas.com/D4419
    jstejada committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    a7b1034 View commit details
    Browse the repository at this point in the history
  5. bump(version): 2.0.12

    Nylas Coffee Machine committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    94dc4d0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aa7749d View commit details
    Browse the repository at this point in the history
  7. [client-app] Correctly handle window.unhandledrejection events

    Summary:
    It seems that sometimes we get events that don't have `event.detail.reason`.
    This commits tries to make our best guess, or report info about the event shape
    
    Test Plan: manual
    
    Reviewers: mark, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4420
    jstejada committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    911d75b View commit details
    Browse the repository at this point in the history
  8. [client-app] Upload nupkg with correct name for win32 autoupdater to …

    …work
    
    Summary: See title
    
    Test Plan: manual
    
    Reviewers: spang, khamidou, halla
    
    Reviewed By: khamidou, halla
    
    Differential Revision: https://phab.nylas.com/D4421
    jstejada committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    fc55835 View commit details
    Browse the repository at this point in the history
  9. bump(version): 2.0.13

    Nylas Coffee Machine committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    1f307f6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9fbee22 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    91f5ca4 View commit details
    Browse the repository at this point in the history
  12. [client-sync] Fix contact ranking error

    Summary:
    This was showing up in Sentry. Check to see if the recipient has an email
    before calling toLowerCase.
    
    Test Plan: yolo
    
    Reviewers: halla, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4423
    Mark Hahnenberg committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    b112343 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2017

  1. Configuration menu
    Copy the full SHA
    c6f7a86 View commit details
    Browse the repository at this point in the history
  2. [client-sync] Correctly remove sync worker reference when destroying it

    Summary:
    By nullifying the key inside `workersByAccountId` we would attempt to
    access accountIds that no longer existed in other parts of the code by
    using Object.keys()
    
    This makes it so we correctly completely remove the record from the map
    
    Test Plan: manual
    
    Reviewers: halla, spang, mark
    
    Reviewed By: mark
    
    Differential Revision: https://phab.nylas.com/D4426
    jstejada committed Apr 14, 2017
    Configuration menu
    Copy the full SHA
    373eb96 View commit details
    Browse the repository at this point in the history
  3. [client-sync] Prevent duplicate accounts and sync workers

    Summary:
    After https://github.com/nylas/nylas-mail-all/commit/008cb4c, the shape of
    account.connectionSettings changed, which means that ids for accounts
    will also change, given that they are based on the connection settings (see
    Account.hash()).
    
    This is fine in most cases, except for accounts that were running on a
    version of Nylas Mail before 008cb4c, then upgraded to a version
    after 008cb4c, and then re-authed their account.
    In this scenario, re-authing the account will create a second account with
    a different `id` but with the same email address, along with an extra
    sequelize database, and will start a second SyncWorker for the same
    account. App-side, the `AccountStore` will correctly overwrite the first account,
    so users would correctly see just 1 account in the sidebar. However, given
    that 2 SyncWorkers would be running for the same account,
    message ids would collide in edgehill.db and this would cause
    threads to disappear from the ui as if they were being deleted.
    
    To fix this, we need to do 2 things:
    
    - Upon app start, we remove any duplicate accounts that might have been created due to this bug before starting any sync workers
    - If we detect that we are going to create a duplicate account upon auth success, we delete the old account first. This will effectively cause sync to restart for the account.
    
    Test Plan:
    Verified problem: Checked out a commit before 008cb4c, authed an account, checked out master, re-authed account, verified that duplicate accounts are created.
    
    Then test 2 scenarios:
    - With duplicate accounts present, checked out this commit, verified that duplicate account would be removed and sync would function normally.
    - With an account authed on a build before 008cb4c, checked out this commit, re-authed the account, and verified that duplicate account wouldn't be created
    
    Reviewers: mark, halla, khamidou, spang
    
    Reviewed By: spang
    
    Subscribers: tomasz
    
    Differential Revision: https://phab.nylas.com/D4425
    jstejada committed Apr 14, 2017
    Configuration menu
    Copy the full SHA
    00aa499 View commit details
    Browse the repository at this point in the history
  4. bump(version): 2.0.14

    Nylas Coffee Machine committed Apr 14, 2017
    Configuration menu
    Copy the full SHA
    66b9bd1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f9a7a59 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2c22d1a View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2017

  1. [client-app] Remove dead mail rules code

    Summary:
    Which was arguably already a code smell being inside the
    DatabaseStore
    
    Test Plan: manual
    
    Reviewers: mark, halla, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4430
    jstejada committed Apr 17, 2017
    Configuration menu
    Copy the full SHA
    5b99c56 View commit details
    Browse the repository at this point in the history
  2. [client-app] Correctly handle db malformed errors in main process

    Summary:
    This commit addressess issue T8135, which prevents the app from
    starting.
    
    This was happening because when 3111c16 landed, we added database
    access from the main (backend) electron process to be able to read the
    identity now stored in the database: nylas@3111c166#diff-1efa26fa0ae1603366b2c0033d971028R44
    However, we omitted to add any error handling, so if the database failed to open
    due to a database malformed error (which it does:
    https://sentry.io/nylas/nylas-mail/?query=is%3Aunresolved+release%3A2.0.14+malformed&statsPeriod=14d), the app will just fail to start,
    given that this happens during the initialization of the main process.
    Additionally, the fact that we had no error handling increased the error
    reports for malformed errors given that we would never handle them, so
    every-time we opened the app we would report the same error
    
    This commit adds the same error handling we have in the DatabaseStore
    and moves the code around so it's available both in the main and
    renderer processes.
    
    After this commit, if the database fails to open during main process
    initialization, due to malformed errors or others, we will correctly
    inform the user that the database is corrupted, rebuild it, and restart
    the app.
    
    Test Plan:
    manually throw errors during setup, verify that we handle them
    correctly
    
    Reviewers: mark, spang, evan, halla
    
    Reviewed By: evan, halla
    
    Differential Revision: https://phab.nylas.com/D4431
    jstejada committed Apr 17, 2017
    Configuration menu
    Copy the full SHA
    26868f6 View commit details
    Browse the repository at this point in the history
  3. [client-app] When resetting database, make sure to re-init db reader

    Summary: see title
    
    Test Plan: manual
    
    Reviewers: halla, mark, evan
    
    Reviewed By: evan
    
    Differential Revision: https://phab.nylas.com/D4432
    jstejada committed Apr 17, 2017
    Configuration menu
    Copy the full SHA
    ad50fde View commit details
    Browse the repository at this point in the history
  4. [client-app] Database malformed errors shouldn't be retryable

    Summary:
    Given that this error is unrecoverable it shouldn't be retryable.
    Additionally, this commit improves error handling for this error in a
    few ways:
    
    - Don't delete all databases, just edgehill.db which is the one we know is corrupted. (Use `handleDatabaseUnrecoverableError` instead of `Actions.resetEmailCache`)
    - Message the user about the database being reset so the app doesn't restart without notice, and make sure that this message is only displayed once by moving it to the main process
    
    Test Plan: manual
    
    Reviewers: mark, spang, evan, halla
    
    Reviewed By: evan, halla
    
    Differential Revision: https://phab.nylas.com/D4433
    jstejada committed Apr 17, 2017
    Configuration menu
    Copy the full SHA
    4a25f63 View commit details
    Browse the repository at this point in the history
  5. bump(version): 2.0.15

    Nylas Coffee Machine committed Apr 17, 2017
    Configuration menu
    Copy the full SHA
    8b9d98c View commit details
    Browse the repository at this point in the history
  6. [client-app] Fix benchmark mode

    Summary:
    We weren't passing benchmarkMode through in the default window options,
    so the worker window (or any other spawned window) would think it wasn't in
    benchmark mode.
    
    Test Plan:
    Run locally, verify that the worker window thinks it's in
    benchmark mode
    
    Reviewers: halla, spang, juan
    
    Reviewed By: juan
    
    Differential Revision: https://phab.nylas.com/D4427
    Mark Hahnenberg committed Apr 17, 2017
    Configuration menu
    Copy the full SHA
    92c3d8c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f9e2e0 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2017

  1. Merge private repo

    jstejada committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    be5c3d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d8f85a View commit details
    Browse the repository at this point in the history
  3. [client-app, client-sync] Move messages out of db into compressed fla…

    …t files
    
    Summary:
    Previously we stored message bodies uncompressed inside two different
    databases. This was bad for a few reasons:
    
    * Duplicate data in multiple places is an obvious waste of disk space
    * Uncompressed data also made the disk footprint bigger than it might
      otherwise be
    * Storing these large message bodies in the database made the db file
      larger than it otherwise could have been, increasing the size of
      tables and slowing down queries.
    
    This diff adds support for storing message bodies outside of the
    database in compressed flat files. It changes the use of the body column
    in the K2 database and the MessageBody table in the edgehill database to
    contain a blob of JSON that contains a path to the file on disk. We
    use the new format in an incremental fashion without having to perform an
    actual database migration by first checking if the body matches our expected
    JSON format and treating it appropriately if it doesn't. Both databases refer
    to the same file on disk, thus deduplicating the messages bodies. We also
    transparently support gzipping the message bodies stored on disk when we
    read from/write to the files. The real world space savings depends on the
    compressibility of the messages, but we've seen up to ~60% improvement in disk
    space usage for certain inboxes. Typical savings are closer to 20%. Also, by
    storing messages as separate files on disk we can potentially integrate with
    Spotlight search at some point in the future.
    
    Test Plan:
    Run locally, make sure that upgrade to this doesn't hose things,
    look at size of DB, read emails
    
    Reviewers: evan, spang, halla, juan
    
    Reviewed By: halla, juan
    
    Differential Revision: https://phab.nylas.com/D4422
    Mark Hahnenberg authored and jstejada committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    8d21d89 View commit details
    Browse the repository at this point in the history
  4. [*] Postinstall should install client-sync regardless of private plugins

    Summary: see title
    
    Test Plan: manual
    
    Reviewers: spang, evan, mark, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4445
    jstejada committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    148fbfd View commit details
    Browse the repository at this point in the history
  5. [*] postinstall: Don't try to link cloud specs if pkgs don't exist

    Summary: see title
    
    Test Plan: manual
    
    Reviewers: evan, spang, mark, halla
    
    Reviewed By: halla
    
    Differential Revision: https://phab.nylas.com/D4446
    jstejada committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    daf7f9e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5c397f5 View commit details
    Browse the repository at this point in the history
  7. [client-sync] Correctly pass path when processing bodies

    Summary: see title
    
    Test Plan: manual
    
    Reviewers: mark
    
    Differential Revision: https://phab.nylas.com/D4447
    jstejada committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    d407699 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    93abaec View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6d2c2b2 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2017

  1. the email match should be case insensitive when selecting the alias

    The _fromContactForReply selects the right email address to fill the from field when replying to messages. The emailMatch should be case insensitive when comparing the list of alias and the to field of the email.
    yehiasalam authored Apr 24, 2017
    Configuration menu
    Copy the full SHA
    23eba90 View commit details
    Browse the repository at this point in the history