dsh-matrix-todo 1.0.0 → 1.1.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
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.0
4
+
5
+ - First-run guide: when the panel opens on an empty store, the client sends
6
+ seven localized onboarding to-dos (one per interaction: add, drag, edit,
7
+ quadrant split, settings, overdue coloring, date picker). The Host writes
8
+ them once behind a new `seeded` flag, so deleting the guide never brings it
9
+ back; an existing list is treated as already seeded (no duplicates for
10
+ upgrades).
11
+ - New `seed` API action: idempotent, accepts localized titles from the client,
12
+ validates them like any other create, and stamps their own creation order.
13
+
14
+ ## 1.0.1
15
+
16
+ - Drop the module-level window guard so the client bundle re-registers after
17
+ hot reload or after the plugin row is disabled and enabled again (the loader
18
+ already de-duplicates by bundle URL).
19
+
3
20
  ## 1.0.0
4
21
 
5
22
  First public release.
package/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  DeepSeek Harness 的侧栏待办插件:主界面是艾森豪威尔矩阵(重要 × 紧急四个象限),可一键切换到「已完成」;数据与界面设置写入本机 profile 下的一个 JSON 文件。
4
4
 
5
5
  - 侧边栏新增入口「四象限待办」,排在自带「待办」之后
6
+ - 首次打开且清单为空时,自动写入一组本地化引导条目(覆盖四个象限、逾期变色与日期面板);删掉后不会再出现
6
7
  - 矩阵视图:立即做 / 计划做 / 委托做 / 别做,四个象限自动撑满面板、各自计数
7
8
  - 拖动四象限中心的圆点即可调整行/列比例,双击圆点恢复均分
8
9
  - 每个象限都能直接点击空白处或底部「+ 添加」就地新增,可为该条设置截止日期
@@ -149,12 +150,15 @@ plugin_manager install_bundle target: <本目录绝对路径>
149
150
  "rowRatio": 0.5,
150
151
  "navLabel": ""
151
152
  },
152
- "reordered": false
153
+ "reordered": false,
154
+ "seeded": true
153
155
  }
154
156
  ```
155
157
 
156
158
  `todos` 的数组顺序就是同象限内的显示顺序。`reordered` 为 `false` 时顺序按创建时间倒序派生(新条目在前);一旦手动拖拽排序,它就变成 `true`,此后数组顺序即你的顺序。`dueDate` 为 `YYYY-MM-DD` 或 `null`。
157
159
 
160
+ `seeded` 表示首次使用引导只写过一次:面板首次打开且清单为空时,会按当前界面语言向 Host 提交 7 条引导待办,Host 写入后把 `seeded` 置为 `true`。之后即使把引导全部删掉,也不会再自动生成。
161
+
158
162
  写盘是「临时文件 + rename」的原子替换,写操作串行排队;文件损坏时会先备份为 `todos.corrupt-<时间戳>.json`,再以空清单 + 默认设置启动。手改文件里的 `settings` 非法值会被忽略并回落到默认值。
159
163
 
160
164
  可在 `cordis.patch.yml` 的插件行里覆盖路径:
@@ -172,6 +176,7 @@ Host 半在 `/matrix-todo/api` 注册 prefix 路由,只接受 POST,并做同
172
176
  | 方法 | body | 说明 |
173
177
  | --- | --- | --- |
174
178
  | `list` | `{}` | 取全部待办与设置 |
179
+ | `seed` | `{ items: [{ title, important, urgent, dueDate? }] }` | 首次使用引导:仅在 `seeded` 为 `false` 时写入,幂等 |
175
180
  | `create` | `{ title, important, urgent, dueDate? }` | 新建 |
176
181
  | `update` | `{ id, title?, important?, urgent?, dueDate? }` | 改字段(含象限标记、截止日期;`dueDate: null` 清除) |
177
182
  | `toggle` | `{ id }` | 完成 / 恢复 |
@@ -180,7 +185,7 @@ Host 半在 `/matrix-todo/api` 注册 prefix 路由,只接受 POST,并做同
180
185
  | `clearCompleted` | `{}` | 清空已完成 |
181
186
  | `saveSettings` | `{ urgentSide?, frame?, radius?, tint?, fontSize?, dueFormat?, titleStyle?, colRatio?, rowRatio?, navLabel? }` | 合并保存界面设置 |
182
187
 
183
- 成功返回 `{ ok: true, result: { todos, settings } }`;失败返回 `{ ok: false, error: { code, message } }`,状态码 `invalid-input` 400 / `not-found` 404 / `io-error` 500。标题去空白后 1–200 字符,清单上限 500 条,圆角 0–24 整数,字号 11–17 整数,`dueDate` 必须是真实存在的 `YYYY-MM-DD` 日期。
188
+ 成功返回 `{ ok: true, result: { todos, settings, seeded } }`;失败返回 `{ ok: false, error: { code, message } }`,状态码 `invalid-input` 400 / `not-found` 404 / `io-error` 500。标题去空白后 1–200 字符,清单上限 500 条,圆角 0–24 整数,字号 11–17 整数,`dueDate` 必须是真实存在的 `YYYY-MM-DD` 日期。
184
189
 
185
190
  ## 文件结构
186
191