Commit graph

115 commits

Author SHA1 Message Date
Ericson "Fogo" Soares ef048a866c
[ENG-1809] Make core more resilient to crashes (#2574)
* Catching panics

* Re-enable unwind on release profile

* Reverting deps due to bad assertion

* Comment why the deps where reverted

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2024-06-30 03:59:01 +00:00
Ericson "Fogo" Soares bdc242a852
[ENG-1775] Scan location using new jobs (#2476)
* First draft on task system usage, still missing job system

* Scan location roughly working, a ton of stuff to fix yet

* Updating some deps due to crashes and bugs

* Exposing non critical errors to frontend

* Getting active job reports from job system

* Using boxed opaque type to avoid a downcast issue with generics

* Task system issues discovered on race conditions

* Enable debug

* Fix job report in the job manager

* Fix race condition on steal tasks

* Fixed race condition on task suspend

* Some fixes on job progress reporting and save

* Fixed many race conditions and a hard deadlock
Also some progress report polishing

* Ignore .ts and .mts video files for now

* Some better logs

* bruh

* Internal deadlocks and excess of communication in the task system
- Also better logs

* Bunch of fixes and optimizations

* WIP at fixing file identifier

* Fixed file identifier job
- still need to work on its progress report frontend

* A bunch of polishing

* Fixed some bugs and did more polishing

* Cleanup

* Bridging old and new job systems

* A ton of fixes

* A bunch of bugs related to shutdown and resume

* Indexer and watcher bugs

* Log normalizing

* Fixing CI

* Change error! to warn! on non critical errors log

* Fix redirect to new location

* Type annotation

* Bogus merge resolution on cargo lock
2024-06-17 21:30:57 +00:00
Vítor Vasconcellos 405fb023d8
Clean up and update rust dependencies (#2544)
* Clean up and update rust dependencies

* Attempt to fix Windows Error
2024-06-10 19:44:00 +00:00
Oscar Beaumont b015763a6f
More P2P docs (#2492)
* Remove relay

* restructure p2p

* wip

* cleanup webrtc

* split up P2P docs

* wip

* more wip

* the fork has moved

* finish local network discovery

* Document the relay system

* be less stupid

* a

* remote ip from deploy script

* remove debug from deploy script

* Explain relay setup and usage

* Physical pain

* fix

* error handling for relay setup

* Listeners Relay state + merge it into NLM state

* `node_remote_identity`

* redo libraries hook

* toggle relay active in settings

* Dedicated network settings page

* Stablise P2P debug page

* warning for rspc remote

* Linear links in docs

* fix p2p settings switches

* fix typescript errors on general page

* fix ipv6 listener status

* discovery method in UI

* Remove p2p debug menu on the sidebar

* wip

* lol

* wat

* fix

* another attempt at fixing library hook

* fix

* Remove sync from sidebar

* fix load library code

* I hate this

* Detect connections over the relay

* fix

* fixes

* a

* fix mDNS

* a bunch o fixes

* a bunch of state management fixes

* Metadata sync on connection

* skill issue

* fix markdown

* Clippy cleanup

* Backport #2380

* Update interface/locales/en/common.json

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/local-network-discovery.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/local-network-discovery.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/relay.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/relay.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/relay.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/relay.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/relay.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/sd_p2p.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/sd_p2p.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/sd_p2p_proto.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/overview.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/overview.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/relay.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/sd_p2p_proto.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/sd_p2p_proto.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/transport-layer.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/sd_p2p_proto.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/local-network-discovery.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* Update docs/developers/p2p/sd_p2p_proto.mdx

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>

* a

* Cleaning binario section

* cleanup Docker message

* idk

* Idempotent listeners

* Manual peers working????

* minor fixes

* crazy idea - don't panic in the event loop

* fixes

* debug

* debug

* LAN badge in network settings

* Use `dns_lookup` instead of `tokio::net::lookup_host`

* fix

* bruh sandwich

* proper dialing

* a

* remove logs

* fix

* Small cleanup

* manual peers state on connected device

* a

* Fix manual discovery state + give it a badge

* Clippy improvements

* flip discovery priority

* Add `addrs` to debug query

* connection candidates in debug

* Fix state

* Clippppppppppppy

* Manual discovery badge

* Flesh out ping example

* Usage guide

* `sd_p2p_proto` examples

* More discovery docs

* More docs work

* docs docs docs and more docs

* PONG

* rename

---------

Co-authored-by: Matthew Yung <117509016+myung03@users.noreply.github.com>
2024-05-30 21:48:12 +08:00
Consoli f4a79a2fcd
Faster debug builds (#2483)
* Config dev profile for faster debug builds

* Remove redundant changes to Cargo.toml in CI

* Forgot Windows

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2024-05-14 05:59:52 +00:00
Brendan Allan d3ce2e8917
use prisma-client-rust main branch (#2471)
* use primsa-client-rust main branch

* remove as i64
2024-05-10 15:54:34 +00:00
Ericson "Fogo" Soares 69412accae
[ENG-1634 / ENG-1636] Integrate Media Data Extractor and Thumbnail Actor with New Task System (#2423)
* Moving stuff around

* Media data extraction task

* New thumbnailer task

* Taking more metrics on thumbnailer

* First drafts on media processor job

* Better interruption latency on thumbnailer task

* Also solve the latency on interrupt at media data extraction

* Media processor job

* Shallow media processor

* Better prioritize files identification

* Integrate ffmpeg media data extraction
- Thumbnail quality improvements parameters
2024-05-10 12:51:22 +00:00
Ericson "Fogo" Soares 5a73df00a4
Update image crate (#2473)
Bump image crate version
Also had to patch pdfium-render to bump its image crate version too
2024-05-10 05:32:33 +00:00
Vítor Vasconcellos e797b02e65
Media metadata extraction & Thumbnailer rework (#2285)
* initial ffprobe commit

* Working slim down version ffprobe

* Auto format ffprobe and deps source

* Remove show_pixel_formats logic
- Fix do_bitexact incorrect check in main after last changes
- Fix some clangd warning

* Remove show_* and print_format options and their respective logic

* Rework ffprobe into simple_ffprobe
- Simplify ffprobe logic into a simple program that gather and print a media file metadata

* Reduce the amount of ffmpeg log messages while generating thumbnails

* Fix completly wrong comments

* mend

* Start modeling ffmpeg extracted metadata on schema
 - Start porting ffprobe code to rust
 - Rename some references to media_data to exif_data

* Finish modeling media info data
 - Add MediaProgram, MediaStream, MediaCodec, MediaVideoProps, MediaAudioProps, MediaSubtitleProps to Schema
 - Fix simple_ffproble to use its custom print_codec, instead of ffmpeg's impl

* Add relation between MediaInfo and FilePath
 - Remove shared properties from MediaInfo and related structs
 - Implement Iterator for FFmpegDict

* Fix and update schema

* Data models and start populating MediaInfo in rust

* Finish populating media info, chapters and program

* Improve FFmpegFormatContext data raw pointer access
 - Implement stream data gathering

* Impl FFmpegCodecContext, retrieve codec information
 - Improve some unsafe pointer uses
 - Impl from FFmpegFormatContext to MediaInfo conversion

* Fix FFmpegDict Drop

* Fix some crago warnings

* Impl retrieval of video props
 - Fix C char* to Rust String convertion

* Impl retrieval of audio and subtitle props
 - Fill props for MediaCodec

* Remove simple_ffprobe now that the Rust impl is done

* Fix schema to match actually retrieved media info
 - Fix import some FFmpeg constants instead of directly using values

* Rework movie_decoder
 - Re-implement create_scale_string and add support anamorphic video
 - Improve C pointer access for FFmpegFormatContext and FFmpegCodecContext
 - Use newer FFmpeg abstractions in movie_decoder

* Fix incorrect props when initializing MovieDecoder

* Remove unecessary lifetimes

* Added more native wrappers for some FFmpeg native objects used in movie_decoder

* Remove FFmpegPacket
 - Some more improvements to movie_decoder

* WIP

* Some small fixes

* More fixes
Rename movie_decoder to frame_decoder
Remove more references to film_strips

* fmt

* Fix duplicate migration for job error changes

* fix rebase

* Solving segfaults, fuck C lang

Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com>

* Update rust to version 1.77
 - Pin rust version with rust-toolchain.toml
 - Change from dtolnay/rust-toolchain to IronCoreLabs/rust-toolchain for rust-toolchain support
 - Remove unused function and imports
 - Replace most CString uses with new c literal string

* More segfault solving and other minor fixes

Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com>

* Fix ffmpeg rotation filter breaking portrait video thumbnails #2150
 - Plus some other misc fixes

* Auto format

* Retrieve video/audio metadata on frontend

* Auto format

* First draft on ffmpeg data save on db

Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com>

* Fix some incorrect changes to prisma schema

* Some fixes for the FFmpegData schema
 - Expand logic to save FFmpegData to db

* A ton of things

Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com>

* Integrating ffmpeg media data in jobs and API

* Rspc can't BigInt

* 🙄

* Add initial ffmpeg metadata entries to Inspector
 - Fix ephemeral metadata api to match the files metadata api call

* Fix Inspector not showing ffmpeg metadata

* Add bitrate, start time and chapters video metadata to Inspector
- Fix backend BigInt conversion incorrectly using i32 instead of u32
- Change FFmpegFormatContext/FFmpegMetaData bit_rate to i64
- Rename byteSize to humanizeSize
- Expand humanizeSize logic to allow handling bits and Binary units
- Move capitalize to @sd/client utils

* Solving some issues

* Fix ffmpeg probe getting incorrect stream id and breaking database unique constraint
 - Fix humanizeSize breaking when receiving floating numbers
 - Fix incorrect equality in StatCard
 - Fix unhandled error in Dialog when trying to remove an unknown dialog

* fmt

* small improvements
 - Remove some unecessary recursion_limit directive
 - Remove unused app_image releated functions
 - Fix metadata query enabled flag

* Add migration for ffmpeg media data

* Fix cypress test

* Requested changes

* Implement feedback
 - Update locale keys for all languages
 - Add pnpm command to update all language keys

* Fix thumb reactivity in non indexed locations

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
Co-authored-by: Vítor Vasconcellos <HeavenVolkoff@users.noreply.github.com>
2024-05-09 02:20:28 +00:00
Vítor Vasconcellos 0f405caf24
Fix CI (#2461)
Use native-tls-vendored for reqwest
 - Update prisma-client-rust
 - Fix mock_instance test
 - Clippy + fmt
 - Improve error handling when uninstall i386 libs in setup-system action
2024-05-08 05:04:25 +00:00
Vítor Vasconcellos 81c2b8bf51
Improve prod bundle size (#2447)
Greatly improve production build size, now prod builds are 1/3 of the size
 - Main spacedrive binary went from ~120M to ~40M
 - Add more optimize options for rust prod build
 - Improve vite settings for front-end prod build
 - Improve lossless compression of PNGs
 - Don't include videos in bundles when they are not used
 - Don't generate/bundle sourcemap for prod builds
2024-05-07 19:32:34 +00:00
Oscar Beaumont a238760c88
[ENG-1690] Upgrade to Tauri 2.0 (#2433)
* Most of it

* Cleanup menu

* fixes

* Fixed linux compilation, still not working though, as the app panic on start

* Add dialog permissions

* fix search keybind

* Fix linux
∙  - Disable linux-ipc-protocol feature, as that is causing panics due to trying to access some WebKit internal structures outside the main thread

* Update to Ubuntu 22.04, new tauri doesn't support ubuntu 20.04
>  - Add note to download page about deb's distro support

* Remove gen/schemas

* Update linux dependencies in setup.sh

* Fix linux deps again
 - Enable rt-tokio-crypto-rust feature in secret-service so clippy stops complaining

* Clippy + auto fmt

* Fix cache-factory
 - Create a devtools feature for desktop app, which is enabled by default on dev builds

* Fix minor error in patchTauri.mjs

* Fix some envvars that have been renamed on tauri v2

* Dont change the secrets

* Add missing linux dependency

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2024-05-07 08:36:50 +00:00
Vítor Vasconcellos 5fe9f02299
Fix BLAKE3 (#2441)
* Update BLAKE3

* Auto fmt

* Revert BLAKE3 to 1.5.0 fork
2024-05-02 09:15:05 +00:00
Ericson "Fogo" Soares 73f521a3b8
[ENG-1629] Write new file identifier with the task system (#2334)
* Introduce deep vs shallow for indexer tasks with different priorities

* Make job wait to dispatch if it's paused

* Extract file metadata task on file identifier job

* Some initial drafts on object processor task

* Object processor task for file identifier

* File Identifier job and shallow
2024-04-25 04:06:11 +00:00
Ericson "Fogo" Soares 6b760b0b2a
[ENG-1628] Write new indexer with the task system (#2161)
* Moving file-path-helper to a sub-crate on core

* Parallel walker tested and working

* Change inner core crate names to sd-core-* naming scheme

* Moving stuff around

* Save and Update tasks for the new indexer job

* Some initial drafts on the new job system

* More drafts on job system

* Changing walker task to a more explicit state machine
Also drafting more of job system

* More drafting on job resume

* Completed the draft on job system inner workings

* New job context abstraction to decouple library stuff from job system

* Properly use composition on task dispatcher

* First draft on indexer job

* Job serialization

* Handling ancestors in the distributed walker for indexer

* Saving computed directories sizes on a location to db

* Enable a way to check if jobs are running in a location

* Progress reporting on indexer job

* Reorganizing modules

* Shallow indexer

* Rust fmt

* Attempting windows CI fix

* Attempting windows CI fix again

* Attempting windows CI fix again
2024-04-08 14:32:44 +00:00
Brendan Allan 79530f1e4e
Fix sync tests (#2194)
* Fix sync tests

* fix build
2024-03-13 05:34:14 +00:00
Oscar Beaumont 926ae4fc65
P2P holepunching + relay (#2147)
* Basic AF server

* wip

* Add autonat to relay server

* Add autonat client + fixes

* Deploy script

* wip

* Debug view

* wip

* wip

* relay all events

* wip

* fix

* wip

* libp2p man spoke

* dctur

* Relay config file

* Advertise relay server

* Dynamic relay configuration

* wip

* p2p relay config

* cleanup

* push instances into p2p state

* fix

* Fix up TS
2024-03-12 06:18:58 +00:00
Brendan Allan d1fa6af7be
Add tests for CompressedCRDTOperation (#2189) 2024-03-12 00:39:57 +00:00
jake 355ac191b8
[ENG-440] Crypto Refactor (#2115)
* rebase: `crates/crypto` into current `main`

* refactor: remove `mnemonic` module

* feat: disable secure erase temporarily

* fix: tsc

* fix: tsc due to unused import

* fix: remove `cli` crypto info

* deps: update

* chore: remove dead comment

* refactor: remove `bincode` feature

* refactor: give `keyring` a dedicated feature so it's not reliant on `sys` as well

* fix: remove `aes-gcm` as it's no longer supported

* refactor: remove dead comment

* fix: update `keyring` imports

* refactor: change tests to `aes-256-gcm`

* feat: make `Key` a `Box<>` internally to ensure it's heap allocated (and fix tests)

* chore: clippy

* fix: hashing tests now that `const` keys aren't available

this will be cleaned up with test vectors and `include_bytes!()`

* chore: clippy

* refactor: remove dead code

* test: bring back `encrypt_with_invalid_nonce` test

* fix: secret service keyring

* fix: `zbus` build issues

* doc: update comment for clearer reasoning

* fix: cargo fmt

* fix: use bytes directly

* deps: update lockfile

* fix: secret service keyring

* fix: comment out windows keyring for now

* fix: use session keyring if no keyring backend

* fix: completely remove keyring module if no keyring is available for that OS

* fix: clippy

* fix: move iimport to correct conditional compilation

* fix: fmt
2024-03-07 08:00:37 +00:00
Brendan Allan 63b17adb10
switch sync to msgpack instead of json (#2164)
* switch sync to msgpack instead of json

* use rmpv

* more rmpv

* use msgpack in cloud

* receive operations as msgpack
2024-03-06 10:15:29 +00:00
Oscar Beaumont 2cc828c4af
Everything over P2P (#2135)
* Fix websockets over P2P + multi-node cache

* cleanup features

* Explorer over P2P demo

* wip

* wip

* working for ephemeral stuff

* Button to get out of remote viewer

* remove

* Cleanup

* more cleanup

* Fix cross-node library queries

* Files over P2P

* Drop `Header::File`

* Fix Clippy

* Don't let noobs get hacked
2024-02-29 07:46:30 +00:00
Ericson "Fogo" Soares dba85ebac3
[ENG-1513] Better integration between Jobs and processing Actors (#1974)
* First draft on new task system

* Removing save to disk from task system

* Bunch of concurrency issues

* Solving Future impl issue when pausing tasks

* Fix cancel and abort

* Bunch of fixes on pause, suspend, resume, cancel and abort
Also better error handling on task completion for the user

* New capabilities to return an output on a task

* Introducing a simple way to linear backoff on failed steal

* Sample actor where tasks can dispatch more tasks

* Rustfmt

* Steal test to make sure

* Stale deps cleanup

* Removing unused utils

* Initial lib docs

* Docs ok

* Memory cleanup on idle

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2024-02-26 19:45:58 +00:00
Vítor Vasconcellos 393a907b57
Update github actions due to nodejs 16 deprecation (#2107)
* Update github actions due to nodejs 16 deprecation
 - Replace archived actions-rs/clippy-check with maintained fork actions-rs-plus/clippy-check
 - Replace redhat-actions/push-to-registry with updated fork Eusebiotrigo/push-to-registry
 - Point redhat-actions/buildah-build and softprops/action-gh-release to current master to fix nodejs deprecation

* Build the correct ios core rust arch for CI runs

* Build ios app for the same arch as the host in Mobile CI

* Some changes to try and make cache-factory faster and avoid failing so much

* Add trigger to run cache-factory on pull requests when there are changes to itself

* Attempt to fix sed usage on macOS

* Don't treat warning as errors

* Fix windows

* Fix windows 2

* Use target ad cache key for rust to differentiate between macOS x86_64 and arm64

* Use faster/better linkers to compile for macOS, Linux and Windows

* Fix missing shell in action

* Fix typo

* Fix missing shell in action 2

* Fix mold download
 - Replace bsdtar with plain tar

* Fix permission denied when extracting mold

* Remove zld

* Don't restore cache for rustfmt
 - Remove target symlink to C:/ in an attempt to speed-up windows CI

* Fix typo

* Restore target symlink on windows
 - Removing it didn't make CI faster

* Run Mobile on macos-14
2024-02-21 09:27:40 +00:00
Oscar Beaumont 519b1b6c46
Fix P2P not working for libraries (#2031)
* P2P Debug route

* Remove legacy peer to peer pairing process

* Fix error typo

* Sync instances with cloud

* Upgrade deps + extended instance data

* Create instance with extended metadata

* Auto sync instances

* Actually `.await`

* bruh

* sync library info

* this isn't gonna work

* only sleep cloud receiver when no more messages (#1985)

* [ENG-1567] Fix renaming (#1986)

fix rename

* only sleep cloud receiver when no more messages

* use in memory instances during cloud receive (#1995)

* use in memory instances during cloud receive

* is_empty

---------

Co-authored-by: nikec <43032218+niikeec@users.noreply.github.com>

* fix type error

* wip

* make mdns mdns better

* rebuild state

* Add hooks + listeners + discovered state

* Split into crates

* wip fixing core + wip merging Spacetime into `sd-p2p2`

* `SmartLockGuard` + `Listener`

* Make `sd-core` compile

* Reenable all operation receivers

* Fix all broken code within `sd-core`

* minor fixes found in review

* Bring in `libp2p` + restructure `sd-p2p` for the gazillion-th time

* whoops

* Compile no matter the (runtime) cost

* fixing merge issues

* wip

* a

* b

* C

* Handle port betterer

* c

* Migrate node config

* a

* no crash on startup

* wip

* a

* jdfhskjfsg

* a

* fix discovery

* a bunch of fixes

* getting Spacedrop working

* I don't get why it no worky

* debug example

* a

* wip

* wip

* removing logging from stream impl

* wip: shit is fucked

* Redo quic integration  + Spacedrop working

* Fix shutdown - deadlocks + shutdown peers

* Add Prisma migrations

* Fix shutdown

* a

* fix

* cleanup

* The lord clippy hath spoken

* disable P2P settings for now

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: nikec <43032218+niikeec@users.noreply.github.com>
2024-02-21 08:13:40 +00:00
Oscar Beaumont a30deaa144
Cloud + P2P (#1970)
* P2P Debug route

* Remove legacy peer to peer pairing process

* Fix error typo

* Sync instances with cloud

* Upgrade deps + extended instance data

* Create instance with extended metadata

* Auto sync instances

* Actually `.await`

* bruh

* sync library info

* this isn't gonna work

* only sleep cloud receiver when no more messages (#1985)

* [ENG-1567] Fix renaming (#1986)

fix rename

* only sleep cloud receiver when no more messages

* use in memory instances during cloud receive (#1995)

* use in memory instances during cloud receive

* is_empty

---------

Co-authored-by: nikec <43032218+niikeec@users.noreply.github.com>

* fix type error

* wip

* make mdns mdns better

* response

* remove renames

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: nikec <43032218+niikeec@users.noreply.github.com>
2024-02-02 09:31:11 +00:00
Vítor Vasconcellos d4328f8280
Update prisma-client-rust to fix compiling from source on Linux (#1958)
Update prisma-client-rust to fix compiling from source on linux
 - Fix rolling release distros that are already using openssl > 3.0
2024-01-22 02:17:27 +00:00
Oscar Beaumont bef1ebcade
[ENG-1508] Launch Spacedrop (#1893)
* Shit UI

* refactor a bit

* wip

* yeet

* farming the wry but it's stale

* Real-time hover event

* Hook with `Platform` + fix broken window-state plugin

* `DragAndDropDebug`

* Clippy

* revert Tauri v2 stuff

* minor

* probs not gonna work

* undo last commit

* a

* b

* c

* d

* e

* f

* g

* long shot

* 1

* no 7

* da hell

* large bruh moment

* lol

* zzzz

* SSH into CI

* yeet

* Tauri mouse position without new Wry

* go for gold

* Correctly lock `ort` version

* minor fixes

* debounce hover events

* WTF Tauri

* Replace DND hooks with goated versions

* wip frontend stuff

* fix ts

* disable library p2p stuff

* remove Spacedrop dialog + hook up backend

* `useOnDndLeave` working

* Close popover when drag outside

* Allow `openFilePickerDialog` for Spacedrop

* couple of fixes

* empty state

* smh

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2024-01-08 06:42:17 +00:00
Ericson "Fogo" Soares 313671245a
Building dependencies with optimization on dev builds (#1902)
Update Cargo.toml
2023-12-20 02:16:05 +00:00
Ericson "Fogo" Soares 7c90bcb95b
[ENG-1479] AI Prototype (#1845)
* First draft on image labeling

* Fixing execution providers for other OSs

* Better error handling and shutdown

* Working with shallow media processor

* bruh

* Fix warnings

* Now hooked to media processor job

* Link desktop app with libonnxruntime to avoid TLS error during startup

* Be able to change models on runtime
Revert to use labels table instead of tags

* A bug on a model-less inference

* Show AI labels on Inspector
 - Change yolo inference to use half precision
 - Add labels api to core

* Remove LD_PRELOAD

* Fix race condition on model executor shutdown

* Don't load all images in memory moron

* Embeed yolo model in prod build
 - Change yolo model path to new one relative to executable

* Disable volume watcher on linux, it was crashing the app
 - Invalidate labels when they are updated

* Rust fmt

* Minor changes

* Gate onnxruntime linking to the ai-models feature

* Add build script to sd-server to handle onnxruntime linking workaround

* Move AI stuff to its own crate and normalize deps

* Rust fmt

* Don't regenerate labels unless asked to

* Now blazingly fast

* Bad merge

* Fix

* Fix

* Add backend logic to download extra yolo models

* Add models api route
 - Add api call to get available model version
 - Add api call to change the model version

* Improve new model download logic
 - Add frontend to change image labeler model

* Fix new model downloader

* Fix model select width

* invalidate labels count after media_processor generates a new output

* Rename AI crate and first draft on download notifications

* fix types

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-12-19 09:28:57 +00:00
Oscar Beaumont 801f819cdf
Upgrade tracing (#1870)
* Upgrade tracing
Thank the lord it's finally here

* Fix excessive logs from mdns_sd & prisma

* fix excessive logs again
2023-12-07 10:22:26 +00:00
Oscar Beaumont 89a7f735e5
[ENG-1400] Normalised caching (#1734)
* prototype

* `.normalise` helper + only `String` keys

* implement it for 'search.paths'

* redux devtools

* fix

* refactor backend

* wip: upgrade to rspc fork

* mega cursed

* Upgrade Specta-related stuff

* Upgrade Typescript

* Cache debug page

* bruh

* Fix optimistic library setting

* Cache clearing

* better timeout

* Fix tags page

* bit of cleanup

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-12-05 13:16:03 +00:00
Ericson "Fogo" Soares 80f16eb888
Update tokio's version (#1761) 2023-11-10 20:37:21 +00:00
Oscar Beaumont 6941912891
[ENG-1399] Upgrade Rust workspace + IPv6 mDNS (#1729)
Upgrade Rust workspace + IPv6 mDNS
2023-11-04 10:20:22 +00:00
Vítor Vasconcellos baf4fc3b59
[ENG-1325] Vendor openssl in tauri (#1636)
* Vendor openssl dependency

* Remove bindgen, seems like windows don't like it
 - Add OPENSSL_RUST_USE_NASM to force windows to use nasm

* Add native-tls-vendored to reqwest
 - Shouldn't change much as the openssl crates override was already dealing with the vendoring anyway
2023-10-20 08:22:36 +00:00
Oscar Beaumont ae4c3d0e6b
Fix Android bridge + drop IOS and Android projects (#1336)
* Goodbye Android Project, you won't be missed

* fix ignore ignoring Kotlin code

* Backport IOS `Podfile` + move Rust crates into `modules/sd-core`

* Workaround for issue in OpenSSL build script

* Fix IOS

* Migrate IOS bridge into Expo Native Module

* Optimistic update for library creation

* useFrameworks static

* add key to infoplist

* more keys

* fix `Podfile`

* Remove IOS project from repo

* fix mobile ci

* woops wrong place

* clean package.json

* Make Android's Rust code build again

* Add back in `if_watch` patch for IOS

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-09-13 10:07:26 +00:00
Oscar Beaumont 94d8f61de9
Update Rust dependencies (#1314)
* Update most of Rust dependencies

* downgrade notify

* a

* fix Linux?

* Android is painful

* update build.gradle

* The lord Clippy has spoken

* Bruh

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
2023-09-12 14:03:25 +00:00
Oscar Beaumont f821bb9a0f
Stop App Freezing (#1257)
* Drop Tauri custom URI handler
Me no likely but it has to be done.

* fix app startup with location

* fix "Add Location" button on web

* Serve correct content range

* Backport changes from 08ba4f91

* none of my homies like panics

* minor fixes

* fmt with new Rust version
2023-08-31 06:54:40 +00:00
Oscar Beaumont 7bf0c0ae4a
[ENG-994] Minor P2P fixes (#1238)
* mdns advertisement on detection

* fix bug in P2P discovery

* Add `P2PEvent::ExpirePeer`

* React properly

* Consistent tracing versions

* better logger config

* Reduce excessive logging from P2P

* Fix panic log hook

* Remove `dbg`

* Fix bug in thumbnailer remover

* wip: Connected peers in UI

* `Sync` is large pain

* init services after library load

* improve error handling of logger

* Sync protocol shutdown

* Add "updater" feature

* fix commands bindings

* nlm state debug query

* nlm debug status

* Make TS happy

* Add `RemoteIdentity` to libraries debug info

* Improve debug data presentation

* Among us level sus

* minor fix panic hook

* Fix EOF issue

* fix instance not being added on pairing

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
2023-08-27 06:41:26 +00:00
Brendan Allan 00e4aa9e8f
Sync ingesting (#1181)
* sync + ingest refactor

* fix Event enum description

* actually do sync over network

* re-enable heif

* remove comment
2023-08-07 07:52:43 +00:00
Brendan Allan 043b607ad4
CRDTOperation receiving (#1122)
* operation receive + compare

* cleanup + deduplication

* operation receive + compare

* cleanup + deduplication

* sync route + operation grouping

* tag assign sync

* proper relation support in sync debug page

* migration

* separate core-sync + utils crates

* separate p2p event loop from manager

* cleanup library handling

* clippy

* feature gate sync messages properly

* make migration not add required field
2023-07-24 15:26:00 +00:00
Oscar Beaumont 23b0c403be
[ENG-925] - Arc<Library>/Arc<NodeContext> (#1124)
* `Arc<Library>` + `Arc<NodeContext>`

* fix specta version

* remove unneccessary derefs

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-07-24 10:59:57 +00:00
Brendan Allan 0a1d721e58
Use codegen for ModelSyncType exec (#1098)
* use codegen for ModelSyncType exec

* folder client format

* hande create operation properly
2023-07-15 04:22:04 +00:00
Brendan Allan c5ce9b1c22
pin PCR to different commit (#1039)
* pin PCR to different commit

* skill issue
2023-06-28 02:31:55 +00:00
Oscar Beaumont f86b6c8b52
[ENG-823] Fix some stuff (#1024)
* SQLite journal bug

* Remove "job.report" indexes thing

* resume button - job not found?

* panic hook with logging

* it did

* large pain

* fix `check_nested_location`

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-27 05:12:04 +00:00
Brendan Allan 9a25373a94
Optional filepath + object fields (#947)
* rust changes

* fix ts

* formatting

* linter's a little baby

* mere

* address review comments
2023-06-16 00:22:11 +00:00
Oscar Beaumont 4987b7039e
Fix main (#952)
fml
2023-06-15 09:06:13 +00:00
Ericson "Fogo" Soares e693c7a542
[ENG-381] Update context menufs actions to support multiple source (#927)
* Generalizing filesystem jobs to accept multiple files at once

* Some small changes and fixing front

* Enable rename route to replicate Finder's behavior

* Assign tag to multiple objects at once

* Remove from recents accepting multiple files

* Fixing some warnings

* Adding multiple files feature to Open and Open With

* Conditional stuff for macos

* Generating commands.ts and other minor warnings

* Rust fmt

* TS typecheck

* Rust format and TS typecheck

* Requested changes

* Requested changes

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-06-14 23:00:28 +00:00
Vítor Vasconcellos e6d0e6098c
[ENG-593] Implement Open With for Linux (#939)
* Implement `Open With` for Linux

* Fix TS typechecker failing and Rust formatting

* Take args by ref

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-06-14 00:54:43 +00:00
Brendan Allan fd236a1b57
[ENG-679] Reserve ids for built in indexer rules (#909)
* indexer rules pub ids

* should work?

* better migrator

* errors

* debugging

* maybe?

* double migrate

* please

* maybe fix?

* update lockfile

* SD_ACCEPT_DATA_LOSS message

* put tracing back

* dumb

* fix system indexer rule ui
2023-06-06 14:42:52 +00:00
Oscar Beaumont ae138b2358
[ENG-672] Find and remove RESYNC log (#892)
large bruh moment
2023-05-31 09:59:03 +00:00