@morehao/dsh-github-trending 0.8.15 → 0.8.16

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
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.8.16] - 2026-11-03
4
+
5
+ ### Fixes
6
+
7
+ - **update**: surface restart notice right after in-panel update (#109)
8
+
9
+ **Full Changelog**: https://github.com/morehao/dsh-github-trending/compare/v0.8.15...v0.8.16
10
+
3
11
  ## [v0.8.12] - 2026-11-02
4
12
 
5
13
  ### Refactors
package/client.js CHANGED
@@ -5838,6 +5838,17 @@ function usePluginUpdate() {
5838
5838
  }, [controller]);
5839
5839
  return [state, controller];
5840
5840
  }
5841
+ function isUpdateSettled(state) {
5842
+ return state.status === "applied" || state.status === "restart-required";
5843
+ }
5844
+ function deriveSettledNotice(state, stored, now = Date.now()) {
5845
+ if (!isUpdateSettled(state)) return null;
5846
+ if (stored !== null) return stored;
5847
+ const from = state.view?.currentVersion ?? "";
5848
+ const to = state.view?.latestVersion ?? from;
5849
+ if (to === "") return null;
5850
+ return { from, to, at: now };
5851
+ }
5841
5852
 
5842
5853
  // node_modules/@morehao/dsh-plugin-kit/dist/update-restore.js
5843
5854
  var PENDING_TTL_MS = 24 * 60 * 60 * 1e3;
@@ -6280,6 +6291,11 @@ function apply(ctx) {
6280
6291
  import_react.default.useEffect(() => {
6281
6292
  setPendingUpdate(readPendingUpdate());
6282
6293
  }, []);
6294
+ const [updateState] = usePluginUpdate();
6295
+ import_react.default.useEffect(() => {
6296
+ if (!isUpdateSettled(updateState)) return;
6297
+ setPendingUpdate((current) => current ?? deriveSettledNotice(updateState, readPendingUpdate()));
6298
+ }, [updateState]);
6283
6299
  const openDigest = import_react.default.useCallback((target) => {
6284
6300
  if (target !== void 0) setDigestTarget(target);
6285
6301
  setView("digest");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morehao/dsh-github-trending",
3
- "version": "0.8.15",
3
+ "version": "0.8.16",
4
4
  "description": "GitHub 趋势日报的 DeepSeek Harness 插件:按日 / 周 / 月周期定时 spawn 本地 trendradar 核心,抓取 Trending、生成中文简介与周期总结,并可选把订阅仓库的新 Release 合成中文摘要,一起提交到你的仓库、自动开 PR 合并;内置概览 / 榜单 / 运行记录 / 订阅 / 设置工作台。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",