Compare commits

..
Author SHA1 Message Date
阿白叔 6cd6520bae fix: wait for native workspace projection before opening a conversation
Core regression / Python core, intervention UI and release configuration (push) Successful in 4m20s
Core regression / JavaScript syntax (push) Successful in 10s
Core regression / Python core, intervention UI and release configuration (pull_request) Successful in 3m42s
Core regression / JavaScript syntax (pull_request) Successful in 7s
2026-11-16 11:00:46 +08:00
abaishu0730 d0c07f4f74 feat: BOM 原生核验、Mentor 复用与完整 Harness(#27)
Core regression / Python core, intervention UI and release configuration (push) Successful in 3m43s
Core regression / JavaScript syntax (push) Successful in 12s
包含审查修复及 V1.3.1 实机测试版准备;Mentor 退出超时与 CAD20 仍待实机复核。
2026-11-16 09:53:13 +08:00
3 changed files with 13 additions and 3 deletions

No files matched your search

+1
View File
@@ -154,5 +154,6 @@ jobs:
- name: Intervention panel and bounded model views (no model or network)
run: |
node tools/verify_dsh_incident_panel.mjs
node tools/verify_dsh_dock_startup.mjs
node tools/verify_dsh_model_results.mjs
node tools/verify_dsh_diagnosis_cancel.mjs
+4 -3
View File
@@ -295,7 +295,7 @@ window.__ModuleLoader__.load({id:'@dx/dsh-task',factory:require=>{
tab==='tickets'?h(TicketsPanel,{operations,perform,pending:pending||operations.busy}):h(UsagePanel,{runtime,control,pending})),
tab!=='overview'&&h('p',{'data-testid':'dx-operations-notice',role:'status',style:{fontSize:12,color:secondary,lineHeight:1.8,whiteSpace:'pre-wrap'}},operations.activity?.message||notice||''));
}
return{inject:['slots','sidebarRightTabs','sidebarRight','uiSession','uiWorkspace'],apply(ctx){
return{inject:['slots','sidebarRightTabs','sidebarRight','uiSession','uiWorkspace','workspaces'],apply(ctx){
ctx.effect(()=>{
let live=true,opened='';
const check=()=>fetch('/dx/context').then(r=>r.json()).then(data=>{
@@ -318,10 +318,11 @@ window.__ModuleLoader__.load({id:'@dx/dsh-task',factory:require=>{
if(sessionId){
if(openedSession===sessionId)return;
try{ctx.sidebarRight.openTab('dx-task');if(ctx.sidebarRight.isExpanded()){openedSession=sessionId;return;}}catch{}
}else if(!connecting&&!adopted){
}else if(!connecting&&!adopted&&ctx.workspaces.list.getSnapshot().phase==='ready'){
connecting=true;
fetch('/dx/workspace').then(r=>{if(!r.ok&&r.ok!==undefined)throw Error();return r.json();}).then(value=>{
if(live&&!current.getSnapshot()&&typeof value.workspace_id==='string'){
if(live&&!current.getSnapshot()&&typeof value.workspace_id==='string'&&
ctx.workspaces.list.getSnapshot().items.some(row=>row.workspaceId===value.workspace_id)){
adopted=true;return ctx.uiWorkspace.openWorkspace(value.workspace_id);
}
}).catch(()=>{adopted=false;}).finally(()=>{connecting=false;if(live)queue();});
+8
View File
@@ -4,6 +4,7 @@ import {readFile} from 'node:fs/promises';
import vm from 'node:vm';
let plugin,session,subscriber,expanded=false,openedWorkspace=0,openedTabs=0;
let workspaceSnapshot={phase:'pending',items:[]};
const effects=[];
const sandbox={window:{__ModuleLoader__:{load:value=>{plugin=value;}}},
setTimeout,clearTimeout,setInterval,clearInterval,
@@ -12,6 +13,7 @@ const sandbox={window:{__ModuleLoader__:{load:value=>{plugin=value;}}},
vm.runInNewContext(await readFile(new URL('../integration/dsh/task-plugin/client.js',import.meta.url),'utf8'),sandbox);
const exported=plugin.factory(name=>name==='react'?{createElement:()=>null}:{});
const ctx={slots:{inject:(_name,fn)=>fn(),register:()=>()=>{}},
workspaces:{list:{getSnapshot:()=>workspaceSnapshot}},
effect:(fn)=>{effects.push(fn());},sidebarRightTabs:{register:()=>{}},
sidebarRight:{mounted:{getSnapshot:()=>session,subscribe:fn=>{subscriber=fn;return()=>{};}},
openTab:()=>{if(!session)throw Error('Session seat absent');openedTabs++;expanded=true;},isExpanded:()=>expanded},
@@ -22,6 +24,12 @@ const ctx={slots:{inject:(_name,fn)=>fn(),register:()=>()=>{}},
try{
exported.apply(ctx);
await new Promise(r=>setTimeout(r,150));
assert.equal(openedWorkspace,0,'native workspace adoption must wait for the official client workspace snapshot');
workspaceSnapshot={phase:'ready',items:[]};
await new Promise(r=>setTimeout(r,150));
assert.equal(openedWorkspace,0,'a ready snapshot must actually contain the native workspace before opening');
workspaceSnapshot={phase:'ready',items:[{workspaceId:'owned-workspace'}]};
await new Promise(r=>setTimeout(r,150));
assert.equal(openedWorkspace,1,'fresh page must adopt the owned native workspace once');
assert.equal(expanded,true,'right dock must open after delayed Session adoption');
const previous=openedTabs;