@evandu/super-pi 0.1.228 → 0.1.231
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/dist/client/.super-pi-client-sources.json +8 -8
- package/dist/client/assets/{CodeMirrorEditor-CxXNu7GH.js → CodeMirrorEditor-DID93847.js} +2 -2
- package/dist/client/assets/{dist-B0pL2s9O.js → dist-3Pg6D38j.js} +1 -1
- package/dist/client/assets/{dist-CaZy3sqX.js → dist-B6rCaeRi.js} +1 -1
- package/dist/client/assets/{dist-C2XjTF4u.js → dist-BKrl_5gD.js} +1 -1
- package/dist/client/assets/{dist-BKlkCgMf.js → dist-BTSVYElY.js} +1 -1
- package/dist/client/assets/{dist-DMSAfmmB.js → dist-BV3vRZ2y.js} +1 -1
- package/dist/client/assets/{dist-D127yGCt.js → dist-Bv7cRIVR.js} +1 -1
- package/dist/client/assets/{dist-DRnA8Kcg.js → dist-C1xMWmS1.js} +1 -1
- package/dist/client/assets/{dist-BtgsKGbq.js → dist-C5DwUAF0.js} +1 -1
- package/dist/client/assets/{dist-DsybCJLu.js → dist-CP9KnSJ0.js} +1 -1
- package/dist/client/assets/{dist-DmnIdTvT.js → dist-C_rYZ4Ky.js} +1 -1
- package/dist/client/assets/{dist-BtlJzzIK.js → dist-CbrabxHt.js} +1 -1
- package/dist/client/assets/{dist-BOEvTs9l.js → dist-Cs3DwIND.js} +1 -1
- package/dist/client/assets/{dist-BpSOZduy.js → dist-DAOEPk-0.js} +1 -1
- package/dist/client/assets/{dist-DJBS8YA6.js → dist-DCp9UGuI.js} +1 -1
- package/dist/client/assets/{dist-CpR-RFPW.js → dist-DIxMpUkq.js} +1 -1
- package/dist/client/assets/{dist-DgSnOG8y.js → dist-DOAMUZ7W.js} +1 -1
- package/dist/client/assets/{dist-DZe_6qck.js → dist-DZ2c3_-S.js} +1 -1
- package/dist/client/assets/{dist-Dz3IKScu.js → dist-Df4Kt0qp.js} +1 -1
- package/dist/client/assets/{dist-COPu8Vm9.js → dist-IwOdQEYa.js} +1 -1
- package/dist/client/assets/{dist-D0ju5zPn.js → dist-LTYjIRRC.js} +1 -1
- package/dist/client/assets/{dist-D55pWayC.js → dist-gxPEZLSf.js} +1 -1
- package/dist/client/assets/{dist-Do27T1qW.js → dist-hbrdp5Te.js} +1 -1
- package/dist/client/assets/{index-DIinpKE8.css → index-ZZn2vRR_.css} +1 -1
- package/dist/client/assets/{index--Y4BWQa7.js → index-pgCioXy9.js} +56 -56
- package/dist/client/index.html +2 -2
- package/dist/server/application/conversation-service.d.ts +13 -8
- package/dist/server/application/conversation-service.js +13 -8
- package/dist/server/git.d.ts +27 -2
- package/dist/server/git.js +163 -19
- package/dist/server/http-server.js +79 -13
- package/dist/server/runtime.js +2 -3
- package/dist/server/store.js +4 -2
- package/dist/server/types.d.ts +9 -6
- package/dist/shared/archive-decisions.d.ts +23 -16
- package/dist/shared/archive-decisions.js +38 -26
- package/dist/shared/project-overview.d.ts +4 -3
- package/dist/shared/project-overview.js +4 -3
- 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.
|
|
8
|
-
//
|
|
9
|
-
//
|
|
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
|
-
//
|
|
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
|
-
//
|
|
15
|
-
//
|
|
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
|
-
*
|
|
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
|
-
*
|
|
66
|
-
* -
|
|
67
|
-
*
|
|
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
|
-
*
|
|
49
|
-
*
|
|
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
|
-
*
|
|
5
|
-
*
|
|
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);
|