Mailspring/spec/stores
Ben Gotow fe5b75b32a fix(counts): Switch to simpler SQL-based counters, introduce total counts
Summary:
The old approach we were using to track unread counts by category was really complicated because it involved computing changes to counts in javascript and then syncing them back to the database, from each process that was making queries. Rather than try to fix that, this diff moves us to a new approach where the counts are maintained by executing a query before and after threads are modified to unapply / reapply them from the counters. Doing this in the database in the same transactions as the thread modifications themselves ensures the counts are internally consistent with the Threads table.

This SQL approach is also able to compute initial counts way faster - initializing totals and unreads in a 1GB edgehill.db in about 1 second on my machine.

Test Plan: All old tests removed, new tests coming

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2757
2016-03-17 18:24:27 -07:00
..
account-store-spec.coffee fix(config): Move account tokens to system keychain 2016-03-14 15:14:08 -07:00
category-store-spec.es6 fix(snooze): Correctly query and create snooze categories per account 2016-03-14 15:36:39 -07:00
contact-store-spec.coffee fix(contact-search): Keep only ranked contacts, query for others. Massive perf boost. 2016-01-28 14:56:15 -08:00
database-setup-query-builder-spec.coffee DatabaseTransaction / QueryBuilder spec fixes 2016-01-25 11:11:57 -08:00
database-store-spec.coffee feat(tasks): add Create, Update, Destroy tasks plus spec & lint fixes 2016-01-15 15:16:21 -05:00
database-transaction-spec.coffee DatabaseTransaction / QueryBuilder spec fixes 2016-01-25 11:11:57 -08:00
draft-store-proxy-spec.coffee fix(syncback): Bidirectional transforms, ready-to-send saved state 2016-03-16 19:27:12 -07:00
draft-store-spec.coffee feat(dock-icon): Drop files to attach them to new msg 2016-03-17 13:14:55 -07:00
file-download-store-spec.coffee fix(downloads): Properly handle network errors, retries of downloads 2016-03-08 18:32:47 -08:00
file-upload-store-spec.coffee feat(dock-icon): Drop files to attach them to new msg 2016-03-17 13:14:55 -07:00
focused-contacts-store-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
focused-content-store-spec.coffee Merge branch 'master' into unified-inbox 2016-01-25 17:28:29 -08:00
focused-perspective-store-spec.coffee fix(focused-persepective): Init saved perspective correctly 2016-02-09 20:10:33 -08:00
message-store-spec.coffee fix(bodies): Move loading into component, add retry, loading spinner 2016-03-09 19:14:54 -08:00
nylas-sync-status-store-spec.es6 fix(specs): Remove fdescribe 2016-03-14 15:39:42 -07:00
task-queue-spec.coffee fix(send): make send/syncback draft tasks cooperate, fix task ordering tracking 2016-03-07 20:14:58 -08:00
unread-badge-store-spec.coffee fix(badge): Badge respects option in prefs 2015-11-30 19:17:35 -08:00