Skip to content

Releases: MYiYang/dsh-git-branch

v0.2.1 — client module registers under the package name

Choose a tag to compare

@MYiYang MYiYang released this 26 Oct 05:27

Patch release: the client half now registers under the package name.

Why

The Host composes client-module rows from Loader row names (exactPackageSpecifier), and the browser looks the factory up by that same specifier. client.js still registered as dsh-git-branch, so the chip could not be located — and when both identities were served, the bundle executed twice and tripped the duplicate-factory guard.

Fixed

  • client.js registers as dsh-git-branch-plugin (equal to package.json.name and to the Loader row in cordis.patch.yml).

Upgrade

npm i dsh-git-branch-plugin@0.2.1

v0.2.0 — Git branch chip, branch table and commit graph

Choose a tag to compare

@MYiYang MYiYang released this 26 Oct 03:02

First public release of dsh-git-branch, the DSH Web plugin that puts Git into the composer.

What it does

  • Branch chip in the composer control row (conversation.input.left); hidden outside a Git repository, shows HEAD@<short> on a detached HEAD.
  • Four-column branch table on click: branch, upstream, ahead/behind (↑2 ↓1), last commit — local rows first, then remote rows, with search above 8 branches.
  • Switching local branches only (git checkout); remote rows stay read-only, so a click never detaches HEAD.
  • Read-only commit graph with lanes, dots, ref badges, subject, hash, author and date (up to 200 commits across all refs).
  • Freshness: re-read on a 15 s cadence while visible, on focus, on visibility change and after a switch.
  • Host half serves one trust-fenced POST /git-branch/api/{status,checkout,graph} route; the directory always comes from the live session, never from the request.

Install

�ash npm i dsh-git-branch-plugin dsh plugin --profile web add dsh-git-branch-plugin

Add dsh-git-branch-plugin to dsh.profile.bundles in ~/.dsh/profiles/web/package.json, restart DSH, then refresh the Harness page.

Checks

  • npm test — 28 passing tests (git layer against throwaway repositories, graph parser/layout, and the real route through apply).
  • Verified install from the registry: 11 files, host half imports and exports apply/inject.

npm: https://www.npmjs.com/package/dsh-git-branch-plugin