Commit Graph
49 Commits
Author SHA1 Message Date
Antonio ScandurraandNathan Sobo e32f1f8b80 Create test_app_state with FakeFs instead of RealFs
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-23 18:17:49 +02:00
Antonio Scandurra 3d4dbf3140 Maintain collaborators in UserStore 2021-09-20 15:05:41 +02:00
Antonio Scandurra 32111092bd Turn UserStore into a model 2021-09-20 14:40:06 +02:00
Antonio Scandurra f2825cceba Start on Presence as the backing model for the people panel 2021-09-17 16:18:41 +02:00
Nathan Sobo 7e4d5b7d04 Clear cached credentials when establishing a websocket connection with an invalid token 2021-09-14 20:36:03 -06:00
Nathan SoboandMax Brunsfeld 4a9918979e WIP: Clear cached credentials if authentication fails
Still need to actually handle an HTTP response from the server indicating there was an invalid token.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-14 19:19:11 -06:00
Nathan SoboandMax Brunsfeld 77a4a36eb3 Test that we reuse credentials when reconnecting
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-14 18:30:17 -06:00
Nathan SoboandMax Brunsfeld 44a457e8b6 Cache credentials in memory separately from connection status
This prevents us from re-prompting for keychain access when we retry connections after the connection is lost.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-14 18:21:46 -06:00
Max Brunsfeld 84d4bb6186 Introduce HttpClient trait, use it to fetch avatars in UserStore
* Add a FakeHttpClient for tests
2021-09-14 13:42:44 -07:00
Nathan Sobo f0019e3725 WIP 2021-09-14 12:29:56 -06:00
428c491542 WIP: Start on rendering avatars
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-14 19:21:03 +02:00
Antonio Scandurra 156fd4ba57 Add integration test simulating killing a connection while chatting 2021-09-09 13:27:44 +02:00
Antonio Scandurra ad7631de9f Refactor and write a simple unit test to verify reconnection logic 2021-09-09 11:00:43 +02:00
Max Brunsfeld edbd424b75 Introduce test-only APIs for configuring how Client reconnects 2021-09-08 18:19:59 -07:00
Max Brunsfeld b6eac57f63 Introduce a concrete Conn type for peer's websocket connection
This is mostly to set us up to test the rpc::Client's reconnect
logic.

There are multiple ways that the `rpc::Client` may establish
its websocket connection: (SSL in production, plain TCP during
local development, and using an in-memory connection for tests).
Now we can represent all of those connections using a common type.

Also, several long methods no longer need to be generic, which
is good for compile time.
2021-09-08 18:14:47 -07:00
Antonio ScandurraandMax Brunsfeld 900010160f WIP
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-09-08 18:58:59 +02:00
Antonio Scandurra 94959d18c4 Load embedded fonts when initializing settings 2021-09-06 14:08:42 +02:00
3bb5610ad1 Overhaul handling of font families
* Specify font families in the theme.
* Load fonts eagerly when loading themes, instead of loading
  them lazily when rendering.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-26 15:06:00 -07:00
Nathan SoboandMax Brunsfeld 8f86fa1ccd Associate messages with their sender, fetching senders if necessary
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-25 14:20:03 -06:00
Max BrunsfeldandNathan Sobo 6df80d94ad Allow subscription/notification to be cancelled by dropping the returned Subscription
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 15:54:24 -07:00
Max Brunsfeld 5ecedd894d Add ChannelList to AppState 2021-08-23 15:03:45 -07:00
Antonio ScandurraandNathan Sobo 94e9a83326 Give up on entities being Send and Sync
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 17:04:32 +02:00
5338b30c00 Remove remaining instances of router
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-08-19 19:38:17 +02:00
Antonio Scandurra d6412fdbde Delete old Peer implementation and adapt previous code paths
This still doesn't compile but should be close.
2021-08-19 15:02:30 +02:00
Nathan SoboandMax Brunsfeld 4d947580b1 Reload current theme on cmd-k shift-T
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 15:52:23 -06:00
Max BrunsfeldandNathan Sobo b30d0daabf Add a theme picker
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 14:55:27 -07:00
Max Brunsfeld 92353b6967 Start work on allowing variables in themes 2021-07-30 17:28:22 -07:00
Max BrunsfeldandNathan Sobo c1808d09ef Add randomized test for DisplayMap
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-30 09:50:28 -07:00
Max Brunsfeld 7260442d42 Move the fs module out of worktree 2021-07-13 15:40:11 -07:00
391ad489ff Rename zed-rpc to zrpc
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-13 18:22:00 +02:00
Max BrunsfeldandNathan Sobo 2a90347b82 Store an Fs on Workspace, pass it to each Worktree
Push test-only worktree behavior down into the Fs,
via a `watch` method which provides fs events.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-12 17:26:14 -07:00
Max Brunsfeld eeebc761b6 Restructure Peer to handle connections' messages in order 2021-07-09 16:27:34 -07:00
Max Brunsfeld 8b58c165a7 Re-export zed-rpc's test support items from zed's test support 2021-07-08 17:38:54 -07:00
Nathan Sobo bbf803d7dc Store a reference to the LangageRegistry on the Worktree 2021-06-29 20:07:37 -06:00
Max Brunsfeld 04c80578bc Start work on sending buffer operations 2021-06-25 13:46:36 -07:00
Max BrunsfeldandNathan Sobo efc8bc3124 Add a test-support feature flag that enables compilation of zed::test module
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-23 18:05:03 -07:00
Antonio Scandurra 02321af08a Respond to proto::OpenBuffer requests 2021-06-23 16:20:02 +02:00
Max Brunsfeld 7a88e44264 Add menu command to join worktree using URL on clipboard
Introduce rpc::Client struct that wraps zed_rpc::Peer
2021-06-17 20:42:36 -07:00
Antonio ScandurraandNathan Sobo 9de4d73ffb Move RpcClient to zed_rpc and rename it to Peer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-16 18:01:26 +02:00
Antonio Scandurra 8112efd522 Replace callback-based requests/messages with streams 2021-06-16 14:26:54 +02:00
Max Brunsfeld f6e2754494 Rename context parameters to cx in main.rs 2021-05-28 15:10:39 -07:00
2f378be1a8 Introduce LanguageRegistry object
* Include it, along with settings in `OpenParams` grouped under a new struct called `AppState`

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-22 12:34:35 +02:00
Antonio ScandurraandNathan Sobo ddd746b9f9 Use env_logger instead of simplelog in tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-20 17:34:14 +02:00
Antonio Scandurra cd7dccd30c Replace remaining usages of finish_pending_tasks with condition 2021-04-20 12:28:30 +02:00
Nathan Sobo a4c1fe5a0b WIP: Add a condition method to model and view handles for use in tests
It returns a future that resolves when the provided predicate returns true. The predicate is called any time the handle's targeted entity calls notify.

Still need to add a timeout and completely remove finsih_pending_tasks.
2021-04-19 22:01:54 -06:00
Nathan Sobo bc34ff54fe Add a failing test for detecting a file move 2021-04-13 20:09:45 -06:00
Nathan Sobo 9bab29c72f Get workspace module in and compiling 2021-03-18 15:52:46 -06:00
Nathan Sobo 171dd0c243 WIP 2021-03-18 13:17:25 -06:00
Nathan Sobo 23308e17a9 WIP on rebuilding with extracted UI framework 2021-03-18 13:13:31 -06:00