Skip to content

fix: support DSH 0.2 and wait for input slots - #4

Open
ReappealXy wants to merge 1 commit into
BeiZi6:mainfrom
ReappealXy:fix/dsh-0.2-compatibility
Open

ReappealXy wants to merge 1 commit into
BeiZi6:mainfrom
ReappealXy:fix/dsh-0.2-compatibility

Conversation

@ReappealXy

Copy link
Copy Markdown

DSH Desktop 2.0.18 (runtime 0.2.1-rc.2) disables the installed plugin because its webserver peer range only accepts 0.1.x. Separately, the indicator can disappear when the client starts before the slots service is available: apply() returns once and never registers the indicator.

This change:

  • Retains the existing 0.1.x peer range and adds ^0.2.1-rc.2. The HTTP route API used by this plugin still works in that runtime.
  • Registers the indicator through ctx.inject(['slots'], ...), with registration cleanup owned by the injected scope.
  • Adds client lifecycle and host quota-route regression tests, an npm test command, and English/Chinese compatibility notes.

Validation:

  • node --test: both tests pass, including delayed slot availability, registration cleanup, credential-reference lookup and three-window quota parsing with a mocked upstream response.
  • Installed DSH compatibility evaluator accepts the updated manifest without an exemption; old 0.1.0-rc.6 and 0.1.7-rc.2 declarations remain accepted.
  • Integration against the actual Cordis 4.0.5 and dsh-host-webserver 0.2.1-rc.2 modules: the local HTTP quota route returns three windows and is removed on disposal.
  • A live quota GET through the installed plugin and DSH credential provider returned HTTP 200 and three quota windows. No credentials are included in this PR.

The desktop UI has not yet been checked after a full application restart. Quota calculations and visual styling are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant