Sebastian Thiel
56642830f0
remove rate-limit as it never kicks in, and also, we'd want the computation for correctness
2024-04-15 07:11:16 +02:00
Sebastian Thiel
2e969d1507
collect filemonitor events into lists to avoid excessive recomputation.
...
Previously, each file change both in `.git` as well as in the worktree would
cause a complete recomputation. This computation included opening a git
repository at least once (probaby more often), to make an 'is-ignored' check.
The latter is very expensive in `git2` and gets more expensive the more
files there are.
Now the repository is opened when needed, and we re-use it for all applicable
file paths.
2024-04-15 07:11:16 +02:00
Sebastian Thiel
af225bd9e0
make events
private and publicly export Event
instead.
...
That way, we get `tauri::Event`, without the somewhat confusing
module name `events`.
2024-04-15 07:11:16 +02:00
Sebastian Thiel
2eaba14819
dissolve the event queue in favor of method calls
...
The idea is that we don't parallelize over a channel anymore, but
instead just process filesystem events, one at a time.
This would allow each handler to become a function that gets its
state passed, and makes all the necessary calls verbatim, which
in turn makes it easy to follow what's happening.
If anything becomes to slow due to the serialization of event processing,
selective parallelization can be re-added.
2024-04-15 07:11:09 +02:00
Sebastian Thiel
3902bb9b2d
de-objectify all sub-handlers
...
Sub-Handlers are objects, and with that comes a lot of complexity.
However, there seems to be on need for it at all, and a first
steps is to turn these into methods to truly understand
what's going on.
2024-04-13 23:09:17 +02:00
Sebastian Thiel
27349a2fa2
Remove Clone
in the vincinity of Watchers where possible.
...
This will help to get away from from the 'everything needs to be shared'
approach to state.
2024-04-13 23:09:17 +02:00
Sebastian Thiel
cdae683757
Turn WatcherInner
into Watcher
...
As `Watcher` really adds nothing.
2024-04-13 23:09:16 +02:00
Sebastian Thiel
1476ff01ee
Avoid managing every piece of the watcher, only manage what's currently needed
2024-04-13 23:09:16 +02:00
Sebastian Thiel
efe03a9b3a
Use the new dispatcher and make sure everything still works
2024-04-13 23:09:16 +02:00
Sebastian Thiel
954d100d95
simplify dispatcher around the idea of a single channel
...
That way, all objects go away and it will be nothing more than a task
around a channel.
2024-04-13 23:09:16 +02:00
Sebastian Thiel
52c637504e
Don't consume instances that are Send+Sync+Clone
...
They don't actually need it.
2024-04-13 23:09:16 +02:00
Sebastian Thiel
de6fd55658
remove try_new()
in favor of new()
in watcher.rs
...
`try_new()` here is used as constructor, which is what `new` is for
with less boilerplate.
2024-04-13 23:09:16 +02:00
Pavel Laptev
6c25a7d5bc
Branch name input improvments ( #3507 )
...
* Resizer hooks improved
- Resizer hook updated in order to get an accurate value without post adjustment
- Naming inconsistency fixed in `useResizer`
* Refactor: name input
- return initial name if a user trying to submit an empty branch name
- removed extra elements and CSS
- Input handling with less code
* trim lane name
2024-04-13 22:07:40 +02:00
Pavel Laptev
7908d0a195
tooltip UX update ( #3508 )
...
- added appearing animation
- removed delay on `mouseleave`
2024-04-13 21:52:33 +02:00
Abdulrahman Alfawal
5203180cdc
Fix toast type on GitHub authenticate failure
2024-04-13 17:25:09 +02:00
Mattias Granlund
bdf65ead48
Disable default context menu unless dev mode
...
- fixes #3496
2024-04-13 16:33:56 +02:00
Pavel Laptev
8dada8149f
File popup menu z-index fix ( #3502 )
2024-04-13 00:29:23 +02:00
Josh Junon
b818ce485b
Merge pull request #3463 from gitbutlerapp/revert-3448-remove-clippy-alloweds
...
Revert "Remove unused (?) allow clippy statements"
2024-04-12 18:05:54 +02:00
Mattias Granlund
ad3e2ffdf5
Make branch title change reflect branch name optimistically
2024-04-12 17:02:08 +02:00
Pavel Laptev
c6c221b6a2
added status messages + code refactor ( #3465 )
...
* added status messages + code refactor
* Exclude `skipped` checks from running checks count
* Added types `ColorStyle` and `KindStyle`
- in order to share same color types across components and avoid duplication added `ColorStyle` and `KindStyle` types
- Renamed color style `warn` in some components to `warning` for consistency
* typo and naming fixes
* Updated component style types
2024-04-12 13:13:24 +02:00
Mattias Granlund
eb80df0450
Simplify project service and settings
...
- removes unnecessary object creation
- fixes staleness bug
2024-04-11 23:34:33 +02:00
Mattias Granlund
701e75f241
Fix unintended effect on project settings
...
- removes unnecessary event dispatching
2024-04-11 23:34:33 +02:00
Mattias Granlund
f0097846e4
Fix "open in vscode" on Windows
...
- fixes #3489
2024-04-11 23:34:33 +02:00
Mattias Granlund
150acb0abf
Show most errors using toast
...
- does not automatically dismiss
- shows the error to the user
2024-04-11 20:17:48 +02:00
Josh Junon
4bb52ac831
Merge pull request #3493 from gitbutlerapp/prune-s3-uploads
...
prune S3 upload file tree
2024-04-11 16:07:12 +02:00
Mattias Granlund
92b12ebad7
Refactor parameters in httpClient.ts
...
- it's convention for first param to be url
2024-04-11 16:06:36 +02:00
Mattias Granlund
7aa30724e7
Move syncToCloud
out of httpClient.ts
2024-04-11 16:06:36 +02:00
Josh Junon
18e85583f0
prune S3 upload file tree
2024-04-11 16:04:22 +02:00
Mattias Granlund
b7ca1ad2c4
Move feedback functions from httpClient.ts into ShareIssueModal.ts
2024-04-11 15:25:20 +02:00
Mattias Granlund
dada5f7dd0
Move user related functions from httpClient.ts to user.ts
2024-04-11 15:25:20 +02:00
Mattias Granlund
84a61e9644
Move Project from HttpClient to projects.ts
...
- renames duplicate type CloudProject
2024-04-11 15:25:20 +02:00
Mattias Granlund
f079f0df77
Rename Project -> CloudProject
...
- we should probably not have multiple types
- one is used on disk, the other in the cloud
2024-04-11 15:25:20 +02:00
Mattias Granlund
6270cbe403
Move User
from httpClient.ts to user.ts
2024-04-11 15:25:20 +02:00
Mattias Granlund
ef270ceaa4
Fixup previous commit
2024-04-11 15:25:20 +02:00
Mattias Granlund
ffbd6e7a0c
Rename constants and move functions in order of priority
...
Readers always start at the top, we should put the most important functions / definitions there.
2024-04-11 15:25:20 +02:00
Mattias Granlund
5abcdcca1f
Replace RequestMethod enum with simpler type
2024-04-11 15:25:20 +02:00
Mattias Granlund
a85ecb9dbb
Rename CloudClient -> HttpClient
...
This class will become a thin wrapper around fetch, the functions it currently declares should live in the code that calls them.
2024-04-11 15:25:20 +02:00
Mattias Granlund
9ca84a6144
Rename cloud.ts -> httpClient.ts
2024-04-11 15:25:20 +02:00
Caleb Owens
0ceff12989
Remove empty body object
2024-04-11 15:25:20 +02:00
Caleb Owens
41644432b9
Introduce method specific methods
2024-04-11 15:25:20 +02:00
Caleb Owens
7100a06b59
Allow passing undefined content type to fix form multipart types
2024-04-11 15:25:20 +02:00
Caleb Owens
59039d3dda
Make use of makeRequest in butlerClient
2024-04-11 15:25:20 +02:00
Caleb Owens
61e68778a9
Move AI types back into the AI folder
2024-04-11 15:25:20 +02:00
Caleb Owens
f8daeeb8c2
Use makeRequest in all existing API wrappers
2024-04-11 15:25:20 +02:00
Caleb Owens
1debab3a92
Introduce an initial makeRequest method
2024-04-11 15:25:20 +02:00
Caleb Owens
b7ac4cc41e
Tidy up seting CloudClient#fetch
2024-04-11 15:25:20 +02:00
Caleb Owens
c094d7e1ee
Remove any cyclic packages
2024-04-11 15:25:20 +02:00
Caleb Owens
251aaa3e59
Moved types.ts which was previously missed
2024-04-11 15:25:20 +02:00
Caleb Owens
3cb86afae7
Move AI Client related stuff into its own folder
2024-04-11 15:25:20 +02:00
Josh Junon
91538281ec
Merge pull request #3491 from gitbutlerapp/fix-signing-config
...
Fix signing config
2024-04-11 14:07:02 +02:00