Sebastian Thiel
73c21f2e42
provide more information in watcher-related errors
...
related to https://github.com/gitbutlerapp/gitbutler/issues/2657#issuecomment-2131307753
It turns out that the UI triggers `set_project_active()`, and then moves on and emits more
commands, some of which depend on a watcher being present.
The UI could wait, but even if it does the 'endless spinner' happens.
2024-05-25 20:35:40 +02:00
Sebastian Thiel
f59268fb25
Allow local overrides for the target triple of production windows builds.
...
The use-case is somewhat specific as it allows developers to do:
```
export TRIPLE_OVERRIDE=x86_64-pc-windows-msvc
```
and build the binary as x86 even on an ARM VM.
The reason ARM builds don't work natively is the `win32` crate,
which simply doesn't work there.
It could be another step to replace it with something that does
to get ARM builds, but probably that will only happen once
there is demand for native ARM windows builds.
2024-05-25 15:05:43 +02:00
Sebastian Thiel
a176bf04cf
remove Windows experiment ( #3601 )
...
The sync-all didn't do anything, and one would still run into locked
files.
2024-05-25 09:10:11 +02:00
Mattias Granlund
021180d8f1
Rename function
2024-05-23 10:58:59 +02:00
Pavel Laptev
ec8b171fc7
Project menu items update + new "Open in VS code" ( #3804 )
2024-05-21 23:57:38 +02:00
Kiril Videlov
9f318626f8
Merge pull request #3737 from anaisbetts/flushable-debounce
...
Avoid file locks by being smarter about when we try to rebuild our information
2024-05-21 13:47:54 +02:00
Mattias Granlund
21e98fd9f2
Simplify getting default target
...
- remove try function in favor of returning error
- drop unused function
2024-05-21 12:02:38 +02:00
Ani Betts
b4b0de6a3c
Merge remote-tracking branch 'upstream/master' into flushable-debounce
...
* upstream/master: (85 commits)
History and minor UI fixes (#3797 )
History fixes (#3796 )
make GitGuardian happy
bump playwright version
add vitest exclude for node_modules
Remove unused exports from ipc
Update auth.ts to use absolute import
Use correct invoke function
setup for async tasks on oplog update
formatting
save and restore the gitbutler/integration branch
remove unneccessary CSPs
Fix ollama request security
fix: forgot the port
feat: Set default snapshot lines threshold to 20 when undefined
fix: Updated connect-src to allow local connections for ollama
Minor tweaks to CSS and use real branch name
Unmount history component when hidden
Fix bug leaving PR button visible
Small refactor of history component
...
2024-05-21 10:29:42 +02:00
Pavel Laptev
6e6272983b
History and minor UI fixes ( #3797 )
...
* Convert Capital case to Uper case "History menu"
* UI updates: target branch styles
* Remove console.log
* CSS: space between "Trunk" and the timer
* UI: reversed chevron arrows fix
* remove commented console.log
* UX: toggle file preview in History
* UI: target branch set animation fix
2024-05-21 01:07:22 +02:00
Scott Chacon
2a89fa6b93
save and restore the gitbutler/integration branch
...
when we save the snapshots, save and restore the integration branch commit properly so we don't get in a weird state after restore
2024-05-19 07:07:55 +02:00
Kiril Videlov
b3a1699cbf
Merge pull request #3786 from gitbutlerapp/Virtual-branch-1
...
remove unneccessary CSPs
2024-05-18 18:26:51 +02:00
Kiril Videlov
7e070ac0f5
remove unneccessary CSPs
2024-05-18 18:13:24 +02:00
Kiril Videlov
07b863731f
Merge pull request #3785 from gitbutlerapp/fix-ollama-request-security
...
Fix ollama request security
2024-05-18 18:08:39 +02:00
Caleb Owens
6ae9b7ff6e
Fix ollama request security
2024-05-18 16:51:20 +01:00
Kiril Videlov
a9316492c9
fix: forgot the port
2024-05-18 17:49:05 +02:00
Kiril Videlov
8fa8cbfe6d
fix: Updated connect-src to allow local connections for ollama
2024-05-18 16:28:19 +02:00
Pavel Laptev
1be1218a71
History View UI ( #3773 )
...
* Separated History logic layout into components
* Layout update, components split and cover new data
* Added file preview
* handle event trigger
* empty states added
* Temp store for snapshot files + threshold section
* formatting
* added a gap between elements in footer
* CSS: padding fix
2024-05-17 01:21:19 +02:00
Ani Betts
2ff2b1f7ec
Format
2024-05-15 20:27:26 +02:00
Ani Betts
ddc2cfeb67
Flush on window focus
2024-05-15 20:27:26 +02:00
Ani Betts
326e9fee02
Wire flushing into the Watcher
...
Give the main window a mechanism to flush pending changes via a Channel
2024-05-15 20:27:26 +02:00
Ani Betts
69cf9c8058
Don't use HOME env var
...
This environment variable doesn't exist on Windows
2024-05-15 17:39:23 +02:00
Ani Betts
1695ad5c53
Add dirs crate
2024-05-15 17:39:00 +02:00
Scott Chacon
d944cad533
merge upstream
...
temp
2024-05-14 10:25:29 +02:00
Kiril Videlov
62dadd96a8
remove unused index subscription
2024-05-13 14:18:56 +02:00
Kiril Videlov
3e0914444f
remove unused crates in tauri
2024-05-12 04:19:19 +02:00
Kiril Videlov
5b3273f542
remove unused sessions / deltas implementation
...
This is removed in favor of the new `ops` module
2024-05-12 03:39:04 +02:00
Kiril Videlov
d9c985db26
Merge pull request #3749 from gitbutlerapp/update-file-event-removal-of-session-id
...
remove sessions/deltas unused tauri events
2024-05-12 03:37:24 +02:00
Kiril Videlov
91e48c6730
remove sessions/deltas unused tauri events
2024-05-12 03:24:36 +02:00
Kiril Videlov
27f0802443
remove gb_reference from projects
2024-05-12 03:08:54 +02:00
Kiril Videlov
3eaaccc2e0
remove deltas calculation on file change
...
This is being replaced by the new `ops` module
Along with the respective tests. There were only session/deletas related assertions in the watcher tests
2024-05-12 02:54:19 +02:00
Kiril Videlov
18cf10a143
remove unused fetch_gb_data
2024-05-12 02:13:02 +02:00
Kiril Videlov
bca8e13dfb
remove unused push_gb_data
2024-05-12 02:05:07 +02:00
Kiril Videlov
2bbe4fa569
remove unused list_deltas endpoint
2024-05-11 21:12:08 +02:00
Kiril Videlov
598fc0ae26
Merge pull request #3744 from gitbutlerapp/remove-sessions-command
...
remove unused list_sessions
2024-05-11 21:09:45 +02:00
Kiril Videlov
14a7e8b2a1
remove unused list_sessions
2024-05-11 20:58:14 +02:00
Kiril Videlov
217efbc932
remove unused project_flush_and_push
2024-05-11 20:52:05 +02:00
Scott Chacon
4d542330c5
merge stuff
2024-05-11 11:43:06 +02:00
Kiril Videlov
62b97f7f5a
remove unused imports
2024-05-10 20:31:07 +02:00
Kiril Videlov
97c072cb7a
remove unused endpoint list_session_files
2024-05-10 20:30:45 +02:00
Kiril Videlov
58c124627a
add an enpoint for getting the snapshot diff
2024-05-09 11:24:42 -07:00
Kiril Videlov
1ae1efeec0
rename tauri module for undo operations
2024-05-08 00:36:16 +02:00
Kiril Videlov
93d5e61530
rename module snapshots to ops
2024-05-08 00:29:38 +02:00
Kiril Videlov
2c065a602e
rename module of oplog trait
2024-05-08 00:29:38 +02:00
Josh Junon
1fd0b1ecfc
make askpass broker a global
2024-05-07 16:07:37 +02:00
Scott Chacon
51f9769024
sign commits with real git
...
in the strangest possible way
2024-05-07 15:15:25 +02:00
Kiril Videlov
1bc41a9146
snapshot list pagination
2024-05-07 00:46:22 +02:00
Josh Junon
0b903bcaef
Merge pull request #3697 from anaisbetts/clean-up-win32-menus
...
Clean up win32 menus
2024-05-06 20:44:40 +02:00
Ani Betts
1309481273
Fix lint
2024-05-06 17:42:34 +02:00
Ani Betts
ec320376ff
Don't have a Window menu on Win32/Linux
...
Generally, we have a Window menu only in apps that can have multiple related windows or tabs. Since we don't have that at the moment, 🔪 the Window menu
2024-05-06 16:28:01 +02:00
Ani Betts
828a7e55b2
We don't need a separate "Close" item on non-macOS
...
Because Win32 and Linux apps generally close when their windows close, we don't need a separate "Close" vs "Quit" item on these platforms
2024-05-06 16:27:25 +02:00
Scott Chacon
ca634807b1
Merge branch 'master' into target-branch-selector-fix
2024-05-06 13:49:27 +02:00
Scott Chacon
344e3d3f38
small rust stuff
2024-05-06 13:44:08 +02:00
Josh Junon
add0a84165
add help menu handler for debug info sharing and remove panic
2024-05-06 12:58:50 +02:00
Josh Junon
cf74b12a3c
Merge pull request #3693 from gitbutlerapp/Help-window-menu
...
"Help" window menu
2024-05-06 12:37:14 +02:00
Pavel Laptev
53d6e58850
match statement update
2024-05-06 12:24:18 +02:00
Pavel Laptev
81ff230fb7
code review fixes
2024-05-06 12:12:39 +02:00
Pavel Laptev
c14fa2f864
version added
2024-05-06 12:05:50 +02:00
Kiril Videlov
5f6ff257d1
refactor snapshotting as an Oplog trait
...
Implemented on Project
2024-05-05 22:28:12 +02:00
Pavel Laptev
e38e68477b
lint fixes
2024-05-05 21:57:45 +02:00
Pavel Laptev
043917ad45
Help window menu added
2024-05-05 21:40:06 +02:00
Scott Chacon
5527d2b6e2
initial implementation of different push target
2024-05-03 11:20:47 +02:00
dependabot[bot]
a1a3abc868
Bump the rust-updates group with 10 updates
...
Bumps the rust-updates group with 10 updates:
| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde ) | `1.0.197` | `1.0.199` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.58` | `1.0.59` |
| [anyhow](https://github.com/dtolnay/anyhow ) | `1.0.81` | `1.0.82` |
| [async-trait](https://github.com/dtolnay/async-trait ) | `0.1.79` | `0.1.80` |
| [chrono](https://github.com/chronotope/chrono ) | `0.4.37` | `0.4.38` |
| [reqwest](https://github.com/seanmonstar/reqwest ) | `0.12.2` | `0.12.4` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.115` | `1.0.116` |
| [ssh-key](https://github.com/RustCrypto/SSH ) | `0.6.5` | `0.6.6` |
| [tauri](https://github.com/tauri-apps/tauri ) | `1.6.1` | `1.6.2` |
| [sysinfo](https://github.com/GuillaumeGomez/sysinfo ) | `0.30.8` | `0.30.11` |
Updates `serde` from 1.0.197 to 1.0.199
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.199 )
Updates `thiserror` from 1.0.58 to 1.0.59
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59 )
Updates `anyhow` from 1.0.81 to 1.0.82
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82 )
Updates `async-trait` from 0.1.79 to 0.1.80
- [Release notes](https://github.com/dtolnay/async-trait/releases )
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.79...0.1.80 )
Updates `chrono` from 0.4.37 to 0.4.38
- [Release notes](https://github.com/chronotope/chrono/releases )
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md )
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.37...v0.4.38 )
Updates `reqwest` from 0.12.2 to 0.12.4
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.2...v0.12.4 )
Updates `serde_json` from 1.0.115 to 1.0.116
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116 )
Updates `ssh-key` from 0.6.5 to 0.6.6
- [Commits](https://github.com/RustCrypto/SSH/compare/ssh-key/v0.6.5...ssh-key/v0.6.6 )
Updates `tauri` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/tauri-apps/tauri/releases )
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v1.6.1...tauri-v1.6.2 )
Updates `sysinfo` from 0.30.8 to 0.30.11
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md )
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.8...v0.30.11 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: async-trait
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: chrono
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: ssh-key
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: tauri
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
- dependency-name: sysinfo
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: rust-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 15:11:55 +00:00
Josh Junon
b350a85e5c
add google images CDN to img-src CSP ( fixes #3516 )
2024-04-30 11:48:00 +02:00
Kiril Videlov
27480c503e
Merge pull request #3629 from gitbutlerapp/remove-rust-posthog-integration
...
remove posthog from the rust code
2024-04-29 16:28:11 +02:00
Scott Chacon
786a834559
Merge pull request #3626 from gitbutlerapp/sc-history-manipulation
...
operation tonkotsu 2
2024-04-29 16:17:57 +02:00
Kiril Videlov
00706b402b
remove posthog from the rust code
...
similar to https://github.com/gitbutlerapp/gitbutler/pull/3628
2024-04-29 16:12:14 +02:00
Kiril Videlov
6439f3333a
remove sentry rust dependencies
2024-04-29 15:54:13 +02:00
Kiril Videlov
83b40eabb6
remove sentry from rust code
...
Since the actually valuable bug reports are submitted by developers as github issues or on our Discord, sentry error reporting is not necessary
2024-04-29 15:46:29 +02:00
Scott Chacon
c5e7fe865c
fix clippy issues
...
fix a few more clippy issues
2024-04-29 15:42:58 +02:00
Scott Chacon
2b1d808314
add several history manipulation backend functions
...
this adds backend functions in Rust to do the following:
* move file hunks between commits (basic)
* undo any commit in a stack
* insert a blank commit
* move a commit within the stack
* update a commit message in place
2024-04-29 15:03:01 +02:00
Kiril Videlov
34d12fb1e6
add snapshotting tests
2024-04-28 20:05:46 +02:00
Kiril Videlov
5420fc3e3c
use new snapshot types
2024-04-26 23:20:31 +02:00
Josh Junon
adcba68220
move multi-file modules to mod.rs and single-file modules to <name>.rs
2024-04-26 11:56:35 +02:00
Sebastian Thiel
ff44a80e74
Merge pull request #3607 from Byron/win-fixes
...
Revert 74eb7bd3
as debounce-timing has no effect (#3601 )
2024-04-25 22:07:37 +02:00
Kiril Videlov
b3c05b7948
fix signatures
2024-04-25 19:23:13 +02:00
Kiril Videlov
753953a7d5
remove tauri endpoint for creating snapshots
2024-04-25 19:23:13 +02:00
Kiril Videlov
a2682e2535
implement undo stack snapshotting
2024-04-25 19:23:13 +02:00
Sebastian Thiel
116f5d02bc
Revert 74eb7bd3
as debounce-timing has no effect ( #3601 )
...
This probably means the raciness is not due concurrency introduced by filesystem events,
which leads me to think that having great 'disk-IO-hygiene` should improve things.'
2024-04-25 16:33:55 +02:00
Sebastian Thiel
29525ffd03
address review comments
...
- rename feature to `windows`
- remove unused config key from `Cargo.toml`, unfortunately `cfg` isn't available for everything
- make sure feature is toggled on on CI when checking and when publishing
2024-04-25 11:29:24 +02:00
Sebastian Thiel
3058ffbc9b
avoid showing colors in Windows logs ( #3601 )
...
People can't copy it without the terminal-escape code, making it harder to read.
2024-04-25 08:19:59 +02:00
Sebastian Thiel
74eb7bd397
on Windows, update far less often on filesystem changes. ( #3601 )
...
By increasing the window size for collecting filesystem events,
knowing that each event is processed in parallel, we might be lucky
and that already reduces the likelyhood of clashes.
It's an experiment though.
On Unix, run with:
`LOG_LEVEL=debug pnpm tauri dev --features adapt-to-windows`
2024-04-25 08:17:11 +02:00
Sebastian Thiel
aa3d3cb7da
fix rustfmt formatting issues due to line-length ( #3039 )
...
The trick is to temporarily set `max_width` in `rustfmt.toml` to 120,
then set it back to the default of 100 (or remove the file).
2024-04-23 12:53:56 +02:00
Sebastian Thiel
be4cd36986
clarify some TODOs to avoid keeping them for too long
...
Note that the comment above 'deltas' merely removed, as it wasn't actionable
without changing the frontend, which can probably already deal with
multiple of these.
Now that types are better understood though, it was straightforward to
change the type of `file_path` to not be a string, which now is even
clearer of a necessity thanks to the `tauri`-independent `watcher` crate.
Also, remove a comment related to the lack of worktree support.
It now fails gracefully, and that will come up again if support should be added.
2024-04-21 11:35:26 +02:00
Kiril Videlov
0fea544cd7
rm gb_repository from controller
2024-04-21 09:26:34 +02:00
Kiril Videlov
72398719bc
rm test command
2024-04-20 00:38:18 +02:00
Josh Junon
d5b34c46f5
mark package info as potentially unused
2024-04-19 16:01:54 +02:00
Josh Junon
7f35537798
only construct about metadata on macos
2024-04-19 15:49:23 +02:00
Josh Junon
ed088f4431
enable devtools on release builds, too
2024-04-19 15:17:44 +02:00
Josh Junon
340eaeaf8c
re-construct the full menu instead of using OS default
2024-04-19 15:15:56 +02:00
Sebastian Thiel
c30ac3ba62
optimize tokio features
...
Previously, the attempt was made to enable only those `tokio` features
that are actually used. However, due to default-features still being
enabled and `tauri` using the `full` feature, for most intents and purposes
that wasn't effective.
Now default features are disabled, and `full` isn't used anymore, forcing
all crates to mention the exact features they need.
Note that `tracing` is missing here, as it wasn't effective previously
without the `--cfg tokio_unstable` option also being specified as rustflag.
2024-04-18 09:48:23 +02:00
Sebastian Thiel
adfbc7c5cc
Remove now unused dependencies from tauri
.
...
These have moved to `watcher` and `analytics` respectively.
2024-04-18 09:25:33 +02:00
Sebastian Thiel
5785085a77
reintegrate watcher
crate into tauri
crate
2024-04-17 22:20:32 +02:00
Kiril Videlov
6f0fe2afa9
rm uses_diff_context from list vbranches return
2024-04-17 07:14:43 +02:00
Vid Luther
4ff94d9f4a
happy 2024
2024-04-16 18:17:51 +02:00
Josh Junon
fa06586cdf
fix devtools on release builds
2024-04-16 16:43:22 +02:00
Mattias Granlund
203da38e8b
Add devtools to view menu
2024-04-16 09:07:11 +01:00
Sebastian Thiel
a3fd06897e
address misc review comments
...
- turn `static` into `const`
2024-04-15 16:55:03 +02:00
Sebastian Thiel
fb9db89e1b
remove '_pure' functions in favor of creating a full handler
in tests.
...
The `pure` functions were from a time where a `Handler` couldn't be instantiated
in full for tests, but that is not the case anymore, so there isn't any use
for the added complexity.
2024-04-15 16:50:20 +02:00
Sebastian Thiel
62b1c49372
avoid &str in place where ProjectId
could be used
2024-04-15 16:23:18 +02:00
Sebastian Thiel
e2ef2dc721
Only watch a single project at a time.
...
Previously it would watch every registered project, which could incur more work
on all parts of the application than necessary.
Now UI sends an event that indicates which project is active, allowing the
watch to be setup in that very moment. It's worth noting that the previously
watched project is automatically deregistered.
2024-04-15 07:19:15 +02:00