@evandu/super-pi 0.1.228 → 0.1.230

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.
Files changed (40) hide show
  1. package/dist/client/.super-pi-client-sources.json +7 -7
  2. package/dist/client/assets/{CodeMirrorEditor-CxXNu7GH.js → CodeMirrorEditor-CdH83gXm.js} +2 -2
  3. package/dist/client/assets/{dist-Dz3IKScu.js → dist-4oqeKAJs.js} +1 -1
  4. package/dist/client/assets/{dist-DJBS8YA6.js → dist-BIoUtFoO.js} +1 -1
  5. package/dist/client/assets/{dist-DRnA8Kcg.js → dist-BRd0MY6g.js} +1 -1
  6. package/dist/client/assets/{dist-BpSOZduy.js → dist-BUpGK7Wx.js} +1 -1
  7. package/dist/client/assets/{dist-CaZy3sqX.js → dist-Bd15gAzx.js} +1 -1
  8. package/dist/client/assets/{dist-B0pL2s9O.js → dist-BfIoLWsG.js} +1 -1
  9. package/dist/client/assets/{dist-DgSnOG8y.js → dist-BxYCi1Ci.js} +1 -1
  10. package/dist/client/assets/{dist-DsybCJLu.js → dist-C115lC0h.js} +1 -1
  11. package/dist/client/assets/{dist-BtgsKGbq.js → dist-C2tHyY0J.js} +1 -1
  12. package/dist/client/assets/{dist-Do27T1qW.js → dist-C6kevFTa.js} +1 -1
  13. package/dist/client/assets/{dist-DmnIdTvT.js → dist-C_OkoC2r.js} +1 -1
  14. package/dist/client/assets/{dist-D127yGCt.js → dist-C_eX0zQ_.js} +1 -1
  15. package/dist/client/assets/{dist-COPu8Vm9.js → dist-CgnYxIkq.js} +1 -1
  16. package/dist/client/assets/{dist-DMSAfmmB.js → dist-CzuEzEPN.js} +1 -1
  17. package/dist/client/assets/{dist-D0ju5zPn.js → dist-DmhzFjHs.js} +1 -1
  18. package/dist/client/assets/{dist-D55pWayC.js → dist-Dw21zOyP.js} +1 -1
  19. package/dist/client/assets/{dist-CpR-RFPW.js → dist-DxruSi9F.js} +1 -1
  20. package/dist/client/assets/{dist-C2XjTF4u.js → dist-DyNzjZtx.js} +1 -1
  21. package/dist/client/assets/{dist-BOEvTs9l.js → dist-Ms7w8NQJ.js} +1 -1
  22. package/dist/client/assets/{dist-BtlJzzIK.js → dist-Qvx5Yx_1.js} +1 -1
  23. package/dist/client/assets/{dist-BKlkCgMf.js → dist-m4X84SYg.js} +1 -1
  24. package/dist/client/assets/{dist-DZe_6qck.js → dist-uzU0O2CO.js} +1 -1
  25. package/dist/client/assets/{index--Y4BWQa7.js → index-Do6vTy5G.js} +56 -56
  26. package/dist/client/assets/{index-DIinpKE8.css → index-ZZn2vRR_.css} +1 -1
  27. package/dist/client/index.html +2 -2
  28. package/dist/server/application/conversation-service.d.ts +13 -8
  29. package/dist/server/application/conversation-service.js +13 -8
  30. package/dist/server/git.d.ts +27 -2
  31. package/dist/server/git.js +163 -19
  32. package/dist/server/http-server.js +79 -13
  33. package/dist/server/runtime.js +2 -3
  34. package/dist/server/store.js +4 -2
  35. package/dist/server/types.d.ts +9 -6
  36. package/dist/shared/archive-decisions.d.ts +23 -16
  37. package/dist/shared/archive-decisions.js +38 -26
  38. package/dist/shared/project-overview.d.ts +4 -3
  39. package/dist/shared/project-overview.js +4 -3
  40. package/package.json +1 -1
@@ -1,33 +1,40 @@
1
- // 归档与未拍板的决策 —— 两边共用的判据。
1
+ // The archive, and the decisions nobody made - one predicate, two ends.
2
2
  //
3
3
  // WHY THIS FILE EXISTS.
4
4
  //
5
- // 归档会牵动三件事,而它们数的是同一批例外:
5
+ // An archive touches three things, and all three count the same exceptions:
6
6
  //
7
- // 1. 归档前告诉用户「还有 N 个未拍板的决策,归档后它们会作废」(客户端的确认框);
8
- // 2. 归档后把那些决策作废(服务端;记录留下,状态改掉);
9
- // 3. 决策作废之后,那个项目归到历史还是留在当前(服务端判视图,客户端照着判)。
7
+ // 1. Before the archive, tell the reader that this archive throws N decisions away
8
+ // (the confirmation box in the client);
9
+ // 2. After the archive, dismiss those decisions (the server; the record stays, only its
10
+ // status changes);
11
+ // 3. Once the decisions are dismissed, the project belongs to history or to the current view
12
+ // (the server decides which; the client applies the same rule).
10
13
  //
11
- // 三件事要是各写一遍判据,就会各写错一遍 —— 提醒说 3 条、作废掉 2 条、视图又按第 4 条算。
12
- // 所以判据只写一次,两端都调它。
14
+ // If each of the three wrote its own predicate, each of the three would get it wrong: the
15
+ // warning says three, the dismissal drops two, and the view files the third somewhere else.
16
+ // So the predicate is written once, and both ends call it.
13
17
  //
14
- // 一条判据贯穿全篇:**未拍板的决策 = 用户的决定 = 项目上 status 为 open 的 boss 级例外**
15
- // (没有 audience 的旧记录也算,那是当年的默认受众)。supervisor 级的是团队内部的事,不是
16
- // 用户的待办,归档不碰它,视图也不为它留位置。
18
+ // ONE PREDICATE RUNS THROUGH THE WHOLE FILE: **a decision nobody made = the reader's own
19
+ // decision = an open boss-level case on a project** (a case with no audience counts too - that
20
+ // was the default audience back then). A supervisor-level case is the team's business, not the
21
+ // reader's to-do: the archive does not touch it, and the view does not make room for it.
17
22
  import { isOpenUserDecision, userProjectDecisions } from "./project-overview.js";
18
23
  /**
19
24
  * THE WORDS THE RECORD CARRIES WHEN AN ARCHIVE THROWS THE DECISION AWAY.
20
25
  *
21
- * 作废也是保留:例外**留在** `p.escalations` 里,原因、决定、决定时间都在,可查可导出;
22
- * 改的只是**状态**。所以这句话要写得像人话,也要说清是谁干的 —— 是用户自己归档了会话,
23
- * 决策才随之作废的。
26
+ * A dismissal is a qualification, not a deletion: the case STAYS in `p.escalations`, with the
27
+ * reason, the decision and the moment in it - searchable, exportable. What changes is the
28
+ * STATUS. So the sentence has to read like a person wrote it, and it has to say who did it: the
29
+ * reader archived the session, and the decision went with it.
24
30
  */
25
31
  export const ARCHIVED_DECISION_REASON = "用户归档了负责人会话,未拍板的决策随之作废。";
26
32
  /**
27
- * 每个会话背着几条未拍板的决策 —— 通过它负责的项目算。
33
+ * HOW MANY DECISIONS EACH SESSION CARRIES - counted through the projects it leads.
28
34
  *
29
- * 一个项目可以有多条未决的用户级例外,它们都记在这个项目的**负责人会话**名下:那个会话是
30
- * 项目的领导,决策是向它要来的,也是它这一摊的事。会话被归档,这个项目就没人管了。
35
+ * A project can hold several open cases, and all of them are counted on that project's OWNER
36
+ * SESSION: that session is the project's leader, the cases were raised against it, and they are
37
+ * its business. Once the session is archived, the project has nobody left.
31
38
  */
32
39
  export function pendingUserDecisionsByOwner(projects) {
33
40
  const counts = {};
@@ -43,9 +50,10 @@ export function pendingUserDecisionsByOwner(projects) {
43
50
  return counts;
44
51
  }
45
52
  /**
46
- * 这批会话被归档时,有几条未拍板的决策会跟着作废。
53
+ * HOW MANY DECISIONS THIS ARCHIVE THROWS AWAY.
47
54
  *
48
- * 树里每一个会话都算:负责人会话在树里,它负责的项目上的未决决策就归零。
55
+ * Every session in the tree counts: an owner session in the tree means the projects it leads
56
+ * lose their pending decisions.
49
57
  */
50
58
  export function pendingUserDecisionsForTree(counts, conversationIds) {
51
59
  if (!counts)
@@ -58,16 +66,20 @@ export function pendingUserDecisionsForTree(counts, conversationIds) {
58
66
  /**
59
67
  * THE DISMISSAL: archiving a leader session throws away the decisions that were waiting on it.
60
68
  *
61
- * 判据只有一条:**负责人会话在这次归档的会话树里** ⇒ 那个项目从此没人管 ⇒ 它欠用户的
62
- * 未决决策作废。三件事不做:
69
+ * There is one predicate: **the owner session is in the tree being archived** means the project
70
+ * has nobody left to run it, so the decisions it owes the reader go with it. Three things are
71
+ * NOT done:
63
72
  *
64
- * - **别的项目的例外不动。** 别人家的项目跟这次归档没关系。
65
- * - **supervisor 级的不作废。** 那是团队内部的事,用户从来没被问过。
66
- * - **记录不删。** 例外留在 `p.escalations` 里,`status` 变成 `dismissed`,`decision` 写下
67
- * 为什么作废,`resolvedAt` 记下什么时候。作废是定性,不是消失。
73
+ * - **Another project's cases are left alone.** Somebody else's project is not this archive's
74
+ * business.
75
+ * - **Supervisor-level cases are left alone.** That is the team's business; the reader was
76
+ * never asked.
77
+ * - **No record is deleted.** The case stays in `p.escalations`, its `status` becomes
78
+ * `dismissed`, `decision` says why it went, and `resolvedAt` says when. A dismissal is a
79
+ * qualification, not a disappearance.
68
80
  *
69
- * 返回的是同样长、同样的顺序的一份列表:**没被动过的项目是同一个对象**,动了的项目是新对象。
70
- * 调用方靠这个比较就知道哪些要落盘。
81
+ * The result is a list of the same length and the same order: an untouched project is the SAME
82
+ * object, a touched one is a new object. That is how the caller knows which ones to persist.
71
83
  */
72
84
  export function dismissArchivedOwnerDecisions(projects, archivedConversationIds, stamp, reason = ARCHIVED_DECISION_REASON) {
73
85
  const archived = new Set(archivedConversationIds);
@@ -43,10 +43,11 @@ export type OverviewProject = {
43
43
  };
44
44
  };
45
45
  /**
46
- * 一条例外是不是「用户还欠着一个决定」。
46
+ * IS THIS CASE STILL A DECISION THE READER OWES?
47
47
  *
48
- * 一条判据,全篇通用:`status` 是 open(还没结),受众是 boss(或者是没写 audience 的旧记录,
49
- * 那是当年的默认受众)。supervisor 级的是团队内部的事,用户从来没被问过,所以不算。
48
+ * One predicate, used everywhere: the case is still OPEN, and it is addressed to the BOSS (or it
49
+ * carries no audience at all - that was the default audience back then). A supervisor-level case
50
+ * is the team's business: the reader was never asked, so it is not theirs to answer.
50
51
  */
51
52
  export declare function isOpenUserDecision(item: OverviewDecision): boolean;
52
53
  /** Internal coordination is not a request for the user's attention. */
@@ -1,8 +1,9 @@
1
1
  /**
2
- * 一条例外是不是「用户还欠着一个决定」。
2
+ * IS THIS CASE STILL A DECISION THE READER OWES?
3
3
  *
4
- * 一条判据,全篇通用:`status` 是 open(还没结),受众是 boss(或者是没写 audience 的旧记录,
5
- * 那是当年的默认受众)。supervisor 级的是团队内部的事,用户从来没被问过,所以不算。
4
+ * One predicate, used everywhere: the case is still OPEN, and it is addressed to the BOSS (or it
5
+ * carries no audience at all - that was the default audience back then). A supervisor-level case
6
+ * is the team's business: the reader was never asked, so it is not theirs to answer.
6
7
  */
7
8
  export function isOpenUserDecision(item) {
8
9
  return item.status === "open" && (item.audience === "boss" || item.audience === undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evandu/super-pi",
3
- "version": "0.1.228",
3
+ "version": "0.1.230",
4
4
  "description": "Web control plane and companion for Pi",
5
5
  "license": "MIT",
6
6
  "type": "module",