Commit Graph

5066 Commits

Author SHA1 Message Date
Nathan Sobo
3cffee4065
Merge pull request #2011 from zed-industries/project-reconnection
Retain connection to remote projects when temporarily disconnected
2023-01-06 18:01:08 -07:00
Nathan Sobo
213658f1e9 Fix tests that failed due to defaulting the grouping interval to zero in tests 2023-01-06 17:56:21 -07:00
Nathan Sobo
386f7ba16d Merge remote-tracking branch 'origin/main' into project-reconnection 2023-01-06 16:52:22 -07:00
Kay Simmons
73e7967a12 working f and t bindings 2023-01-06 14:24:20 -08:00
Antonio Scandurra
83c98ce049 Prevent making further requests after language server shut down
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-01-06 13:40:32 -07:00
Antonio Scandurra
8487ae77e7 Share new worktrees when resharing project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-01-06 12:58:19 -07:00
Max Brunsfeld
b762d70202 Remove unused CallbackCollection method 2023-01-06 11:51:36 -08:00
Max Brunsfeld
53cb3a4429 Remove GC step for callback collections, always drop callbacks asap 2023-01-06 11:33:50 -08:00
Max Brunsfeld
ef192a902a Remove dropped subscription eagerly when removing callbacks 2023-01-06 11:03:45 -08:00
Antonio Scandurra
585c23e9f6 Match guest's reported buffers on host when synchronizing after reconnect
If the host thinks a guest has a buffer that they don't have, the host won't
send it to them when they attempt to open it the next time. This can happen
if the guest disconnected before they received the host's response to an
initial open buffer request.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-01-06 11:48:34 -07:00
Max Brunsfeld
4708f5d88f Add test for notifying and dropping subscriptions in an update cycle 2023-01-06 10:46:03 -08:00
Max Brunsfeld
a165cd596b Make event tests in gpui more consistent 2023-01-06 10:44:45 -08:00
Antonio Scandurra
0d31c8c1c8 Only share worktrees when UpdateProject succeeded 2023-01-06 10:41:11 -07:00
Antonio Scandurra
8c5a0ca3a4 Couple worktree sharing with project metadata updates 2023-01-06 10:31:36 -07:00
Antonio Scandurra
5c05b7d413 Ensure initial project metadata is sent when first sharing a project 2023-01-06 10:18:26 -07:00
Max Brunsfeld
3da69117ae Use a CallbackCollection for action dispatch observations 2023-01-06 09:15:53 -08:00
Nathan Sobo
4256a96051 Avoid holding project handle on a call that could hang
This fixes a leaked handle error.
2023-01-05 21:01:27 -07:00
Max Brunsfeld
82e9f736bd Use a CallbackCollection for release observations
Co-authored-by: Kay Simmons <kay@zed.dev>
2023-01-05 18:02:53 -08:00
Max Brunsfeld
fa620bf98f Fix logic error in dropping callback subscriptions
Co-authored-by: Kay Simmons <kay@zed.dev>
2023-01-05 17:30:39 -08:00
Max Brunsfeld
378f0c32fe Restructure callback subscriptions
Fix a callback leak that would occur when dropping a subscription
to a callback collection after triggering that callback, but before
processing the effect of *adding* the handler.

Co-authored-by: Kay Simmons <kay@zed.dev>
2023-01-05 16:41:23 -08:00
Nathan Sobo
77e322cb75 Wait for incomplete buffers when handling incoming buffer file updates 2023-01-05 13:50:25 -07:00
Julia
f669b8a029
Merge pull request #2007 from zed-industries/recent-projects-prefer-first-match
Prefer first max while fuzzy matching projects fixes unexpected behavior
2023-01-05 12:10:51 -05:00
Julia
09d57d1f26 Prefer first max while fuzzy matching projects fixes unexpected behavior 2023-01-05 11:27:50 -05:00
Nathan Sobo
7a629769b7 Re-request incomplete remote buffers when syncing buffers
Any buffers we requested but that haven't been fully sent will cause
outstainding open requests to hang. If we re-request them, any
waiting open requests will resume when the requested buffers finish
being created.

Co-authored-by: Max Brunsfeld <max@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-01-04 16:00:43 -07:00
Joseph T. Lyons
bd223f5a1f
Merge pull request #2002 from zed-industries/appease-clippy
Appease clippy
2023-01-04 16:33:29 -05:00
Nathan Sobo
1006ada458 Update scan_id on worktree entries when there is a conflict
Forgetting to do this meant we were unable to sync changes with reconnecting
guests in some cases.
2023-01-04 13:59:16 -07:00
Mikayla Maki
79f8f08caf v0.69.x dev 2023-01-04 11:45:25 -08:00
Nathan Sobo
789bbf15b7 Update buffer files when synchronizing buffers
It's possible that the host was disconnected when attempting to notify
guests of a file save, so we need to transmit this in order to correctly
update the file's mtime.

Next failing seed OPERATIONS=200 SEED=6894
2023-01-04 12:33:48 -07:00
Nathan Sobo
1dd085fc92 Introduce completed_scan_id to worktree
We need to know the most recent scan id we have actually completed. This is to
handle the case where a guest disconnects when we're in the middle of streaming
worktree entries to them. When they reconnect, they need to report a scan_id
from before we started streaming the entries, because we have no record of when
the stream was interrupted.

Next failure:
SEED=5051 ITERATIONS=1 OPERATIONS=200 cargo test --release --package=collab random -- --nocapture
2023-01-03 18:26:57 -07:00
Julia
93a634991b Include Typescript completion item detail field in completion label 2023-01-03 16:37:35 -05:00
Nathan Sobo
90fb9b53ad WIP 2023-01-03 13:30:14 -07:00
Nathan Sobo
8d70a22fa3 Record failing seed 2023-01-02 21:12:39 -07:00
Nathan Sobo
a6ffcdd0cf Track open buffers when handling sync requests
When a host sends a buffer to a guest for the first time, they record that
they have done so in a set tied to that guest's peer id. When the guest
reconnects and syncs buffers, they do so under a different peer id, so we
need to be sure we track which buffers we have sent them to avoid sending
them the same buffer twice, which violates the guest's assumptions.
2023-01-02 20:27:59 -07:00
Max Brunsfeld
74843493f4 Assign fake fs entries' mtimes more consistently 2023-01-02 10:20:52 -08:00
Julia
2b1118f597 Add dismiss buffer search button & fix some faulty icon button styling
Co-Authored-By: Nate Butler <nate@zed.dev>
2023-01-01 23:50:46 -05:00
Joseph Lyons
233b28a1b9 Appease clippy 2023-01-01 23:50:45 -05:00
Mikayla Maki
eeb21af841
Merge pull request #2000 from zed-industries/fix-line-seperator
Add other line seperators to regex normalization
2022-12-30 18:24:36 -08:00
Mikayla Maki
a5bccecd48 Add other line seperators to regex normalization 2022-12-30 18:18:02 -08:00
Joseph Lyons
2bc36600d4 Rename variable 2022-12-29 13:43:56 -05:00
Joseph Lyons
60f29410ca Add close clean items command 2022-12-29 13:28:52 -05:00
Joseph Lyons
ca3c4566dd Add close all items command 2022-12-29 01:43:49 -05:00
Nathan Sobo
f3dee2d332 Remove printlns, found a failure
Failing seed:
SEED=416 MAX_PEERS=2 ITERATIONS=5000 OPERATIONS=159 cargo +beta test --package=collab random -- --nocapture
2022-12-27 17:01:31 -07:00
Nathan Sobo
273988b8d5 Set transaction group interval to ZERO by default in tests
We were seeing non-deterministic behavior in randomized tests when
generating backtraces took enough time to cause transactions to group
in some cases, but not group in others.

Tests will need to explicitly opt into grouping if they want it by
setting the interval explicitly. We have tests in the text module that
currently test the history grouping explicitly, but I'm not sure
it's needed elsewhere.
2022-12-27 16:47:28 -07:00
Joseph Lyons
21a0df406f Add home and end key support 2022-12-26 00:24:26 -05:00
Max Brunsfeld
599acf0daa WIP - Panic immediately when detecting non-determinism via a change to the execution trace 2022-12-23 17:34:13 -08:00
Antonio Scandurra
6458a9144e WIP: failing randomized test
SEED=175 MAX_PEERS=2 ITERATIONS=1 OPERATIONS=159 cargo test --package=collab random -- --nocapture
2022-12-23 15:02:06 +01:00
Antonio Scandurra
344d05045d Avoid hanging waiting for operations when buffer has none 2022-12-23 12:26:48 +01:00
Antonio Scandurra
75803d8dbb Respond with an error when client hasn't got a registered handle 2022-12-23 11:53:13 +01:00
Joseph Lyons
41bff3947c Add actions for requesting features and filing bug reports 2022-12-22 23:04:33 -05:00
Joseph Lyons
f65fda2fa4 Add memory to system specs 2022-12-22 18:10:49 -05:00
Joseph Lyons
ea16082a42 Factored data into a SystemSpecs struct
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2022-12-22 14:27:32 -05:00
Max Brunsfeld
42e74e7eef Excluded deleted entries when initially sending worktrees to guests
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-22 11:18:10 -08:00
Antonio Scandurra
738e161bc6 WIP: failing test
SEED=882 RUST_LOG=collab::tests::randomized_integration_tests=info MAX_PEERS=2 ITERATIONS=1 OPERATIONS=49 cargo test --package=collab random -- --nocapture
2022-12-22 18:32:21 +01:00
Antonio Scandurra
559e14799c Restructure randomized test to be a bit clearer and test more stuff 2022-12-22 17:54:25 +01:00
Joseph Lyons
eeb5b03d63 add command to copy system information to the clipboard 2022-12-22 03:43:04 -05:00
Max Brunsfeld
d750b02a7c Handle file and diff updates to incomplete buffers
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-21 15:39:57 -08:00
Max Brunsfeld
c321f5d94a Assert that buffers' file state matches in randomized collab test
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-21 15:38:44 -08:00
Max Brunsfeld
89da738fae In randomized test, open remote projects via the room
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-21 14:13:43 -08:00
Max Brunsfeld
8cd94060bb 💄 Avoid referring to all clients as guests in random integration test 2022-12-21 11:37:18 -08:00
Max Brunsfeld
d8ccdff9fc Move randomized integration test into its own file 2022-12-21 11:26:24 -08:00
Antonio Scandurra
47348542ef Synchronize buffers when either the host or a guest reconnects 2022-12-21 14:20:56 +01:00
Antonio Scandurra
b5fb8e6b8b Remove unused JoinProjectError 2022-12-21 13:10:07 +01:00
Antonio Scandurra
b0336cd27e Add failing test for buffer synchronization after disconnecting 2022-12-21 11:56:15 +01:00
Antonio Scandurra
ecd80c553c Verify removing worktrees while host is offline 2022-12-21 11:47:01 +01:00
Antonio Scandurra
59d7f06c57 Handle proto::UpdateProjectCollaborator message in Project 2022-12-21 11:09:27 +01:00
Max Brunsfeld
15f666a50a Refresh project collaborator connection id for rejoined projects 2022-12-20 18:03:33 -08:00
Max Brunsfeld
ec6f2a3ad4 💄 Reorder private Project method 2022-12-20 17:32:42 -08:00
Max Brunsfeld
213be3d6bd Delete stale projects after cleanup interval, via server foreign key cascade 2022-12-20 17:27:42 -08:00
Max Brunsfeld
55800fc696 💄 Avoid repeated sql condition in rejoin_room 2022-12-20 17:23:52 -08:00
Max Brunsfeld
6a2066af6c 💄 Reduce indentation in Database::rejoin_room 2022-12-20 17:16:56 -08:00
Max Brunsfeld
cb8962691a Remove unnecessary UnshareProject message sent to clients leaving a project 2022-12-20 16:58:44 -08:00
Max Brunsfeld
bb00134f5f Clean up projects when leaving a room 2022-12-20 16:44:57 -08:00
Max Brunsfeld
21d6665c37 Merge branch 'main' into project-reconnection 2022-12-20 15:50:09 -08:00
Max Brunsfeld
6542b30d1f Implement rejoining projects as guest when rejoining a room
Co-authored-by: Julia Risley <julia@zed.dev>
2022-12-20 15:02:26 -08:00
Max Brunsfeld
55ebfe8321 Handle unshared projects when rejoining a room
Also, construct remote projects via the room, to guarantee
that the room can manage the projects' sharing lifecycle.

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-20 11:10:46 -08:00
Antonio Scandurra
9d15b3d295 Remove unused import 2022-12-20 17:47:22 +01:00
Antonio Scandurra
d31fd9bbf2 Support adding worktrees to project while host is offline 2022-12-20 17:42:08 +01:00
Antonio Scandurra
52babc51a0 Make host reconnection test pass when mutating worktree while offline 2022-12-20 17:30:58 +01:00
Antonio Scandurra
1a3940a12e Fix project reconnection test to ensure rooms actually reconnects 2022-12-20 14:51:46 +01:00
Antonio Scandurra
1aec691b35 Sketch out project reconnection routine on the server 2022-12-20 12:03:43 +01:00
Max Brunsfeld
70dd586be9 Start work on rejoining rooms, supplying all project info at once
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-19 17:50:43 -08:00
Max Brunsfeld
af85db9ea5 WIP - Retain hosts' project state when they disconnect 2022-12-19 11:38:08 -08:00
Max Brunsfeld
67b265b3d5 Add failing integration test for resharing projects on reconnect 2022-12-19 11:37:28 -08:00
Max Brunsfeld
c8b209306e collab 0.4.2 2022-12-19 11:29:22 -08:00
Max Brunsfeld
61c6c825b5
Merge pull request #1980 from zed-industries/following-panics
Fix panics when following
2022-12-19 11:26:28 -08:00
Antonio Scandurra
0ede89d82a WIP 2022-12-19 20:05:00 +01:00
Julia
c49573dc11 Format problematic DB macros 2022-12-19 11:11:10 -05:00
Julia
de9c58d216
Merge pull request #1983 from zed-industries/multi-buffer-git-gutter
Multi buffer git gutter
2022-12-19 10:53:42 -05:00
Antonio Scandurra
cb60eb8a57 Update rust-analyzer's disk_based_diagnostics_progress_token 2022-12-19 16:27:25 +01:00
Antonio Scandurra
d8219545c9 💄 2022-12-19 16:17:27 +01:00
Antonio Scandurra
06f6d02579 Stop counting extensions in worktree 2022-12-19 16:05:22 +01:00
Max Brunsfeld
1e02ebbd11 Replicate pending selections separately from other selections
This fixes a panic that would occur when a leader created
a pending selection that overlapped another selection,
because the follower would attempt to treat that pending
selection as non-pending, which would violate the invariant
that selections are sorted and disjoint.
2022-12-17 14:00:53 -08:00
Max Brunsfeld
8c64514570 Add ZED_STATELESS env var, for suppressing persistence
Use this env var in the start-local-collaboration script to make
the behavior more predictable.
2022-12-17 12:03:51 -08:00
Kay Simmons
6fcb3c9020
Merge pull request #1972 from zed-industries/recent-workspace
Recent Project Picker
2022-12-16 15:51:57 -08:00
Kay Simmons
2c47bd4a97 Clear stale projects if they no longer exist 2022-12-16 15:45:17 -08:00
Antonio Scandurra
a5f624203e collab 0.4.1 2022-12-16 12:02:03 +01:00
Antonio Scandurra
457e1046c8 Bump protocol version 2022-12-16 11:48:14 +01:00
Antonio Scandurra
21ab1bb434 Remove unnecessary PeerId parsing code 2022-12-16 11:45:42 +01:00
Antonio Scandurra
aa44de3d16 Fix test ensuring room is left when disconnected from LiveKit 2022-12-16 10:52:32 +01:00
Max Brunsfeld
ad37034960 Identify LiveKit room participants by user id, not peer id
This way, their participant id can remain the same when they reconnect.
2022-12-15 17:19:32 -08:00
Julia
ebd0c5d000 Handle reversed=true for multi-buffer git-hunks-in-range iteration
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-12-15 18:17:32 -05:00
Julia
f88b413f6a Rewrite multi-buffer aware git hunks in range to be more correct
Less ad-hoc state tracking, rely more on values provided by the
underlying data

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-15 17:09:09 -05:00
Antonio Scandurra
c2f5381e5a collab 0.4.0 2022-12-15 19:37:53 +01:00
Antonio Scandurra
ea1f6689b9
Merge pull request #1971 from zed-industries/update-app-icons
Update Zed & Zed Preview icons
2022-12-15 19:37:04 +01:00
Antonio Scandurra
2679e245a5 Minor stylistic change 2022-12-15 16:40:16 +01:00
Antonio Scandurra
5a334622ea 💄 2022-12-15 16:34:59 +01:00
Antonio Scandurra
5720c43fe7 Merge branch 'main' into fix-reconnects-after-deploy 2022-12-15 15:32:05 +01:00
Antonio Scandurra
5fb522a9b1 collab 0.3.14 2022-12-15 11:31:51 +01:00
Antonio Scandurra
86e5ae1f2e Allow nulls in projects.host_connection_{id,server_id}
The server version on stable won't be able to fill values for those
columns when we deploy the migration to preview.

With this commit we're also dropping the unused `worktree_extensions`
and `project_activity_periods` tables. The last version of the server
on stable (0.2.6) doesn't contain any code that accesses those tables.
2022-12-15 11:30:51 +01:00
Antonio Scandurra
aadd7f2886 collab 0.3.13 2022-12-15 10:53:17 +01:00
Antonio Scandurra
067a19c971 Avoid logging an error when user who hasn't joined any room disconnects 2022-12-15 10:45:03 +01:00
Antonio Scandurra
688f179256 Use "id" nomenclature more consistently 2022-12-15 10:15:59 +01:00
Antonio Scandurra
af77f1188a Re-add server_id indices for room_participants/project_collaborators 2022-12-15 09:58:25 +01:00
Julia
0dedc1f3a4 Get tests building again 2022-12-15 00:17:28 -05:00
Max Brunsfeld
6c58a4f885 Fix stale server queries, use foreign keys from connectionsn to servers 2022-12-14 17:34:24 -08:00
Kay Simmons
6da59311d1 Add open recent project to file menu 2022-12-14 16:02:48 -08:00
Kay Simmons
2bc685281c Add recent project picker 2022-12-14 15:59:50 -08:00
Max Brunsfeld
7e0b6ed1c6 Bump RPC version due to multibuffer following PR 2022-12-14 15:34:22 -08:00
Max Brunsfeld
e08d6cd6de
Merge pull request #1921 from zed-industries/multibuffer-following
Allow following collaborators into editors with multi-excerpt buffers (refactors + find-all-refs)
2022-12-14 15:33:11 -08:00
Max Brunsfeld
954c9ac3fd Add integration test coverage for following into multibuffers 2022-12-14 15:28:58 -08:00
Max Brunsfeld
e4c5dfcf6c Use run_until_parked instead of 'condition' in all integration tests 2022-12-14 15:05:35 -08:00
Nate Butler
5f6313d336 Update Zed & Zed Preview icons 2022-12-14 17:41:18 -05:00
Max Brunsfeld
70efd2bebe Introduce a ViewId message, identifying views across calls 2022-12-14 14:40:07 -08:00
Max Brunsfeld
f99f581bfc Clean up state matching in from_state_proto using let/else statements 2022-12-14 11:09:33 -08:00
Max Brunsfeld
09d3fbf04f In editor following test, apply excerpt removals to both followers 2022-12-14 11:08:08 -08:00
Antonio Scandurra
363e3cae4b WIP 2022-12-14 19:25:07 +01:00
Antonio Scandurra
930be6706f WIP 2022-12-14 18:02:39 +01:00
Antonio Scandurra
05e99eb67e Introduce an epoch to ConnectionId and PeerId 2022-12-14 15:55:56 +01:00
Antonio Scandurra
9bd400cf16 collab 0.3.12 2022-12-14 11:43:33 +01:00
Antonio Scandurra
553585b9a1 Add more logging to Room 2022-12-14 11:43:12 +01:00
Antonio Scandurra
674fddac87 Instrument rpc::Server::start and reduce cleanup timeout again 2022-12-14 11:42:12 +01:00
Antonio Scandurra
63e7b9189d collab 0.3.11 2022-12-14 11:25:04 +01:00
Antonio Scandurra
9530976f61 Try using a longer timeout for cleaning up stale rooms 2022-12-14 11:24:36 +01:00
Antonio Scandurra
02c30b0091 collab 0.3.10 2022-12-14 09:35:52 +01:00
Antonio Scandurra
b9c7796547 Reduce readiness probe delay and period 2022-12-14 09:35:36 +01:00
Antonio Scandurra
e00cb6b074 collab 0.3.9 2022-12-14 09:05:19 +01:00
Antonio Scandurra
dc47552180 Fix kubernetes configuration for readiness probe 2022-12-14 08:58:19 +01:00
Antonio Scandurra
98a593b263 collab 0.3.8 2022-12-14 08:56:02 +01:00
Antonio Scandurra
897506c797 Define readiness probe to know when the new server can accept traffic 2022-12-14 08:54:46 +01:00
Antonio Scandurra
59c9a57570 collab 0.3.7 2022-12-14 08:43:18 +01:00
Antonio Scandurra
dde6cf596e Don't wait for stale project deletion before listening for connections 2022-12-14 08:42:34 +01:00
Antonio Scandurra
2596fefa04 collab 0.3.6 2022-12-13 23:09:02 +01:00
Antonio Scandurra
34b69896e4 Listen to SIGTERM in addition to ctrl-c for graceful shutdown 2022-12-13 23:08:43 +01:00
Antonio Scandurra
7824ace58b collab 0.3.5 2022-12-13 22:40:55 +01:00
Antonio Scandurra
b150efbd96 Set log level to debug for preview deployment
Also, add a log statement when we receive the interrupt signal.

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-13 22:38:55 +01:00
Max Brunsfeld
c20204d269 collab 0.3.4 2022-12-13 11:17:37 -08:00
Max Brunsfeld
45bfcfc3b8 Fix excessive delay before clearing stale room data
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-13 11:17:20 -08:00
Julia
cf72173282 Clamp end of visual git hunk to requested range 2022-12-13 13:58:50 -05:00
Max Brunsfeld
5218a2f966 collab 0.3.3 2022-12-13 10:17:01 -08:00
Max Brunsfeld
95748123b5 Merge remote-tracking branch 'origin/collab-0.3.x' 2022-12-13 10:16:25 -08:00
Max Brunsfeld
6ad326ac58 Wait longer before deleting outdated rooms from the database
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-13 10:14:43 -08:00
Mikayla Maki
b0652c55c6
Merge pull request #1968 from zed-industries/fix-text-size-in-updates
Fix text size in notifications
2022-12-13 10:00:24 -08:00
Mikayla Maki
790ef19a48 Fix mis-set variables 2022-12-13 09:58:04 -08:00
Julia
ecd44e6914 Git diff recalc in project diagnostics 2022-12-13 12:35:58 -05:00
Julia
2cd9987b54 Git diff recalc in project search 2022-12-13 12:35:58 -05:00
Julia
7c3dc1e3dc Cleanup 2022-12-13 12:35:58 -05:00
Julia
00b7c78e33 Initial hacky displaying of git gutter in multi-buffers 2022-12-13 12:35:58 -05:00
Max Brunsfeld
11800a8a78 Merge branch 'main' into multibuffer-following 2022-12-13 09:25:18 -08:00
Antonio Scandurra
99c5f8c713 collab 0.3.2 2022-12-13 15:16:41 +01:00
Antonio Scandurra
461c2400ad
Merge pull request #1965 from zed-industries/preserve-calls-during-server-restarts
Automatically re-join call when server is restarted
2022-12-13 14:12:32 +01:00
Antonio Scandurra
073a2988e6 Move creation of room_id index into its own migration 2022-12-13 13:57:41 +01:00
Antonio Scandurra
70aac75dd5 Run until parked before asserting about participants in restart test 2022-12-13 13:53:51 +01:00
Antonio Scandurra
4dc838fbb7 Reset connection pool when tearing down the server in tests 2022-12-13 13:51:25 +01:00
Antonio Scandurra
d4c8fa3090 Use a synchronous mutex for ConnectionPool 2022-12-13 13:50:51 +01:00
Antonio Scandurra
a594ba8f8a Simulate server restarts in randomized test 2022-12-13 12:18:38 +01:00
Antonio Scandurra
f1884d608b Allow server to see client disconnection before giving up on reconnecting 2022-12-13 12:17:21 +01:00
Antonio Scandurra
417db95693 Fix typo in index name 2022-12-13 11:44:48 +01:00
Antonio Scandurra
0220d7ba5d Include room_id in CallCanceled message
This ensures we don't accidentally cancel old calls.
2022-12-13 11:43:09 +01:00
Antonio Scandurra
e2b132ef23 💄 2022-12-13 11:37:39 +01:00
Antonio Scandurra
7e8d9d52d3 Delete stray debug statement 2022-12-13 11:36:40 +01:00
Antonio Scandurra
6a6a032f1f Delete stale rooms/participants after RECONNECT_TIMEOUT 2022-12-13 11:32:37 +01:00
Mikayla Maki
fcea254e8e
Merge pull request #1963 from zed-industries/fix-workspace-corner-cases
Fix small workspace deserialization corner cases
2022-12-12 17:56:43 -08:00
Mikayla Maki
9bf0a02eae Allow an empty center group to successfully deserialize into an empty pane.
Fix error when deserializing pane axis which caused it's members.len() > 1 invariant to be violated
Fix failure to gain center pane focus when failing to deserialize a center pane entirely

Co-authored-by: Max <max@zed.dev>
2022-12-12 17:51:16 -08:00
Max Brunsfeld
2affbcc495
Merge pull request #1962 from zed-industries/scrolling-breaks-follow
Avoid breaking follow when syncing leader's scroll position
2022-12-12 16:37:58 -08:00
Mikayla Maki
cd2d593a6c Fixed issue where the NextScreen action would never have an effect 2022-12-12 15:36:51 -08:00
Max Brunsfeld
9ef00ea44c Avoid breaking follow when syncing leader's scroll position
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Kay Simmons <kay@zed.dev>
2022-12-12 15:36:30 -08:00
Mikayla Maki
5a29a74956 Fetch last workspace explicitly when starting Zed
co-authored-by: Max <max@zed.dev>
2022-12-12 13:29:18 -08:00
Mikayla Maki
db3119b553 Add check for if the user wants a blanks workspace when deserializing 2022-12-12 12:25:52 -08:00
Max Brunsfeld
f797dfb88f Merge branch 'main' into multibuffer-following 2022-12-12 11:47:39 -08:00
Antonio Scandurra
beea9b68ff Allow re-joining room after server restarts 2022-12-12 16:03:21 +01:00
Antonio Scandurra
3cd77bfcc4 Always cast connection ids to i32
Postgres doesn't support unsigned types. This also adds indices to
support querying `project_collaborators` and `room_participants`
by connection id.
2022-12-12 11:43:08 +01:00
Antonio Scandurra
456396ca6e Rename connection_lost to answering_connection_lost 2022-12-12 11:43:08 +01:00
Antonio Scandurra
26b5653427 Delete hosted projects from database when connection is lost 2022-12-12 11:43:08 +01:00
Antonio Scandurra
895c365485 Introduce random reconnections in the randomized test 2022-12-12 11:43:08 +01:00
Antonio Scandurra
8fa26bfe18 Fix test_calls_on_multiple_connections after adding room reconnection 2022-12-12 11:43:08 +01:00
Antonio Scandurra
aca3f02590 Re-join room when client temporarily loses connection 2022-12-12 11:43:08 +01:00
Antonio Scandurra
d74fb97158 Remove Executor trait from collab and use an enum instead
This will let us save off the executor and avoid using generics.
2022-12-12 11:43:08 +01:00
Mikayla Maki
34388a1d31 Updated is_child() to omit self 2022-12-09 12:07:49 -08:00
Mikayla Maki
3a4f8d267a Fix infinite loop in dock position when deserializing 2022-12-09 11:50:24 -08:00
Antonio Scandurra
0366d725ea collab 0.3.1 2022-12-09 08:19:41 +01:00
Antonio Scandurra
2697112a8a Don't drop unregistered column in reconnection support migration
We don't use this column anymore because, when a project is unshared, we
simply remove it from the `projects` table. However, this column is expected
in the stable version of the server and the database is shared between stable
and preview. If we dropped it, stable would start throwing errors.
2022-12-09 08:11:18 +01:00
Mikayla Maki
925c9e13bb Remove terminal container view, switch to notify errors 2022-12-08 20:21:00 -08:00
Mikayla Maki
da100a09fb WIP 2022-12-08 20:21:00 -08:00
Mikayla Maki
c42da5c9b9 WIP 2022-12-08 20:21:00 -08:00
Mikayla Maki
2733f91d8c Fix bugs resulting from refactoring the terminal into project and workspace halves 2022-12-08 20:21:00 -08:00
Mikayla Maki
83aefffa38 Rearrange the terminal code to not have a cyclic dependency with the project 2022-12-08 20:21:00 -08:00
Mikayla Maki
1b8763d0cf WIP - move terminal to project as pre-prep for collaboration 2022-12-08 20:21:00 -08:00
Max Brunsfeld
7dde54b052 v0.68.x dev 2022-12-08 15:33:02 -08:00
Kay Simmons
b1e37378dc
Merge pull request #1944 from zed-industries/vim-page-movement
Add scroll commands to vim mode
2022-12-08 14:58:19 -08:00
Kay Simmons
e61a38b3a9 remove printline 2022-12-08 14:45:22 -08:00
Kay Simmons
2cf48c03f9 fix final failing tests 2022-12-08 14:39:48 -08:00
Joseph Lyons
ab978ff1a3 collab 0.3.0 2022-12-08 16:35:13 -05:00
Joseph T. Lyons
dcd4b8f7db
Merge pull request #1941 from zed-industries/Allow-overwriting-signup-data
Allow overwriting signup data if a user signs up more than once with the same email address
2022-12-08 16:11:28 -05:00
Kay Simmons
10aecc310e notify views when hover finishes in tooltip wrapper 2022-12-08 11:26:46 -08:00
Kay Simmons
750e7eb833
Merge pull request #1945 from zed-industries/drag-and-drop-deadzones
Add deadzones to drag and drop
2022-12-08 11:15:42 -08:00
Kay Simmons
36bc90b2b8 Add deadzones to drag and drop 2022-12-07 17:46:00 -08:00
Kay Simmons
f6f41510d2 fix failing tests from incorrect follow behavior 2022-12-07 17:25:48 -08:00
Kay Simmons
cffb064c16 Refactor editor scrolling and implement scroll commands from vim mode 2022-12-07 16:39:32 -08:00
Joseph Lyons
d71d543337 Ensure that subsequent signup happens after initial
We can't rely on the fact that the test won't run fast enough such that both `created_at`s are the same time.  This ensures the subsequent signup happens after the initial one and that the database doesn't overwrite the initial one.
2022-12-07 08:15:01 -05:00
Antonio Scandurra
665219fb00 Fix inviting user that had already signed up via a different email 2022-12-07 14:07:01 +01:00
Antonio Scandurra
1b8f23eeed Add failing test showcasing inviting existing user via different email 2022-12-07 14:06:59 +01:00
Joseph Lyons
5f31907127 Clean up test 2022-12-07 07:12:27 -05:00
Joseph Lyons
97989b04a0 Remove comment 2022-12-06 17:18:54 -05:00
Joseph Lyons
694840cdd6 Allow overwriting signup data if a user signs up more than once with the same email address 2022-12-06 17:12:12 -05:00
Antonio Scandurra
3b5b48c043 Query project count as i64 instead of i32 when gathering metrics
Using the latter will cause a type mismatch when performing the query.
2022-12-06 15:00:32 +01:00
Antonio Scandurra
fc7b01b74e Fix busy status when accepting a contact request
Previously, we would send an contact update when accepting a request
using the same `busy` status for both the requester and the responder.
This was obviously wrong and caused the requester to see their own
busy status as the newly-added responder contact's status.
2022-12-06 10:19:34 +01:00
Antonio Scandurra
f1b35981c2
Merge pull request #1935 from zed-industries/reconnections-2
Move in-memory server state to the database
2022-12-06 09:22:59 +01:00
Antonio Scandurra
744714b478 Remove unused UserId import from seed script 2022-12-06 09:07:25 +01:00
Max Brunsfeld
855f17c378 Include outline items for c/c++ functions returning pointers-to-pointers, references
Co-authored-by: Julia Risley <julia@zed.dev>
2022-12-05 13:56:21 -08:00
Mikayla Maki
0921178b42 Got tree sitter integration to a shippable place 2022-12-05 11:31:52 -08:00
Mikayla Maki
30872d3992 Added experimental support for scheme, racket, and commonlisp 2022-12-05 11:31:49 -08:00
Antonio Scandurra
cd08d289aa Fix warnings 2022-12-05 19:45:56 +01:00
Antonio Scandurra
9a62150dce Merge branch 'main' into reconnections-2 2022-12-05 19:18:40 +01:00
Antonio Scandurra
7bbd97cfb9 Send diagnostic summaries synchronously 2022-12-05 19:07:06 +01:00
Antonio Scandurra
5443d9cffe Return project collaborators and connection IDs in a RoomGuard 2022-12-05 18:37:01 +01:00
Antonio Scandurra
be3fb1e985 Update sea-orm to fix bug on failure to commit transactions
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-12-05 18:36:25 +01:00
Antonio Scandurra
b97c35a468 Remove project_id foreign key from room_participants 2022-12-05 15:16:06 +01:00
Antonio Scandurra
eec3df09be Upgrade sea-orm 2022-12-05 14:56:01 +01:00
Antonio Scandurra
d3c411677a Remove random pauses to prevent the database from deadlocking 2022-12-05 12:03:45 +01:00
Antonio Scandurra
d97a8364ad Retry transactions if there's a serialization failure during commit 2022-12-05 10:49:53 +01:00
Antonio Scandurra
0ed731780a Remove duplication between transaction and room_transaction 2022-12-05 09:46:03 +01:00
Julia
11c1254e71
Merge pull request #1924 from zed-industries/simon-says-dont-move
Do not reorder tab opened by follower to end of item list
2022-12-04 13:00:07 -05:00
Mikayla Maki
55eb0a3742 Fixed and error message and properly initialized the DB 2022-12-03 16:46:35 -08:00
Mikayla Maki
1ce0863158 Removed old code 2022-12-03 16:27:45 -08:00
Mikayla Maki
d609237c32 Found db parallelism problem :( 2022-12-03 16:26:37 -08:00
Mikayla Maki
4288f10873 And library change 2022-12-03 16:13:02 -08:00
Mikayla Maki
80e035cc2c Fixed bad rebase 2022-12-03 16:12:07 -08:00
Mikayla Maki
a1f273278b Added user notifications 2022-12-03 16:06:02 -08:00
Mikayla Maki
ffcad4e4e2 WIP fixing dock problems 2022-12-03 16:06:02 -08:00
Mikayla Maki
5262e8c77e CHANGE LOCK TO NOT BE DROPPED INSTANTLY. DANG U RUST
co-authored-by: kay@zed.dev
2022-12-03 16:06:02 -08:00
Mikayla Maki
5e240f98f0 Reworked thread safe connection be threadsafer,,,, again
Co-Authored-By: kay@zed.dev
2022-12-03 16:06:02 -08:00
Mikayla Maki
189a820113 First draft of graceful corruption restoration 2022-12-03 16:06:02 -08:00
Mikayla Maki
b8d423555b Added side bar restoration 2022-12-03 16:06:02 -08:00
Kay Simmons
8a48567857 Reactivate the correct item in each pane when deserializing 2022-12-03 16:06:01 -08:00
Kay Simmons
f68e8d4664 Address some issues with the sqlez_macros 2022-12-03 16:06:01 -08:00
Kay Simmons
1b225fa37c fix test failures 2022-12-03 16:06:01 -08:00
Kay Simmons
a29ccb4ff8 make thread safe connection more thread safe
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-12-03 16:06:01 -08:00
Mikayla Maki
9cd6894dc5 Added multi-threading problem test 2022-12-03 16:06:01 -08:00
Kay Simmons
dd9d20be25 Added sql! proc macro which checks syntax errors on sql code and displays them with reasonable underline locations
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-12-03 16:06:01 -08:00
Mikayla Maki
260164a711 Added basic syntax checker to sqlez 2022-12-03 16:06:01 -08:00
Kay Simmons
359b8aaf47 rename sql_method to query and adjust the syntax to more closely match function definitions 2022-12-03 16:06:01 -08:00
Kay Simmons
1cc3e4820a working serialized writes with panics on failure. Everything seems to be working 2022-12-03 16:06:01 -08:00
Mikayla Maki
3e0f9d27a7 Made dev tools not break everything about the db
Also improved multi statements to allow out of order parameter binding in statements
Ensured that all statements are run for maybe_row and single, and that of all statements only 1 of them returns only 1 row
Made bind and column calls add useful context to errors

Co-authored-by: kay@zed.dev
2022-12-03 16:06:01 -08:00
Mikayla Maki
2dc1130902 Added extra sql methods 2022-12-03 16:06:01 -08:00
Mikayla Maki
37174f45f0 Touched up sql macro 2022-12-03 16:06:01 -08:00
Mikayla Maki
76c42af62a Finished terminal working directory restoration 2022-12-03 16:06:01 -08:00
Mikayla Maki
cf4c103660 Fixed workspace tests 2022-12-03 16:06:01 -08:00
Mikayla Maki
e1eff3f4cd WIP: Some bugs switching to database provided IDs, terminal titles don't reload when restored from serialized, workspace tests are no longer passing but should be easy to fix when it isn't 11:44 2022-12-03 16:06:01 -08:00
Mikayla Maki
a47f2ca445 Added UUID based, stable workspace ID for caching on item startup. Completed first sketch of terminal persistence. Still need to debug it though.... 2022-12-03 16:06:01 -08:00
Mikayla Maki
e659823e6c WIP termial implementation. need some way of getting the currently valid workspace ID 2022-12-03 16:06:01 -08:00
Mikayla Maki
a8ed95e1dc Implementing persistence for the terminal working directory, found an issue with my current data model. :( 2022-12-03 16:06:01 -08:00
Kay Simmons
cb1d2cd1f2 WIP serializing and deserializing editors 2022-12-03 16:06:01 -08:00
Mikayla Maki
9077b058a2 removed test file 2022-12-03 16:06:01 -08:00
Mikayla Maki
7ceb5e815e workspace level integration of serialization complete! Time for item level integration....
Co-Authored-By: kay@zed.dev
2022-12-03 16:06:01 -08:00
Mikayla Maki
992b94eef3 Rebased to main 2022-12-03 16:06:01 -08:00
Mikayla Maki
a0cb6542ba Polishing workspace data structures
Co-authored-by: kay@zed.dev
2022-12-03 16:06:01 -08:00
Mikayla Maki
6530658c3e Added center group deserialization 2022-12-03 16:06:01 -08:00
Kay Simmons
75d3d46b1b wip serialize editor 2022-12-03 16:06:01 -08:00
Kay Simmons
d20d21c6a2 Dock persistence working!
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-12-03 16:06:01 -08:00
Kay Simmons
c1f7902309 wip 2022-12-03 16:06:01 -08:00
Mikayla Maki
4798161118 Distributed database pattern built.
Co-Authored-By: kay@zed.dev
2022-12-03 16:06:01 -08:00
Mikayla Maki
2a5565ca93 WIP 2022-12-03 16:06:00 -08:00
Mikayla Maki
a5edac312e Moved to workspaces crate... don't feel great about it 2022-12-03 16:05:26 -08:00
Mikayla Maki
e578f2530e WIP commit, migrating workspace serialization code into the workspace 2022-12-03 16:05:25 -08:00
Mikayla Maki
c84201fc9f Done first draft of strongly typed migrations 2022-12-03 16:05:25 -08:00
Kay Simmons
4a00f0b062 Add typed statements 2022-12-03 16:05:25 -08:00
Mikayla Maki
64ac84fdf4 Re-use big union statement for get_center_pane 2022-12-03 16:05:25 -08:00
Mikayla Maki
f27a9d77d1 Finished the bulk of workspace serialization. Just items and wiring it all through.
Co-Authored-By: kay@zed.dev
2022-12-03 16:05:25 -08:00
Mikayla Maki
0186289420 Refined sqlez, implemented 60% of workspace serialization sql 2022-12-03 16:05:25 -08:00
Mikayla Maki
6b214acbc4 Got Zed compiling again 🥰 2022-12-03 16:05:25 -08:00
Kay Simmons
d419f27d75 replace worktree roots table with serialized worktree roots list 2022-12-03 16:05:25 -08:00
Kay Simmons
eb0598dac2 more refactoring and slightly better api 2022-12-03 16:05:25 -08:00
Mikayla Maki
aa7b909b7b WIP3 2022-12-03 16:05:25 -08:00
Mikayla Maki
b552f1788c WIP2 2022-12-03 16:05:25 -08:00
Mikayla Maki
d492cbced9 WIP 2022-12-03 16:05:25 -08:00
Mikayla Maki
19aac6a57f Moved docks to a better position 2022-12-03 16:05:25 -08:00
Kay Simmons
685bc9fed3 impl bind and column and adjust pane tables 2022-12-03 16:05:25 -08:00
Mikayla Maki
406663c75e Converted to sqlez, so much nicer 2022-12-03 16:05:25 -08:00
Mikayla Maki
c8face33fa WIP, incorporating type parsing using new sqlez patterns 2022-12-03 16:05:25 -08:00
Mikayla Maki
3c1b747f64 WIP almost compiling with sqlez 2022-12-03 16:05:25 -08:00
Mikayla Maki
777f05eb76 Finished implementing the workspace stuff 2022-12-03 16:05:25 -08:00
Mikayla Maki
395070cb92 remove submodule 2022-12-03 16:05:25 -08:00
Mikayla Maki
a4a1859dfc Added sqlez api 2022-12-03 16:05:25 -08:00
Kay Simmons
e3fdfe02e5 WIP switching to sqlez 2022-12-03 16:05:24 -08:00
Mikayla Maki
7744c9ba45 Abandoning rusqlite, the API is miserable 2022-12-03 16:04:10 -08:00
Mikayla Maki
e6ca0adbcb Fixed failing serialization issues 2022-12-03 16:04:10 -08:00
Mikayla Maki
c105f41487 Started working on dock panes
co-authored-by: kay@zed.dev
2022-12-03 16:04:10 -08:00
Mikayla Maki
ddecba143f Refactored workspaces API and corrected method headers + fixed bug caused by migration failures
co-authored-by: kay@zed.dev
2022-12-03 16:04:10 -08:00
Mikayla Maki
3451a3c7fe Rebase - Got Zed compiling and fixed a build error due to conflicting dependencies that cargo didn't catch :(
Co-Authored-By: kay@zed.dev
2022-12-03 16:04:10 -08:00
Mikayla Maki
b9cbd4084e WIP: fixing up behavior of workspace initialization 2022-12-03 16:04:10 -08:00