* Script for beta config; unique data dir, in-app env/type display
To release a beta build, increment the version and add -beta-N to the
end, then go through all the standard release activities.
The prepare-build npm script then updates key bits of the package.json
to ensure that the beta build can be installed alongside a production
build. This includes a new name ('Signal Beta') and a different location
for application data.
Note: Beta builds can be installed alongside production builds.
As part of this, a couple new bits of data are shown across the app:
- Environment (development or test, not shown if production)
- App Instance (disabled in production; used for multiple accounts)
These are shown in:
- The window title - both environment and app instance. You can tell
beta builds because the app name, preceding these data bits, is
different.
- The about window - both environment and app instance. You can tell
beta builds from the version number.
- The header added to the debug log - just environment. The version
number will tell us if it's a beta build, and app instance isn't
helpful.
* Turn on single-window mode in non-production modes
Because it's really frightening when you see 'unable to read from db'
errors in the console.
* aply.sh: More instructions for initial setup and testing
* Gruntfile: Get consistent with use of package.json datas
* Linux: manually update desktop keys, since macros not available
* Add emoji button and popup panel
This integrates a simple third party emoji panel with a few css overrides to
correct some relative paths and colors.
The trickiest thing about this is ensuring we don't break the layout, which is
acheived through precise control over the panel's height, and prodigious calls
to updateMessageFieldSize.
// FREEBIE
* Don't close emoji panel on click, do close on send
To better facilitate multiple emoji entry.
// FREEBIE
* Make panel emojis bigger and higher resolution
// FREEBIE
* Move paperclip button to the right of the microphone
This makes our bottom-bar button arrangement more comfortable and consistent
with Android.
// FREEBIE
* Move emoji picker padding to inner container
* Insert emojis at cursor position
Don't just append to the end like a n00b! Also handle selected text correctly.
https://stackoverflow.com/questions/11076975
// FREEBIE
* A few visual tweaks to reduce visual complexity of emoji panel
- No gray buffer on the right side of the emoji panel
- No gray buffer between message compose text box and emoji window
- The scroll bar for the emojis is the same as our normal scrollbars
Re-enable download and upload of larger attachments
(#1591/ce0e39aaa7eec873f65fe9675badbd6461a3054c)
Prevent situation where lack of keys makes "Error handling incoming
message." common (#1595)
Stay connected or reconnect quickly in changing network conditions,
returning from sleep, etc. (#1593)
Don't send read syncs (to your devices) or read receipts (to client
devices) for messages with errors (#1596)
Fix occasional very long app startup (#1597)
Don't check for auto updates on linux; handled by package manager
(#1592)
Load profiles for a conversation without blocking convo load (#1570)
The About window is no longer blank (#1564)
Add 5s timeout for all requests but attachment up/down, avatar (#1584)
Dev:
- Move to node fetch API for web requests instead of XHR (#1552)
- Log when we've detected a new version (#1567)
- Reduce logging when the window moves (#1568)
- Add GPLv3 LICENSE file (#1309)
- Remove documentation references to BitHub (#1576)
- models/conversation: Refer to proper error variable (#1569)
- Deployment: No longer use CI windows assets (#1564)
- Fix copy pasta of timestamp_m to timestamp_h in locales (#1582)
* Use node-fetch instead of xhr
* Remove XMLHttpRequest.js
// FREEBIE
* Avoid calling json() on non json responses
Previously we would catch and swallow JSON parsing errors resulting from an
empty response, though empty responses are normal from a few endpoints, like
requesting sms or voice registration codes.
Since the JSON parsing call is now handled internally by node-fetch, we have to
keep closer track of our expected response type to avoid throwing an exception.
// FREEBIE
* Include about.html in production Electron build
* Remove windows from fetch-release task, fix permissions
We no longer use the pre-built assets from AppVeyor for our Windows
build.
* AppVeyor: Remove capture/upload of built assets
Improved OS menus (#1563)
- About box now available on all platforms
- The Help menu now has four new items: Go to release notes, Go to forums, Go to support, File a bug
- All menu item labels are now localizable
Add setting to hide menu bar on Windows/Linux - thanks to @connection-reset! (#1551)
Fix flickering offline/disconnected status on Linux (#1561)
Fix slowdowns when composing multiline message (#1560)
Fix intermittent incorrect conversation sort order (#1558)
Dev:
- Improve fixtures, restore `InboxView` rendering on the test page (#1562)
- Bugfix updates to a number of dependencies (#1560)
- .gitignore no longer excludes many files under `components` (#1560)
Feature: Blue check marks for read messages if opted in (#1489)
Re-enable import by excluding 'debug' items from export (#1532)
Better handling of network disconnection/reconnection on Linux (#1546)
Load debug log dialog immediately, then populate log data (#1540)
Fix audio notifications on Linux (#1526)
Re-enable fullscreen on OSX (#1525)
Fix vertically-aligned onboarding progress text (#1547)
Fix broken file icon when attaching non-image (#1548)
Deployment:
- Standardize artifact names - include platform name (#1539)
- Update electron-updater and supply it with windows/publisherName
(#1535)
- Use cdn endpoint for auto update (#1538)
Dev:
- Override console.log in main process, handle non-strings (#1536)
- window.onerror: move to proper window.log.error call (#1528)
- Remove duplicate definition of getSyncRequest (#1530)
- Ensure locale is 'en' when NODE_ENV=test (#1527)
FREEBIE
This ensures that the signing certificate of any binary pulled down as
part of auto-update on Windows is in the CA chain (not self-signed) and
has the right publisherName. electron-updater also rejects any unsigned
binary when asked to check the publisherName.
FREEBIE
This will make electron-updater use the cdn-fronted updates.signal.org instead
of the s3 endpoint. You can verify it worked by looking at the url generated in
dist/latest-mac.json and dist/win-unpacked/resources/app-update.yml
// FREEBIE
Make long-lived socket connections more reliable (#1511)
Show offline state faster on loss of network access (#1512)
Notifications:
- Only show notifications when a large backlog download is complete
(#1507)
- Ensure final message before 'empty' is ready for notification
(#1522)
Ensure we always replace $name$ variable in strings (#1520)
Update strings for fa, no, pt_BR, pt_PT, ro, zh_CN, zh_TW (#1517)
Update electron to v1.6.14 to get security fix (#1519)
Eliminate warning on Windows installation with code-signing (#1513)
Dev:
- Move logging to disk via bunyan - should make message processing
faster! (#1506)
- Only retry messages on startup, not every reconnect (#1510)
- Log call messages instead of throwing error (#1504)
- Redact group ids in logging
(4c48d12dc3)
- Remove manifest.json from project
(3a3f2495e0)
FREEBIE
* Add certificate name for windows code-signing
electron-builder supports our extended validation code-signing cert, but
only on windows. Our release process must now include a signing step on
windows.
FREEBIE
* AppVeyor Remove certificateSubjectName to disable signing
* Move code-signing disable package.json updates above build
* AppVeyor: Use temporary holding file for package.json changes
We can't run our tests in a standalone server anymore, so no need for
connect.
Similarly, sauce labs is no longer necessary because all of our tests
are run locally inside of Electron.
FREEBIE
- Logging is available in main process as well as renderer process, and
entries all go to one set of rotating files. Log entries in the
renderer process go to DevTools as well as the console. Entries from
the main process only show up in the console.
- We save three days of logs, one day per file in %userData%/logs
- The 'debug' object store is deleted in a new database migration
- Timestamps and level included in the new log we generate for publish
as well as the devtools
- The bunyan API is exposed via windows.log (providing the ability to
log at different levels, and save objects instead of just text), so we
can move our code to it over time.
FREEBIE
Fix extended periods of not receiving messages on Linux (#1497)
Fix crash on non-file drag/drop events (#1498)
Dev:
- yarn install now builds electron dependencies automatically
(#1491)
- Docs are refreshed for the new world of Electron (#1491)
- Update our release scripts to match changes in electron-builder
(#1484)
- Additional logging when we can't decrypt a user's profile (#1483)
- Remove images/emoji directory (#1485)
FREEBIE
Update to Emojiset 4.0 (#1482)
Fix unthemed Submit Debug Log dialog (#1479)
Additional logging to help track down socket disconnect problems
(#1469)
Dismiss loading screen if we have network problems (#1466)
Setup:
On network error during setup, show error screen instead of hanging
(#1472)
Allow user to setup new install with pre-profiles mobile device
(#1470)
Ensure that we stay pinned to Windows taskbar on upgrade (#1473)
Ensure we are in the right category on Linux (#1473)
Ensure that we Heavye the right icon in the GNOME taskbar (#1473)
Transifex config specific to electron, updated translations (#1478)
CI:
Bypass often-corrupt node_modules/.bin/grunt.cmd on windows (#1481)
AppVeyor: Reduce build output due to xcopy of all emoji files
(c2c9cd0aa2)
FREEBIE
* Upgrade emoji deps and move to node_modules
Add support for Emoji 3.0 and switch from bower to yarn for managing emoji
dependencies.
// FREEBIE
* Delete old emoji deps
// FREEBIE
* Don't copy emoji on windows
It is no longer necessary since the symlinked image dir is gone.
// FREEBIE
* Update emoji test
// FREEBIE
* Fix emoji tests; remove all overrides of emoji-js functions
FREEBIE
* Update electron-builder and config, grunt-exec, and spellchecker
electron-builder is a major update: ^18.8.1 -> ^19.27.3
Fixes#1463, where we lose the user's decision to pin to taskbar
The other three are all minor changes, but it's generally good to stay
up to date.
FREEBIE
* Add category for our Linux build target
Fixes#1460, though the recommended list of categories doesn't seem to
match what is shown in Linux Mint. Hopefully it understands that
what was previously 'Networking' should now be 'Internet'
Standard list:
https://standards.freedesktop.org/menu-spec/latest/apa.html
FREEBIE
* Add StartupWMClass to .desktop file so GNOME can find running app
Fixes#1432
FREEBIE
Contact profiles support - display avatars and names (#1453)
Audio notes can now be recorded on Windows (#1456)
When window is snap-positioned on windows, no longer automatically
re-position window (#1455)
Ensure that our sound setting applies for all notification types (#1445)
Fix loading screen hang with application is unlinked (#1440)
Fix error dialog on initial load (#1440)
Based on https://github.com/WhisperSystems/Signal-Desktop/releases/tag/v0.43.3
FREEBIE
Rebased on v0.42.3, with two additional changes.
Certificate pinning via node XMLHttpRequest implementation (#1394)
Import: Wait until db writes resolve before saying we're done (#1401)
FREEBIE
* Add certificate pinning on https service requests
Make https requests to the server using node apis instead of browser apis, so we
can specify our own CA list, which contains only our own CA.
This protects us from MITM by a rogue CA.
As a bonus, this let's us drop the use of non-standard ports and just use good
ol' default 443 all the time, at least for http requests.
// FREEBIE
* Make certificateAuthorities an option on requests
Modify node-based xhr implementation based on driverdan/node-XMLHttpRequest,
adding support for setting certificate authorities on each request.
This allows us to pin our master CA for requests to the server and cdn but not
to the s3 attachment server, for instance. Also fix an exception when sending
binary data in a request: it is submitted as an array buffer, and must be
converted to a node Buffer since we are now using a node based request api.
// FREEBIE
* Import node-based xhr implementation
Add a copy of https://github.com/driverdan/node-XMLHttpRequest@86ff70e, and
expose it to the renderer in the preload script.
In later commits this module will be extended to support custom certificate
authorities.
// FREEBIE
* Support "arraybuffer" responseType on requests
When fetching attachments, we want the result as binary data rather than a utf8
string. This lets our node-based XMLHttpRequest honor the responseType property
if it is set on the xhr.
Note that naively using the raw `.buffer` from a node Buffer won't work, since
it is a reuseable backing buffer that is often much larger than the actual
content defined by the Buffer's offset and length.
Instead, we'll prepare a return buffer based on the response's content length
header, and incrementally write chunks of data into it as they arrive.
// FREEBIE
* Switch to self-signed server endpoint
* Log more error info on failed requests
With the node-based xhr, relevant error info are stored in statusText and
responseText when a request fails.
// FREEBIE
* Add node-based websocket w/ support for custom CA
// FREEBIE
* Support handling array buffers instead of blobs
Our node-based websocket calls onmessage with an arraybuffer instead of a blob.
For robustness (on the off chance we switch or update the socket implementation
agian) I've kept the machinery for converting blobs to array buffers.
// FREEBIE
* Destroy all wacky server ports
// FREEBIE
Order of operations is now:
- regenerate local assets
- clean the release dir
- download linux/windows releases
- build osx release
- smoke all test releases
// FREEBIE
npm run icon-gen and grunt (run default task) can be grouped into one
operation.
Use SIGNAL_ENV instead of NODE_ENV since Setting NODE_ENV adversely
affects yarn's install behavior, so we had to set it after the install
and before the build. By using a custom variable instead, we can set it
globally and eventually use it in a build matrix.
Move mas build to its own npm script
// FREEBIE
These modules together allow us to import css files from third party
components without maintaining symlinks that essentially rename them as
sass partials, which doesn't work on windows.
// FREEBIE
This corresponds to CFBundleVersion in the mac build. It must be
incremented every time we upload a new build to the app store for the
current release version.
// FREEBIE
Either icon-gen or local scaling of images was producing a corrupted and
glitchy .icns file. With this module, we need only provide a 1024px
image and it handles the scaling and generation of all other icon
assets.
// FREEBIE
Add the buildExpiration config and add it to the renderer's config
object. Use grunt to write the build expiration to
config/local-production.json which will override the default value (no
expiration) in production. Finally, run this grunt task as part of the
build process.
// FREEBIE
Add environment-specific configs under `./config` and integrate with the
build system. Also changes package.json `files` from blacklist to
whitelist.
// FREEBIE
Spaces in the file name get escaped to %20. Then the percent sign gets
escaped again on the way to s3 upload, such that the object name on s3
ends up as %2520. To fix this, we can simply omit spaces from our
artifact names.
// FREEBIE
Move these to where the build expects them to be.
In theory electron-builder should generate these from a build/icon.icns
but that doesn't seem to be working.
// FREEBIE
`npm run icon-gen` builds icon files from png files in the images
directory, outputting to build/icon.{ico,icns} (the expected location
for electron-builder).
// FREEBIE
Set NODE_ENV at run time or build time to switch the app between dev and
production modes.
At build time, the current NODE_ENV will be included in the packaged
app's package.json file. At runtime we read NODE_ENV from package.json,
but also allow the local environment variable to override. A query
string parsed by a preload script exposes the value to the renderer,
which then determines whether we use the staging or production server.
Additionally, different environments have different user data
directories.
// FREEBIE
In package.json, define our main entry point for electron, and add a
node script to start it up.
Add main.js from Electron/electron-quick-start with two modifications.
1. Load background.html instead of index.html
2. Disable node integration in the renderer
At this point we can load the background page in a window
with `npm start`, though it currently breaks on missing chrome app APIs.
// FREEBIE
Set up grunt with tasks for:
* preen - deletes unused files from bower_components, configured in
bower.json
* concat - concatenates preened bower components, configured
automagically from the preen config
It's worth noting that this setup assumes the order of files within a
package doesn't matter. This is usually true since we often include only
one file from the package.