From cb4e8acd9fa47730e80b0101e0d0e80cabb9e568 Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Thu, 15 Jan 2026 12:06:20 +0100 Subject: [PATCH 1/2] fix(astrolabe): update Vue component bindings for Vue 3 compatibility The astrolabe app was using Vue 2 style bindings that don't work with @nextcloud/vue 9.x and Vue 3: - NcTextField: Changed from :value/@update:value to v-model - NcSelect: Changed from v-model (with computed prop) to :model-value/@update:model-value The legacy :value and @update:value props were being ignored because @nextcloud/vue 9.x components use modelValue/update:modelValue internally. This caused the search button to remain disabled and the algorithm dropdown to be unresponsive. Co-Authored-By: Claude Opus 4.5 --- third_party/astrolabe/src/App.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/third_party/astrolabe/src/App.vue b/third_party/astrolabe/src/App.vue index 2710539..59a8636 100644 --- a/third_party/astrolabe/src/App.vue +++ b/third_party/astrolabe/src/App.vue @@ -48,19 +48,18 @@
+ @update:model-value="algorithm = $event ? $event.id : 'hybrid'" /> + :max="100" />
From 006a3d95d65b7900ed614dc812f6d8af1169e995 Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Thu, 15 Jan 2026 12:16:08 +0100 Subject: [PATCH 2/2] fix(astrolabe): address review feedback for Vue 3 bindings - Change limit initialization from string '20' to number 20 in App.vue - Update AdminSettings.vue NcTextField to use v-model instead of legacy :value/@update:value bindings - Update AdminSettings.vue NcSelect components to use :model-value with computed getters and @update:model-value for proper object-to-id conversion (same pattern as App.vue) Co-Authored-By: Claude Opus 4.5 --- third_party/astrolabe/src/App.vue | 2 +- .../src/components/admin/AdminSettings.vue | 24 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/third_party/astrolabe/src/App.vue b/third_party/astrolabe/src/App.vue index 59a8636..8ce12c0 100644 --- a/third_party/astrolabe/src/App.vue +++ b/third_party/astrolabe/src/App.vue @@ -443,7 +443,7 @@ export default { algorithm: 'hybrid', showAdvanced: false, selectedDocTypes: [], - limit: '20', + limit: 20, scoreThreshold: 0, loading: false, error: null, diff --git a/third_party/astrolabe/src/components/admin/AdminSettings.vue b/third_party/astrolabe/src/components/admin/AdminSettings.vue index 68f2051..53db507 100644 --- a/third_party/astrolabe/src/components/admin/AdminSettings.vue +++ b/third_party/astrolabe/src/components/admin/AdminSettings.vue @@ -152,19 +152,21 @@
+ class="form-field" + @update:model-value="settings.algorithm = $event ? $event.id : 'hybrid'" />

{{ t('astrolabe', 'Hybrid combines semantic understanding with keyword matching. Semantic finds conceptually similar content. BM25 matches exact keywords.') }}

+ class="form-field" + @update:model-value="settings.fusion = $event ? $event.id : 'rrf'" />

{{ t('astrolabe', 'Only applies to hybrid search. RRF balances results well for most queries. DBSF may work better when keyword matches are over/under-weighted.') }}

@@ -184,14 +186,13 @@
+ class="form-field" />

{{ t('astrolabe', 'Maximum number of results to return per search query (5-100).') }}

@@ -276,6 +277,15 @@ const fusionOptions = computed(() => [ { id: 'dbsf', label: t('astrolabe', 'DBSF - Distribution-Based Score Fusion') }, ]) +// Computed properties for NcSelect (converts between stored ID and option object) +const selectedAlgorithmOption = computed(() => + algorithmOptions.value.find(opt => opt.id === settings.value.algorithm) || algorithmOptions.value[0], +) + +const selectedFusionOption = computed(() => + fusionOptions.value.find(opt => opt.id === settings.value.fusion) || fusionOptions.value[0], +) + // Methods async function loadServerStatus() { loading.value = true