From a266fe00107f1b22aff2390cc8e33c105d5b5b4f Mon Sep 17 00:00:00 2001 From: Iain Sproat <68657+iainsproat@users.noreply.github.com> Date: Tue, 13 May 2025 10:24:42 +0100 Subject: [PATCH 1/6] fix(server): log message includes all referenced properties --- packages/server/modules/core/services/objects/management.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/modules/core/services/objects/management.ts b/packages/server/modules/core/services/objects/management.ts index 00ed3fd44..c8c3a0039 100644 --- a/packages/server/modules/core/services/objects/management.ts +++ b/packages/server/modules/core/services/objects/management.ts @@ -181,7 +181,8 @@ export const createObjectsFactory = { batchIndex: index + 1, totalCountOfBatches: batches.length, - elapsedTimeMs: t1 - t0 + elapsedTimeMs: t1 - t0, + countStoredObjects: objsToInsert.length }, 'Batch {batchIndex}/{totalCountOfBatches}: Stored {countStoredObjects} objects in {elapsedTimeMs}ms.' ) From 86ebd8fbf95f48c9ea0e7013e4f473107cfa1721 Mon Sep 17 00:00:00 2001 From: Iain Sproat <68657+iainsproat@users.noreply.github.com> Date: Tue, 13 May 2025 10:51:11 +0100 Subject: [PATCH 2/6] more error handling and logging fixes --- packages/server/modules/auth/services/mailchimp.ts | 6 ++++-- packages/server/modules/previews/resultListener.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/server/modules/auth/services/mailchimp.ts b/packages/server/modules/auth/services/mailchimp.ts index 89831fded..4db38f4d0 100644 --- a/packages/server/modules/auth/services/mailchimp.ts +++ b/packages/server/modules/auth/services/mailchimp.ts @@ -6,6 +6,7 @@ import { UserRecord } from '@/modules/core/helpers/types' import { MisconfiguredEnvironmentError } from '@/modules/shared/errors' import { OnboardingCompletionInput } from '@/modules/core/graph/generated/graphql' import { MailchimpResourceError } from '@/modules/auth/errors' +import { ensureError } from '@speckle/shared' let mailchimpInitialized = false @@ -76,11 +77,12 @@ export async function updateMailchimpMemberTags( // Check if user is already in audience (meaning they consented to marketing emails) try { await mailchimp.lists.getListMember(listId, subscriberHash) - } catch { + } catch (e) { throw new MailchimpResourceError( 'User not found in Mailchimp audience. They should have been added during registration.', { - info: { userEmailHash: subscriberHash } + info: { userEmailHash: subscriberHash }, + cause: ensureError(e, 'Mailchimp API error') } ) } diff --git a/packages/server/modules/previews/resultListener.ts b/packages/server/modules/previews/resultListener.ts index f8ee0c4c4..f4bc04472 100644 --- a/packages/server/modules/previews/resultListener.ts +++ b/packages/server/modules/previews/resultListener.ts @@ -86,7 +86,7 @@ export const consumePreviewResultFactory = switch (previewResult.status) { case 'error': - log.error({ reason: previewResult.reason }, previewMessage) + log.warn({ reason: previewResult.reason }, previewMessage) await upsertObjectPreview({ objectPreview: { objectId, From 6ccac31c339ffc4b0515bb5c9c3f2270089e3089 Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle Date: Tue, 13 May 2025 14:06:23 +0200 Subject: [PATCH 3/6] fix: remove unnecessary available seat calculation --- packages/frontend-2/lib/workspaces/composables/plan.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend-2/lib/workspaces/composables/plan.ts b/packages/frontend-2/lib/workspaces/composables/plan.ts index 8fe4f3908..261efbdf0 100644 --- a/packages/frontend-2/lib/workspaces/composables/plan.ts +++ b/packages/frontend-2/lib/workspaces/composables/plan.ts @@ -107,8 +107,8 @@ export const useWorkspacePlan = (slug: string) => { // Seat information const seats = computed(() => result.value?.workspaceBySlug?.seats) const hasAvailableEditorSeats = computed(() => { - if (seats.value?.editors.available && seats.value?.editors.assigned) { - return seats.value?.editors.available - seats.value?.editors.assigned > 0 + if (seats.value?.editors.available) { + return seats.value.editors.available > 0 } return false }) From 879c9a4b0862710620aa79ed178fcf226eb49fcd Mon Sep 17 00:00:00 2001 From: Alexandru Popovici Date: Tue, 13 May 2025 15:12:34 +0300 Subject: [PATCH 4/6] fix(viewer-lib): Edges pipeline now is explicit about which object visibilities to render, avoiding rendering colored masked objects (#4719) --- .../pipeline/Passes/DepthNormalPass.ts | 4 +++ .../pipeline/Pipelines/EdgesPipeline.ts | 30 +++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/packages/viewer/src/modules/pipeline/Passes/DepthNormalPass.ts b/packages/viewer/src/modules/pipeline/Passes/DepthNormalPass.ts index 7964e2e9b..178c7d7b3 100644 --- a/packages/viewer/src/modules/pipeline/Passes/DepthNormalPass.ts +++ b/packages/viewer/src/modules/pipeline/Passes/DepthNormalPass.ts @@ -53,6 +53,10 @@ export class DepthNormalPass extends BaseGPass { return this.mrt as unknown as WebGLRenderTarget } + set outputTarget(target: WebGLMultipleRenderTargets) { + this.mrt = target + } + public set options(value: DepthNormalPassOptions) { super.options = value this.depthType = this._options.depthType diff --git a/packages/viewer/src/modules/pipeline/Pipelines/EdgesPipeline.ts b/packages/viewer/src/modules/pipeline/Pipelines/EdgesPipeline.ts index c5c749778..2966bfee4 100644 --- a/packages/viewer/src/modules/pipeline/Pipelines/EdgesPipeline.ts +++ b/packages/viewer/src/modules/pipeline/Pipelines/EdgesPipeline.ts @@ -5,7 +5,7 @@ import { TAAPass } from '../Passes/TAAPass.js' import { ObjectLayers } from '../../../IViewer.js' import { ProgressivePipeline } from './ProgressivePipeline.js' import { DepthNormalIdPass } from '../Passes/DepthNormalIdPass.js' -import { Texture } from 'three' +import { Texture, WebGLMultipleRenderTargets } from 'three' import { DepthPass } from '../Passes/DepthPass.js' import { NormalsPass } from '../Passes/NormalsPass.js' import { BasePipelineOptions } from './Pipeline.js' @@ -50,11 +50,26 @@ export class EdgesPipeline extends ProgressivePipeline { depthNormalIdPass.setJitter(true) depthNormalIdPass.setClearColor(0x000000, 1) depthNormalIdPass.setClearFlags(ClearFlags.COLOR | ClearFlags.DEPTH) + depthNormalIdPass.setVisibility(ObjectVisibility.DEPTH) + + const depthNormalIdPassTransparent = new DepthNormalIdPass() + depthNormalIdPassTransparent.setLayers([ObjectLayers.STREAM_CONTENT_MESH]) + depthNormalIdPassTransparent.setJitter(true) + depthNormalIdPassTransparent.setVisibility(ObjectVisibility.TRANSPARENT) + depthNormalIdPassTransparent.outputTarget = + depthNormalIdPass.outputTarget as unknown as WebGLMultipleRenderTargets const depthPassNormalIdDynamic = new DepthNormalIdPass() depthPassNormalIdDynamic.setLayers([ObjectLayers.STREAM_CONTENT_MESH]) depthPassNormalIdDynamic.setClearColor(0x000000, 1) depthPassNormalIdDynamic.setClearFlags(ClearFlags.COLOR | ClearFlags.DEPTH) + depthPassNormalIdDynamic.setVisibility(ObjectVisibility.DEPTH) + + const depthPassNormalIdDynamicTransparent = new DepthNormalIdPass() + depthPassNormalIdDynamicTransparent.setLayers([ObjectLayers.STREAM_CONTENT_MESH]) + depthPassNormalIdDynamicTransparent.setVisibility(ObjectVisibility.TRANSPARENT) + depthPassNormalIdDynamicTransparent.outputTarget = + depthPassNormalIdDynamic.outputTarget as unknown as WebGLMultipleRenderTargets const edgesPass = new EdgesPass() edgesPass.setTexture('tDepth', depthNormalIdPass.depthTexture) @@ -80,8 +95,17 @@ export class EdgesPipeline extends ProgressivePipeline { taaPass.inputTexture = edgesPass.outputTarget?.texture taaPass.accumulationFrames = this.accumulationFrameCount - this.dynamicStage.push(depthPassNormalIdDynamic, edgesPassDynamic) - this.progressiveStage.push(depthNormalIdPass, edgesPass, taaPass) + this.dynamicStage.push( + depthPassNormalIdDynamic, + depthPassNormalIdDynamicTransparent, + edgesPassDynamic + ) + this.progressiveStage.push( + depthNormalIdPass, + depthNormalIdPassTransparent, + edgesPass, + taaPass + ) this.passList = this.dynamicStage From a8ad4eeba06604aa9d0b76db12fa6de713714075 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 13 May 2025 14:42:08 +0200 Subject: [PATCH 5/6] Chore: Remove all noPersonalEmails related logic (#4726) --- .../components/auth/RegisterWithEmailBlock.vue | 12 ++---------- packages/frontend-2/composables/globals.ts | 8 -------- packages/frontend-2/lib/auth/helpers/validation.ts | 8 -------- utils/helm/speckle-server/templates/_helpers.tpl | 3 --- .../templates/frontend_2/deployment.yml | 2 -- utils/helm/speckle-server/values.schema.json | 5 ----- utils/helm/speckle-server/values.yaml | 2 -- 7 files changed, 2 insertions(+), 38 deletions(-) diff --git a/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue b/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue index 96bc6bbd5..2a577f9d3 100644 --- a/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue +++ b/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue @@ -69,10 +69,7 @@ import { ToastNotificationType, useGlobalToast } from '~~/lib/common/composables import { ensureError } from '@speckle/shared' import { useAuthManager } from '~~/lib/auth/composables/auth' import { loginRoute } from '~~/lib/common/helpers/route' -import { - passwordRules, - doesNotContainBlockedDomain -} from '~~/lib/auth/helpers/validation' +import { passwordRules } from '~~/lib/auth/helpers/validation' import { graphql } from '~~/lib/common/generated/gql' import type { ServerTermsOfServicePrivacyPolicyFragmentFragment } from '~~/lib/common/generated/gql/graphql' import { useMounted } from '@vueuse/core' @@ -96,18 +93,13 @@ const router = useRouter() const { signUpWithEmail, inviteToken } = useAuthManager() const { triggerNotification } = useGlobalToast() const isMounted = useMounted() -const isNoPersonalEmailsEnabled = useIsNoPersonalEmailsEnabled() const newsletterConsent = defineModel('newsletterConsent', { required: true }) const loading = ref(false) const password = ref('') const email = ref('') -const emailRules = computed(() => - inviteToken.value || !isNoPersonalEmailsEnabled.value - ? [isEmail] - : [isEmail, doesNotContainBlockedDomain] -) +const emailRules = [isEmail] const nameRules = [isRequired] const isEmailDisabled = computed(() => !!props.inviteEmail?.length || loading.value) diff --git a/packages/frontend-2/composables/globals.ts b/packages/frontend-2/composables/globals.ts index dae4abd04..e08033a86 100644 --- a/packages/frontend-2/composables/globals.ts +++ b/packages/frontend-2/composables/globals.ts @@ -68,12 +68,4 @@ export const useIsBillingIntegrationEnabled = () => { return ref(FF_BILLING_INTEGRATION_ENABLED) } -export const useIsNoPersonalEmailsEnabled = () => { - const { - public: { FF_NO_PERSONAL_EMAILS_ENABLED } - } = useRuntimeConfig() - - return ref(FF_NO_PERSONAL_EMAILS_ENABLED) -} - export { useGlobalToast, useActiveUser, usePageQueryStandardFetchPolicy } diff --git a/packages/frontend-2/lib/auth/helpers/validation.ts b/packages/frontend-2/lib/auth/helpers/validation.ts index 393aec621..9c877d077 100644 --- a/packages/frontend-2/lib/auth/helpers/validation.ts +++ b/packages/frontend-2/lib/auth/helpers/validation.ts @@ -1,5 +1,4 @@ import { isStringOfLength, stringContains } from '~~/lib/common/helpers/validation' -import { blockedDomains } from '@speckle/shared' export const passwordLongEnough = isStringOfLength({ minLength: 8 }) export const passwordHasAtLeastOneNumber = stringContains({ @@ -21,10 +20,3 @@ export const passwordRules = [ passwordHasAtLeastOneLowercaseLetter, passwordHasAtLeastOneUppercaseLetter ] - -export const doesNotContainBlockedDomain = (val: string) => { - const domain = val.split('@')[1]?.toLowerCase() - return domain && blockedDomains.includes(domain) - ? 'Please use your work email instead of a personal email address' - : true -} diff --git a/utils/helm/speckle-server/templates/_helpers.tpl b/utils/helm/speckle-server/templates/_helpers.tpl index cca60c5e1..526adea86 100644 --- a/utils/helm/speckle-server/templates/_helpers.tpl +++ b/utils/helm/speckle-server/templates/_helpers.tpl @@ -566,9 +566,6 @@ Generate the environment variables for Speckle server and Speckle objects deploy - name: FF_WORKSPACES_MODULE_ENABLED value: {{ .Values.featureFlags.workspacesModuleEnabled | quote }} -- name: FF_NO_PERSONAL_EMAILS_ENABLED - value: {{ .Values.featureFlags.noPersonalEmailsEnabled | quote }} - - name: FF_WORKSPACES_SSO_ENABLED value: {{ .Values.featureFlags.workspacesSSOEnabled | quote }} diff --git a/utils/helm/speckle-server/templates/frontend_2/deployment.yml b/utils/helm/speckle-server/templates/frontend_2/deployment.yml index 5406ea844..2cdcc6bec 100644 --- a/utils/helm/speckle-server/templates/frontend_2/deployment.yml +++ b/utils/helm/speckle-server/templates/frontend_2/deployment.yml @@ -141,8 +141,6 @@ spec: value: {{ .Values.featureFlags.gendoAIModuleEnabled | quote }} - name: NUXT_PUBLIC_FF_FORCE_ONBOARDING value: {{ .Values.featureFlags.forceOnboarding | quote }} - - name: NUXT_PUBLIC_FF_NO_PERSONAL_EMAILS_ENABLED - value: {{ .Values.featureFlags.noPersonalEmailsEnabled | quote }} - name: NUXT_PUBLIC_FF_WORKSPACES_NEW_PLANS_ENABLED value: {{ .Values.featureFlags.workspacesNewPlanEnabled | quote }} - name: NUXT_PUBLIC_FF_NEXT_GEN_FILE_IMPORTER_ENABLED diff --git a/utils/helm/speckle-server/values.schema.json b/utils/helm/speckle-server/values.schema.json index 4f7f3eb95..8950ae3e6 100644 --- a/utils/helm/speckle-server/values.schema.json +++ b/utils/helm/speckle-server/values.schema.json @@ -85,11 +85,6 @@ "description": "Forces onboarding for all users", "default": false }, - "noPersonalEmailsEnabled": { - "type": "boolean", - "description": "Disables the ability sign up with personal email addresses", - "default": false - }, "workspacesNewPlanEnabled": { "type": "boolean", "description": "Toggles whether the new (Q1 2025) plans for workspaces are available. workspacesModuleEnabled must also be enabled for this to take effect.", diff --git a/utils/helm/speckle-server/values.yaml b/utils/helm/speckle-server/values.yaml index 55e2f49eb..bc9594b54 100644 --- a/utils/helm/speckle-server/values.yaml +++ b/utils/helm/speckle-server/values.yaml @@ -55,8 +55,6 @@ featureFlags: forceEmailVerification: false ## @param featureFlags.forceOnboarding Forces onboarding for all users forceOnboarding: false - ## @param featureFlags.noPersonalEmailsEnabled Disables the ability sign up with personal email addresses - noPersonalEmailsEnabled: false ## @param featureFlags.workspacesNewPlanEnabled Toggles whether the new (Q1 2025) plans for workspaces are available. workspacesModuleEnabled must also be enabled for this to take effect. workspacesNewPlanEnabled: false ## @param featureFlags.moveProjectRegionEnabled Enables the ability to move a project region (manually or automatically) From c8b01ffd2a34c109c5b21402a5e58c8e70bba275 Mon Sep 17 00:00:00 2001 From: Kristaps Fabians Geikins Date: Tue, 13 May 2025 16:18:46 +0300 Subject: [PATCH 6/6] fix(tailwind-theme): remove default exports to fix comp w/ dui3 (#4730) --- packages/dui3/tailwind.config.mjs | 2 +- packages/tailwind-theme/README.md | 2 +- packages/tailwind-theme/src/index.ts | 2 -- packages/tailwind-theme/src/plugin.ts | 3 +-- packages/tailwind-theme/src/preset.ts | 2 +- packages/ui-components/tailwind.config.cjs | 4 ++-- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/dui3/tailwind.config.mjs b/packages/dui3/tailwind.config.mjs index b952f6bfb..a74d51214 100644 --- a/packages/dui3/tailwind.config.mjs +++ b/packages/dui3/tailwind.config.mjs @@ -1,4 +1,4 @@ -import speckleTheme from '@speckle/tailwind-theme' +import { plugin as speckleTheme } from '@speckle/tailwind-theme' import { tailwindContentEntries as themeEntries } from '@speckle/tailwind-theme/tailwind-configure' import { tailwindContentEntries as uiLibEntries } from '@speckle/ui-components/tailwind-configure' import formsPlugin from '@tailwindcss/forms' diff --git a/packages/tailwind-theme/README.md b/packages/tailwind-theme/README.md index 095ead69e..e54022f43 100644 --- a/packages/tailwind-theme/README.md +++ b/packages/tailwind-theme/README.md @@ -5,7 +5,7 @@ Tailwind theme used in frontend 2 and other apps. ## Setup 1. Install the package -1. In your tailwind config import `@speckle/tailwind-theme` and `@tailwindcss/forms` and add them to your `plugins` array +1. In your tailwind config import `plugin` from `@speckle/tailwind-theme` and `@tailwindcss/forms` and add them to your `plugins` array 1. Import `tailwindContentEntries` from `@speckle/tailwind-theme/tailwind-configure` and invoke it in the `contents` field in your Tailwind config to ensure PurgeCSS is configured correctly. It requires the CJS `require` object as its only parameter. If it isn't available (in an ESM environment), you can use node's `createRequire()`. ## Development diff --git a/packages/tailwind-theme/src/index.ts b/packages/tailwind-theme/src/index.ts index a1320a510..559e74f29 100644 --- a/packages/tailwind-theme/src/index.ts +++ b/packages/tailwind-theme/src/index.ts @@ -1,4 +1,2 @@ import { darkThemeVariables, lightThemeVariables, plugin } from './plugin.js' - -export default plugin export { darkThemeVariables, lightThemeVariables, plugin } diff --git a/packages/tailwind-theme/src/plugin.ts b/packages/tailwind-theme/src/plugin.ts index 38b0874e9..154d5d8b8 100644 --- a/packages/tailwind-theme/src/plugin.ts +++ b/packages/tailwind-theme/src/plugin.ts @@ -1,5 +1,5 @@ import buildPlugin from 'tailwindcss/plugin.js' -import preset from './preset.js' +import { config as preset } from './preset.js' export const lightThemeVariables = { /* used only as the page background */ @@ -385,5 +385,4 @@ const plugin = buildPlugin(({ addComponents, addBase }) => { }) }, preset) -export default plugin export { plugin } diff --git a/packages/tailwind-theme/src/preset.ts b/packages/tailwind-theme/src/preset.ts index 54468f304..51689c319 100644 --- a/packages/tailwind-theme/src/preset.ts +++ b/packages/tailwind-theme/src/preset.ts @@ -97,4 +97,4 @@ const config: Config = { plugins: [FormsPlugin] } -export default config +export { config } diff --git a/packages/ui-components/tailwind.config.cjs b/packages/ui-components/tailwind.config.cjs index 4c000fd57..1f0db61c9 100644 --- a/packages/ui-components/tailwind.config.cjs +++ b/packages/ui-components/tailwind.config.cjs @@ -1,4 +1,4 @@ -const speckleTheme = require('@speckle/tailwind-theme') +const { plugin: speckleTheme } = require('@speckle/tailwind-theme') const { tailwindContentEntries } = require('@speckle/tailwind-theme/tailwind-configure') const formsPlugin = require('@tailwindcss/forms') @@ -10,5 +10,5 @@ module.exports = { './src/**/*.{js,ts,jsx,tsx,vue}', ...tailwindContentEntries() ], - plugins: [speckleTheme.default, formsPlugin] + plugins: [speckleTheme, formsPlugin] }