fix: keep rc.6 UI plugins compatible with keyed settings slots (rc.8) - #134
Closed
yaojin3616 wants to merge 1 commit into
Closed
fix: keep rc.6 UI plugins compatible with keyed settings slots (rc.8)#134yaojin3616 wants to merge 1 commit into
yaojin3616 wants to merge 1 commit into
Conversation
rc.7+ made `settings.plugin.item` a keyed slot that requires `options.key`, but legacy rc.6 plugin bundles still register an `id`. Harness rejects the registration with `keyed slot "settings.plugin.item" requires options.key`, which the desktop reports as "Failed to load plugins" and prevents the affected plugin from loading entirely. Shim the minified SlotCore in `dsh-web-frontend/dist/assets/index-*.js` at postinstall time: when the slot is `settings.plugin.item` and the registrant has `id` but no `key`, copy `id` into `key`. Other keyed slots stay strict, and the install is idempotent with a fail-loud vendor-drift check so a future frontend asset shape change cannot silently drop the shim. Fixes #74.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
idis accepted as thekeyfor thesettings.plugin.itemkeyed slot, while keeping explicit keys authoritativepostinstalltime againstdsh-web-frontend/dist/assets/index-*.js, with idempotence and a fail-loud vendor-drift checkRoot cause
Harness rc.6 exposed
settings.plugin.itemas a list slot, so existing third-party bundles register anid. rc.7 made that slot keyed and now requiresoptions.key, causing those bundles to fail during UI startup before the desktop can render:The browser shell bundles its own SlotCore inside
@deepseek-ai/dsh-web-frontend/dist, so the fix has to be applied to the served minified asset, not just the module the unit tests import.Why this differs from PR #75
PR #75 targets
0.1.0-rc.7and patches@deepseek-ai/dsh-client-ui-slotsplus@deepseek-ai/dsh-client-ui-settings-plugins. Currentmainis on0.1.0-rc.8, where@deepseek-ai/dsh-client-ui-slotsno longer exists as a separate package and the slot shim has to live in the served minified bundle. This PR re-aims the same compatibility shim at the rc.8 layout and is intentionally scoped to the slot registration; if the configurable-plugins tab also needs a downstream patch, that should be a follow-up once we can repro the missing-card symptom.Verification
node scripts/install-plugin-compatibility.mjs(twice — confirms idempotence)node --checkon the served frontend assetnpm test— 32 files, 197 tests passednpm run typechecknpm run buildLimitations
A packaged Electron visual launch was not performed because the Electron binary was intentionally not downloaded in this environment. The frontend rewrite deliberately fails installation if a future Harness asset no longer matches the pinned rc.8 shape, so an upgrade cannot silently omit the compatibility shim.
Fixes #74.