377 Commits

Author SHA1 Message Date
Iain Sproat a8e3707e6d chore(deps): preview service bump @speckle/viewer to 2.25.7 (#5073) 2025-07-15 11:29:24 +01:00
Daniel Gak Anagrov e6cd2ab441 feat(preview-service): re introduce preview service acceptance test (#5049)
* feat: basic structure for running tests

* feat: added test to ci

* feat: added server test (wip)

* refactor: restuctured entrypoint

* feat: added supertest

* fix: missing deps

* fix: test example ci

* fix: updated default envs

* feat: debug ci

* feat: switch browser

* fix: superadmin ci

* feat: try another image

* fix: try another image with node

* fix: mr comments

* fix: ci job

* chore: workaround to push the image

* chore: try with new base image

* chore: retry

* chore: retry

* chore: retry

* chore: retry

* chore: retry

* fix: test via debug

* fix: envbar

* chore: wrapped up changes, cleaned mr

* chore: fix linter and skiped puppeteer download

* fix: removed paralelism

* fix: paralelism issues
2025-07-15 10:56:09 +02:00
Kristaps Fabians Geikins bde148f286 chore(server): migrating fully to ESM (#5042)
* wip

* some extra fixes

* stuff kinda works?

* need to figure out mocks

* need to figure out mocks

* fix db listener

* gqlgen fix

* minor gqlgen watch adjustment

* lint fixes

* delete old codegen file

* converting migrations to ESM

* getModuleDIrectory

* vitest sort of works

* added back ts-vitest

* resolve gql double load

* fixing test timeout configs

* TSC lint fix

* fix automate tests

* moar debugging

* debugging

* more debugging

* codegen update

* server works

* yargs migrated

* chore(server): getting rid of global mocks for Server ESM (#5046)

* got rid of email mock

* got rid of comment mocks

* got rid of multi region mocks

* got rid of stripe mock

* admin override mock updated

* removed final mock

* fixing import.meta.resolve calls

* another import.meta.resolve fix

* added requested test

* nyc ESM fix

* removed unneeded deps + linting

* yarn lock forgot to commit

* tryna fix flakyness

* email capture util fix

* sendEmail fix

* fix TSX check

* sender transporter fix + CR comments

* merge main fix

* test fixx

* circleci fix

* gqlgen bigint fix

* error formatter fix

* more error formatting improvements

* esmloader added to Dockerfile

* more dockerfile fixes

* bg jobs fix
2025-07-14 10:26:19 +03:00
Kristaps Fabians Geikins 7e01c6f769 feat(fe2): improved file import error handling (#5016)
* WIP error dialog

* import error reporting

* dialog content memoization

* dialog work

* more cleanup

* apollo cache adjustments

* add jobId to uploads table

* fix showing old pending version state

* feat(fe2): prevent user from leaving page if active uploads (#5017)

* feat(fe2): prevent user leaving if active uploads

* fixxes
2025-07-02 11:01:41 +03:00
Iain Sproat a6c473f682 fix(server): correctly handle content-disposition (#5008)
- non-ascii filenames were not handled correctly causing 500 errors when file attempted to be downloaded
2025-06-30 13:57:09 +01:00
Kristaps Fabians Geikins 2be1592341 feat: show historical model uploads (#4954)
* ensure modelId is always filled

* BE seems fine

* frontendd

* pagination fix

* table max height

* lint fix

* unset tiny limit

* test fix
2025-06-18 10:56:33 +03:00
Iain Sproat 4738b97091 feat(server/fileuploads): use a presigned url to upload large files (#4901) 2025-06-17 17:38:47 +01:00
Kristaps Fabians Geikins 596312ab0e feat(frontend): personal project limit disclaimers & prompts (#4822)
* ProjectsAdd wrapper

* WorkspaceMoveProject wrapper added

* move wrapper finalized

* passing through location

* more cleanup

* model add wrapper

* permissions cleanup

* add invite wrapper

* vue-tippy bugfix

* ViewerLimitsDialog prep

* upgrade limit alert prep

* limit alerts

* movemanager fix

* new add flow

* slug update fix

* add model flow

* invites?

* some extra fixes

* move unmount fix?

* more fixes

* vue-tsc update

* style: remove h-32 for smaller screens

* vue-tsc parser fix

* prep for new viewer limits dialog

* updated viewer dialogs

* comment variant cleanup

* CR comments

---------

Co-authored-by: michalspeckle <michal@speckle.systems>
2025-05-28 12:12:18 +03:00
andrewwallacespeckle 9e662daadc Update vue-tippy & remove legacy code 2025-05-27 11:28:56 +02:00
Alexandru Popovici 0ef0a13979 Pro Measurement Tools (#4452)
* feat(viewer-lib): WIP on area measurement

* feat(viewer-lib): WIP on area measurement. Basics are working. Needs more bling

* feat(viewer-lib): Implemented polygon triangulation for measured area

* chore(shared): Updated MeasurementType

* Add Area control to measure panel

* feat(viewer-lib): Real time updates of the fill polygon and area value

* feat(viewer-lib): Added pole of innacessibility as area label anchor using the polylabel libraryh

* feat(viewer-lib): Fixed fill polygon material

* feat(viewer-lib): Changed the surface normal indicator from the faulty disc to a outlined rectangle. Looks and works much better now

* fix(viewer-lib): Measurements get clipped by sections planes

* faet(viewer-lib): Measurements can now optionally define their own snapping method. Area measurement snaps to first point in screen space. Generic vertex snap still applies if enabled

* fix(viewer-lib): Forgot to project the measured point

* feat(viewer-lib): Double click auto-finishes the area measurmenet by instantly joining with the first point. Right clikc removes current area measurement point so you can 'undo'

* fix(viewer-lib: Fixed a stupid bug relatedto text because somebody thought that making it 'async' would be sooooo cool...

* fix(frontend): Prevent zoom on double click when using area measurement

* chore(viewer-lib): Refined and fomralized a bit now that the general idea of a measurement has got more complex

* chore(viewer-lib): Moved state switching a bit

* chore(viewer-lib): Replaced the old disc normal indicator with the new one and made it standard. Added an option to the gizmo's style that determines the pixels size of the normal indicator

* chore(viewer-lib): Documented the area measurement tool

* chore(viewer-lib): Some updates:
- Implemented proper bounds getter for area measurement
- Got rid of the static vector buffers in Measurement and replaced them with consts where needed
- Reduced the min click timing from 250ms to 150ms
- Other small adjustments

* feat(viewer-lib): Added the option to chain measurements

* chore(frontend-2): Added toggle for measurement chaining

* chore(viewer-lib): Perpendicular measurement chaining now align on the same line as requested

* feat(viewer-lib): Implemented point (coordinate) measurement:
- Added support for billboard offseting in NDC in the shader via vec2 offset uniform. Not a dream come true, but required mostly because of how troika works
- SpeckleText background now follows text anchoring
- Implemented new POINT measurement type

* chore(viewer-lib): Separated label position calculation. We now update only the label transform each frame, instead of updating the entire label redunantly

* chore(viewer-lib): Offsets are now constants. Removed redundant vector and matrix creation

* chore(frontend-2): Placeholder radio button for point measurement type. Fixed compile errors

* fix(viewer-lib): Fixes WEB-3105. Export all measurement types

* updated icons

* Update description

---------

Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2025-05-26 12:10:19 +03:00
Gergő Jedlicska 2e86a723c6 feat(fileimport-service): add next gen file importer (#4697)
* feat(fileimport-service): add next gen file importer

* feat(fileimports): integrate server and fileimporter

* chore(dui3): remove leftover artifacts

* fix(server): test typing fixes

* fix(fileimports): test and pr comment fixes

* feat(fileimports: moare test fixes

* fix(fileimports): tests and yarn dedupe
2025-05-23 10:27:00 +02:00
Alexandru Popovici a385823b2d feat(viewer): objectloader2 integration (#4267)
* feat(viewer-sandbox): Made a sandbox function that will only invoke the object-loader loading objects

* first pass of creating an objectloader2

* updated build + added vitest

* try to get viewer sandbox to use new code

* sandbox type fix

* refactor a bit

* can download root

* intermediate commit for downloader/caching queue

* can download stuff!

* refactor files

* intro isBase and fix isString

* move single download to downloader

* fix download

* PR feedback

* some intermediate commit

* do clean up and download better

* clean up promises and linting

* can generate values while downloading and caching

* add a finish method

* remove unused functions

* remove asBase

* add temporary docs

* add more docs with mermaid

* add more test models

* add response validation

* add tests and redo options

* add test for download batch

* fix downloader tests and change Item to have clearer Base items

* add tests and refactor a little

* use fetch in downloader as an option

* use optional in-memory indexdb instead of monkey patching the global one

* more refactors for options for objectloader2

* add tests for objectloader2

* adjust single download

* benchmark loading and adjust ol2 batches

* download more!

* adjust to use hash privates

* refactored again with renaming

* cleanup

* make setupCacheDb throw instead

* use BatchedPool for downloads!

* fix tests

* adjust timings and add adaptive waiting

* Only wait if queue wasn't empty and queue size was full

* fix tests

* fix file names and some private usage

* fix interval and private usage

* rename vars

* use params for methods

* fix params for constructors and tests

* fix params for constructors and tests again

* using dexie

* faster settings but doesn't end well

* fixed end, optimized and removed logs

* fix tests

* fix types?

* update lock with WSL

* add e2e small model test

* fix/update yarn.lock

* Remove unused eslint ignore to fix pre-commit

* prettier fixes

* fix real DB usage

* rename methods to better match OL1

* rename methods to better match OL1 again

* add extra header collection

* add headers correctly

* test getTotalObjectCount

* feat(viewer-lib): Replaced old object loader with Adam's  objectloder2

* fix(viewer-lib): Removed the old object loader. Removed unneeded pause time in speckle loader

* Testing

* only deferred if not downloaded....don't save everything

* Lockfile

* pool isn't adjustable, adjust download buckets, dexie read is faster

* chore

* fix(viewer-lib): Fixed compiler errors

* fix getObject access with real indexeddb...adjust buffer for deferred access

* Fix disposal and pausing

* don't index item!

* fix dockerfiles to use OL2

* fix Dockerfile

* Fix dockerfile

* defer correctly and use record to add/lookup/remove to

* delete stuff correctly

* chore(sandbox): Enabled viewer loading

* use objects instead of arrays to avoid findIndex

* remove extra count

* add a found cache to avoid some db hits

* order matters for deferment

* move found map to deferment

* change option numbers

* 2 level cache with expiry

* defer everything, use loader to track what is requested....expire only found items

* add deferment disposal

* oops mismerge

* chore(sandbox): Default stream

* Beta version of CachePump and CacheReader

* Clean up initialization

* More clean up

* chore(objectloader2): Fixed CI compiler error

* chore(objectloader2): Fixed prettier

* add cachePump tests

* add cacheReader tests

* fixed more tests

* fixed final tests

* moving stuff around and lock return value

* try to move stuff out of objectloader2

* use a factory

* rename factory

* formatting

* eslist fixes

* try allocating no strings

* add comments

* small refactor and add another test

* fix deferment expiration and have test

* use byte size for max memory cache size

* fix deferment manager tests

* saved comment

* fix(viewer-sandbox): Fixed compiler error

* ignore tshy

* chore(frontend): Attempt to make viewer loading sequential

---------

Co-authored-by: Adam Hathcock <adam@hathcock.uk>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2025-05-21 10:05:50 +03:00
Benjamin Ottensten 3d4c4395f4 Feat: Enable Intercom for in-app support (#4640) 2025-05-19 15:35:16 +02:00
Chuck Driesler 2294cd1dff chore(deps): dedupe ajv (#4744) 2025-05-14 16:01:53 +01:00
Chuck Driesler 18d8ccaae7 fix(automate): set default input values in function input form (#4728) 2025-05-14 14:09:06 +01:00
Alexandru Popovici 02b97bcb86 preview-frontend-no-outlines (#4715)
* chore(preview-frontend): Disabled outlines to avoid the extra complexity and weird artifacts

* chore(preview-frontend): Pinned the viewer version

* chore(preview-frontend): Added lockfile

* chore(preview-frontend): Bumped viewer version

* chore(preview-frontend): lockfile
2025-05-14 14:33:59 +03:00
Kristaps Fabians Geikins a1f8f79b7a chore: finish removing dui3 (#4738) 2025-05-14 10:48:34 +03:00
Kristaps Fabians Geikins 24425a3a24 feat: update datadog cli to hopefully fix node22 issue in ci (#4722) 2025-05-13 12:11:27 +03:00
Gergő Jedlicska 2fdcf1bd1d refactor(shared): unified queue handling (#4691)
* feat(shared): unified queue initialization in shared

* feat(queues): use the new queue creation everywhere

* chore(shared): move to redis module

* chore(shared): fix export maps

* chore(fileimport): add deps properly

* fix(shared): import fix

* fix(everything): moear imports

* fix(server): cjs imports
2025-05-08 16:58:43 +02:00
Kristaps Fabians Geikins 10832655d4 fix(server): all project created subs firing for workspace guests + req ctx cache fix for subs (#4453)
* WIP sub fix

* fix sub resolver caching issue
2025-04-16 11:21:17 +03:00
Alessandro Magionami 0c18acc452 Alessandro/web 2945 comments hide body (#4385)
* chore(core): move limits logic into shared

* feat(comments): limit text and rawText for comments

* chore(core): removed test moved to shared

* chore(comments): generate gql types

* feat(comments): rework comment history limits

* chore(comments): fix tests

* chore(shared): add dayjs as dependency

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2025-04-15 10:44:12 +02:00
Kristaps Fabians Geikins 5f88f562d3 feat: updated various "read/update" settings related permission checks (#4356)
* a bunch more tests

* updated GQL resolvers

* project create checks implemented

* project update/settings related checks in FE

* a bunch of tests

* tests fix

* disable app schema check
2025-04-09 16:13:09 +03:00
Kristaps Fabians Geikins 820a1e2ebf feat(server): workspace roles taken into account in project queries (#4319)
* Workspace.projects fixed

* Query.project tested & fixed

* personalOnly flag added

* withProjectRoleOnly flag

* authorizeResolver implicit workspace roles

* minor cleanup

* reorg + support for throwing auth errors

* global error mapping

* undo special borkage

* CR fixes

* more CR fixes

* shared tests fix

* minor adjustment

* tests fix

* see if removing cached roles fixes it?

* more fixes

* clean up debugging garbage
2025-04-07 12:52:07 +03:00
Kristaps Fabians Geikins c54d15fd93 feat: authz frontend foundation + reworked errors (#4275)
* feat: authz frontend foundation + reworked errors

* lint fixes

* test fix

* fixed noCache() util
2025-03-27 16:13:35 +02:00
Adam Hathcock 975f0e1a51 feat(objectloader): ObjectLoader2: use indexdb as cache and batch download objects (#4172)
* feat(objectloader2): Made objectloader2 to be faster!

---------

Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2025-03-27 10:47:10 +00:00
Iain Sproat 66e19a92b6 Merge pull request #4202 from specklesystems/iain/web-2811-new-preview-service-pods-stuck-on-terminating
fix(preview service): handle shutdown via terminus
2025-03-26 08:29:57 +00:00
Kristaps Fabians Geikins a6a4ceee86 feat: true-myth result structures & other auth policy improvements (#4262)
* fixing up typing

* better dynamic loader mechanism

* buildReqLoaders cleanup

* added caching to loaders

* ensuring all loaders are async

* fe2 plugins error handling fix

* feat(shared): true-myth result structures & other auth policy improvements

* moving workspaceCore loaders to correct place
2025-03-25 17:49:02 +01:00
Iain Sproat a555fc1c1a Merge branch 'main' into iain/web-2811-new-preview-service-pods-stuck-on-terminating 2025-03-25 16:32:55 +00:00
Gergő Jedlicska b7656c1a13 tests(shared/authz): (#4250)
* test(shared): add more tests to auth policies

* test(shared): add more tests to auth policies

* chore(authz): fix export

* chore(authz): test env fix

* chore(authz): more test fixes

---------

Co-authored-by: Charles Driesler <chuck@speckle.systems>
2025-03-24 16:03:22 +01:00
Kristaps Fabians Geikins c988276c54 stuff seems to work (#4240) 2025-03-24 15:56:02 +01:00
Gergő Jedlicska 968d2f2520 auth/lib (#4242)
* wip

* wip

* feat(authz): wip policy shape

* wip

* fix(authz): canReadProject with latest pattern

* wip

* feat(shared): simplify authz checks and policies

* feat(shared): port role weights into shared

* test(shared): some more tests for authz

* test(shared): more query project tests

* typo!

* feat(shared): ff loading refinements

* feat(shared): example authorization policy integration

* authz loaders init

* chore(authz): naming etc

* wip

* fix(authz): authz error objects

Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Gergő Jedlicska <gjedlicska@users.noreply.github.com>

* fix(authz): use correct role weights

* chore(authz): use codes from errors in tests

* chore(authz): wow

* chore(authz): fix more tests, add more tests

* chore(authz): fix some tests, add some tests (again)

* fix(authz): fix tests again

* fix(server): you need to await !!!! otherwise it crashes the server.

---------

Co-authored-by: Charles Driesler <chuck@speckle.systems>
Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Gergő Jedlicska <gjedlicska@users.noreply.github.com>
2025-03-21 16:37:36 +01:00
Chuck Driesler 66da283a79 Revert "feat(authz): shared authz pipeline (#4151)" (#4241)
This reverts commit cb8aa31b66.
2025-03-21 15:41:17 +01:00
Chuck Driesler cb8aa31b66 feat(authz): shared authz pipeline (#4151)
* wip

* wip

* feat(authz): wip policy shape

* wip

* fix(authz): canReadProject with latest pattern

* wip

* feat(shared): simplify authz checks and policies

* feat(shared): port role weights into shared

* test(shared): some more tests for authz

* test(shared): more query project tests

* typo!

* feat(shared): ff loading refinements

* feat(shared): example authorization policy integration

* authz loaders init

* chore(authz): naming etc

* wip

* fix(authz): authz error objects

Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Gergő Jedlicska <gjedlicska@users.noreply.github.com>

* fix(authz): use correct role weights

* chore(authz): use codes from errors in tests

* chore(authz): wow

* chore(authz): fix more tests, add more tests

* chore(authz): fix some tests, add some tests (again)

* fix(authz): fix tests again

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Gergő Jedlicska <gjedlicska@users.noreply.github.com>
2025-03-21 14:45:36 +01:00
Kristaps Fabians Geikins e24c26e3d2 feat: getting rid of defaultProjectRole setting (#4221)
* feat: getting rid of defaultProjectRole setting

* get stdout reporting in CI

* yarn lock fix

* fix package.json

* better CI test output

* pinning mocha-multi
2025-03-20 12:58:30 +02:00
Iain Sproat f667eb1d48 fix(fileimport service): re-add undici for legacy ifc importer 2025-03-15 08:02:10 +00:00
Iain Sproat f3bd2e9e14 Merge branch 'main' into iain/web-2811-new-preview-service-pods-stuck-on-terminating 2025-03-14 17:29:17 +00:00
Iain Sproat b06fa2e68b Merge branch 'main' into iain/file-import-more-fixes 2025-03-14 15:19:36 +00:00
Iain Sproat e153ca31be Merge branch 'main' into iain/fileimport-typescript 2025-03-13 17:17:17 +00:00
Iain Sproat a017e33ef6 Remove undici from lock file 2025-03-13 15:57:08 +00:00
Iain Sproat 5804ee4b50 fix(preview service): handle shutdown via terminus 2025-03-12 09:28:38 +00:00
Iain Sproat cfef333a0c feat(preview service): introduce /metrics endpoint for Prometheus (#4127) 2025-03-10 10:48:29 +00:00
Gergő Jedlicska 61609de97e gergo/previews (#3765)
* feat(preview-generator): add new preview generator webapp

* wip(preview-service): reworking the preview service backend

* feat(previews): logging

* feat(preview-service): streamline payloads

* fix(preview-service): do not log the full payload

* feat(preview-service): build new preview service

* feat(preview-service): add separate response queue

* feat(previews): integrate preview queues with the server

* feat(previews): use module alias

* chore(previews): remove old preview service code

* feat(previews): log stuff on job statuses

* fix(previews): add missing deps and scripts

* fix(previews): package deps fix

* fix(server): moar typing fixes

* Metrics related to jobs: total count, request failures, response errors & durations

* duration should include unit.
- histogram metric should be summary
- error responses include duration in seconds
- attempt to remove metric before adding it (prevent errors with duplicate metrics)

* fix(server, frontend): some ts fixes

* fixes

* fix(frontend): remove unneeded ts-expect-error

* chore(preview-service): eslint

* TS fix

* feat(previews): more smoal fixes

* fix(preview-service): alias loading

* feat(helm): updates for new preview service queue setup

* feat(preview-service): launch new browser for each job

* feat(preview-service): add timeout, fix liveliness

* fix(helm): add access to new secret in service accounts

* tidy metrics into a separate file

* Remove broken preview service acceptance test

* fix broken import

* Add metrics to test

* feat(preview-service): handle preview service shutdown properly

* fix(previews): merge bork

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2025-03-06 14:26:56 +01:00
Kristaps Fabians Geikins 954b1a9f11 feat: plan prices accurately read from Stripe (#4104)
* WIP prices + new caching utils

* cached workspace plan prices

* GQL API done

* integrated in frontend

* fixed missing FF

* CR fixes

* integration tests

* removed non-existant team yearly env var
2025-03-05 12:23:38 +02:00
Iain Sproat 7cc8e65e1e Merge branch 'main' into iain/fileimport-typescript 2025-03-04 16:41:01 +00:00
Kristaps Fabians Geikins ec092fb042 chore: move common workspace plan/feature config to @speckle/shared (#4064)
fix: gqlgen regenerated
2025-02-27 11:18:30 +02:00
Kristaps Fabians Geikins 1d2a594f0a chore: upgrade TS 5.2 -> 5.7.3 & ESLint to 9.20.1 (#4032)
* chore: upgrade TS 5.2 -> 5.7.3

* vite dts fix

* lint fix

* resolutions fix

* ui comp build fix

* precommit fix?

* latest eslint version

* autoloader fix

* undo unnecessary viewer change

* eslint fixes fe2 + trying disabled type linting

* lint fixes
2025-02-20 14:18:18 +02:00
Iain Sproat ec98f8d4cb chore(fe1): remove deprecated frontend (#3998)
---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2025-02-18 12:36:52 +00:00
Iain Sproat 85fa5b603a chore(fileimport service): improve error handling 2025-02-11 12:17:39 +00:00
Iain Sproat 55315feb59 fix(server/diffdownload): fix the bug where client connection close events were not propogated to the database stream connection (#3921)
* WIP: trying to catch a bug

* great success

* reinstate gzip

* Remove feature flag

* remove stream-chain dependency

* remove superfluous logging lines

* re-align with original where possible

* re-align package.json

* More re-alignment with main branch before the previous 'fix'

* A smaller failing example
2025-02-04 11:09:53 +01:00
Iain Sproat 32c310f849 fix(server/objects): solves database connection resource leak when client connections are prematurely closed (#3889) 2025-01-28 15:56:21 +01:00