Commit graph

754 commits

Author SHA1 Message Date
lilia
25b0fbd949
Fix exceptions on window close
The stopListening function was being passed the close event as an
argument, which caused it to throw.

// FREEBIE
2017-09-14 16:53:36 -07:00
lilia
49cdc98386
Fix lightbox 2017-09-14 16:53:35 -07:00
lilia
acd19fd759
Fix inbox styles 2017-09-14 16:53:35 -07:00
lilia
88893079d2
Fix restart 2017-09-14 16:53:35 -07:00
lilia
6686621b0b
Fix file dialog 2017-09-14 16:53:34 -07:00
lilia
859d49b3f4
Use relative paths
// FREEBIE
2017-09-14 16:53: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
e3bada1f4a
MessageView.updateColor: Call getAvatar on convo, not message
FREEBIE
2017-09-07 10:38:00 -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
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
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
3d8aa3b8a2
Export: Handle synchronous 'shutdown-complete' event (already offline)
FREEBIE
2017-08-28 14:01:51 -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
Scott Nonnenberg
675d41843e Re-enable message box if enter pressed with no text/files
Previously the message would stay disabled until the user clicked with
the mouse.

FREEBIE
2017-08-17 08:54:38 -07:00
Scott Nonnenberg
680f7d8b57 Additional logging for perf analysis and cross-device debuging
- How long it takes to get a message through the pre-send checks
- How long it takes to open a conversation for the first time
- The timestamp of any message we send to corellate with other logs
- Add conversation ID to 'decrypt old identity key errors' start/end

FREEBIE
2017-08-17 08:54:38 -07:00
Scott Nonnenberg
241e26dc17 Don't revoke convo avatar URL on unload - we will need it again
FREEBIE
2017-08-15 14:08:14 -07:00
Scott Nonnenberg
8700112f6d Decrypt any IncomingIdentityKeyError still sticking around
FREEBIE
2017-08-12 13:17:53 -07:00
Scott Nonnenberg
67cb9bdf54 Disable message box between send request and final send begin
Because we do a number of async checks before allowing the real send to
begin, on a slow matchine or when doing a lot of work (like receiving a
lot of messages) there can be a noticeable delay between hitting Enter
and the clearing of the text in the message box. In fact, newly-typed
text can be added to the previous message if the delay is long enough.

This prevents any interaction with the message box until the send has
either been prevented or has started.

FREEBIE
2017-08-11 18:55:16 -07:00
Scott Nonnenberg
e57f155403 Handle rejections from protocol layer (due to missing records)
isVerified and isUntrusted both went to the protocol layer, but were not
prepared for rejected promises resulting from missing records. This
prevented send in large groups where there has never been a message
exchanged with one of the members.

FREEBIE
2017-08-10 11:21:15 -07:00
Scott Nonnenberg
6caf88c404 Key verification error popup: Remove cancel, empty resolve()
FREEBIE
2017-08-07 16:14:49 -07:00
Scott Nonnenberg
82b2a611e3 MessageView: Always remove errors on re-render to prevent doubles
FREEBIE
2017-08-07 16:14:49 -07:00
Scott Nonnenberg
78c02f1154 Restore 'cancel' button on delete message confirmation dialog
FREEBIE
2017-08-07 16:14:49 -07:00
Scott Nonnenberg
ec70170829 ConversationView.unload: Add ability to provide reason for logging
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
c0f8812f9b ConversationView: when windows are closed, call unload()
Anyway, unload() is a more comprehensive method for doing what the close
handler was trying to do before.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
65283d2794 Unload conversations and old messages every half-hour
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
31d7e652fe Dismiss the app loading screen if we failed to connect to socket
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
305bd6b3b8 App loading screen: show messages processed so far
Also, show the same loading screen on index.js before we've bootstrapped
the app.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
39795170c1 Handle the 'extension loaded, reopen window' scenario
Not sure exactly how to think about Chrome app lifetimes, so we're
being conservative. We only show the full-application loading screen
once, on first display of the inbox.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
53f2bfbb57 Animated loading screens on startup and first conversation load
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
3e8b34f3d0 findOrCreateById instead of private-specific method
Anyway, findOrCreateById with no type didn't succeed, because the
conversation didn't validate.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
b985228160 Last seen indicator/scroll down button - defensive removal
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
e6859a3684 Ensure that promises always resolve, or that rejections are okay 2017-08-04 12:03:25 -07:00
Scott Nonnenberg
5da324103a Throttle calls to getProfile when opening conversation
We don't want to throttle other calls to getProfile, so we localize this
to the fetch we do when we first open a conversation.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
aa80cdd74d ConfirmationDialogView: Make showCancel an explicit option
Also, don't call resolve/reject callbacks if they weren't provided.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
14765599f3 Delete individual message
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
80a2a01e37 Remove jitter on verifying/unverifying safety number
On every click, even when sub-panes were open, we were calling
markRead(), which would save the conversation model with the new
unreadCount. The KeyVerificationPanelView was wired up to the change
event on conversation, so it would render with the results of that
update, then finally the user's intended update.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
12b2674bde Show size of files even if size not precomputed for attachment
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
4124d5cb9b Show 'Message not sent' only if 'Some recipients failed' not showing
Also switch up the visual style for 'Some recipients failed' text to
match the more-visible 'Message not sent' text and the 'Resend' link.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
25243ad9de Send warning: Show single problematic group member, not group name
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
697079cf9b Add else handlers with logging in toggleVerified catch handler
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
8112cd220a Show warning when we discover key change on verify
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
5bba6d3f17 setTrusted() -> setApproved() to dismiss the five-second warning
This change makes sense, since there was already a reference in the code
to the then-nonexistent setApproved()!

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
7ab20f09cc Fix focus issues with identity key send view
Tabbing right after entering the view would cause everythign to go crazy
as focus went back to the pane you were just on. This change both sets
the proper focus on load of that view (on the cancel button) and hides
other panes when they aren't active, only making them visible again when
they are once again the 'top' pane.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
ff4fde651c Make it clear in conversation just some recipients failed
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
12914307f1 Improve experience when discovering identity key error on send
New experience in the Message Detail view when outgoing identity key
errors happen, matching the Android View.

'View' button is only shown on outgoing key errors right now.

When a contact with an outgoing identity key error is clicked, they are
taken to a view like the popup that comes up on Android: an explanation
of what happened and three options: 'Show Safety Number', 'Send Anyway',
and 'Cancel'

Contacts are now sorted alphabetically, with the set of contacts with
errors coming before the rest.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
b6cca41a0c Update verification-related strings to better match mobile app
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
5b46ef3562 Show last seen indicator for keychange/verification notifications
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
1fedc75e5d Handle unverified length of zero
This can happen with unknown groups, where we don't know the list of
members but we're receiving messages. It's generally not a good
experience, but we shouldn't crash.

FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
30bc3fca3a MessageView: Be resilient to multiple renders of a network error
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
d1fa28b706 Object.assign -> _.extend(), for to make Chrome 45 and below work
FREEBIE
2017-08-04 12:03:25 -07:00