@takagaki/cortex-decisions-viewer 0.12.47 → 0.12.48
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/render.js +72 -10
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -966,7 +966,7 @@ function sanitizeRegisteredNow(v) {
|
|
|
966
966
|
* 写し忘れても赤くならなかったので、突き合わせは viewer/test/state-vocab-parity.test.mjs。
|
|
967
967
|
*/
|
|
968
968
|
const STATE_STATUSES = {
|
|
969
|
-
reachable: ["ok", "not_in_channel", "missing_scope", "no_token", "unreachable", "unknown", "not_in_space", "no_credentials", "no_consent", "transcripts_api_disabled", "no_access_policy", "speaker_attribution_off", "folder_not_granted"],
|
|
969
|
+
reachable: ["ok", "not_in_channel", "missing_scope", "no_token", "unreachable", "unknown", "not_in_space", "no_credentials", "admin_approval_pending", "no_consent", "transcripts_api_disabled", "no_access_policy", "speaker_attribution_off", "folder_not_granted"],
|
|
970
970
|
ingested: ["ok", "failed", "skipped"],
|
|
971
971
|
// 案件カレンダーは作れたか(tools #427)。行の描画は #428。ここに無いと、中央が報告した
|
|
972
972
|
// 「作成済み」の行が overlay に届く前に落ちて、画面は永久に「作成中」のまま
|
|
@@ -1931,7 +1931,7 @@ const BAD_STATE_STATUSES = {
|
|
|
1931
1931
|
// 案件カレンダー(tools #427)。**`requested` は中立**(依頼を受けた・作成中)で悪くない。
|
|
1932
1932
|
// 入れると、押した直後の 15 分が全部⚠️になる
|
|
1933
1933
|
calendar: ["failed"],
|
|
1934
|
-
reachable: ["not_in_channel", "missing_scope", "no_token", "unreachable", "not_in_space", "no_credentials", "no_consent", "transcripts_api_disabled", "no_access_policy", "speaker_attribution_off", "folder_not_granted"],
|
|
1934
|
+
reachable: ["not_in_channel", "missing_scope", "no_token", "unreachable", "not_in_space", "no_credentials", "admin_approval_pending", "no_consent", "transcripts_api_disabled", "no_access_policy", "speaker_attribution_off", "folder_not_granted"],
|
|
1935
1935
|
};
|
|
1936
1936
|
/**
|
|
1937
1937
|
* 案件カレンダーの ID の形か(#428)。
|
|
@@ -3739,6 +3739,12 @@ a.ds-tile:hover { text-decoration: none; }
|
|
|
3739
3739
|
(flex: 1 1 100%)——状態バッジの横に押し込むと、いちばん読ませたい一文が
|
|
3740
3740
|
カード幅に負けて省略される。状態の語より弱く、しかし読める大きさで出す */
|
|
3741
3741
|
.ds-gate-help { flex: 1 1 100%; margin: 4px 0 0; font-size: 12px; line-height: 1.7; color: #6b7280; }
|
|
3742
|
+
/* 管理者への依頼文(#521)。手順が複数行あるので details に畳む——開いたまま出すと、
|
|
3743
|
+
1行のはずの案内(.ds-gate-help / .ds-probe-help)が一覧を占領する */
|
|
3744
|
+
.ds-gate-request { margin-top: 4px; }
|
|
3745
|
+
.ds-gate-request > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
|
|
3746
|
+
.ds-gate-request[open] > summary { margin-bottom: 6px; }
|
|
3747
|
+
.ds-gate-request-line { margin: 2px 0; font-size: 12px; line-height: 1.7; color: #6b7280; }
|
|
3742
3748
|
/* 「接続を確認」を押した結果(2026-08-19)。**必ず自分の行を占める**(flex: 1 1 100%)。
|
|
3743
3749
|
夜間のスナップショットの状態バッジと**同時に2つの判定を並べない**ため、押したあとは
|
|
3744
3750
|
状態バッジをこの中の判定へ置き換える(同じ画面で「⚠️」と「接続OK」が並ぶのが、
|
|
@@ -6176,6 +6182,30 @@ ${calendarAddUrl.toString()}
|
|
|
6176
6182
|
cls: "ds-gate-muted",
|
|
6177
6183
|
help: "管理者の設定が済むと読み取りが始まります。",
|
|
6178
6184
|
},
|
|
6185
|
+
// HTTP 403(#521)。アプリはスペースに追加済みだが、**顧客の Google Workspace 管理者**が
|
|
6186
|
+
// Marketplace からの管理者インストールをまだ済ませていない。not_in_space(スペースの
|
|
6187
|
+
// メンバーが直せる)にも no_credentials(艦隊側の鍵が無い=顧客に打つ手が無い)にも
|
|
6188
|
+
// 寄せない——直せるのが「顧客の管理者」という、どちらとも別の人・別の操作だから。
|
|
6189
|
+
// **機械語(permission_denied)は出さない**(#521 で分類できたので、もう「不明」ではない)。
|
|
6190
|
+
//
|
|
6191
|
+
// 依頼文(手順つき)は長いので details に畳む。**help がそのまま summary の文になる**
|
|
6192
|
+
// (gateHelpNodes・#521)——「帯は症状・行は一手」の1文は details の外に出さなくても
|
|
6193
|
+
// summary は常に見えるので、開かなくても次の一手は読める。行の補足は最大1段の約束
|
|
6194
|
+
// (github-state-reason.test.mjs)を守るため、help と request を別々の要素にしない
|
|
6195
|
+
"admin_approval_pending": {
|
|
6196
|
+
text: "管理者の承認待ち",
|
|
6197
|
+
cls: "ds-gate-warn",
|
|
6198
|
+
help: "貴社の Google Workspace 管理者がこのアプリを承認すると、読み取りが始まります。",
|
|
6199
|
+
request: {
|
|
6200
|
+
lines: [
|
|
6201
|
+
"貴社の Google Workspace 管理者に、次の手順で「Cortex by Classmethod」の利用承認をご依頼ください。",
|
|
6202
|
+
"1. Google 管理コンソール(admin.google.com)を開く",
|
|
6203
|
+
"2. 「アプリ」→「Google Workspace Marketplace アプリ」を開く",
|
|
6204
|
+
"3. 「アプリを追加」から「Cortex by Classmethod」を検索する",
|
|
6205
|
+
"4. 組織全体(または該当の組織部門)へのインストールを選び、データへのアクセスを許可する",
|
|
6206
|
+
],
|
|
6207
|
+
},
|
|
6208
|
+
},
|
|
6179
6209
|
// --- ここから Microsoft 365(#335)。**値の正本は infra 側の語彙表**
|
|
6180
6210
|
// (slack-gate.mjs の SLACK_GATE_VALUES と connection-state-keys.mjs の
|
|
6181
6211
|
// REACHABLE_STATUSES)で、1対1の一致を infra のテストと
|
|
@@ -6459,6 +6489,35 @@ ${calendarAddUrl.toString()}
|
|
|
6459
6489
|
if (s.gate == null || s.gate === "") return DS_GATE_PENDING;
|
|
6460
6490
|
return DS_GATE[s.gate] || DS_GATE["unknown"];
|
|
6461
6491
|
}
|
|
6492
|
+
/**
|
|
6493
|
+
* dsGateOf が持つ「次の一手」を、**必ず1個の DOM ノード**にする。呼び出しは2箇所
|
|
6494
|
+
* (行の常時表示・「接続を確認」を押した結果)で、gate.help / gate.request が
|
|
6495
|
+
* 正本——ここを通さずに文を書き写すと、片方だけ古くなる(DS_GATE の項と同じ理由)。
|
|
6496
|
+
*
|
|
6497
|
+
* 🔴 **要素を2つに割らない(行の補足は最大1段・github-state-reason.test.mjs
|
|
6498
|
+
* 「行の補足は最大1段」)。** gate.request(依頼文。手順が複数行あるもの)があるときは、
|
|
6499
|
+
* **help の1文を details の summary にする**——summary は開閉と無関係に常に見えるので、
|
|
6500
|
+
* 「帯は症状・行は一手」は畳まなくても読め、依頼文の手順だけが details の中に畳まれる
|
|
6501
|
+
* (#521・オーナー指摘「繰り返さない」)。help だけの p と request だけの details を
|
|
6502
|
+
* 別々に足すと、同じ ds-gate-help が2つ並んで上の番人に落ちる。
|
|
6503
|
+
*
|
|
6504
|
+
* @param cls 呼び出し側の文脈を表す class(行は「ds-gate-help」、押した結果は
|
|
6505
|
+
* 「ds-probe-help」)。**「ds-gate-help」を付けた要素だけが、押した瞬間に隠される**
|
|
6506
|
+
* (下の probeSection の stale 処理)ので、混同すると二重表示か消え忘れが起きる
|
|
6507
|
+
*/
|
|
6508
|
+
function gateHelpNodes(gate, cls) {
|
|
6509
|
+
if (gate.request) {
|
|
6510
|
+
var det = el("details", { class: cls + " ds-gate-request" }, [
|
|
6511
|
+
el("summary", { text: gate.help || "詳しい手順" }),
|
|
6512
|
+
]);
|
|
6513
|
+
gate.request.lines.forEach(function (line) {
|
|
6514
|
+
det.appendChild(el("p", { class: "ds-gate-request-line", text: line }));
|
|
6515
|
+
});
|
|
6516
|
+
return [det];
|
|
6517
|
+
}
|
|
6518
|
+
if (gate.help) return [el("p", { class: cls, text: gate.help })];
|
|
6519
|
+
return [];
|
|
6520
|
+
}
|
|
6462
6521
|
/**
|
|
6463
6522
|
* 一覧・タイルに出す「⚠️ …」の要約。**呼び出しは2箇所(グループの summary と能力タイル)。**
|
|
6464
6523
|
* 写経すると片方だけ古くなり、同じ画面で語が割れる(この節では実際に起きた)。
|
|
@@ -9629,18 +9688,21 @@ ${calendarAddUrl.toString()}
|
|
|
9629
9688
|
* 行の常時表示(DS_GATE の 「help」)が既に持っている——写経すると、同じ行の常時表示と
|
|
9630
9689
|
* 押した結果で語が割れる(この節が何度も直してきた形)。DS_GATE から引いて1文だけ出す。
|
|
9631
9690
|
*
|
|
9632
|
-
* ⚠ **403(Workspace 管理者の承認待ち)は
|
|
9633
|
-
*
|
|
9634
|
-
* ——待っても直らない(管理者が承認するまで同じ応答が返る)。
|
|
9691
|
+
* ⚠ **403(Workspace 管理者の承認待ち)は #521 で「admin_approval_pending」に分類済み。**
|
|
9692
|
+
* 機械語(「permission_denied」)はもう出さない。**「時間をおいて」とも言わない**
|
|
9693
|
+
* ——待っても直らない(管理者が承認するまで同じ応答が返る)。401 / 429 は依然
|
|
9694
|
+
* Phase 0 未採取で「unknown」のまま、サーバの機械語をそのまま出す。
|
|
9635
9695
|
*/
|
|
9636
9696
|
function googleChatProbeHelpNodes(s, r) {
|
|
9637
|
-
var p = function (t) { return el("p", { class: "ds-probe-help", text: t }); };
|
|
9638
9697
|
// 成功。**1行で終わり**(状態の語が既に「接続OK」と出ている)
|
|
9639
9698
|
if (r.gate === "ok") return [];
|
|
9640
|
-
// not_in_space / no_credentials
|
|
9699
|
+
// not_in_space / no_credentials / admin_approval_pending は行の常時表示と同じ文面
|
|
9700
|
+
// (DS_GATE から引く。依頼文の details も gateHelpNodes 経由で同じものが出る)。
|
|
9641
9701
|
// 押した瞬間に行側の 「.ds-gate-help」 は隠れるので、二重には出ない
|
|
9642
|
-
var
|
|
9643
|
-
|
|
9702
|
+
var gate = dsGateOf({ type: s.type, gate: r.gate });
|
|
9703
|
+
var nodes = gateHelpNodes(gate, "ds-probe-help");
|
|
9704
|
+
if (nodes.length) return nodes;
|
|
9705
|
+
var p = function (t) { return el("p", { class: "ds-probe-help", text: t }); };
|
|
9644
9706
|
if (r.gate === "unreachable") {
|
|
9645
9707
|
// 帯(「アクセス不可」)が症状を言っている。**ここは一手だけ**
|
|
9646
9708
|
return [p("時間をおいて、もう一度「接続を確認」を押してください。")];
|
|
@@ -12174,7 +12236,7 @@ ${calendarAddUrl.toString()}
|
|
|
12174
12236
|
//
|
|
12175
12237
|
// **ボタンより後ろに置く。** カードは横並びの flex なので、間に挟むと
|
|
12176
12238
|
// 「登録を解除」が案内文の下の行へ落ちて、既存案件の行の形が変わる
|
|
12177
|
-
|
|
12239
|
+
gateHelpNodes(gate, "ds-gate-help").forEach(function (n) { card.appendChild(n); });
|
|
12178
12240
|
// **最後に測った理由と直し方を、押す前から出す(#346)。** 「アクセス不可 8時間前に確認」
|
|
12179
12241
|
// だけでは、押さない人(初見の PM 等)が止まる。表にエントリがある状態は定型の補足
|
|
12180
12242
|
// (リンク込み)だけ、無い状態は needed → detail のフォールバック。どちらも ds-gate-help
|
package/package.json
CHANGED