From 0ff95251f5774e6ceb660849f30f946419966b92 Mon Sep 17 00:00:00 2001 From: archipelago Date: Thu, 8 Oct 2026 12:47:40 -0400 Subject: [PATCH] fix: connect AI funding scan to the wallet scanner --- docs/external-access-and-websites.md | 12 ++++++++++++ neode-ui/src/components/AIConnectionModal.vue | 10 +++++++--- .../components/__tests__/AIConnectionModal.test.ts | 7 +++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/docs/external-access-and-websites.md b/docs/external-access-and-websites.md index e726766c..25c22e77 100644 --- a/docs/external-access-and-websites.md +++ b/docs/external-access-and-websites.md @@ -385,3 +385,15 @@ change the allowance, send a payment, start inference, or publish content. API keys use the existing private node credential store and are not passed to AIUI. Focused provider/publishing tests and production qualification are in progress; these changes are not yet deployed or publicly released. + +Provider-focused validation: 20 dashboard/setup/signer tests, 22 AIUI provider +and generation tests, and 22 trusted bridge/integration tests pass. Initial +publishing tests required an AI-connection component stub for their isolated +mounts; the provider default test now checks initial state before the suite's +explicit Claude selection. The full backend suite and production builds remain +pending. Framework still runs the preceding candidate; its management service is +active and no Ollama container exists after cleanup. +The funding modal's Scan action now opens the existing wallet scanner and returns +to funding on close; six focused connection-modal tests pass after that wiring. +The first dashboard production build passed; it will be rebuilt for this final +scanner wiring before deployment. AIUI and isolated backend builds are ongoing. diff --git a/neode-ui/src/components/AIConnectionModal.vue b/neode-ui/src/components/AIConnectionModal.vue index efe82d8f..09b30bfa 100644 --- a/neode-ui/src/components/AIConnectionModal.vue +++ b/neode-ui/src/components/AIConnectionModal.vue @@ -28,7 +28,8 @@

Your draft stays in place when you close this window.

- + + diff --git a/neode-ui/src/components/__tests__/AIConnectionModal.test.ts b/neode-ui/src/components/__tests__/AIConnectionModal.test.ts index 48724442..ccdec6f5 100644 --- a/neode-ui/src/components/__tests__/AIConnectionModal.test.ts +++ b/neode-ui/src/components/__tests__/AIConnectionModal.test.ts @@ -2,8 +2,10 @@ import { mount, flushPromises } from '@vue/test-utils' import { beforeEach, describe, expect, it, vi } from 'vitest' import AIConnectionModal from '../AIConnectionModal.vue' import ReceiveBitcoinModal from '../ReceiveBitcoinModal.vue' +import WalletScanModal from '../WalletScanModal.vue' import { rpcClient } from '@/api/rpc-client' vi.mock('@/api/rpc-client', () => ({ rpcClient: { call: vi.fn() } })) +vi.mock('../WalletScanModal.vue', () => ({ default: { props: ['show'], template: '
' } })) vi.mock('../ReceiveBitcoinModal.vue', () => ({ default: { props: ['show', 'initialMethod'], template: '
' } })) vi.mock('@/views/settings/RoutstrBudgetSection.vue', () => ({ default: { template: '
' } })) const state = () => ({ schema: 1, settings: { provider: 'auto', openai_model: '' }, claude_configured: false, openai_configured: false, local_ready: false, routstr_remaining_sats: 0 }) @@ -18,6 +20,11 @@ describe('AI connection setup', () => { expect(vi.mocked(rpcClient.call).mock.calls.every(([r]) => !['assistant.budget-set', 'system.settings.set'].includes(r.method))).toBe(true) await button(w, 'Top up with ecash').trigger('click') expect(w.findComponent(ReceiveBitcoinModal).props()).toMatchObject({ show: true, initialMethod: 'ecash' }) + w.findComponent(ReceiveBitcoinModal).vm.$emit('scan'); await flushPromises() + expect(w.findComponent(WalletScanModal).props('show')).toBe(true) + expect(w.findComponent(ReceiveBitcoinModal).props('show')).toBe(false) + w.findComponent(WalletScanModal).vm.$emit('close'); await flushPromises() + expect(w.findComponent(ReceiveBitcoinModal).props('show')).toBe(true) w.unmount() })