fix(client): restore remote settings with lifecycle-aware service injection - #28
Conversation
…pm test works standalone Since 0.8.10 (upload.test.js) and 0.8.12 (session-routing.test.js) import lib/index.js at module scope, a clean `npm ci --legacy-peer-deps` in CI fails with ERR_MODULE_NOT_FOUND: the host half statically imports @deepseek-ai/dsh-tools (peerDependency), whose module graph also loads @deepseek-ai/cordis, dsh-scope, dsh-llm, dsh-session and dsh-timeout. npm never installs peer-only packages under --legacy-peer-deps, so CI could not import the plugin's own host code. Local runs were masking this via profile-linked node_modules. Declare that import-time closure as devDependencies (never shipped: files: lib + cordis.patch.yml). npm ci now installs it for the test environment; production still receives the real peers from the dsh host at load time. Fixes CI on main (red since 0.8.10) and for every PR.
|
Reviewed & CI-fixed. The client-lifecycle change itself is correct and well-tested — here's the state: Code review — approvesVerified against the live dsh 0.1.2-rc.1 client contract (real rc.1 packages + the slot system's declared registration options):
CI was red — but not because of this PRThe 6 failures ( CI fix (pushed to this branch,
|
…1 (PR #28) - client.js: exports.inject=['slots','locale'] hard deps (remove the `if (slots === undefined) return` early-out that skipped registration) - settings.section registers with order:40 (rc.1 list slots sort by `order`; the old priority:40 was a dead field sorting as 0) - conversation.hero + sidebar directoryFlow seats inject independently - sessions/betterSidebar via ctx.inject optional lifecycle; drop the dead WORKSPACES lookup - manifest: dsh.client.inject + peers swap deprecated dsh-client-runtime/dsh-client-ui-workspace for rc.1 dsh-client-ui-renderer/dsh-client-locale @0.1.2-rc.1 - test/client-lifecycle.test.js: 8 VM full-bundle lifecycle tests - CI: declare the host peer import-time closure (dsh-tools/cordis/ dsh-scope/dsh-llm/dsh-session/dsh-timeout) as devDependencies so `npm ci --legacy-peer-deps && npm test` works standalone (main CI was red since 0.8.10) - lockfile regenerated; version bump 0.8.14
Summary
Fix the missing Settings → Remote Workspace page on DSH 0.1.2-rc.1 and profiles using replacement workspace/sidebar components.
slotsandlocaleservices soapply()waits for them instead of permanently returning before slots are available.dsh-client-runtime/ nativedsh-client-ui-workspacemetadata with the current renderer and locale packages; keep npm lockfile peer metadata consistent.sessionsandbetterSidebaras optional, lifecycle-scoped integrations; clear stale sessions when the provider unloads.order: 40for the settings navigation entry and remove the unused workspaces lookup.Validation
node --test test/client-lifecycle.test.js test/i18n.test.js: 12 passed.node check.mjs,node --check lib/client.js,git diff --check: passed.npm ci --legacy-peer-deps --no-audit --no-fundcompleted. Linked the locally installed DSH 0.1.2-rc.1 host peer packages for integration tests;npm test: 87 passed, 0 failed.link:dependency in the existing Web profile; host import and refreshed settings page verified.Related to #26.