Commit Graph

51 Commits

Author SHA1 Message Date
Alessandro Magionami 6d0f08b7b5 feat(workspaces): approve join request (#3833)
* feat(workspaces): approve join request

* chore(workspaces): add missing dep to resolver call

* chore(workspaces): use commandFactory
2025-01-16 16:46:59 +01:00
Alessandro Magionami 7bf3c5df74 chore(workspaces): fix graphql enum 2025-01-14 17:58:51 +01:00
Alessandro Magionami bb73ecbe3c feat(workspaces): list workspace join requests for admin 2025-01-14 12:02:57 +01:00
Gergő Jedlicska 229a19c981 gergo/workspaceAdmin (#3677)
* feat(workspaces): add unified paginated items service

* feat(workspaces): admin update workspace plan
2024-12-11 18:54:24 +01:00
Gergő Jedlicska e30b8c83b9 gergo/workspacesMultiRegion (#3477)
* feat(webhook-service): learn to speak multi region

* feat(fileimport-service): talk multi region to me

* feat(fileuploads, blobs): multi region

* feat(workspaces): update delet workspace with billing and regions

* fix typo

* feat(workspaces): remove old billing resolvers

* test(workspaces): fix tests

* fix(workspaces): remove unused schema
2024-11-19 15:45:03 +01:00
Kristaps Fabians Geikins 9b5873e4f5 feat(server): SmartTextEditorValue.attachments multiregion support (#3513) 2024-11-19 15:58:40 +02:00
Chuck Driesler b195df37d6 feat(sso): active user sso information (#3432)
* feat(workspaces): add workspace sso feature flag

* feat(workspaceSso): wip validate sso

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* WIP

* fix(sso): restructure to handle all branches at end of flow

* fix(sso): add and validate emails used for sso

* fix(sso): park progress

* chore(workspaces): review sso login/valdate

* fix(sso): adjust validate url

* chore(sso): auth header puzzle

* fix(sso): happy-path config

* chore(gql): gqlgen

* fix(sso): almost almost

* fix(sso): auth endpoint

* a lil more terse

* fix(sso): light at the end of the tunnel

* fix(sso): improve catch block error messages

* fix(sso): session lifespan => validUntil

* fix(sso): I think we've got it

* feat(sso): limited workspace values for public sso login

* fix(sso): use factory functions

* fix(sso): til decrypt is single-use

* fix(sso): correct usage of access codes

* fix(sso): use finalize middleware in all routes

* chore(sso): cheeky tweak

* fix(sso): move some types around

* fix(sso): stencil final shape I'm sleepy

* fix(sso): more factories more factories

* fix(sso): on to final boss of factories

* fix(sso): needs a haircut but she works

* fix(sso): init rest w function, not side-effects

* fix(sso): /authn => /sso

* chore(sso): errors

* chore(sso): test test test

* chore(sso): test all the corners

* feat(sso): list workspace sso memberships

* chore(sso): tests, expose in rest

* fix(sso): sketch active user auth

* fix(sso): expose search via gql

* fix(sso): active user session information

* chore(sso): sso session test utils

* chore(sso): test sso session repo/services

* chore(sso): gqlgen

* fix(sso): simplify gql resolver structure

* chore(sso): gqlgen

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-11-05 12:27:46 +00:00
Kristaps Fabians Geikins 5df716bf1c feat: add & list server regions (#3423)
* WIP create modal

* babababa

* create dialog looks ok

* FE largely there

* workss

* cleanup

* fixed up test plumbing to avoid deadlocks and simplify GQL calls

* test fix

* added all tests

* CI fix
2024-10-31 16:08:50 +01:00
Kristaps Fabians Geikins 55d0d10103 Merge pull request #3406 from specklesystems/fabians/multi-region-base
feat(server): multi region module base w/ a test (mocked) mutation
2024-10-30 10:25:04 +00:00
Kristaps Fabians Geikins 610808fc15 feat(server): multi region module base w/ a test (mocked) mutation 2024-10-29 14:07:35 +02:00
Alessandro Magionami 11c13796c2 Merge pull request #3393 from specklesystems/fabians/gendo-ioc-5
chore(server): gendo IoC #5 - getVersionRenderRequestFactory
2024-10-28 15:17:56 +01:00
Gergő Jedlicska af3857a209 gergo/web 2038 billing graphql api (#3379)
* feat(gatekeeper): add gatekeeper module feature flag

* feat(gatekeeper): add workspace pricing table domain

* feat(gatekeeper): add checkout session creation

* feat(gatekeeper): verify stripe signature

* wip(gatekeeper): checkout callbacks

* feat(gatekeeper): add unlimited and academia plan types

* refactor(envHelper): getStringFromEnv helper

* chore(gatekeeper): add future todos

* feat(gatekeeper): add productId to the subscription domain

* feat(gatekeeper): add in memory repositories

* feat(gatekeeper): add more errors

* feat(gatekeeper): complete checkout session service

* feat(gatekeeper): add stripe client implementation

* feat(gatekeeper): add checkout session completion webhook callback path

* feat(gendo): fix not needing env vars if gendo module is not enabled

* feat(gatekeeper): require a license for billing

* chore(gatekeeper): cleanup before testing

* feat(gatekeeper): subscriptionData parsing model

* ci: add billing integration and gatekeeper modules to test config

* test(gatekeeper): add checkout service tests

* feat(gatekeeper): make completeCheckout callback idempotent properly

* feat(gatekeeper): move to knex based repositories

* test(gatekeeper): billing repository tests

* feat(gatekeeper): add yearly billing cycle toggle

* feat(ci): add stripe integration context to test job

* feat(billingPage): conditionally render the checkout CTAs

* fix(gatekeeper): remove flaky test condition

* feat(helm): add billing integration feature flag

* WIP billing gql api

* feat(gatekeeper): cancel checkout session api

* feat(gatekeeper): handle existing checkout sessions, when trying to create a new one

* feat(gatekeeper): add workspace plans gql api

* feat(gatekeeper): handle cancelation and subscription updates

* fix(gatekeeper): scope initialization

* fix(gatekeeper): eliminate stripe client import sideeffect

* fix(gatekeeper): eliminate stripe client import sideeffect 2

* fix(mainConstants): fitler gatekeeper scopes with feature flag
2024-10-25 10:46:09 +02:00
Kristaps Fabians Geikins 4a29e5f650 chore(server): gendo IoC #5 - getVersionRenderRequestFactory 2024-10-24 17:01:09 +03:00
Kristaps Fabians Geikins 0d2fb7db9b chore(server): core IoC #82 - (most) branches resolvers to TS 2024-10-17 13:24:33 +03:00
Kristaps Fabians Geikins 93d0ffd31b chore(server): core IoC #81 - server resolvers to TS (#3319) 2024-10-17 13:23:06 +03:00
Kristaps Fabians Geikins 62d749f02c schema.js to TS 2024-09-26 14:24:05 +03:00
Alessandro Magionami daa742382f Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-943-get-stream-activity 2024-09-23 15:59:55 +02:00
Alessandro Magionami 6920bb1f0c chore(activitystream): refactor getStreamActivity 2024-09-23 15:40:49 +02:00
Kristaps Fabians Geikins 3b47774a9a chore(server): auth typescript cleanup (#3045)
* chore(server): auth IoC 19 - setupStrategiesFactory

* chore(server): auth typescript cleanup
2024-09-20 12:23:12 +03:00
Alessandro Magionami 9669a94552 chore(workspaces): optimize project roles resolvers 2024-09-16 17:27:43 +02:00
Kristaps Fabians Geikins f5ebb7de08 fix(server): workspace status check query (#2991) 2024-09-13 14:51:48 +03:00
Kristaps Fabians Geikins 2569f190cb Revert "fix(server): workspace status check query"
This reverts commit 5413269273.
2024-09-13 14:02:56 +03:00
Kristaps Fabians Geikins 5413269273 fix(server): workspace status check query 2024-09-13 14:02:04 +03:00
Alessandro Magionami 6bda45ac61 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-957-get-webhooks 2024-09-11 15:59:07 +02:00
Alessandro Magionami 378b4e3edc chore(webhooks): fix codegen types 2024-09-11 15:49:18 +02:00
Kristaps Fabians Geikins f60d459ead chore(server): blobstorage IoC 1 - getBlobs 2024-09-11 15:30:36 +03:00
Kristaps Fabians Geikins a30073c725 chore: refactor stats module to ts 2024-09-10 09:38:16 +03:00
Chuck Driesler 9ec90cd64f fix(workspaces): guarantee that workspace admins are project owners (#2835)
* fix(workspaces): separate resolver for workspace project role update

* fix(workspaces): frontend protection

* fix(workspaces): new composable, clearer errors

* fix(workspaces): correct logic

* fix(workspaces): gen
2024-09-03 17:18:30 +02:00
Chuck Driesler 39c34b1b78 fix(workspaces): safer billing query for guests (#2844)
* fix(workspaces): safer billing query for guests

* chore(workspaces): comment

* chore(workspaces): lint

* chore(workspaces): ope
2024-09-02 15:23:27 +01:00
Gergő Jedlicska 625fec4294 feat(workspaces): leave workspace (#2585) 2024-08-06 16:55:40 +02:00
Alessandro Magionami 12685af29a Alessandro/web 1388 mutation create new email (#2561)
* feat(useremails): userEmails graphql query

* feat(useremails): create user email mutation

* feat(useremails): set primary and delete user email mutations

* chore(useremails): fix update user email type

* chore(useremails): create typed tests for graphql and emails field resolver in user type

* chore(userEmails): group user email mutations in a specific mutation object

* linting fixes

* more lint fixes

* tests fix

* more test fixes

* chore(userEmails): cleanup

* chore(useremails): rely on knex trx for transaction handling

* chore(useremails): fix checkemail not present

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2024-08-05 18:39:52 +02:00
Kristaps Fabians Geikins ede566eed9 feat(server): serverInvites refactor + workspace invites CRUD & GQL API (#2530)
* prep for new resources algo

* typescriptifying stuff

* minor types fix

* migrate to resources col

* repo & creation updated, WIP processing/retrieval

* WIP invite processing

* finished finalization refactor

* project invite management

* transformed all invites services

* fixed up projects & core serverinvites resolvers

* test fixes

* WIP workspace create GQL & test

* basic invite creation test works

* a buncha working tests

* more tests

* cancelation tests

* minor invite use refactor

* invite retrieval tasks

* invite use() works as expected

* filtering out broken invites

* enabled invite retrieval by token irregardless of who is it for

* minor adjustments

* tests fix

* test config improvements

* test env adjustment

* extra test case

* making resource access limits harder to ignore

* linter fixes

* eventBus type cleanup

* better generic names

* refactored serverinvites resource migration

* fix(server): better error message in project invite edge case
2024-07-29 14:37:54 +03:00
Chuck Driesler 6eaf3c8c92 feat(workspaces): cru(d) resolvers (#2521)
* feat(workspaces): drop createdByUserId from the dataschema

* feat(workspaces): repositories WIP

* merge

* protect against removing last admin in workspace

* quick impl and stub tests

* add tests

* services

* unit tests for role services

* feat(workspaces): authorize project creation if workspace specified

* feat(workspaces): emit project created event

* feat(workspaces): assign roles on project create in workspace

* feat(workspaces): update project roles when user added to workspace

* feat(workspaces): stencil gql resolvers

* fix(workspaces): lol lmao

* fix(workspaces): perform automatic project role update in service function

* fix(workspaces): also delete roles

* fix(workspaces): broke tests again oops

* fix(workspaces): update `onProjectCreated` listener to use new repo method

* fix(workspaces): use service function in event listener

* fix(workspaces): get workspace projects via existing stream repo functions

* fix(workspaces): roles mapping in domain, use enum

* feat(workspaces): stencil gql api and resolvers

* fix(workspaces): repair type reference in tests

* fix(workspaces): consolidate files, use different existing stream-getter

* fix(workspaces): more specific error

* fix(workspaces): roles and scopes

* fix(workspaces): yield per page

* fix(workspaces): some test dry

* fix(workspaces): superdry

* fix(workspaces): add scopes

* fix(workspaces): classic

* feat(workspaces): create workspace mutation

* feat(workspaces): I'm sure everything will be fine

* fix(workspaces): yep

* fix(workspaces): successful gql e2e test

* feat(workspaces): update workspace resolver

* chore(workspaces): update resolver test

* feat(workspaces): some retrieval resolvers

* chore(workspaces): tests for query resolvers

* fix(chore): revert temp test command change

* fix(workspaces): test structure and gql types

* fix(workspaces): validate user authz to perform some operations

* fix(workspaces): use existing test infrastructure

* fix(workspaces): stop `isPublic` check if authorizing a workspace resource

* fix(workspaces): better test hygiene

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-07-25 12:58:28 +01:00
Kristaps Fabians Geikins 0b2ca9a515 feat: add missing FE1 fields to the FE2 GQL schema (#2471)
* WIP version create

* commitCreate migrated

* minor cleanup

* commitReceived migrated

* added Project.object

* Project.comment introduced

* moving away old API usages in FE1

* ProjectMutations.batchDelete

* project pending access requests

* WIP project access req tests

* project access req tests done

* ModelByName test

* version mutation tests

* project.object tests

* batch delete tests

* minor improvements to redirect logging
2024-07-10 11:33:53 +02:00
Kristaps Fabians Geikins d4f90a83e8 chore: cleaning up betaAutomations (#2413) 2024-06-20 15:35:39 +03:00
Kristaps Fabians Geikins e13b4adaad feat(fe2): retrieving gh orgs from exec engine (#2343) 2024-06-07 15:24:42 +02:00
Gergő Jedlicska 58e5fa4511 Gergo/automate backend module (#2267)
* Starting on gergo/newAutomateModule

* regenerated gql

* minor gql optimizations

* various fixes for project tabs

* WIP featured functions

* composable for ez debounced inputs

* composable for ez debounced inputs

* WIP fn card

* TS error fixes

* WIP cardd

* WIP function cards

* empty state done

* WIP runs  table

* runs table looks good

* run info dialog works

* minor run dialog improvement

* feat: add automate module with feature flag

* added fautomate feature flag to fe2 as well

* link to beta implemented

* minor adjustment

* enabling dev to skip migrations

* Merge branch 'main' into fabians/fe2-automate-integration

* tabs set up for single automation page

* refactored editable title/description

* models title fix

* update title mutation

* title done

* WIP function card

* feat: feature flags implementation

* WIP runs

* feat: feature flags feedback

* Revert "feat: feature flags feedback"

This reverts commit 139065bcbf967af207c2e98896ff3aae8ff2fdb0.

* Revert "feat: feature flags implementation"

This reverts commit 0614debb330ab092e96c71b7eccfaa8b4a280a4f.

* minor row fix

* core automation page done

* wip automation fn settings

* function settings dialog

* apollo dev tools fix

* feat: automation run trigger logic

* functions page

* WIP function page

* fix FE2 lint issue

* testing library borked, just skip interactive tests

* tests fix

* enabling automate module for testing

* disabling module in test env

* WIP fn page

* parameters demo dialog

* added markdown rendering

* finished single function page

* faked markdown

* pkg json fix

* pkg json fix

* updated schema for triggers

* more schema adjustments

* adjusted FE to support triggers

* added model select to automate edit

* fixed up runs dialog & status icon

* migrated viewer to new components

* updated automate panel to fit designs in viewer

* cleaning up old shit

* mocks fix

* fn logo size fix

* runs table status fix

* feat: automate module, automation creation and trigger

* test: fix automate module tests

* test: fixt automate module tests

* feat: create function flow

* linting fixes

* test fix?

* functions page fixes

* WIP automation wizard

* parameters step done

* WIP details step

* automation wizard done for the most part

* triggering automation

* enabled switch

* create automation from fns page

* create automation from fn page

* details validation update

* disable capability for switch

* edit fn done

* functions empty state

* various empty states

* minor adjustment

* various minor fixes

* automation status dialog responsivity

* status icon responsivity fixes

* viewer panel

* empty state adjustments

* fns page responsivitiy

* fn page core responsivity

* automation wizard responsivity

* fn wizard responsity fixes

* minor fix ups

* fixed up existing backend stuff

* fixing eslint hopefully

* tryna fix eslint

* automate code validation mechanism added

* minor GQL schema change

* maybethis fixes eslint?

* more eslint debugging

* fix cross-env missing

* tryna fix eslint memory issues

* ci test fix

* error improvements

* migrations for fn tables

* Improve empty state

* Update button copy in edit function dialog

And remove unused icon

* Refine function page design

* WIP function create

* fn creation tests added

* Fix enable switch label text on Automation page

* Update design of function card

* Change tag to beta

* Fix selected ring not being rounded

* Minor copy changes here and there

* Add border and header column bg to Table component

* Update styling of Automations tab

* Update styling of individual Automation page

* Remove icon from button

* fn update w/ tests

* fn release creation w/ tests

* fixing tests

* GH auth endpoint

* minor cleanup

* WIP reporting function statuses

* automation update/delete w/ tests

* WIP automation revision & trigger tests

* revision creation tests done

* trigger tests

* function run reporting works

* report status tests WIP

* run status update tests done

* auth code handshake tests

* a couple of FE2 fixes

* WIP function retrieval queries & tests

* WIP automation queries

* removed all functions stuff

* implemented fn queries

* all kinds of queries & resolvers done

* more queries

* automations query

* automation status resolution core algo

* FE2 fixes

* fixed up mocks

* fix(fe2): disallow loading automations if non-owner

* chore: circleci extension config change

* fixing some benjamins changes

* hydration mismatch fix

* fixed tests

* preview service fix?

* env flag fix

* more form validation improvements

* proper automation status run ordering

* featured mock fix

* meta data fixed

* introduce outdated label

* log streaming mock moved to serverside

* encryption in create for FE

* fix: integration work

* core encryption stuff implemented

* fixing tests & linting

* improved revision input validation

* automation create works

* automations status fix

* fixed automation run queries

* minor cleanup

* implemented log streaming

* properly handing redacted props in update rev flow

* implemented subscriptions backend

* WIP subscriptions FE implementation

* subscriptions work?

* feat: add docker compose based reverse proxy for the server stack

* revert: restore docker compose ingress dockerfile

* chore: disable automate module feature flag by default

* fix: move nginx ingress file to the right place

* Implement `automateFunctionRunStatusReport` (#2262)

* untested implementation

* no more errors

* no more errors

* lint

* add all statuses to `AutomationRunStatusOrder`

* fix: status reporting now works

* park in the right place, grapple with tests

* update tests

* use correct run ids, adjust tests

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>

* fix: make tab selection robust by using dynamic ID lookup

* tests: fix authz module tests

* fix: frontend TS issue

* ci: add automate encryption keys path value

* Fix ts build errors from ui-components changes

* fix: frontend automation status colors

* gergo/automateBackendModule (#2202)

* feat: automation run trigger logic

* feat: automate module, automation creation and trigger

* test: fix automate module tests

* test: fixt automate module tests

* minor fix ups

* fixed up existing backend stuff

* fixing eslint hopefully

* tryna fix eslint

* automate code validation mechanism added

* minor GQL schema change

* maybethis fixes eslint?

* more eslint debugging

* fix cross-env missing

* tryna fix eslint memory issues

* ci test fix

* error improvements

* migrations for fn tables

* WIP function create

* fn creation tests added

* fn update w/ tests

* fn release creation w/ tests

* fixing tests

* GH auth endpoint

* minor cleanup

* WIP reporting function statuses

* automation update/delete w/ tests

* WIP automation revision & trigger tests

* revision creation tests done

* trigger tests

* function run reporting works

* report status tests WIP

* run status update tests done

* auth code handshake tests

* a couple of FE2 fixes

* WIP function retrieval queries & tests

* WIP automation queries

* removed all functions stuff

* implemented fn queries

* all kinds of queries & resolvers done

* more queries

* automations query

* automation status resolution core algo

* FE2 fixes

* fixed up mocks

* fix(fe2): disallow loading automations if non-owner

* fixing some benjamins changes

* hydration mismatch fix

* fixed tests

* preview service fix?

* env flag fix

* more form validation improvements

* proper automation status run ordering

* featured mock fix

* feat(fe2): promo banner support (#2242)

* Initial Commit

* Updated Breakpoints

* WIP

* Fix typing

* WIP - broken image

* Updates

* Hide banners if none defined

* Remove test banner

* Hardcoded image from assets

* Add type to promoBanners

* Updates from CR

* Add expiry dates to banners

* meta data fixed

* introduce outdated label

* log streaming mock moved to serverside

* Viewer API Improvements (#2072)

* Fix some monstrous bugs with index buffer shuffling now that we've changed our approach a bit.~

* Finished with the new material management approach for mesh batches. SelectionExtension now uses this approach and also considers existing material opacities when setting select and hover materials

* Updated LineBatch to work with the new material management approach

* Implemented the required draw range related changes to the point batch

* Text batche now work with the new material management

* SpeckleLineMaterial and SpecklePointsMaterial are now SpeckleMaterial as well. Had to rename two properties of SpeckleMaterial due to some typescript named property clash thing, but nothing really changed

* Removed eslint-disable clauses in materials where they were no longer needed. Removed unused imports and overrides

* Added the RTE define for some materials by default. It can still be overriden if users want to

* Stencil outlines is now an toggle-able option for any SpeckleMaterial. Restricted to meshes

* Implemented setting desired material for all geometry types via RenderMaterial and DisplayStyle data. SpeckleRenderer now has three overloaded setMaterial function. One for a material instance, one for a filer material and one for RenderData&DisplayStyle. Moved material hash related functionality from NodeRendeView into Materials

* Added MaterialOptions which can be used when setting materials based on RenderMaterial/DisplayStyle to toggle various material features like stencilOutlines, pointSize. SelectionExtension now uses data material to set materials, and things are so much more simpler and nicer

* Added public method for setting seletion extension options

* After some profiling, realized three.js was doing a lot of pointless work each frame so now we're caching materials created from RenderMaterial/DisplayStyle to avoid this. Perf is nice and sharp now

* addRenderTreeAsync is now a generator. Handled automatic zooming on viewer loading. Disabled section tool by default

* Centralized RTE and shadow RTE buffer in an extended webglrenderer. This avoids re-computing rte data for each material over and over. Also, rte data is now centralized and available to materials

* SpeckleMeshes now use a cached material clone as their batch material like any other material they use

* Cleaned up Materils. Updated the debug show batches function use the new material manipulation system. So much easier now

* Real time measurement exist now as a separate extension. Existing functionality preserved, besides one or two small additions. Renamed the MEASUREMENTS object layer to OVERLAY for a more generic usage. SelectionExtension can now be enabled/disabled. Added an additional overload to the setCameraView method in ICameraController which takes a box3 as target to focus the camera on

* Removed viewer related events from input and replaced them everywhere with the proper input event types where required

* Fixed two issues with the shadowcatcher. One was a regression introduced after we centralized the RTE data. The other was a super old one one and was essentially causing the shadowcatcher to generate the contact shadows incorrectly because the correct transform textures were not bound (this is three.js being a pain)

* WIP on the filtering extension

* FilteringExtension is done. Kept the same implementation

* Added filter reset function

* Removed uniform texture and batch count binding from each material's OnBeforeRender function. Additionallit our material override function from SpeckleMesh now uses our fast copy instead of three's copy function for materials. This decreased CPU overhead each frame by 20+% and also eliminated the ugly call to SpeckleMesh's function for updating the material with the transform texture and batch object count from each material's render callback which was not supposed to be there

* Update RenderingStats to measure CPU render time per frame.

* Added early and late update functions for extensions. First gets called before the core's update, and the latter afterwards

* All speckle materials now use the centralized RTE data. Updated the fasts copy method to copy userdata defined uniforms where needed

* Added explosion extension. Additional cleanup

* Dirty transforms are marked on a per batch object basis, whenever their transforms gets changed. This automates the transform texture update execution, so we no longer need to manually mark entire batches as dirty

* Added getObjects which returns all batch objects in the scene and getObjects which takes an rv an returns only the batch object associated with that rv. Both of these methods are availale on the renderer

* Added setters for position, rotiation and scale in batch object

* Diff extension is complete. We stuck with creating material instances and using those for coloring since it ensures maximum draw call efficiency. Fixed an issue in MeshBatch where transparent draw groups were not always sorted at the end of the group list leading to incorect opauque object selection during the depth pass

* RV batch materials are obtained via the viewer-core API based on the RV itslef. This removed the need to get all batch materials for the differ

* Small cleanup

* Removed all circular dependencies besides one, like I predicted. The final one will dissapaear on it's own in the near future when we'll gracefull make DataTree obsolete. As a note, the circular dependencies were very shallow, reffering to enums/interfaces/statics declared in specific files. There was no real circular dependency on a class level

* Removed last circular dependency just for the sake of completion

* SpeckleRendere now has a clipping volume which is used internally to reject picks outside of it, and it's also exposed to the outside world to be used however

* Implemented the SpeckleLoader along with it's abstract supertype. Data loading is now done through this loader which handles tree population with raw data as well as render view data.

* Working minimal obj loader

* Added total node counting and displaying

* Viewer's load object now takes a loader of any speckle loader base class and uses that to load, instead of taking urls and tokens. This allows for any kind of loader to work with the vieweer's load function. Moved indexing of obj geometry to the obj geometry convertor. Loaders now take the target world tree instance instead of a viewer instance

* Loaders can now load from string and array buffer data where implemented. ObjLoader can now load from a string payload. Sandbox can now load obj files from the UI using a file picker

* alex/API2.0-core

* Started on #1673. Fixed an issue with walkAsync where the recursive generator would waste too much time idle.

* Solution for #1673. Replaced the old async pausing approach with a better version that has true variable wait time, and does not add additional dead wait time. Render tree building is now several times faster

* Cut down some more on load time by using a lookup table for determined speckle types. For a very large number of objects, getting the actual speckle type was quite slow. For our reference stream with 1kk objects we cut down around 2 seconds of load time

* BoxFromObjects now returns the correctly transformed aabb

* Implemented optimisations for batch building step from the loading process. Reduced the step's time by around 50%

* Implemented a NodeMap which allows us to search for nodes very very fast.

* Added a dynamic pause in the loader which stops the converter from blocking. Paramater object types are not added as nodes anymore. Callback from converter is not without arguments

* Replaced some internal walks with the newer and much faster id finding approach

* Disable object shallow cloning acrss the speckle converter

* Fixed the issues with block instances and revit instances caused by not duplicating speckle objects in the converter

* getObjectPropertis is now async and slightly improved the execution time of the flatten function which it uses

* Set caching to true by default

* Fix for display style hashing

* Implemented legacy viewer as a wrapper around the old viewer API

* Started testing FE1 with API 2.0. Fixed some legacy issues. Also the camera controller extension now exposes it's underlying controls object for the sake of not messing around with unwatend changes in FE1

* Updated FE1 with API2.0 selection changes

* Fixing selection bugs

* The viewer now ignores duplicate id nodes

* Fixes to object properties population, camera zooming and adding subtrees in core

* Fixed some filtering issues. Added UpdateFlags to the viewer's requestRender function

* Fixed an issue where section boxes were incorrectly added to the URL

* Objects with no id are not given nodes into the tree

* Updates to FE2 for API2.0. Also fixed a really really obscure bug in viewer-core where a material an incorrect material was set when reseting the batch to the default material

* We now store separate node maps for each model loaded. Each node now holds it's subtree id (as a small number for memory considerations)

* Render request after updating the visual diff

* Fixed some missing update calls on shadows

* Reverted FE1 changes and pinned the viewer library to a specific (latest) version pre-API2.0

* We're adding a viewer node for loaded models as subtree parent. This is because we're no longer spoofing ids and the model parent id needs to be preserved

* Fixed an issue where clicking on a comment bubble made the pipeline use accumulation improperly, leading to dark blight

* Null check for setMaterial. Fixed another case of dark blight. Hack required by frontend

* Fixed the issue with filtering state not propagating in the FE

* Updated selection event changes

* Fixed an issue where an undefined subtree id would yield an incorrect render tree upon requesting it

* Fixed an issue where undefined nodes were returned as valid when searching of ids

* NodeRenderView now holds it's subtree id along the speckle id. This allows for precise node matching when looking for specific nodes

* Fixed an issue with BlockInstances not instancing underlying meshes from breps

* Some fixes to diffing. Some older than API2.0, some new. Render views now have guid composed of their id and subtreeid.

* Update node render view id with guid where needed

* Unload function now checks for requested resource to unload before trying to unload it

* Check for the existence of a batch before applying draw ranges. Inthe FE, extension can temporarily keep dead rvs in their state when switching between streams leading to errors

* Fixed an issue for filtering where subtree roots would cause incorrect rv additions to the ghosted rv lists

* Unified block instance and revit instance conversion implementation

* Separted instanced from non-instanced rvs. Working on InstancedMeshBatch

* WIP on instanced types

* Implemented visual for box draging

* BoxSelection extension beautified and documented along with some small but welcomed changes to the viewer-core

* Viewer's getExtension now looks in the prototype chain before returning an undefined extension

* Added the extended Selection extension here for possible later use

* First iteration on instancing. General idea works. Still WIP on several fronts

* Fixed issues related to incorrect transform being calculated for instanced geometry. Fixed an issue with incorrect bounds being calculated

* Fixed a few issues with instanced vs non instanced render view gathering

* Disabled box selection extension

* Fixed some linter errors

* Disabled a lint 'error'

* Fixed issues with depth rendering and instanced objects and fixed draw range visibility for instanced batches in a minimalistic way

* Updated the measurements extension with the visiblity option

* Restructed a bit our implementation for the acceleration structure because now the BLAS needs to aggregate an instance of three-mesh-bvh not extend it. So that instanced batch objects can share a single bvh instance -> no redundancy

* WIP

* Revert "WIP"

This reverts commit 20d4bbf6210b0d37b956cc5b41fdb06f29845b4f.

* More WIP on trying to make instanced geometry TAS and BAS work properly

* Both Tas and Bas intersection testing seem to working fine. Now we need to implemented draw grouping for instanced mesh batches

* Added draw group management to InstancedMeshBatch. It works in the same manner as for non instanced batches, but the offset value refers to instances not triangles. I believe it could be simplified, but I'd like to get it up and working first

* Draw groups need to hold the index and count from the instanced buffer attribute

* Added array shuffling to the instanced mesh batch using the same approach we used for the non instanced one.

* Instanced batches now dynamically add InstancedMesh objects based on draw groups and a computed transform buffer

* Applying draw range updates for instanced batches now works. Still some issues to handle. It aint much, but it's honest work

* Disabled some more RTE until setting visibility for draw ranges is finished

* Moved getting opaque, transparent and stencil draw ranges out from Batcher and on to a per-batch basis. Now instanced batches correctly apply draw ranges and get their opaque, transparent and stecil ranges

* Fixed an issue with setting the visibility ranges for instanced mesh batches

* Instanced attributes for instanced meshes now no longer allocate

* Shadow depth material for instances is now set in the speckle renderer

* R-enabled RTE globally. Made instancing work with RTE. Made instancing work with both RTE and shadowmapping.

* Fixed an issue with materials building up in the mesh batch's cache incorrectly

* Implemented gradient indexs attributes for instanced batches. Thismeans, any color ramp based material like the ones we use for filtering now works

* Changed the way compound ids are created for instances, so that less memory is required. i.e chrome is not crashing anymore on particular streams

* Implemented reseting the draw ranges for instanced mesh batches. We no longer double buffer the gradient index buffer. We just create a new one when shuffling, populate it, then copy it over at the end. We're still double buffering the transforms buffer since that one is larger and we might not want to allocate it each time we shuffle

* Removed references of draw groups with ids since we're not doing that anymore. Fixed an issue with mesh batches where the material cache would keep piling materials incorrectly

* Several issues with selective transformations on instanced batches fixed.

* Added default null materials for instanced meshes both with and without vertex colors

* Got rid of the patched InstancedMesh because it was ridiculously slow. Instead we're now computing the scene box using our acceleration structures where available and three.s boundingbox where not available

* Minor, yet big regression fix

* Fixed regression

* Exported some extra types

* WIP on instanced balancing

* Instanced objects under a certain threshold now get batched together as regular mesh batches

* Forgot to update the rvs aabb

* Unified instanced and non instanced batch creation. Instances which do not qualify for instanced batching anre now mixed together with the rest of the non instanced batched objects

* Added some timing information to instanced batches

* Fixed an issue with zooming in on objects not working in the selection extension. Fixed an issue with object picking failing due to fp precision for objects right at the edge of the clipping volume.

* Removed logs

* Update stream moving via UI

* Removed the priority argument from loadObject since it's not needed anymore

* Updated LegacyViewer

* Fixed an issue with API 2.0 where the legacy form of transforms with only an array of values as the matrix would not work

* Updated FE1 viewer package to latest before API 2.0

* Disabled selection when measurement mode is on

* Updated ibl params updating

* Fixed an issue with measurement text not showing up

* Logs

* lockfile

* Made DataTree obsolete. Removed unused 'input' property from viewer

* Fixed circular dependencies

* Removed DebugViewer, other small changes

* Small changes

* Small fixes

* Added id to NodeData

* Removed unused bounds property in rendertree

* Notes to future self + ExtendedExtension is now exported

* Removed an unused function from renderer. Removed the parent argumetn from getRenderViewerForNode... since it was legacy and has no meaning anymore.

* Removed the instance type check in getRenderViewesForNode method. Should not be needed anymore and it was bad to begin with anyway

* Removed some test code

* Small changes

* Removed pointless bounds calculation. Added note

* Added return types

* Ingestigating large group operations

* Nested nodes from TreeNode are now optional. Small update to node render view.

* #1818 Remove the concept of speckle data existing behind a 'data' field

* Removed unneeded property

* made arguments options in transformTRS

* getBoundingBox from acceleration structures have an optional argument now

* Several Batch methods no longer take variable numbe of arguments, but arrays now

* Added note

* Note

* Removed unused things

* Note and made the raycaster protected in intersections

* Added some typings

* Replaceds some functions with accessors. Added typings. Renamed stuff

* Removed some unused properties.

* Typings for measurements

* Small typing changes

* Fixed some more compile errors

* Sources from 'batching' folder are now strict compile compliant

* Sources from 'materials' folder are now strict compile compliant

* Sources from 'extensions' folder are now strict compile compliant

* Sources from 'tree' folder are now strict compile compliant

* Viewer interface, implementation, legacy implementation and the exports now comply with the strict compilation flag. Also added the new tsconfig

* Sources from 'objects' folder now comply to the strict compilation rules

* Sources from 'pipeline' now satisfy the requirements for strict compilation

* Sources from 'loaders' folder are now compiling with strict. That was so much fun

* Sources from 'query' folder are now compiling with strict

* Another round of correction triggered by previous changes

* Update the declaration file in the object loader to contain a member that needs to be public

* SpeckleRenderer along with the rest of the surces from the root 'modules' folder are not compiled with strict

* Completely deprecated DataTree. Updated the dependencies with @types/underscore. Fixed remaining compilation issues

* Fixed a failing build on the CI regarding a timeout id

* Fixed compile errors from sandbox

* Another fix

* All EventEmiter child classes now have mapped event handler argument types, so that when attaching to a specific event, the provided handler has the correct types for it's arguments. Implicitly, got rid of the the unknown types in all event handlers.

* Disabled verbatimModuleSyntax because it was messing things up. Fixed an issue with an improper import

* Fixed frontend-2 linting errors. Also added all the event payload maps to the viewer export

* Some good additions but mostly typescript catering

* Some more typescript catering, but also something useful. The intersect function is now overloaded so that when you specify only the ObjectLayers.STREAM_CONTENT_MESH object layer in it's layers argument it will always return a ExtendedMeshIntersection which guarantees to have a batchObject, face and it's object is of type SpeckleMesh | SpeckleInstancedMesh. Generally you mostly raycast against meshes and getting a three.js intersection object which has all it's fileds optional led to some very useless defined checks. With this we can avoid all of them

* Continued from yesterday, finished with the changes in intersections. Added MeshIntersection which is returned by all bvh intersections. This eliminates the need to check for face, faceIndex or index on intersection results from intersection meshes. Groups from MeshBatch and InstancedMeshBatch are now always DrawRanges(they always were)

* Mostly catering to typescript

* Removed underscore and all unused dependancies. Fixed remaining lint and build errors

* Minor changes

* Added the no-non-null assertion rule to the sandbox

* getExtension never returns null, but rather throws an exception if requested extension does not exist. Added hasExtension for (theoretical) situations where you want to check for extension existence but don't want to go by try/catch with getExtension. Fixed remaining lint/build errors

* getBatches now returns explicit batch types based on the geometry type that you provide

* Adding the lockfile

* undoing unnecessary FE2 changes

* Merged viewer/fe SpeckleObject types

* Fixed two small issues

* Minor linting issues

---------

Co-authored-by: Kristaps Fabians Geikins <fabians@speckle.systems>

* encryption in create for FE

* fix: integration work

* bugfix(fe2): Fix conditioning around posting comments in viewer (#2246)

* Test fix

* Update

* Testing

* Updates from testing

* various fixes

---------

Co-authored-by: Kristaps Fabians Geikins <fabians@speckle.systems>

* core encryption stuff implemented

* fixing tests & linting

* improved revision input validation

* automation create works

* fix(server): avoid removing verified email from user (#2249)

* fix(server): avoid removing verified email from user

* fix(server): fix test and use secure domain

* fix(server): remove redundant test

* automations status fix

* fixed automation run queries

* minor cleanup

* implemented log streaming

* properly handing redacted props in update rev flow

* implemented subscriptions backend

* feat(fe2): move settings to tab on projects page (#2207)

* Add settings tab. Update style of component

* Structuring of files/components

* Updates to TexInput

* Add RadioGroup

* Last FE work

* FE Updates

* Webhooks Settings Tab

* Styling updates to webhooks

* Title/Description Update

* General Page done

* Collaborators WIP

* Styling updates

* Add custom message to updateProject

* Radio Group Same Height

* Styling updates to radio group. Disabled state

* Updates pre demo

* Updates to icons & post demo changes

* Major Updates

* Unsaved Changes Dialog

* Routing WIP

* Remove StatsBlock

* Auto update discussions on Private

* Routing/Redirects

* New input style

* Invite Dialog

* Fix mobile radiogroup

* Mobile Improvements

* Fix console warning

* Fix build

* Disabled States

* Fix console

* Unhide webhooks

* Updates from testing

* Responsive fixes

* Alignment fixes

* Fix textarea mobile height

* Updates to GraphQL Fragments

* Fix disabled state

* WIP Arrows for scroll

* Update PageTabs - broken

* Fix to PageTabs

* PageTab fix initial scroll

* Hide Scrollbar

* Better underline method

* Fix mobile initial underline

* Webhooks Empty State

* Fix input border

* Fix empty state

* Input Styling updates

* Remove mobile smaller text

* Update disabled state for disabled items

* Updates disabled sates on Settings Block

* Fix build. Disable Invite

* Fixes to invite permissions

* Disable role select when invite is disabled

* Small alignment fix

* Fix webhooks empty state

* cleaning up unnecessary vue files

* story improvement

* Remove DisabledMessage prop

* Fix disabled prop on Button

* Move team to Leave Fragment

* Remove unused Disabled Message props

* Add limit to graphql query

* Updates to BlockDiscussions

* add formatTriggers function to webhooks

* Remove md from button. Improved switch

* Update RadioGroup.stories.ts

* Update RadioGroup to use defineModel

* Various styling and copy updates

- More concise and accurate copy
- More readable
- Works better on mobile

* Updates to Invite Dialog

* Custom success Message

* Update slot names

* Remove md in TextInput. Set h-8 to default

* Changes from call with fabs

* Replace isOwner with composable

* Set SettingsBlock icon as optional

* Comments from PR

* Updates from PR

* Final Tidy Ups

* Fix Title/Description

* Fix spacing issue on Webhooks page

* Update borders and colors to align with Automate

Makes the same changes that I recently made to the unreleased Automate tab

* WEB-869

* Improve styling of radiogroup component

Better borders, hover effect, bigger checkmark icon, more subtle active background color, same across breakpoints.

* Adjust border styling of RadioGroup component

* Improve circle around checkmark in RadioGroup

* Split Tabs into 2 components

* Restyle overflow arrows

* Adjust gap and remove icons from vertical nav

Too many icons on the screen got distracting.

* Ensure active item visible

* Increase gap on vertical nav

* Update copy for Access and Discussions settings

* Input Tidyup

* WEB-877 update-collaborators-block

* Update inputs to new style

* Fix webhooks button hover state

* Fix comment copy

Appears in the access settings before embedding a model

* Remove hover shadow from search input on Dashboard

* Small change from Benjamin

* Change collaborators permissions copy

* Comments from PR #1

* Comments from PR #2

* Fix condition for EditableHeader

* Updates from CR

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: Benjamin Ottensten <benjamin.ottensten@gmail.com>

* WIP subscriptions FE implementation

* Use showbutton prop instead of useCheckViewerCommentingAccess (#2251)

* subscriptions work?

* Reverted project access copy to something like before (#2254)

* bugfix(ui-components): Scroll jumps to top on Dialog open (#2250)

* Updates to dialog component

* Fix build issues

* Fix build

* Use shortened header in Scene Explorer (#2256)

* feat(fe2) - Replace CommonEditableTitleDescription with new CommonTitleDescription (#2253)

* Make project & model headers non-editable

* Fixes from PR

* Add placeholder for description

* Only show manage button when user canEdit (#2260)

* feat: add docker compose based reverse proxy for the server stack

* revert: restore docker compose ingress dockerfile

* chore: disable automate module feature flag by default

* fix: move nginx ingress file to the right place

* feat(fe2): Hide settings tab for logged out users (#2261)

* Hide settings for logged out users

* Hide settings tab for non-logged in users

* Add middleware to settings to login

* Add middleware

* Update to webhooks middleware

* Updates to middleware

* Changes to middleware

* Update comments

* bugfix(fe2): Coloring function disappears if parameter title is too long (#2255)

* Add truncation to filter name

* Use shortened model name in scene explorer

* Revert "Use shortened model name in scene explorer"

This reverts commit b86e1d8577ba1009462f68fb45840b8b1f66ec1a.

* Remove gap

* Implement `automateFunctionRunStatusReport` (#2262)

* untested implementation

* no more errors

* no more errors

* lint

* add all statuses to `AutomationRunStatusOrder`

* fix: status reporting now works

* park in the right place, grapple with tests

* update tests

* use correct run ids, adjust tests

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>

* fix: make tab selection robust by using dynamic ID lookup

* tests: fix authz module tests

* fix: frontend TS issue

* ci: add automate encryption keys path value

* Fix ts build errors from ui-components changes

* fix: frontend automation status colors

* add handling for all enum cases in useRunStatusMetadata

* Fix merge issue

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: andrewwallacespeckle <139135120+andrewwallacespeckle@users.noreply.github.com>
Co-authored-by: Alexandru Popovici <alexandrupopoviciioan@gmail.com>
Co-authored-by: Kristaps Fabians Geikins <fabians@speckle.systems>
Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com>
Co-authored-by: Benjamin Ottensten <benjamin.ottensten@gmail.com>
Co-authored-by: Chuck Driesler <cdriesler.iv@gmail.com>

* fix: runStatus label merge error

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: Benjamin Ottensten <benjamin.ottensten@gmail.com>
Co-authored-by: Chuck Driesler <cdriesler.iv@gmail.com>
Co-authored-by: andrewwallacespeckle <139135120+andrewwallacespeckle@users.noreply.github.com>
Co-authored-by: Alexandru Popovici <alexandrupopoviciioan@gmail.com>
Co-authored-by: Kristaps Fabians Geikins <fabians@speckle.systems>
Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com>
2024-05-17 14:36:28 +02:00
Kristaps Fabians Geikins a329f91a44 fix(server): protecting against scope elevation in PAT creation (#1901)
* test DX improvements + tests for token:write scope

* protecting against scope elevation
2023-12-08 14:50:23 +02:00
Kristaps Fabians Geikins 79d293e178 fix: preparing automation backend for use in FE (#1790)
* fix: preparing automation backend for use in FE

* minor migration adjustment

* modelId only

* more CR fixes

* improved validation

* WIP model automation status (#1791)

* additional run status insert validations

* model card dialog

* show view automation btn

* story mock fixes

* version card dialog

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2023-09-18 11:49:11 +03:00
Gergő Jedlicska 8063652dbf automations backend (#1789)
* feat(server): WIP automations api

* feat(server): Automations Backend api WIP take 2

* feat(automations): add validation to automation run schema with zod

* fix(server): add zod to package.json

* fix(server): automations pr cleanup
2023-09-11 14:38:15 +02:00
Gergő Jedlicska 4b071872c2 gergo/adminInviteList (#1761)
* feat(admin): add users email to the admin user list query

* feat(admin): WIP invite list

* feat(admin): fix server invites resolver typing

* fix(admin): slim down admin user list item data
2023-08-11 15:02:02 +03:00
Gergő Jedlicska 48588e5ee5 Merge branch 'main' of github.com:specklesystems/speckle-server into gergo/adminFacelift 2023-07-31 16:25:35 +02:00
Gergő Jedlicska 56555342e4 fix(server): fix admin gql resolver typing 2023-07-31 16:11:10 +02:00
Kristaps Fabians Geikins 951d86aa3e feat(server): cross-server onboarding stream sync + DL project CLI command (#1717)
* WIP

* cleanup and sync MVP kinda done

* WIP

* logging improved a bit

* fixed version sorting

* onboarding base stream creation works

* moved onboarding stream to use new base
2023-07-31 11:44:39 +03:00
Kristaps Fabians Geikins b02a07e2b6 feat: Frontend 2.0 MVP 2023-05-08 10:47:01 +03:00
Kristaps Fabians Geikins 8e59ee7243 refactor: moving away from 'user' query (#1046)
* refactor: moving away from 'user' query + various fixes

* fix: linting issue in stream tests

* fix(server): some tests broken after rebase onto main
2022-10-06 12:08:08 +03:00
Kristaps Fabians Geikins db6a3e9367 refactor(server): apollo server v2 -> v3 migration (#1071) 2022-10-06 11:12:16 +03:00
Kristaps Fabians Geikins f991504932 feat: stream access requests (#976) 2022-09-06 11:10:38 +03:00
Kristaps Fabians Geikins 651dee0977 feat(server): stream discoverability flag & queries (#948) 2022-08-24 13:46:24 +03:00
Kristaps Fabians Geikins af45fc2742 feat(server): notify on comment mention + notifications API (#933) 2022-08-19 10:27:48 +03:00