dsh-git-badge 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,21 @@ npm. 0.6.0 is the first release recorded here.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.13.0] - 2026-09-15
14
+
15
+ ### Added
16
+
17
+ - **A visible seam-absent notice on the input chip.** When `allowBuilds` keeps
18
+ the postinstall from patching, a market install lands chip-working but
19
+ sidebar-off with no message anywhere — dshmarket cannot see host files, and
20
+ the old hint was a hover tooltip nobody finds. Now, once the 5-second boot
21
+ grace proves the seam is genuinely absent, the chip shows
22
+ *sidebar badges off — run `npx dsh-git-badge apply`* with a dismiss **×**.
23
+ The notice is always true and self-resolving: apply + restart makes the seam
24
+ declare and it never renders again. The × means *stop asking this boot* —
25
+ dismissal is session-scoped, so a seam that is still absent asks again at the
26
+ next boot, and the long-form explanation stays on the chip's hover tooltip.
27
+
13
28
  ## [0.12.0] - 2026-09-15
14
29
 
15
30
  ### Removed
package/lib/client.js CHANGED
@@ -703,6 +703,16 @@ window.__ModuleLoader__.load({
703
703
  */
704
704
  let seamHint = null;
705
705
 
706
+ /**
707
+ * Dismissal of the seam-absent notice, deliberately MODULE-level rather
708
+ * than component state: a useState flag would un-dismiss when the chip
709
+ * remounts (a sidebar toggle, a route change), and the × the user just
710
+ * clicked would silently stop meaning anything. Session-scoped on
711
+ * purpose — it resets at the next boot, so a seam that is STILL absent
712
+ * asks again, while one fixed by apply + restart never nags at all.
713
+ */
714
+ let seamNoticeDismissed = false;
715
+
706
716
  function ComposerGitChip({ sessionId }) {
707
717
  const target = sessionId === void 0 ? void 0 : { kind: "session", id: sessionId };
708
718
  // the PR/CI token is always on the chip, so its fetch is not gated
@@ -715,6 +725,10 @@ window.__ModuleLoader__.load({
715
725
  // the PR token's own hover/focus state: it underlines on hover (and on
716
726
  // focus) rather than at rest, and that underline is applied inline below
717
727
  const [linkHover, setLinkHover] = react.useState(false);
728
+ // seamHint is module state set once, 5s after boot; dismissing it needs a
729
+ // re-render that no fetch will schedule, so the × bumps a counter here.
730
+ const [, bumpNotice] = react.useState(0);
731
+ const seamNotice = seamHint !== null && !seamNoticeDismissed ? seamHint : null;
718
732
  const detail = useGitStatus(target, { pr: true, detail: true, enabled: hovered });
719
733
  if (info === void 0 || info.git !== true) return null;
720
734
  // the mark is an element now rather than a leading glyph in the string, so
@@ -738,10 +752,10 @@ window.__ModuleLoader__.load({
738
752
  whiteSpace: "nowrap",
739
753
  cursor: "default"
740
754
  },
741
- // the only in-product message a market user gets when the seam is
742
- // absent: hover the chip you CAN see to learn the one command that
743
- // turns on the rows you cannot. null until the delayed check in
744
- // apply() proves the seam never appeared.
755
+ // the long-form explanation, on hover; the inline seam-notice below is
756
+ // the visible channel (its text is the short form, its title this).
757
+ // null until the delayed check in apply() proves the seam never
758
+ // appeared.
745
759
  title: seamHint === null ? undefined : seamHint,
746
760
  // the card is fetched for a pointer that RESTS here, not one that
747
761
  // merely crosses the chip
@@ -786,6 +800,68 @@ window.__ModuleLoader__.load({
786
800
  onBlur: () => setLinkHover(false),
787
801
  children: prToken
788
802
  }),
803
+ /**
804
+ * The seam-absent notice: the market-install notification for the
805
+ * state a blocked postinstall leaves behind — chip working, sidebar
806
+ * rows structurally off, nothing patched, nothing to restart INTO.
807
+ * It is only ever TRUE (seamHint is set 5s after boot, only after
808
+ * the composed graph is given its chance), and it is self-resolving:
809
+ * apply + restart makes the seam declare, and this never renders
810
+ * again. That is what distinguishes it from the old restart notice,
811
+ * which outlived the restart it asked for. Dismissal is a session
812
+ * value (see seamNoticeDismissed), so the × means "stop asking this
813
+ * boot", never "stop asking forever".
814
+ */
815
+ seamNotice === null
816
+ ? null
817
+ : react_jsx_runtime.jsxs(
818
+ "span",
819
+ {
820
+ style: {
821
+ display: "inline-flex",
822
+ alignItems: "center",
823
+ gap: "6px",
824
+ paddingLeft: "6px",
825
+ borderLeft: "1px solid var(--dsw-alias-border-secondary, #d0d7de)",
826
+ whiteSpace: "normal",
827
+ maxWidth: "320px"
828
+ },
829
+ children: [
830
+ react_jsx_runtime.jsx(
831
+ "span",
832
+ {
833
+ title: seamHint,
834
+ children: "sidebar badges off — run `npx dsh-git-badge apply`"
835
+ },
836
+ "explain"
837
+ ),
838
+ react_jsx_runtime.jsx(
839
+ "button",
840
+ {
841
+ "aria-label": "Dismiss the sidebar-badges notice (returns next boot while the seam is absent)",
842
+ onClick: () => {
843
+ seamNoticeDismissed = true;
844
+ bumpNotice((n) => n + 1);
845
+ },
846
+ style: {
847
+ cursor: "pointer",
848
+ color: "inherit",
849
+ background: "none",
850
+ border: "1px solid var(--dsw-alias-border-secondary, #d0d7de)",
851
+ borderRadius: "4px",
852
+ fontSize: "11px",
853
+ lineHeight: "18px",
854
+ padding: "0 6px",
855
+ flex: "none"
856
+ },
857
+ children: "×"
858
+ },
859
+ "dismiss"
860
+ )
861
+ ]
862
+ },
863
+ "seam-notice"
864
+ ),
789
865
  ]
790
866
  });
791
867
  // No Tooltip primitive (a shell that does not seed it): render the chip
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-git-badge",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Git status badges for DeepSeek Harness: an input-row chip on every install, plus sidebar session-row badges (git status, PR/CI action tokens) after one manual step: `npx dsh-git-badge apply`, then restart dsh web. Event-driven freshness over SSE.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",