Repository navigation
fix(client): restore the GitHub card and add an editable token field - #30
Merged
Merged
Conversation
DSH 0.2.1 serves a settings namespace only for a plugin whose Config carries at least one volatile() field. dsh-github had none, so the settings service skipped the whole namespace and the GitHub row had no editable form at all. githubToken is now that field. tokenSource also gains a config member that auto tries before the credentials file, the environment and the gh CLI, so a token saved on the page is what the host resolves. A volatile field hands the plugin a live reference instead of the stored string, and a Settings write updates that reference in place. liveValue() reads it on every operation, which is also what makes a saved token apply without reloading the plugin. Refs PerryLink#29
The browser half required the browser-side credentials remote, which
DSH 0.2.1 removed: @deepseek-ai/dsh-credentials exports no ./remote,
and nothing else provides that namespace. The client entry therefore
stayed pending, which 0.2.x treats as a fatal web boot, and the
defensive variant returned before ctx.slots.register, so no card ever
appeared in the Plugins panel.
The card now reads and writes the form the page supplies, whose shape
is { state, mutate } rather than the getSnapshot/subscribe pair the old
controller assumed. It registers on plugins.item unconditionally and
renders through the shipped SettingsForm and SettingsSecretField, so
themes and installed skins restyle it.
The page body adds a short guide to the two GitHub token pages. The
summary line stays a plain description, because the list render
supplies no form to read a state from. dsh.client.inject drops the
client packages the card no longer imports.
Refs PerryLink#29
lib/ is generated by tsc and is therefore always LF, while core.autocrlf=true checks everything else out as CRLF. After every build, all 31 lib files tsc rewrote showed up as modified with no content change. The attribute makes the checkout bytes match the build output.
PerryLink
added a commit
that referenced
this pull request
Oct 27, 2026
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.
Checklist
pnpm run typecheck && pnpm test && pnpm run build && pnpm run check:readmesis green (200 passed, 3 skipped)CHANGELOG.mdhas an entry under## [Unreleased]Fixes #29Summary
Fixes #29.
On DSH 0.2.1 the host half works but the card never mounts: the browser half still declares the browser-side credentials remote, which 0.2.1 removed. A pending client entry is a fatal web boot there, and the defensive variant returned before
ctx.slots.register, so the card disappeared without an error.Two further contracts moved with it:
plugins.itemnow hands the entry aformshaped{ state, mutate }, notgetSnapshot()/subscribe(); andsettings.describe()serves a namespace only when its Config exposes a.volatile()field, whichdsh-githubdid not have.The card now reads and writes the page-supplied form, registers on
plugins.itemunconditionally, and renders through the shippedSettingsForm/SettingsSecretField, with a short guide to the classic and fine-grained token pages.Config.githubTokenis the new.volatile()field, read through its live reference per operation;tokenSourcegains aconfigmember thatautotries first.The tradeoff worth a decision: the token now sits in the profile configuration as plain text, which this plugin previously avoided by writing through the credentials seam. The browser has no credentials remote on 0.2.1, so a UI-editable token has to live in configuration today. Happy to switch to a host-side remote if you prefer that direction.
Two small pieces ride along: a
.gitattributespinningeol=lf(on Windows withcore.autocrlf=true, everylib/file a build rewrote showed as modified with no content change), and the README/CHANGELOG updates the doc gate requires for the new config key.