refactor(web): collapse the shell boot into the AppWebEntry class

The four free functions in boot.tsx become one kernel class holding what
must exist before cordis: the parsed BootManifest, the ClientModuleSystem
instance, and the loading-page handles. Context/Loader setup runs in
parallel with the immediately-tier prefetch, but entry creation awaits the
prefetch: materialization is tree.import's synchronous require, so
cross-package require edges (i18n -> runtime/client) need every
immediately-tier factory registered first — unbarriered creation raced
10-25% of boots. The kernel adopts the modules entry (writes the
__DSH_MODULES__ slot pre-cordis, creates the entry first, skips its graph
row), and provide('modules') now lives in the adoption apply. apps/web
drops its host-package edges (composition is apps/cli's job).
This commit is contained in:
imccyu
2026-07-25 01:19:30 +08:00
parent 8d4aa73abe
commit 80cd8f54b5
10 changed files with 221 additions and 451 deletions
+2 -2
View File
@@ -3,8 +3,8 @@
* loader holding, module-table seeding, AppRoot gate, plugin assembly — lives
* in @deepseek-ai/dsh-client-web; this file only finds the mount point.
*/
import { bootWebShell } from '@deepseek-ai/dsh-client-web'
import { AppWebEntry } from '@deepseek-ai/dsh-client-web'
const el = document.getElementById('root')
if (el === null) throw new Error('web app: missing #root')
bootWebShell(el)
void new AppWebEntry(el).run()