Commit Graph

2780 Commits

Author SHA1 Message Date
Scott Nonnenberg
adb30e6490 Export: Fixes and debugging, Migration: show install step first (#1697)
* Export: Allow for duplicate folders and filenames

This should account for messages with duplicate received_at times. It is
unlikely that their attachment filenames overlap as well, but in that
case the more recent attachment will win. On import, both messages will
end up with the same file.

* Export: Throw informative error if message had no received_at

* Migration: First step is to install the new signal desktop

Once that's installed, we move on to the choose directory step, which
actually does the export. You can cancel out of the first step if you
can't install the new Signal Desktop at the moment.

Also: This removes the cancel button on the 'complete' step, since it
has the potential to very easily cause conflicts between the new Signal
Desktop and the chrome app.

* Refine our duplicate resilience: throw on dupe in some cases

* Migration: Remove later step install buttons; should be complete

* Export: Check type of data destined for disk, throw error
2017-11-03 16:01:27 -07:00
Scott Nonnenberg
9585f14f4e v0.44.5
Cancel out of a complete migration, with confirmation dialog (#1686)
v0.44.5
2017-11-02 18:39:16 -07:00
Scott Nonnenberg
702ace15ec Cancel out of a complete migration (#1686)
* Allow cancellation of migration process; show warning beforehand

* Export: Properly handle errors that happen during a write
2017-11-02 18:36:13 -07:00
Scott Nonnenberg
ac7a346412 v0.44.4
Fix broken attachment filtering
v0.44.4
2017-11-02 15:07:47 -07:00
Scott Nonnenberg
cc5230f0b0 v0.44.3
Export: remove problematic zero-length attachments (#1683)

Export: devtools-only logging (#1683)
v0.44.3
2017-11-02 14:25:32 -07:00
Scott Nonnenberg
f047d36fc1 Export: remove zero-length attachments, devtools-only logging (#1683)
* Database: Eliminate zero-length attachments from all messages

* DevTools-only logging to help with export debugging
2017-11-02 13:01:32 -07:00
Scott Nonnenberg
b3091e77f6 v0.44.2
Clean attachment structure to enable successful export (#1631)

If export fails, add cancel button to go back to using app (#1631)
v0.44.2
2017-11-01 12:34:35 -07:00
Scott Nonnenberg
d4a77bded2 Clean attachment structure, cancel out of failed migration (#1631)
* Database migration: Fix attachments with unexpected structure

* Attachment cleanup: Remove all attachments with no data field

* Export: Allow user to cancel out on error if never succeeded

* Only update attachment id if fileName not present

Turns out that modern attachments only have fileName, without an id.

* A small tweak to the attachment fix-up migration, test coverage

* Take migration version back down to 16

* Jshint fix in database.js
2017-11-01 12:30:20 -07:00
Scott Nonnenberg
e9e4f168a3 v0.44.1
New menu option to start migration process, eliminate banner
2017-10-31 11:12:18 -07:00
Scott Nonnenberg
46e9ad3317 New menu option to start migration process, eliminate banner 2017-10-31 11:11:45 -07:00
Scott Nonnenberg
16a09a8f94 v0.44.0 2017-10-20 17:55:51 -07:00
Scott Nonnenberg
d22e678d18 Update el, es, and kn translations 2017-10-20 17:55:26 -07:00
Scott Nonnenberg
3cbf67ceb0 Remotely deprecate Chrome app via file on updates.signal.org 2017-10-20 17:53:20 -07:00
Scott Nonnenberg
e9d2694f8f Update strings for da, fa, hr, pt_BR, pt_PT, ro, and zh_TW (#1509)
FREEBIE
2017-09-28 11:59:08 -07:00
Scott Nonnenberg
a064e4b9b2 Travis: Update to node 6
FREEBIE
2017-09-26 10:38:49 -07:00
Scott Nonnenberg
6b7edc2df3 v0.43.4
Force full contact/group import on next launch if not first run (#1476)

Performance: Log entry max to 2k, less logging in hot codepaths (#1459)

Don't show notification for verified state change with yourself (#1454)

Export: Improve usability - timing expectations, install button (#1474)

Add Transifex config to git to unblock Electron localization (#1477)

Large localization update

FREEBIE
v0.43.4
2017-09-14 16:41:17 -07:00
Scott Nonnenberg
c71b7d7f27 Update localized strings
FREEBIE
2017-09-14 16:34:13 -07:00
Scott Nonnenberg
ff6dc786f9 Force full contact/group import on next launch if not first run (#1476)
* Force full contact/group import on next launch (if not first run)

FREEBIE

* Don't update contact sync key in storage on every reconnect

FREEBIE
2017-09-14 12:08:10 -07:00
Lilia
2166e0924a Add transifex config to git (#1477)
So we can pull different translation resources from different branches.

// FREEBIE
2017-09-14 09:45:34 -07:00
Scott Nonnenberg
00e1a6a36a Export: Improve usability - timing expectations, install button (#1474)
Because export might take a couple minutes, we now set expectations
that it might take 'several minutes' instead of just 'please wait.'

We also promote 'Install new Signal Desktop' from a text link in the
instructions to a button. This is important on the 'Completed' screen
because it is bigger and to the left of the 'Export Again' button, which
previously drew primary focus on that screen.

Lastly, we also remove the title-specific element of the support link,
so we're resilient to title changes in the future.

FREEBIE
2017-09-13 13:33:40 -07:00
Scott Nonnenberg
1e694fe8d7 Log entry max to 2k, remove logging in hot codepaths (#1459)
On a recent trip through a CPU profile taken while Signal Desktop
churned through a large backlog of messages, it was clear that
console.log was a major source of time spent, primarily the sort
operation required after every new entry is added to the Backbone
collection. So, three different techniques to combat this:

1) Reduce the maximum number of entries in the collection from 5k to 2k
2) No more logging of add/update/remove queue in MessageReceiver
3) No more log entries in Message.handleDataMessage main codepath

FREEBIE
2017-09-12 09:34:49 -07:00
Scott Nonnenberg
69af8d2651 Don't show notification for verified state change with yourself (#1454)
* Don't show notifications for verified state change with yourself

It's confusing to users, and it really doesn't mean anything anyway.

FREEBIE

* Add log statement that we've suppressed a verified notification

FREEBIE
2017-09-08 11:14:01 -07:00
Scott Nonnenberg
3a733ea10a v0.43.3
Fix bug causing contact and group names/colors to be lost (#1437)

Fix broken Swedish translation preventing new installs
(8caecd50cd)

Fix clear message bubbles when adding contact with previous messages
in iOS (#1438)

Fix message bubble widths on horizontal resizes (#1447)

Remove horizontal scrolling in convo/message lists (#1448)

Update translations for hr, pt_BR and sv
(8dca9c9b8f)

Export (still behind a flag):
  - Limit attachment filename length for Windows path limits (#1439)
  - Reintroduce conversation last-contact date in directory name (#1439)

Add tests for export utility functions (#1439)

FREEBIE
v0.43.3
2017-09-07 10:41:09 -07:00
Scott Nonnenberg
e3bada1f4a MessageView.updateColor: Call getAvatar on convo, not message
FREEBIE
2017-09-07 10:38:00 -07:00
Lilia
71036e31ab Fix horizontal scrolling in convo/message lists (#1448)
This removes some errant horizontal scrollability from the conversation list and
the message list.

// FREEBIE
2017-09-07 09:57:47 -07:00
Lilia
5d8e8459b3 Fix bouncy bubble widths (#1447)
Max-width on a message bubble should be about 30em for the good readability.
However, when the window isn't wide enough, bubbles must be further limited.

The transition should happen around the point that these two rules intersect,
but it was kicking in a little late, which caused the bubbles to jump from wider
to shorter as you widened the window past a certain point. This change adjusts
the threshold for smoother and more consistent bubble resizing.

The variable name $big-avatar-min-width is an artifact of a past design and was
previously used in multiple places, but it no longer makes sense in this context
so it has been discarded.

// FREEBIE
2017-09-07 09:57:33 -07:00
Scott Nonnenberg
cc6dcf67b7 Export: Limit attachment filename length, + convo date, + tests (#1439)
* Export: limit attachment names to 30 chars, tests for helper fns

Also, reintroduce last contact date in conversation dir name

FREEBIE

* MessageView tests: Fix failures during blanket coverage run

FREEBIE
2017-09-06 18:20:42 -07:00
Scott Nonnenberg
4009a0119e MessageView: Handle change of color to null, call getColor() (#1438)
When we relied on the actual value of the color property to be supplied
to the updateColor change event listener, sometimes it would be null.
Then the conversation bubbles would have no color at all, making the
text hard to read.

FREEBIE
2017-09-06 18:19:11 -07:00
Scott Nonnenberg
4cba16cb61 Fetch all conversations on startup of app, not on inbox load (#1437)
* Fetch all conversations on startup of app, not on inbox load

A recent change to fetch conversations less didn't take into account all
that can happen in the app without the inbox loaded. That only happens
when the window is shown, and messages can come in with the app in the
background. In that case, the conversation wouldn't have been loaded
from the database, but would be saved to the database anyway, losing
data.

This change fetches all conversations as soon as the the data store is
ready for a fetch. It also introduces failsafe throws to ensure that
synchronous ConversationController accesses don't happen until the
initial fetch is complete. A new getUnsafe() method was required to
account for some of the model setup that happens during that initial
conversation fetch.

Fixes #1428

FREEBIE

* Fix tests: ConversationController.load() required before get()

FREEBIE
2017-09-06 18:18:46 -07:00
lilia
8caecd50cd Update swedish translations
// FREEBIE
2017-09-04 12:39:32 +02:00
lilia
8dca9c9b8f Update translations
Fixes #1427

// FREEBIE
2017-09-04 12:24:28 +02:00
Scott Nonnenberg
2adc53a588 v0.43.2
Fix problems with updating contact information (#1419)

Performance/reliability: Fetch conversations from DB only once (#1420)

Export bug-fixes (still behind a flag)
  - Properly generate directory names for nameless groups (#1421)
  - Remove " as one of the allowed characters in filenames

FREEBIE
2017-09-01 10:41:39 -07:00
Scott Nonnenberg
d8ce198f55 Fetch conversations once, clean up ConversationController API (#1420)
* Fetch conversations once, clean up ConversationController API

Race conditions around re-fetching have caused some problems recently,
so this removes the need to re-fetch conversations. They are fetched
once or saved once, and that is it. All interaction goes through the
ConversationController, which is the central source of truth.

We have two rules for Conversations:

1. If a conversation is in the ConversationController it doesn't need
   to be fetched, but its initial fetch/save might be in progress. You
   can wait for that fetch/save with conversation.initialPromise.
2. If a conversation is not already in the ConversationController, it's
   not yet in the database. It needs to be added to the
   ConversationController and saved to the database.

FREEBIE

* Remove Conversation.fetch() call in Message.handleDataMessage()

FREEBIE

* ConversationController.API cleanup: Fix two missing spots

FREEBIE
2017-09-01 09:10:41 -07:00
Lilia
51cd28bb4a Fix race handling contact sync with verified info (#1419)
When processing a contact sync with embedded identity key verification info, we
were running overlapping async fetch/save operations on the same conversation
model, causing a race that tends to clobber updates to the contact info.

In this change we extend the application-level contact info handler to block on
a subsequent call to the verification handler, which effectively serializes the
fetch/save calls, and relieves the need for the message receiver to trigger a
seperate event concerning the verification info on contact sync messages.

Fixes #1408

// FREEBIE
2017-09-01 07:42:41 -07:00
Scott Nonnenberg
07abe2639f Export: Properly generate directory names for nameless groups (#1421)
FREEBIE
2017-09-01 07:33:30 -07:00
Scott Nonnenberg
94b63c39fd Export: Remove " as one of the allowed characters in filenames
Turns out that it's not allowed on windows.

FREEBIE
2017-08-31 23:25:49 -07:00
Scott Nonnenberg
a01588f55e v0.43.1
Properly handle update of blocked numbers sync'd from mobile
device (#1411)

Fix some bugs with migration to Electron (still behind a flag)
  - Dark Theme: Increase banner text contrast for legibility (#1415)
  - Better disambiguate conversation directory names (#1409)
  - Handle long group or contact names (#1402)
  - Redact group ids in export logging (#1402)

Better logging
  - Don't log expiration if queued task threw an error (#1412)
  - Additional error handling/logging during contact sync (#1395)

Remove unknown group messages from cache - no need to retry! (#1414)

Update a large number of strings via transifex (#1403)

FREEBIE
v0.43.1
2017-08-30 14:51:42 -07:00
Scott Nonnenberg
36e8b82b5f Remove unknown group messages from cache - no need to retry! (#1414)
FREEBIE
2017-08-30 14:40:08 -07:00
Scott Nonnenberg
52a595b372 Export/Dark Theme: Increase banner text contrast for legibility (#1415)
FREEBIE
2017-08-30 14:39:45 -07:00
Scott Nonnenberg
46b64e306f createTaskWithTimeout: Don't log expiration if task threw (#1412)
FREEBIE
2017-08-30 13:33:55 -07:00
Scott Nonnenberg
3f7fbd93d5 Export: Better disambiguate conversation directory names (#1409)
FREEBIE
2017-08-30 13:23:07 -07:00
Scott Nonnenberg
4011e26b50 Fix handling of sync message with blocked numbers (#1411)
FREEBIE
2017-08-30 11:55:17 -07:00
Scott Nonnenberg
b14667ae40 Additional error handling/logging during contact sync (#1395)
FREEBIE
2017-08-30 09:35:04 -07:00
Scott Nonnenberg
e16d80d9a2 Update a large number of strings via transifex (#1403)
FREEBIE
2017-08-30 09:31:03 -07:00
Scott Nonnenberg
548586b934 Chrome export fixes: too-long names, redact group ids (#1402)
* On export, don't print out entire group id, just last three chars

FREEBIE

* Export: Limit conversation dirs to 30 characters of original name

FREEBIE

* Redact groups ids on import as well

FREEBIE

* InboxView: Protect against nonexistent loading screen

FREEBIE
2017-08-30 09:30:21 -07:00
Scott Nonnenberg
6190ad794a v0.43.0
Note: This version requires a new 'directory' permission

Feature: Migration to Electron (currently behind a flag)
  - Warning banner that this version is deprecated
  - Export of all database contents to disk
  - This exported data can be used to initialize the Electron version
    of the app
  - Note: after export, this Chrome instance will not be useable since
    the Electron export-initialized instance will be an exact copy.
    _There can only be one_ client with the same identity!
  - See original pull request for flags to enable or reset:
    https://github.com/WhisperSystems/Signal-Desktop/pull/1342

We now log 'clearAttention' less, since we call it every two seconds

String updates for es, fi, it, ja, pt_PT, ru and sv

FREEBIE
v0.43.0
2017-08-28 14:22:26 -07:00
Scott Nonnenberg
763970b0c5 String updates for es, fi, it, ja, pt_PT, ru and sv
FREEBIE
2017-08-28 14:21:40 -07:00
Scott Nonnenberg
3d8aa3b8a2 Export: Handle synchronous 'shutdown-complete' event (already offline)
FREEBIE
2017-08-28 14:01:51 -07:00
Scott Nonnenberg
d31d1712b1 Bullet-proofing export scenarios: null attachments, no msgreceiver
FREEBIE
2017-08-28 13:20:53 -07:00
Scott Nonnenberg
c0cd733139 Full export, migration banner, and full migration workflow - behind flag (#1342)
* Add support for backup and restore

This first pass works for all stores except messages, pending some scaling
improvements.

// FREEBIE

* Import of messages and attachments

Properly sanitize filenames. Logging information that will help with
debugging but won't threaten privacy (no contact or group names),
where the on-disk directories have this information to make things
human-readable

FREEBIE

* First fully operational single-action export and import!

FREEBIE

* Add migration export flow

A banner alert leads to a blocking ui for the migration. We close the socket and
wait for incoming messages to drain before starting the export.

FREEBIE

* A number of updates for the export flow

1. We don't immediately pop the directory selection dialog box, instead
  showing an explicit 'choose directory' button after explaining what is
  about to happen
2. We show a 'submit debug log' button on most steps of the process
3. We handle export errors and encourage the user to double-check their
  filesystem then submit their log
4. We are resilient to restarts during the process
5. We handle the user cancelling out of the directory selection dialog
  differently from other errors.
6. The export process is now serialized: non-messages, then messages.
7. After successful export, show where the data is on disk

FREEBUE

* Put migration behind a flag

FREEBIE

* Shut down websocket before proceeding with export

FREEBIE

* Add MigrationView to test/index.html to fix test

FREEBIE

* Remove 'Submit Debug Log' button when the export process is complete

FREEBIE

* Create a 'Signal Export' directory below user-chosen dir

This cleans things up a bit so we don't litter the user's target
directory with lots of stuff.

FREEBIE

* Clarify MessageReceiver.drain() method comments

FREEBIE

* A couple updates for clarity - event names, else handling

Also the removal of wait(), which wasn't used anywhere.

FREEBIE

* A number of wording updates for the export flow

FREEBIE

* Export complete: put dir on its own line, make text selectable

FREEBIE
2017-08-28 13:06:10 -07:00