fix: hide native discovery editor immediately on target change

This commit is contained in:
VAIO73
2026-10-17 11:27:16 +00:00
parent e89f2596b2
commit bbe811e873
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -1348,7 +1348,7 @@ export function LxcAppPanel({ vmid, ctIp, onChange, managed, initialData, oci }:
}
// ── Editor ─────────────────────────────────────────────────────
if (editing) {
if (editorOpen && editing) {
const draft = editing.draft
const method = draft.installed_via || ""
const isPackaged = method === "dpkg" || method === "apk"
@@ -134,6 +134,13 @@ async function main() {
assert.ok(text(failed.tree()).includes('nativeScanFailed'))
assert.equal(failed.calls.filter(c => c.url.endsWith('/apps/suggestions') && c.method === 'POST').length, 0)
const editorSwitch = fixture()
editorSwitch.render(); await editorSwitch.settle()
await editorSwitch.button('searchApplications').props.onClick(); editorSwitch.render()
await editorSwitch.button('registerButton').props.onClick(); editorSwitch.render()
editorSwitch.render({vmid: 102})
assert.ok(!text(editorSwitch.tree()).includes('saveButton'), 'old editor must disappear in the very first render of another CT')
const late = fixture()
late.render(); await late.settle(); late.holdScan()
const scan = late.button('searchApplications').props.onClick()