From c7e0929eca718b249d6fb6d4fa6314de78f45f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuzhan=20Koral?= <45078678+oguzhankoral@users.noreply.github.com> Date: Tue, 3 Feb 2026 14:43:16 +0300 Subject: [PATCH] feat: new business model changes (#85) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: initial can create version implementation on model card * feat: disable model card CTAs for send * feat: initial model ingestion tests * fix: apply ingestion send to all CTAs * feat: sketchup bridge * feat: centeralize the start ingestion logic in host app store * fix: sketchup is handling via model ingestion * chore: cosmetics * feat(ingestion): add failWithError and failWithCancel GraphQL mutations * feat(ingestion): add failIngestion and cancelIngestion methods to useModelIngestion composable * feat(ingestion): handle ingestion failure and cancellation in hostAppStore * fix: reviewers comments * fix: don't know where the f that came from * refactor(ingestion): remove unused statusData and fix lint errors * feat(wizard): add canCreateVersion permission check to publish wizard * TODOs * feat(permissions): add 1s polling for canCreateVersion to reflect workspace limit changes * fix(tooltip): undefined doesnt refresh v-tippy * fix(wizard): too much ctrl z lol * refactor(permissions): check canCreateVersion on action instead of polling * feat(hostApp): adds fallback for model ingestion on older servers * fix: ingestion available check and rock'n roll * feat: workspace plan updated subscription boilerplate * fix: bump the timeout to 2h * feat: handle version limits in publish flows via subscription * feat: align Archicad and Vectorworks with new ingestion flow * chore: onMounted at end of file * fix: logic and ui adjustments * fix: refactoring and permissions * refactor: ingestionStatus renamed to activeIngestions * fix: error handling and notifications * fix: global error handling * chore: general alignment and clean up * fix(vectorworks): now uses capital V * chore: revert codegen --------- Co-authored-by: Björn Steinhagen <88777268+bjoernsteinhagen@users.noreply.github.com> Co-authored-by: Björn Steinhagen --- components/common/ModelNotification.vue | 21 +- components/model/CardBase.vue | 26 +- components/model/Sender.vue | 100 +++++- components/send/Wizard.vue | 84 ++++- .env.example => env.example | 0 lib/bridge/server.ts | 84 ++++- lib/bridge/sketchup.ts | 96 +++-- lib/common/generated/gql/gql.ts | 54 ++- lib/common/generated/gql/graphql.ts | 335 ++++++++++++++---- lib/core/composables/useCheckGraphql.ts | 71 ++++ lib/graphql/mutationsAndQueries.ts | 19 +- .../composables/useModelIngestion.ts | 227 ++++++++++++ lib/ingestion/graphql/mutations.ts | 86 +++++ lib/ingestion/graphql/queries.ts | 17 + lib/models/card/notification.ts | 1 + lib/workspaces/graphql/subscriptions.ts | 7 + store/accounts.ts | 9 + store/hostApp.ts | 180 ++++++++-- 18 files changed, 1230 insertions(+), 187 deletions(-) rename .env.example => env.example (100%) create mode 100644 lib/core/composables/useCheckGraphql.ts create mode 100644 lib/ingestion/composables/useModelIngestion.ts create mode 100644 lib/ingestion/graphql/mutations.ts create mode 100644 lib/ingestion/graphql/queries.ts create mode 100644 lib/workspaces/graphql/subscriptions.ts diff --git a/components/common/ModelNotification.vue b/components/common/ModelNotification.vue index d7c1ab0..8260462 100644 --- a/components/common/ModelNotification.vue +++ b/components/common/ModelNotification.vue @@ -27,16 +27,17 @@ > {{ notification.secondaryCta.name }} - - {{ notification.cta.name }} - +
+ + {{ notification.cta.name }} + +
-
+
@@ -260,11 +262,18 @@ const store = useHostAppStore() const accStore = useAccountStore() const { trackEvent } = useMixpanel() -const props = defineProps<{ - modelCard: IModelCard - project: ProjectModelGroup - canEdit: boolean -}>() +const props = withDefaults( + defineProps<{ + modelCard: IModelCard + project: ProjectModelGroup + canEdit: boolean + ctaDisabled?: boolean + ctaDisabledMessage?: string + }>(), + { + ctaDisabled: false + } +) defineEmits<{ (e: 'manual-publish-or-load'): void @@ -275,6 +284,7 @@ const isSender = computed(() => { }) const buttonTooltip = computed(() => { + if (props.ctaDisabled) return props.ctaDisabledMessage return props.modelCard.progress ? 'Cancel' : isSender.value diff --git a/components/model/Sender.vue b/components/model/Sender.vue index 72b5a20..9f5c0f3 100644 --- a/components/model/Sender.vue +++ b/components/model/Sender.vue @@ -4,6 +4,8 @@ :model-card="modelCard" :project="project" :can-edit="canEdit" + :cta-disabled="ctaDisabled" + :cta-disabled-message="ctaDisabledMessage" @manual-publish-or-load="sendOrCancel" >
@@ -17,7 +19,6 @@ full-width @click.stop="openFilterDialog = true" > - {{ modelCard.sendFilter?.name }}:  {{ modelCard.sendFilter?.summary }} @@ -31,13 +32,18 @@
- Save - - Save & Publish - +
+ + Save & Publish + +
@@ -108,7 +114,7 @@ diff --git a/components/send/Wizard.vue b/components/send/Wizard.vue index 7bc93a5..bb7e45e 100644 --- a/components/send/Wizard.vue +++ b/components/send/Wizard.vue @@ -21,7 +21,6 @@ @search-text-update="updateSearchText" />
-
-
-
- Publish +
+ + Publish +
@@ -55,6 +55,7 @@