diff --git a/AppImage/components/lxc-app-panel.tsx b/AppImage/components/lxc-app-panel.tsx index 666009cb..24003d66 100644 --- a/AppImage/components/lxc-app-panel.tsx +++ b/AppImage/components/lxc-app-panel.tsx @@ -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" diff --git a/tests/lxc_updates/test_native_app_discovery_ui.cjs b/tests/lxc_updates/test_native_app_discovery_ui.cjs index 51f759b7..3bb55dc4 100644 --- a/tests/lxc_updates/test_native_app_discovery_ui.cjs +++ b/tests/lxc_updates/test_native_app_discovery_ui.cjs @@ -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()