Commit Graph

215 Commits (0ad35cc0e656d84575796a9838b10d83b2eac9a1)

Author SHA1 Message Date
Scott Nonnenberg 63dcd43025
Add manual test scenarios for remembering window state
FREEBIE
8 years ago
Scott Nonnenberg 3a3aa3efb6
Remove test/protos symlink, use window.PROTO_ROOT for config 8 years ago
Scott Nonnenberg f84d8038c1
Remove i18n stub used in NetworkStatusView tests
FREEBIE
8 years ago
Scott Nonnenberg cb296fcfaa
Cleanup: Add unit-tests task to grunt test, fix style checks
And improve success logging in unit-tests.

FREEBIE
8 years ago
Scott Nonnenberg b9b9abf76a
Fix emoji tests - image paths are no longer absolute
FREEBIE
8 years ago
Scott Nonnenberg 4402a91976
Use correct locale, fall back to en if we don't have translations
FREEBIE
8 years ago
Scott Nonnenberg 18b8907c96
Fix non-rendering unicode characters on test page
FREEBIE
8 years ago
Scott Nonnenberg a9b4109e9b
Fix NetworkStatusView tests' stubbing of window.i18n
FREEBIE
8 years ago
Scott Nonnenberg c77554533c
Fix emoji test, since emoji image paths no longer start with /
FREEBIE
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
Scott Nonnenberg 53f2bfbb57 Animated loading screens on startup and first conversation load
FREEBIE
8 years ago
Scott Nonnenberg ef3431af1b isUntrusted: Return false if firstUse is true
Because users will see this upon first trying to communicate with a new
contact if they're quick about it.

FREEBIE
8 years ago
Scott Nonnenberg cc2c3edaa6 Override Backbone's trigger with one that catches exceptions
Model operations are vulnerable to exceptions thrown by event handlers.
Because this can interrupt really important data operations, it's better
to let the operation continue and log the error. In all likelihood it's
a view-related problem, and that shouldn't cause any data operation to
fail.

FREEBIE
8 years ago
Scott Nonnenberg bd0050b6c6 Cache messages on receipt, remove from cache when processed
FREEBIE
8 years ago
Scott Nonnenberg 8112cd220a Show warning when we discover key change on verify
FREEBIE
8 years ago
Scott Nonnenberg 91f50c028f Unify processVerifiedMessage with Java implementation
This removes our support for the New Key/DEFAULT case, which iOS will
sync to us. Why? Because it ensures that in out of date scenarios, we
don't lose the higher-security state we were in previously.

FREEBIE
8 years ago
Scott Nonnenberg d1a9b62077 test/index.html: Restore previous location of code coverage stuff
I changed the location when trying to get code coverage to work properly
and it turned out not to be necessary for the fix.

FREEBIE
8 years ago
Scott Nonnenberg c10e1b4ad0 Code coverage test run: Fix broken test
This test failed only under code coverage runs - because start up of the
page too took long!

FREEBIE
8 years ago
Scott Nonnenberg 5c990d2a35 Code coverage: Collect test coverage for the protocol layer
Because we were only doing a partial instrumentation run prior to this
change, un-instrumented code had references to un-instrumented code
(because Blanket's instrumentation re-runs the code once it is
instrumented, updating the window.NAME reference).

A big part of this was that libtextsecure was not instrumented. And for
good reason; it takes a long time to load and run, especially when
instrumented. But without covering it, we'll have an incomplete view
of our code coverage. So, all coverage collection remains off by
default.

FREEBIE
8 years ago
Scott Nonnenberg 10f4f3fea5 Fix crash in keychange listener test
FREEBIE
8 years ago
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
8 years ago
Scott Nonnenberg b6cca41a0c Update verification-related strings to better match mobile app
FREEBIE
8 years ago
Scott Nonnenberg f654532fa8 Handle UNVERIFIED sync verification messages (via contact sync)
FREEBIE
8 years ago
Scott Nonnenberg 20451cc827 Show verified/keychange notifications when actually relevant
FREEBIE
8 years ago
lilia 877f092b2c Fix tests
saveIdentity now requires a full protocol address string

// FREEBIE
8 years ago
Scott Nonnenberg 0056cbefc1 processVerifiedMessage: Trigger keychange event when key differs
FREEBIE
8 years ago
lilia 5d5805526a Fix a test
Set the timestamp on the record to current time to ensure that
nonblockingApproval will be required.

// FREEBIE
8 years ago
lilia f15fadbb4d Test processVerifiedMessage 8 years ago
lilia 044e1560e0 Test new setVerified behavior
// FREEBIE
8 years ago
lilia 33b4d398d6 Fix indentation 8 years ago
lilia 1e594e79c1 Fix test page template
// FREEBIE
8 years ago
Scott Nonnenberg 16433d661a Show call to action on group member list when verifying
FREEBIE
8 years ago
Scott Nonnenberg 31bf05e14a Add verified state summary to top of safety number screen
FREEBIE
8 years ago
Scott Nonnenberg 11372b4e00 Add icons for keychange and expiration timer in-conversation items
The shield matches the Android app's key change notification, and the
clock icon was easy to do and makes it easier to visually distinguish
those items in the conversation history.

FREEBIE
8 years ago
Scott Nonnenberg c714fb6dbf Shadow/icon/blue for banner, better verify advisories in dark theme
FREEBIE
8 years ago
Scott Nonnenberg 1cf9289b1a Add items to conversation history when user verifies/unverifies
FREEBIE
8 years ago
Scott Nonnenberg 47c5142a83 Replace unicode check with new svg icon
A good bit of CSS was required to keep the text color changing along
with the text it is nestled within.

Also: took this opportunity to increase the contrast of the number and
verified section right under the contact name in the group members view.

FREEBIE
8 years ago
Scott Nonnenberg 8264f3ba33 Make the term 'Verified' fully localizable
FREEBIE
8 years ago
Scott Nonnenberg 8d29cb9830 Prevent access to Safety Number when talking to yourself
FREEBIE
8 years ago
Scott Nonnenberg c7e385eb38 Remove 'safety number approval' option from settings dialog
Also sync templates in test/index.html and background.html

FREEBIE
8 years ago
Scott Nonnenberg 243cbd8123 Confirmaton on send, banner when 'unverified'
Not yet using the new APIs, but ready to. Still to do:
- Send sync messages on trust decisions
- Respond to received trust decision sync messages
- Show trust decisions in the conversation history
- In that rare situation where a sent message ends up with a key error
  make it easy to retry the send.

FREEBIE
8 years ago
Scott Nonnenberg bedf10056b Support for group-member verifications via second-level panel
Also:
- All the necessary wire-up to update things in real time. If you have
a safety number page up via a group member view as well as via a 1:1
conversation with that contact, they'll both be updated as the
underlying model changes. Similarly, the overall group will update
in real-time as members change.
- A bit of special-casing for yourself in a group conversation - you're
shown as 'me' and are not clickable, where normally that would take you
to the Safety Number screen for that contact. You are also not included
in the trust calculations for a given group.

FREEBIE
8 years ago
Scott Nonnenberg ae3587f05e Move all instances of 'verify identity' to 'show identity'
As discussed in standup this morning - only the act of verifying or a
statement about current status should use that word 'verify.'

FREEBIE
8 years ago
Scott Nonnenberg ee0b0f5ffb Remove all concept of 'key conflict' from the app 8 years ago
lilia 51080141cd Update identity store tests
// FREEBIE
8 years ago
lilia 27692b4dfc Normalize whitespace in storage tests
// FREEBIE
8 years ago
lilia c6bfdec84d Remove blockingApproval
// FREEBIE
8 years ago