Commit graph

299 commits

Author SHA1 Message Date
Matthew Yung f7b0e3bd06
[ENG-1794] Overview Rework (#2555)
* StorageBar implementation

* filekindstats reworked into interactive node graph

* ui changes to graph

* light/dark mode changes + ui edits

* missing dependancy in package.json and minor visual improvements

* fixed collision physics

* d3 force package

* fixed nodes going off screen

* removed onNodeDragEnd

* fix central node and add particle effect

* fixed central node and typescript errors

* bar graph/storage bar ui improvements

* changed icons

* totals

* made ui changes

* ui changes

* minor requested ui changes

* fixed spacing for ui

* Remove extraneous newline in core/src/api/libraries.rs

* Fix minor suggestions from code review

* Fix typecheck

* Auto format

* refactor file kind stat card with css grid

* ensure unidentified files never negative

* FIxing some stats

* Counting directories

* fixed error with height of bars

* updated storage bar

* total files update

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
Co-authored-by: James Pine <ijamespine@me.com>
Co-authored-by: Lynx <141365347+iLynxcat@users.noreply.github.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
Co-authored-by: Lynx <ephemeral.lynx@protonmail.com>
Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2024-06-24 20:00:51 +00:00
ameer2468 a9eb3c7f42
[MOB-108] UI adjustments (#2563)
* wip

* wip

* max width on locations in drawer

* remove fade and console log

* lint fix
2024-06-24 15:50:36 +00:00
ameer2468 6e3559b7cf
[ENG-1798] Improve cloud sync ui (#2554)
improve cloud sync ui

cleanup

use better values

lint
2024-06-18 16:15:11 +00:00
Arnab Chakraborty 18235c6f09
[MOB-106] Cloud Sync for Mobile (#2549)
* wip + working backfill

* Finished BackfillWaiting page + initial auth setup

Also, setting up the cloud sync page.

* mobile auth

* Import Cloud Library

Currently, you can import a cloud library, however it seems that the data, such as locations, is not transferring correctly.

* Working Mobile Cloud Sync

Cloud Sync works for Mobile, and the mobile app can sync files from a cloud library, and other clients can access the data from the phone's cloud library.

* Cloud Sync Done

* Formatting

* Fix new library button

* New device type passing to auth

* Improve design of cloud settings and import modal

* ui adjustments and code cleanup

* Update styling if there's only 1 instance

* code cleanup, design tweaks

* empty state & simple indicator animation

* lint

* loading indicator and cleanup

* Fix to Sync Subscription

* Update Cargo.lock

* Async logout for debug

* tweaks

* Update SettingsStack.tsx

* cleanups and cloud desktop design improvements

* more cleanups and ui improvements

* ts

* i18n

* Cloud Sync Docs

* styling

* Delete library-sync.mdx

Moving docs to a separate branch

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2024-06-18 08:46:29 +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
ameer2468 f8ed254a22
[MOB-94] Onboarding haptics (#2552)
Onboarding haptics
2024-06-14 16:42:19 +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
ameer2468 9ddfee8916
[MOB-105] Rename with extension & add await (#2539)
add await date accessed to run first and rename with extension consideration
2024-06-06 15:02:20 +00:00
ameer2468 8d0a31c9d6
[MOB-100] Job manager design improvements (#2531)
* design improvements job manager mob

* centering
2024-05-31 19:42:59 +00:00
ameer2468 530e3c8ac8
[MOB-99] Job remove & more (#2514)
* Clear job and improve job manager design

* pullToRefresh, search adjustment, and more

* ts

* use rspc instead of query client

* Update JobManagerModal.tsx
2024-05-28 21:02:50 +00:00
ameer2468 2321addc67
[MOB-98] Rename, delete, & more (#2506)
* rename and delete support, browse design improvement

* update toast styling

* Update RenameModal.tsx

* fix test

* fix warning message on initial render, add-tag test, and remove solid js references

* ci

* Add feedback toast for location delete and tag delete
2024-05-27 15:44:15 +00:00
ameer2468 96a45ee76c
[MOB-97] Fade select tags and empty location state (#2496)
* fade select tags and empty location state

* smaller tags

* smaller tags  in filters and add tags modal
2024-05-20 22:29:56 +00:00
ameer2468 9d47af8bd1
[MOB-95] Tags support & more (#2494)
* tags support wip

* Mob: tags in explorer, ui adjustments, add filter based on search click and more

* Fix tags scroll on filters

* Set heights so UI updates correctly

* Update Tags.tsx

* remove console logs

* remove console logs

* Update Locations.tsx

* type

* Update locations.rs

* make tags abit smaller

* list view visual improvements

* Remove plus
2024-05-17 15:55:29 +00:00
Vítor Vasconcellos 50f554d5e5
Fix front-end error when selecting multiple files with inspector open (#2486)
- Fix humanizeSize returning value as original (which was simply plain wrong), replace it with the original bytes
 - Restore plural to humanizeSize, but only when converting object to string
 - Fix float number to BigInt conversion in humanizeSize possibly causing an error (now it truncates the value)
 - Remove unused profile.release from `apps/desktop/src-tauri/Cargo.toml`, repo's main Cargo.toml profile overrides it
 - Update `packageManager` and remove conflicting `engineStrict` entry from package.json
 - Remove `prefer-symlinked-executables` from `.npmrc`, linked bug was fixed
2024-05-14 07:06:07 +00:00
Jamie Pine 8bfcf58a0d
[ENG-1778] Total library size statistic (#2477)
* it

* migration

* fix error msg

* fix error msg actually tho

* fix

* ts errors
2024-05-13 22:02:49 +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
ameer2468 853f0d4185
[MOB-96] Haptics on tabs interaction and more (#2464)
Haptics on tabs interaction and more
2024-05-08 17:41:34 +00:00
ameer2468 893452d8c8
Mob: remove sort by text (#2463)
Remove sort by text
2024-05-08 13:48:33 +00:00
Utku 7cd33727b3
[MOB-35] Explorer sort by (#2387)
* pnpm

* hide search on some screens

* translations

* move shared order stuff to @sd/client

* some ideas

* wip - redesign otw

* Merge remote-tracking branch 'origin' into mob-35-explorer-sort-by

* header adjustments and more

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2024-05-07 22:12:09 +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
ameer2468 da9fb959e8
[MOB-79] Categories search redirect (#2443)
Support clicking on categories to redirect to search
2024-05-02 14:05:24 +00:00
ameer2468 b29deff592
[MOB-68] Search (#2434)
* wip: search plugin query & save

* wip

* wip mob search

* mob search - explorer filtering & support name, extension search

* Mobile search

* cleanup

* code improvements & type to search all locations

* Update Search.tsx

* ts

* code doc and type tweak

* lint

* move onSuccess
2024-05-01 21:52:14 +00:00
Vítor Vasconcellos e4b0aedf64
Auto format/lint and revert some changes made to CI (#2429)
Revert some changes made to CI in #2412
 - Auto lint and format
2024-05-01 13:59:16 +00:00
Oscar Beaumont ce5e285c2f
Remove normalised cache (#2390)
* yeetus

* fix

* a

* fix

* todo

* fix library stuff

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2024-04-30 00:36:39 +00:00
ameer2468 9126332df1
[MOB-89] Separate headers (#2408)
* separate headers

improvements to headers

cleanup

missed cleanup

documentation

* Update SearchStack.tsx
2024-04-27 15:08:07 +00:00
ameer2468 57b0139240
[MOB-90] Visual adjustments (#2383)
* Visual adjustments

* Update Tags.tsx

* cleanup

* remove prop

* remove hitslop

* sectionlist
2024-04-24 23:34:24 +00:00
Utku e009a0478c
Revert "[MOB-85] Better headers" (#2376)
Revert "[MOB-85] Better headers (#2375)"

This reverts commit 6a556a457d.
2024-04-23 23:20:59 +00:00
ameer2468 6a556a457d
[MOB-85] Better headers (#2375)
* wip

* improve headers

* cleanup
2024-04-23 22:21:31 +00:00
Utku 5624054f1e
Mobile cleanup & improvements (#2362)
clean up & improvements
2024-04-19 07:55:50 +00:00
Utku f48a91b124
[MOB-82] Switch to expo image & inspector long press (#2301)
* open action modal on long press

* fix styling on about screen

* better/optimized image component
2024-04-09 12:13:27 +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
Arnab Chakraborty 20d9878968
Disable Labeler (#2288)
* Disable Labeler

* Auto format and lint

* Comment out regen labels context menu entry

* Comment out some more labels references

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2024-04-05 19:41:11 +00:00
Vítor Vasconcellos 595172a33a
Implement test retry for Mobile CI (#2281) 2024-04-04 14:19:35 +00:00
ameer2468 475d8bd88c
Correct width for button (#2284)
correct width for button
2024-04-04 10:41:22 +00:00
ameer2468 e34f37ddf9
[MOB-80] Drawer design improvement & more (#2274)
* draw design improvement

* lint

* view all buttons

* tweaks

* widths
2024-04-03 16:37:56 +00:00
Utku f5c258e627
[MOB-77] Mobile Drawer (#2255)
* drawer and navigation

* Remove old job manager code

* make edit location/tags UX better

* hide settings bcs it exist on tabs

* we don't do index on mobile for screens + some organization

* make max w percantage
2024-04-01 10:41:00 +00:00
ameer2468 08825dd22f
[MOB-67] Saved search UI (#2265)
save search ui
2024-03-30 20:56:58 +00:00
Utku 9a1cdf1dca
Fix all the weird eslint warnings (#2245)
* actually fix the weird lint errors

* Prettier auto-format

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2024-03-26 20:46:44 +00:00
Utku 6277c8cb5f
Command Palette (#2228)
* bring it back

* move into folder

* fix shortcuts colliding

* tags

* fix key capture problems

* add 2 more actions + locations to cmd

* fix search navigation issue W @nikec

* fix saerch input

* improve scrollbar look and text on lightheme + fix edge view search showing

* useShortcut

* add cmdp to keybinds page

* killer i18n extension for vscode

* some missing keys and localized cmdk

* in lists that can change - it's better to use the id rather than index to avoid extra re-renders

* Update CMDKLocations.tsx

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2024-03-26 13:05:46 +00:00
Vítor Vasconcellos 51acd0fd8e
Make mobile tests more resilient (#2236)
* Attempt at making mobile tests more resilient

* Forgot shell property

* Remove debug flag from run-maestro-tests.sh

* Fix kill command

* Improve device emulator launch code
 - Remove maestro version lock (expo is not using it anymore on their repo)
 - Use some of the same command expo uses to ensure device emulator launched

* ...

* ...

* Make grep timeout less strict

* Increase timeouts

* Downgrade macOS and Xcode

Following Expo changes:
cb7c90dac4
2024-03-25 19:42:37 +00:00
Arnab Chakraborty 1baa5966d7
Remove the .unwrap() from the mobile core (#2237)
So, `.unwrap()` can cause issues when the core dies by throwing a panic. So, by moving to a `match` instead, we can stop the panic from occurring.
2024-03-23 21:33:57 +00:00
ameer2468 e148028e2f
[MOB-75] New screens, design fixes, and more (#2229)
* WIP: categories screen, design updates, and more

* redesigned import modal, android ui fixes, and more

* more ui fixes and improvements

* more ui tweaks and updates

* change color

* pnpm-lock

* Update LocationSettings.tsx

* Update BrowseTags.tsx

* eslint

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Update BrowseTags.tsx
2024-03-22 14:12:30 +00:00
Vítor Vasconcellos 08c42a36fe
[ENG-1624] E2E Tests (#2192)
* Basic cypress test

* Add e2e test command

* Add full e2e test for creating and deleting a library

* Add cypress to CI

* Fix cypress CI
 - Use arm macos for running cypress
 - Setup rust on cypress job
 - Increase cypress CI timeout

* Remove unused APPLE_SIGNING_IDENTITY envvar

* Update deps again + Try to fix Cypress CI setup

* Update deps again

* Only test default location if it exists

* Use latest v18 NodeJS in CI

* Increase minimum node version due to updated dependency
 - @typescript-eslint/eslint-plugin now requires node >=18.18

* Fix testing failing for optional default locations

* Enable video recording
 - Fix screenshot and video artifact uploading

* Fix location test
 - Use correct location name, instead of trying to derive it from the internal id
2024-03-19 20:22:17 +00:00
ameer2468 52d7c572be
[MOB-66] Black theme & more (#2213)
* wip, black theme and updates

* wip

* More tweaks and adjustments

* eslint

* Move some components into their own file

* lint interface onboarding

* remove mobile obj and move into app

* remove navback prop since native stack does it
2024-03-16 00:56:34 +00:00
Utku 57edc36772
Use native navigator on mobile (#2214)
* native

* types
2024-03-15 23:33:14 +00:00
ameer2468 1fd217c9af
[ENG-1679] Video intro fix & darker color (#2204)
* Fix bg

test vid update

fix vid fragments

fix intro

black mobile intro

lint

* update vid

* pascal case

* file glitch

* files

* Update GetStarted.tsx
2024-03-13 21:50:21 +00:00
Utku 4fc8dcfb48
[MOB-69] Infinite scroll & explorer query hooks (#2197)
* run sim before everything

* move passwordmeter

* annoying maestro

* remove bad extension from recom

* move explorer query logic to @sd/client

* update mobile packages

* working explorer

* search with the new query

* tag explorer

* revert maestro version bump
2024-03-13 20:53:00 +00:00
Oscar Beaumont 2ca88a5d6b
Refactor P2P Hooks (#2193)
* 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

* refactor p2p hooks

* fix backend state

* Skip self

* a

* b

* Relay config in debug query

* Fix method name

* tsc is broken on my machine

* a

* Incorrect typecasts. Can we just ban them

* fix types
2024-03-13 06:43:22 +00:00
Utku d60789e588
Make eslint happy (#2198)
* eslint maxing

* @sd/ui too
2024-03-12 20:41:41 +00:00
Utku a5f74b19c2
Mobile components directory organization (#2190)
* organization

* imports

* format

* fix location query

* woops
2024-03-11 18:48:52 +00:00