fix: mount the Advisor card on the Plugins page (dsh 0.1.6-alpha.2) - #87
q1692306918 wants to merge 2 commits into
Conversation
Bump every @deepseek-ai/dsh-* peer to the 0.1.6-alpha.2 line and move the client-half declaration's owner package: ui-settings-plugins (which declared the 0.1.5-rc.2 `settings.plugin.item` card slot) -> ui-plugin-manager (the Plugins page, which declares `plugins.bundle.config` / `plugins.row.config`). Sync minimumReleaseAgeExclude to the re-resolved lockfile, and extend the ui-primitives packageExtensions repair: that package's 0.1.6-alpha.2 build still moves its runtime modules to devDependencies, and its closure now also needs `diff` + `simple-icons` (without them the Vitest card suite fails to resolve the import).
The 0.1.6-alpha.2 shell no longer declares the `settings.plugin.item` keyed slot (ui-plugin-config -> ui-plugin-manager). `ctx.slots.inject` waits for a declaration that never lands, so the card's registration became a SILENT no-op: the host half stayed active and healthy while the web card simply never mounted, with no error on either side. Register into the seat the host actually declares - `plugins.bundle.config`, keyed by the bundle package name (`dsh-advisor`), rendered on the bundle's own page in the Plugins panel. That seat is `view: 'page'`-only, so the self-chromed card keeps its shape; its root becomes a `<div>` (the owner renders a `<section>`, not the old card `<ul>`). Adapt to the line's second seam: `agent/created` is now a SERIAL event whose listeners are awaited before creation resolves, and whose payload carries a required `source`. The handler returns `undefined` per the new listener contract and contains its own failures - an advisory-only plugin must never be able to fail the primary agent's creation. Regression pins: the emitted bundle must carry `plugins.bundle.config` and must not carry the removed `settings.plugin.item`; the card spec pins the new keyed seat.
|
Thank you for the Contribution!!! but generally I prefer to wait for the RC to be merged into main and releasing a new version (to prevent the case where someone installs it directly via git, and might end up with an old RC version that doesn't work). I will merge this PR after the RC is released, then release a new version. |
|
Would you like the advisor's provider and model to be per-session? If there's no plan for that on main, I'll just handle it locally on my end — I wanted to check with you first so I don't submit a change that wouldn't be useful.
At 2026-09-20 15:13:38, "BT.Wood(Tang Bo Hao)" ***@***.***> wrote:
btspoony left a comment (omdsh-dev/dsh-advisor#87)
Thank you for the Contribution!!! but generally I prefer to wait for the RC to be merged into main and releasing a new version (to prevent the case where someone installs it directly via git, and might end up with an old RC version that doesn't work). I will merge this PR after the RC is released, then release a new version.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
btspoony
left a comment
There was a problem hiding this comment.
⚠️ Verdict: needs fixes · Confidence 65%
| Findings | Count |
|---|---|
| 🔴 must-fix | 0 |
| 🟠 should-fix | 1 |
| 🔵 nit | 0 |
| ❓ unverified | 2 |
📋 Review
What this PR does: migrates the Advisor card registration from the removed settings.plugin.item seat to plugins.bundle.config keyed by the bundle package name, adapts the now-serial agent/created seam (required payload source, awaited listeners, a throw fails creation), and bumps the dsh peer line to ^0.1.6-alpha.2 (lockfile, release-age exclusions, the dsh-client-ui-primitives workspace repair gaining diff + simple-icons, README badges, docs, two regression pins).
Findings
🟠 README Quick Start still routes web users to the old Settings page
- Evidence:
README.md:23andREADME.zh.md:23— thedsh plugin --profile web add dsh-advisorcomment still reads# web profile (Settings → Advisor card)/# web profile(设置 → Advisor 卡片), while line 16 of the same two files (changed by this PR) now documentssidebar → Plugins → dsh-advisor → Advisor card. - Impact: the copy-paste Quick Start instruction contradicts the mount surface this PR exists to fix; a user following it is sent to the page where the card no longer renders.
- Merge class: should-fix
- Confidence: HIGH
- Fix sketch: update both Quick Start comments to the Plugins route (one line each).
Linked-issue AC
none
✅ Verified
- Seat migration:
plugins.bundle.configis declared bydsh-client-ui-plugin-manager(packages/client/ui-plugin-manager/src/client/slot-contract.ts:21-45at dsh0.1.6-alpha.2), is bundle-name-keyed, isview: 'page'-only, and is rendered by the owner inside a<section>(PluginManagerPage.tsx:466-471);settings.plugin.itemis absent from that revision's settings slot contract and client slot catalog. - Type and peer move: the type-only SlotMap merge and the
dsh.client.injectpackage both move to@deepseek-ai/dsh-client-ui-plugin-manager/client, which exists and re-exports the owner type;PropsRuntime<'plugins.bundle.config'>matches the host owner share ({ view }). - Markup: the card root is now a
<div>under the owner's<section>; droppinglist-style: nonematches the removed<li>root, and no selector mismatch remains. agent/createdseam: serial, awaited and failure-propagating in0.1.6-alpha.2(packages/core/agent/src/runtime-types.ts:248-261,src/index.ts:524-551); the new handler is synchronous, contains its own failures, and explicitly returnsundefined, so an advisory-only plugin cannot veto primary agent creation.- Regression pins are non-tautological:
tests/client-build.test.ts:174-187asserts the emitted registration carriesplugins.bundle.config+dsh-advisorand excludessettings.plugin.item(it would fail on the pre-PR shape);tests/advisor-card.spec.tsx:333-369requires the bundle seat entry and key. - Packaging: all 20
@deepseek-ai/dsh-*peers use^0.1.6-alpha.2with no exception and both README badges follow;minimumReleaseAgeExcludecovers exactly the 59@deepseek-ai/*names resolved in the lockfile, with no third-party exemption andminimumReleaseAgeunchanged. - Supply chain: the only new third-party lock records are
diff@9.0.0andsimple-icons@16.31.0, both integrity-pinned; thepackageExtensionsrepair touches only the local workspace manifest ofdsh-client-ui-primitives(not the published plugin manifest and not a consumer install); no new registry host, lifecycle script,requiresBuildsurface, CI file, or executable was added. - Diff hygiene: the 18 changed files match the PR body's inventory — no unmentioned file, hidden payload, or dynamic evaluation.
- ❓ Registry-side provenance and publication ages of the new dependency records were not verified (static review; no network install).
- ❓ This PR's runtime verification claims (live card mount against a running
0.1.6-alpha.2web profile; the targeted test subset; the 10tests/prepare-release.test.tsfailures) were not reproduced here — the review is static by request.
🗑️ Considered & rejected
minimumReleaseAgeExclude"diverges from the re-resolved lockfile": rejected — recomputed; the exemption list's package-name set is exactly the lockfile's 59 names. 34 entries carry the new0.1.6-alpha.2coordinate while the lock still resolves those names at0.1.5-rc.2(transitive pins), which is the intended line-scoped exemption, not a policy hole.- "72 passed" unsupported: rejected — the four test files contain exactly 72
it/testdefinitions at this head (34 + 8 + 19 + 11) with noskip,onlyor.each, so the stated count matches the checked-in selection. - Knowledge docs still prescribe
settings.plugin.item: real staleness, but.mstar/knowledge/is maintainer-owned process SSOT refreshed at iteration close — handled as a maintainer follow-up (§ Plan to fix), not as a contributor action. - Historical provenance comment naming
ui-plugin-config: rejected — a deliberately pinned historical citation; that package's absence from0.1.6-alpha.2is expected. - Stale banner screenshot: the image contains only the card with no page chrome, so it cannot be shown stale from the file itself; the alt text was updated by this PR. Not filed.
🛠️ Plan to fix
Expand fix plan
1. README.md:23 + README.zh.md:23 — change the `dsh plugin --profile web add dsh-advisor`
comment to the Plugins route, worded consistently with line 16 of both files.
Verify: no "Settings → Advisor" / "设置 → Advisor" route text remains in
README.md / README.zh.md / docs/*.
Maintainer-side (not a contributor requirement):
2. Refresh .mstar/knowledge/architecture-patterns/dsh-plugin-config-card-surface.md and the
knowledge index line to the `plugins.bundle.config` bundle-name seat, marking the
`settings.plugin.item` recipe superseded (knowledge maintenance), so the next card change
cannot re-register into the removed seat.
3. Optional: recapture docs/screenshots/advisor-settings-card.webp on the Plugins page for the
next release notes.|
Correction to the review's Considered & rejected entry on Exact recomputation at this head:
The exemption table's own comment ( |
This PR will be merged after the release of the DSH RC version. |
Root cause
dsh-advisor@0.4.1registers its single UI contribution into thesettings.plugin.itemkeyed slot (src/client/index.ts). That slot does notexist on the 0.1.6-alpha.2 line:
cordis_inspect_query(clientSlots.listSubTree, rootsettings.plugin.item)→
available: false;hit is a stale doc comment in
dsh-client-ui-settings-models'.d.ts);dsh-cordis-client-runner, generated from theclient packages'
slot-contract.ts) listsplugins.item,plugins.bundle.configandplugins.row.configinstead, declared bydsh-client-ui-plugin-manager— the package that replaceddsh-client-ui-plugin-config.ctx.slots.inject(key, cb)runs the callback when the declaration lands, so aregistration into a seat nobody declares is a silent no-op: the host half
stays
activeand healthy while the card never mounts, and nothing throws oneither side. That is why the plugin looked "installed but invisible".
The fix
plugins.bundle.config, keyed by thebundle package name (
dsh-advisor; the page renders the entry withentryKey = pkg.name). That seat isview: 'page'-only, so theself-chromed card keeps its shape;
plugins.row.config(
dsh-advisor#advisor) was the alternative, but it also owes aview: 'summary'one-liner and this bundle's card edits the wholebundle's
advisorconfiguration.@deepseek-ai/dsh-client-ui-plugin-manager/client, and the peer/dsh.client.injectpackage moves with it.
AdvisorCardPropsbecomesPropsRuntime<'plugins.bundle.config'>.<div>: the owner renders a<section>, not the old card<ul>(list-style: nonedropped with it).agent/createdis now serial — the payload requiressource, and listeners are awaited before creation resolves; a throwfails creation. The handler returns
undefinedper the new listenercontract and now contains its own failures (logged, never propagated): an
advisory-only plugin must not be able to fail the primary agent's startup.
@deepseek-ai/dsh-*peer bumped to^0.1.6-alpha.2,minimumReleaseAgeExcludesynced to the re-resolved lockfile, README badgesupdated.
pnpm-workspace.yaml'sui-primitivesmetadata repair gainsdiff+simple-icons: that package's 0.1.6-alpha.2 build still moves itsruntime modules to
devDependencies, and without the two new modules theVitest card suite fails with
Failed to resolve import "diff".Verification
pnpm typecheck→ 0;pnpm build→ 0 (lib/client.jsemitted);pnpm vitest run tests/advisor-card.spec.tsx tests/client-build.test.ts tests/integration.test.ts tests/settings-live.test.ts→ 72 passed;pnpm test→ 371 passed, 10 failed — all 10 intests/prepare-release.test.ts, which installs a#!/bin/shgit shim intothe fixture
PATH. On Windows an extensionless POSIX script is notexecutable, so the shim never intercepts and the real
gitanswers; thefile and
scripts/prepare-release.mjsare untouched by this PR (fails atHEADtoo on this host, passes on the Linux CI runner);linked in: client
Slots.listSubTreerootplugins.bundle.configreportsavailable: truewithoccupants: [{ key: "dsh-advisor", active: true }].Regression pins
tests/client-build.test.tsasserts the emitted bundle carriesplugins.bundle.configand notsettings.plugin.item, so the next seatmove fails the build gate instead of disappearing at runtime.
tests/advisor-card.spec.tsxpins the new keyed seat and key.Notes for review
dsh webneeds a restart to pick up thenew module generation; the client half is served fresh (verified live above).
docs/screenshots/advisor-settings-card.webpstill shows the old settingspage — worth re-capturing on the new surface before merging.
CHANGELOG.mdis generated from git log at release prep, so nothing waswritten there.