Commit graph

1472 commits

Author SHA1 Message Date
Vítor Vasconcellos a6a57bbd50
Fix pnpm format command failing with some files (#622)
* Fix `pnpm format` command failure
 - Update prettier and plugins dependencies
 - Add auto-install-peers to .npmrc
 - Fix formating of previously failing files
 - Some basic security mitigations (`pnpm audit --fix`)

* setup-system.sh: Don't do a full system update on ArchLinux

* Revert "Some basic security mitigations (`pnpm audit --fix`)"
2023-03-19 16:47:10 +00:00
nikec 249d5b5534
[desktop] fix tag & location name overflow (#618) 2023-03-19 06:02:10 +00:00
Jamie Pine 2e3c708db8
[Fix] lockfile 2023-03-18 01:49:15 -07:00
Jamie Pine 3ddd83000e
[Refactor] CAS id generation code simplify
Credit: ChatGPT 4
"In this simplified version, the code calculates the sample interval based on the file size and then uses a single loop to handle both the small and large file cases. The last sample is always taken from the end of the file."
2023-03-17 20:11:08 -07:00
Jamie Pine 3b8c866cbc
[Landing Fix] App embed horizontal padding 2023-03-17 20:08:53 -07:00
Utku 902a3b5ba1
Onboarding, Spacedrop & Location Settings Screen & Styled API (#596)
* fix wrong current lib logic

* add delete lib dialog to LibraryGeneralSettings

* add delete lib to mobile LibraryGeneralSettings too

* onboarding screens

* move zxcvbn to @sd/client

* get started screen and bloom

* merge fix

* move generatePassword back to interface

* add useZodForm to mobile and match react-hook-form versions

* new lib screen

* Implement styled api

* create lib screen and some tweaks

* password input

* fix password meter comp

* new library style tweaks

* Fix remove password bug (interface)

* master password screen

* privacy screen

* creating lib screen

* hexagons are cool

* Expo 48

* keyboard handling

* fix P2P on IOS

* fix types

* asset script

* new icons

* Spacedrop screen

* Fix mobile asset imports

* fix import cycle warning

* Edit Location Settings screen and style changes on other setting screens

* fix library creating bug? hopefully lol

* move PasswordMeter to interface

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-03-17 02:00:02 +00:00
Jamie Pine 3b4248c836
[ENG-441] Explorer size toggle (#611)
explorer size toggle + light theme icons start + radix checkbox
2023-03-16 18:59:06 -07:00
Jamie Pine 776c2afd6c
update team page 2023-03-16 14:09:04 -07:00
nikec 1694b09057
add available positions to mobile nav (#613) 2023-03-16 13:20:38 +00:00
nikec e874aed431
fix docs sidebar search input (#614)
fix search input
2023-03-16 13:03:47 +00:00
nikec ff0742441a
fix careers phosphor icons (#615)
fix phosphor icons
2023-03-16 12:54:04 +00:00
Oscar Beaumont d430a56101
fix README logo 2023-03-16 14:34:51 +08:00
Jamie Pine 888e1f6205
job posting 2023-03-15 13:20:54 -07:00
Brendan Allan 145f87cdab
Data Router (#609)
* data router time

* update pnpm.lock
2023-03-15 16:11:47 +00:00
jake e12475a4e1
[ENG-430] *Nix setup script improvements (#602)
* add `protobuf` deps to arch and fedora

* update webkit2gtk package name for fedora >= 37

* revert last change as fedora 37/38 can still use the old name

This reverts commit cc9b2d7053.

* shfmt

* re-introduce webkit changes (and fix my bad bash)

* remove duplicate webkit dep

* update mac setup logic

* remove ffmpeg versioning (we don't use it on any other system)

* check that RPMFusion is enabled

* more verbose protobuf variable names

* add comments/todos and remove unnecessary 64 bit declaration

* fix incorrect command & use latest ffmpeg on macos

* update deps & remove comments
2023-03-15 16:11:15 +00:00
jake 171f19bc71
[ENG-429] Crypto organization/refactor (#607)
* update comment

* key manager feature gating

* update deps & more feature gating

* fix keyring feature gating

* add an `exhaustive_read` function for crypto/stream

* restructure STREAM module

* move tests+shared utils

* clean up stream decryption

* further cleanup

* impl to `GenericArray` for `Nonce`

* update examples

* update refs & `use`s

* fix `Nonce` -> `GenericArray` conversions

* better `Protected` conversions + remove `Password` type

* a work of art

* finishing touches

* some API changes

* rename `StreamX` to `X`

* fix everything else

* separate `primitives` from `types`

* update imports & fix build
2023-03-15 16:09:36 +00:00
Utku 5b6c8c9165
Assets Export Script (#608)
* asset script

* Add commonjs vite plugin

* Use the index file and rename some images

* Delete unsued files and imports

* Change require to import

* Remove @ts-nocheck bcs why not
2023-03-15 11:15:59 +00:00
Brendan Allan 53229809ca
update swift-rs (#605) 2023-03-13 07:53:28 -07:00
Oscar Beaumont 1978e2ff48
Eng 432 refactor mdns service/state (#604)
clean up mdns state and refactor advertisement system
2023-03-13 18:05:46 +08:00
Oscar Beaumont 0c25239c53
Typesafe stream handling (#603)
* typesafe stream handling
Now it's impossible for your to respond to a broadcast stream. Previously this would just fail due to the TCP connection having been closed by the sender.

* remove connected_peers state from `SpaceTime`

* use `OutEvent` instead of `tokio::spawn` for `SpaceTime` events

* Polling for events > tokio::mpsc

* extend max length of sync messages to ~4GB + broadcast done message

* Fix "actOS" operating system decode error
2023-03-13 16:58:35 +08:00
Ericson "Fogo" Soares 4a6b057872
[ENG-371] Subpath shallow re indexing (#599)
* Introducing sub path indexing for IndexerJob

* Introducing shallow indexer job

* Some feature flags to avoid warnings at pnpm prep

* Many fixes at shallow indexer job

* Changing how we implement the bookkeeping for file_path ids
Now we're account for independent locations, and also integrating
better with the LibraryContext, instead of using a static global

* Making indexer job reentrant

* Introducing shallow file identifier job
And a bunch of minor refactors

* Rust fmt

* Removing light scan from getExplorerData query
Light scan is a mutation, so we can call it on useEffect function from
the Explorer component in the frontend, when a location_id or the explorer
path changes

* Handling job early finish on init for identifier

* Only invalidate query if we have orphan paths

* Introducing ShalowThumbnailerJob

* Clippy warnings about `into_iter()`

* Naming scheme for Prisma's selects and includes

* Invalidating getExplorerData at thumbnailer

* Small mistakes lol

* Some nitpicks with pnpm prep

* Rust fmt

* Changing indexer's walk log to `trace!`

* Not deleting all file_paths on location fullRescan

* TS typecheck

* Removing `file_path` selection just with id
2023-03-10 16:25:58 +00:00
Oscar Beaumont 7c5f760fbd
Basic Spacedrop working with rspc! (#601) 2023-03-09 06:23:17 -08:00
Jamie Pine f98d7ad6e0
[ENG-408] Dynamic Object icons (#600)
* improved object icons

* remove redundant control flow

* added support for base icon overrides by extension
+ deleted old icons folder and moved official icons into there

* fixed folder icon error

* removed temp nodes example

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-09 11:08:10 +00:00
Oscar Beaumont 66fe8d1814
[ENG-227] Desktop app and landing page telemetry using Plausible Analytics (#583)
* add Plausible analytics to landing page

* proxy plausible through vercel

* fix typo & add other options

* add plausible to `sd/client`

* add telemetry sharing option into library config

* add telemetry config option to lib creation dialog

* revert error message change but keep the typo fix

* add telemetry sharing & error handling to client context

* add important note about requiring the tracker component in root/base layouts

* add the `PlausibleTracker`

* grammatical tweaks

* some TS cleanup

* disable analytics in debug mode

* further component improvements and use custom event props

* more cleanup

* remove tracking from onboarding (no telemetry sharing config option)

* update comment

* add fancy new plausible hooks/tracking

* add `pageview` monitoring hook to `$libraryId` layout

* add library creation events to onboarding and creation dialog

* revert `useCurrentLibraryId()` error handling & add important comment

* minor comment tweaks

* replace `usage` with `telemetry`

* add missing newline

* add location create & delete events

* add tag create & delete events

* add/update library create & delete events

* add fn for getting telemetry settings for library by uuid

* add more events + fix a few bugs

* update generics

* add `telemetryState` `valtio` store

* use new telemetry state

* remove old artifacts from `ClientContext`

* Revert "add telemetry sharing option into library config"

This reverts commit afb9f892ab.

* update events, docs & generics

* add `tagAssign` event

* light comment updates

* const names, comments, etc

* add additional info to props and update comment

* add telemetry sharing to debug state (for sharing telemetry in debug mode)

* update `debugState` item name

* change how `Switch` updates the store in privacy settings

* remove `getTelemetryState` from `telemetryState`

* cleanup library creation event handling/telemetry config updating

* add `DebugPopover` to onboarding in debug mode

* improve code quality/comments

* remove useless comment

* rename `ob_store` and `shareTelemetryDataWithDevelopers`

* fix typo

* add `telemetryLogger` and prevent multiple of the same events from firing consecutively

* add more unique path matching and fix an issue with events

* rename `telemetryLogger` -> `telemetryLogging`

---------

Co-authored-by: brxken128 <77554505+brxken128@users.noreply.github.com>
2023-03-09 08:37:57 +00:00
Oscar Beaumont d21a521cbe
[ENG-407] Spacedrop backend (#598)
* format Rust

* Spacedrop a string

* Praise thee Clippy, lord of the Rust

* add protobuf to Mac and Linux CI

* plz GH Actions have Chocolatey
2023-03-09 11:27:45 +08:00
Oscar Beaumont f746530289
P2P Core (#597)
* implement space time

* I love it when my code works
2023-03-09 03:18:33 +08:00
Brendan Allan 23ad538678
rename LibraryContext to Library (#595) 2023-03-07 01:15:20 -08:00
Brendan Allan 31df51501e
CI Cache Factory (#593)
* introduce cache factory

run cache factory on all branches

add names

use single quotes

add setup and prisma generation

add pnpm install

don't install cargo-watch in ci

make composite setup script

use env var for windows ci

undo all powershell stuff

* better windows ci

* don't install cargo-watch in ci

* only run cache factory on main

* i'm silly

* debug only ci

* check runner instead of matrix in setup action

* don't save cache output most of the time

* no more os-specific features

* cache entire workspace

* only cache on main again

* test instead of buidl in cache factory

* smaller ci + testing

* don't individually test each crate

* remove unnecessary needs

* smaller formatting and more clippy

* undo rustfmt changes

* disable tests
2023-03-06 06:10:55 -08:00
Brendan Allan c814919a6c
remove usage of UnsafePointer (#594) 2023-03-05 08:20:41 -08:00
Brendan Allan dad2072d7b
generate + use ModelSyncData enum (#592)
* generate + use ModelSyncData enum

* cache prisma clients on sync-generator
2023-03-04 22:12:37 -08:00
Brendan Allan 885f49619d
platform-restrict android code (#591)
* platform-restrict android code

* spelling error
2023-03-03 22:36:12 -08:00
Brendan Allan 29a3123df5
restrict all swift stuff to macos only (#590)
restrict all swift stuff to macos only
2023-03-03 21:29:52 -08:00
Brendan Allan d89240d9e2
Colocate native code + reorganise (#589)
colocate native code + all rust in crates/
2023-03-03 09:22:22 +00:00
Brendan Allan 3299454d62
convert location + file path to unique shared models (#587) 2023-03-03 00:02:33 -08:00
Brendan Allan 3aa91e9cde
Eng 388 remove pre commit hooks (#588)
* remove precommit hooks

* update pnpm.lock
2023-03-03 08:01:45 +00:00
Brendan Allan 420aa75da5
More sync impls (#586)
tags and stuff
2023-03-02 21:23:10 -08:00
Ericson "Fogo" Soares fe215566d6
Fix unique constraint on file path table (#585)
* Complying with a pedantic Clippy

* Some task runners for vscode

* Solving duplicated directories events
When creating a directory through MacOS's Finder, for some reason
FSEvents receives 2 Create Folder events that we have to handle

* Damn rustfmt
2023-03-02 02:36:49 +00:00
jake ad157f58a5
[ENG-376] Fix double libraries being created during onboarding (#582)
* ensure the library creation `useEffect` only ever fires once

* use an early return
2023-02-28 12:19:55 +00:00
Brendan Allan c65d92ee4c
[ENG-380] Interface code structure improvement (#581)
* beginnings of app directory

* settings mostly good

* colocate way more components

* flatten components folder

* reexport QueryClientProvider from client

* move CodeBlock back to interface

* colocate Explorer, KeyManager + more

* goddamn captialisation

* get toasts out of components

* please eslint

* no more src directory

* $ instead of :

* added back RowHeader component

* fix settings modal padding

* more spacing, less margin

* fix sidebar locations button

* fix tags sidebar link

* clean up back button

* added margin to explorer context menu to prevent contact with edge of viewport

* don't export QueryClientProvider from @sd/client

* basic guidelines

* import interface correctly

* remove old demo data

* fix onboarding layout

* fix onboarding navigation

* fix key manager settings button

---------

Co-authored-by: Jamie Pine <ijamespine@me.com>
2023-02-27 21:29:48 -08:00
Oscar Beaumont c6455dd439
Add Cargo Watch to install scripts (#584) 2023-02-27 13:54:26 +08:00
Oscar Beaumont faeb0473cf
UI testing (#565)
* store demo data in React Query

* Playwright for UI screenshots

* use path based routing on web

* Fix Typescript error
2023-02-27 13:15:47 +08:00
Oscar Beaumont 7192ead2c2
core startup error handling (#579)
* core startup error handling

* lazy load `PasswordMeter` so that the huge `@zxcvbn-ts` isn't in the core bundle

* please clippy

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-25 13:50:22 +00:00
Jamie Pine 9aa2832530
[BUGFIX] Only show list view header on list view 2023-02-24 22:26:59 -08:00
Jamie Pine 677e1b63e9
[ENG-379] Explorer item resizer (#580)
* added item resizer
fixed explorer store bug
refactored file image component

* better sizing for videos

* fixed inspector width issue

* remove console.log

* added column titles to list view + extra details

* moved util

* remove imports

* Update packages/interface/src/components/explorer/FileColumns.tsx

Co-authored-by: Brendan Allan <brendonovich@outlook.com>

* address issues

* fix extension in file list name

* Update packages/interface/src/components/explorer/FileColumns.tsx

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-25 06:16:57 +00:00
Jamie Pine 0b9005fdef
[BUG] fix broken explorer 2023-02-24 14:32:59 -08:00
Jamie Pine 3f44d6f521
[ENG-363] Spacedrop UI + Misc Improvements (#568)
* begin spacedrop ui + misc ui improvements

* better 404 xox

* Update extensions.rs

I think I prefer Container

* added DragRegion component,  ot tested cuz im on my fone

* Update DragRegion.tsx

fix import

* added dummy drop items

* better dummy data

* added clouds & search bar

* added action buttons to spacedrop items

* customize subtle button

* added support for apng, thanks luka big pants

* use relative path in sidebar

* use BYTES const

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-24 08:12:21 +00:00
Utku 7b739d0b33
Mobile Strict Mode and Types (#578)
* better compiler options

* fix types

* fix more types
2023-02-24 08:11:48 +00:00
Brendan Allan 32ffd5f820 check if any libraries in AppLayout 2023-02-23 18:08:56 +08:00
Brendan Allan bfc3ca0f9b
Another routing overhaul (#577)
* whole lotta routing

* remove stats refreshing

* start integrating new contexts on mobile

* update mobile to please typescript

* fix mobile

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-02-23 09:56:32 +00:00
Utku 810b5161dc
Fix Mobile & opacity/x syntax (#576)
* fix mobile

* fix opacity/xx (it doesn't exist)

* Add opacity-60 back to job manager
2023-02-21 17:57:08 +00:00