Repository navigation
fix(hub): target the running profile in copyable commands - #157
Closed
hongkong7530 wants to merge 1 commit into
Closed
hongkong7530 wants to merge 1 commit into
hongkong7530 wants to merge 1 commit into
Conversation
The command the hub shows and copies was pinned to the web profile, and the catalog stamps that same placeholder onto every entry it publishes, so a host serving another profile handed the user a command for the wrong one: DSH Desktop runs the desktop profile, and pasting the command installed into web. The uninstall command omitted --profile entirely, which the CLI rejects. Re-point only the catalog's default placeholder at the profile reported by GET /dsh-plugin-hub/env, leaving a profile a plugin pins for itself (CLI-only plugins such as dsh-tui) untouched, and name the profile when building an uninstall command.
Author
|
i have done a better vision,so later i will push something new |
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.
What changed
The install command the hub shows and copies was pinned to
--profile web, and the catalogstamps that same placeholder onto every entry it publishes. A host serving a different profile
therefore handed the user a command for the wrong profile — DSH Desktop runs the
desktopprofile, so pasting a copied command installed the plugin into
web. The uninstall commandomitted
--profileentirely, which the official CLI rejects outright.Measured against the live catalog: 13448 of 13448 entries carry
dsh plugin --profile web add …in both
install.commandandinstall.githubCommand, and none names another profile.retargetProfile()rewrites only the catalog's blanket placeholder, using the profile reportedby
GET /dsh-plugin-hub/env.dsh-tuigenuinelyneed
--profile dsh-tui, which cannot be inferred from the package name.uninstallCommandOf()builds the uninstall command with the profile, since--profileis arequired option.
/envanswers, no profile is invented: the generated command omits--profileand theUI shows a
<profile>placeholder rather than naming a possibly-wrong one.dsh plugin remove …;it now names the profile too.
Why
Copying a command is the documented escape hatch when an in-app install fails, and for CLI-only
plugins it is the only path. On Desktop it silently targeted the wrong profile.
Verification
npm run check— typecheck (client/server/test), tests, and build all pass.tests/install-command-profile.test.ts(5 tests) covers the rewrite, a pinned profile,the unknown-profile case, and both generated commands.
tests/catalog.test.tspreviously asserted the hardcodedwebfor a generated command; it nowpasses the profile explicitly.
tests/probe.test.tsfail in this environment onmainas well (they exercise areal
githandshake through a non-existent proxy and acurlTLS-revocation fallback); they areunrelated to this change and fail identically on a pristine checkout.
generated commands resolve to
dsh plugin --profile desktop ….Notes
This targets the community hub only. A separate and unrelated issue exists in DSH core:
reconcile()in@deepseek-ai/dsh-plugin-managerskips dependencies that were already presentbefore the run, so an install interrupted between pnpm writing
package.jsonand reconciliationleaves the package installed but absent from
dsh.profile.bundles— it never loads, and re-addingit does not repair the state. Reproducible by killing the install around 3s in;
remove+addfixes it. Happy to file that separately if useful.