@rubytech/create-maxy-code 0.1.310 → 0.1.312
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/package.json +1 -1
- package/payload/platform/lib/graph-style/dist/index.d.ts +5 -2
- package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/graph-style/dist/index.js +65 -2
- package/payload/platform/lib/graph-style/dist/index.js.map +1 -1
- package/payload/platform/lib/graph-style/src/__tests__/parity.test.ts +218 -0
- package/payload/platform/lib/graph-style/src/index.ts +53 -2
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +21 -3
- package/payload/platform/plugins/docs/references/admin-ui.md +20 -2
- package/payload/platform/scripts/check-no-esm-require.mjs +4 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +29 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/index.js +16 -2
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts +10 -0
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +22 -2
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/reseat-ledger.d.ts +49 -0
- package/payload/platform/services/claude-session-manager/dist/reseat-ledger.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/reseat-ledger.js +148 -0
- package/payload/platform/services/claude-session-manager/dist/reseat-ledger.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/scope-record.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/scope-record.js +35 -53
- package/payload/platform/services/claude-session-manager/dist/scope-record.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/sidecar-store.d.ts +45 -0
- package/payload/platform/services/claude-session-manager/dist/sidecar-store.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/sidecar-store.js +118 -0
- package/payload/platform/services/claude-session-manager/dist/sidecar-store.js.map +1 -0
- package/payload/server/public/assets/{AccessGate-BOqUU-za.js → AccessGate-Dh5A79FU.js} +1 -1
- package/payload/server/public/assets/{AdminLoginScreens-WvRuaNIg.js → AdminLoginScreens-B8s2TbT7.js} +1 -1
- package/payload/server/public/assets/AdminShell-Cu1zlb6L.js +1 -0
- package/payload/server/public/assets/{Checkbox-DjM6aYP_.js → Checkbox-B_sOAyv1.js} +1 -1
- package/payload/server/public/assets/OperatorConversations-hm0Gpu_Q.js +1 -0
- package/payload/server/public/assets/{admin-XbVTsU2q.js → admin-gZEndvJT.js} +1 -1
- package/payload/server/public/assets/{audio-attachment-mime-CVxjPN8V.js → audio-attachment-mime-B0b89VnH.js} +1 -1
- package/payload/server/public/assets/brand-BcNavK6q.css +1 -0
- package/payload/server/public/assets/{browser-Ct5Kwlmk.js → browser-BUlB5_MD.js} +1 -1
- package/payload/server/public/assets/chat-BnceaVl7.js +1 -0
- package/payload/server/public/assets/data-3Nl3P5wt.js +1 -0
- package/payload/server/public/assets/{graph-DWT1rhy9.js → graph-DMCKpW6P.js} +2 -2
- package/payload/server/public/assets/graph-labels-AZLGoVy8.js +1 -0
- package/payload/server/public/assets/operator-BF4F7k23.js +1 -0
- package/payload/server/public/assets/page-DQUEst1o.js +1 -0
- package/payload/server/public/assets/{public-owWW-MIA.js → public-G_-UI9nB.js} +1 -1
- package/payload/server/public/assets/{public-next-ClQwtyeC.js → public-next-C8_nExQB.js} +1 -1
- package/payload/server/public/assets/{useSelectionMode-BZsJuUm-.js → useSelectionMode-Bf6Rt-sl.js} +1 -1
- package/payload/server/public/browser.html +6 -6
- package/payload/server/public/chat.html +8 -8
- package/payload/server/public/data.html +5 -5
- package/payload/server/public/graph.html +8 -8
- package/payload/server/public/index.html +8 -8
- package/payload/server/public/operator.html +10 -10
- package/payload/server/public/public-next.html +9 -9
- package/payload/server/public/public.html +7 -7
- package/payload/server/server.js +1007 -458
- package/payload/server/public/assets/AdminShell-DHv6_SZ4.js +0 -1
- package/payload/server/public/assets/OperatorConversations-CDY0jUMb.js +0 -1
- package/payload/server/public/assets/brand-N-Hi3IPA.css +0 -1
- package/payload/server/public/assets/chat-CEde1CLX.js +0 -1
- package/payload/server/public/assets/data-TZOmA1Qg.js +0 -1
- package/payload/server/public/assets/graph-labels-OBadNo54.js +0 -1
- package/payload/server/public/assets/operator-BpzQ9Ezb.js +0 -1
- package/payload/server/public/assets/page-Dts8u8MD.js +0 -1
- /package/payload/server/public/assets/{brand-zL3tAdql.js → brand-BQ_u9UdS.js} +0 -0
package/package.json
CHANGED
|
@@ -64,8 +64,11 @@ export declare function formatMessageTimestamp(iso: string): string | null;
|
|
|
64
64
|
/**
|
|
65
65
|
* 24-char canvas label for a node. Label precedence per label family
|
|
66
66
|
* (ToolCall.toolName, WorkflowRun startedAt formatted, WorkflowStep.label,
|
|
67
|
-
* Person givenName+familyName compose, Agent displayName/slug,
|
|
68
|
-
*
|
|
67
|
+
* Person givenName+familyName compose, Agent displayName/slug, Job
|
|
68
|
+
* client+#jobId compose, QuoteDocument ref, InboundInvoice
|
|
69
|
+
* supplier+#confirmationNumber compose, WhatsAppGroup clientName,
|
|
70
|
+
* Message role+timestamp), then a generic
|
|
71
|
+
* fallthrough across curated keys
|
|
69
72
|
* (name, title, summary, givenName, subject, text) — :ConversationArchive
|
|
70
73
|
* rows (Task 397) carry a stable `title` written by the writer so they pick
|
|
71
74
|
* up the generic-fallback `title` key naturally. Finally a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAyFtD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M,GAAG,IAAI,CAOzE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;CACxB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,kBAAkB,CAU/E;AASD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC;AAKD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI7D;AAED,iEAAiE;AACjE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIjE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAsF1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAuD3D"}
|
|
@@ -170,8 +170,11 @@ function formatMessageTimestamp(iso) {
|
|
|
170
170
|
/**
|
|
171
171
|
* 24-char canvas label for a node. Label precedence per label family
|
|
172
172
|
* (ToolCall.toolName, WorkflowRun startedAt formatted, WorkflowStep.label,
|
|
173
|
-
* Person givenName+familyName compose, Agent displayName/slug,
|
|
174
|
-
*
|
|
173
|
+
* Person givenName+familyName compose, Agent displayName/slug, Job
|
|
174
|
+
* client+#jobId compose, QuoteDocument ref, InboundInvoice
|
|
175
|
+
* supplier+#confirmationNumber compose, WhatsAppGroup clientName,
|
|
176
|
+
* Message role+timestamp), then a generic
|
|
177
|
+
* fallthrough across curated keys
|
|
175
178
|
* (name, title, summary, givenName, subject, text) — :ConversationArchive
|
|
176
179
|
* rows (Task 397) carry a stable `title` written by the writer so they pick
|
|
177
180
|
* up the generic-fallback `title` key naturally. Finally a
|
|
@@ -217,6 +220,38 @@ function pickShortLabel(node) {
|
|
|
217
220
|
return v.length > 24 ? v.slice(0, 24) + '…' : v;
|
|
218
221
|
}
|
|
219
222
|
}
|
|
223
|
+
else if (primaryLabel === 'Job') {
|
|
224
|
+
const client = typeof props.client === 'string' ? props.client : '';
|
|
225
|
+
const jobId = typeof props.jobId === 'string' ? props.jobId : '';
|
|
226
|
+
const composed = [client, jobId.length > 0 ? `#${jobId}` : '']
|
|
227
|
+
.filter((s) => s.length > 0)
|
|
228
|
+
.join(' ');
|
|
229
|
+
if (composed.length > 0) {
|
|
230
|
+
return composed.length > 24 ? composed.slice(0, 24) + '…' : composed;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
else if (primaryLabel === 'QuoteDocument') {
|
|
234
|
+
const ref = typeof props.ref === 'string' ? props.ref : '';
|
|
235
|
+
if (ref.length > 0) {
|
|
236
|
+
return ref.length > 24 ? ref.slice(0, 24) + '…' : ref;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
else if (primaryLabel === 'InboundInvoice') {
|
|
240
|
+
const supplier = typeof props.supplier === 'string' ? props.supplier : '';
|
|
241
|
+
const conf = typeof props.confirmationNumber === 'string' ? props.confirmationNumber : '';
|
|
242
|
+
const composed = [supplier, conf.length > 0 ? `#${conf}` : '']
|
|
243
|
+
.filter((s) => s.length > 0)
|
|
244
|
+
.join(' ');
|
|
245
|
+
if (composed.length > 0) {
|
|
246
|
+
return composed.length > 24 ? composed.slice(0, 24) + '…' : composed;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
else if (primaryLabel === 'WhatsAppGroup') {
|
|
250
|
+
const clientName = typeof props.clientName === 'string' ? props.clientName : '';
|
|
251
|
+
if (clientName.length > 0) {
|
|
252
|
+
return clientName.length > 24 ? clientName.slice(0, 24) + '…' : clientName;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
220
255
|
else if (primaryLabel === 'Message') {
|
|
221
256
|
const role = typeof props.role === 'string' ? props.role : '';
|
|
222
257
|
const roleShort = role === 'user' ? 'user'
|
|
@@ -283,6 +318,34 @@ function pickDisplayName(node) {
|
|
|
283
318
|
if (v.length > 0)
|
|
284
319
|
return v;
|
|
285
320
|
}
|
|
321
|
+
else if (primaryLabel === 'Job') {
|
|
322
|
+
const client = typeof props.client === 'string' ? props.client : '';
|
|
323
|
+
const jobId = typeof props.jobId === 'string' ? props.jobId : '';
|
|
324
|
+
const composed = [client, jobId.length > 0 ? `#${jobId}` : '']
|
|
325
|
+
.filter((s) => s.length > 0)
|
|
326
|
+
.join(' ');
|
|
327
|
+
if (composed.length > 0)
|
|
328
|
+
return composed;
|
|
329
|
+
}
|
|
330
|
+
else if (primaryLabel === 'QuoteDocument') {
|
|
331
|
+
const ref = typeof props.ref === 'string' ? props.ref : '';
|
|
332
|
+
if (ref.length > 0)
|
|
333
|
+
return ref;
|
|
334
|
+
}
|
|
335
|
+
else if (primaryLabel === 'InboundInvoice') {
|
|
336
|
+
const supplier = typeof props.supplier === 'string' ? props.supplier : '';
|
|
337
|
+
const conf = typeof props.confirmationNumber === 'string' ? props.confirmationNumber : '';
|
|
338
|
+
const composed = [supplier, conf.length > 0 ? `#${conf}` : '']
|
|
339
|
+
.filter((s) => s.length > 0)
|
|
340
|
+
.join(' ');
|
|
341
|
+
if (composed.length > 0)
|
|
342
|
+
return composed;
|
|
343
|
+
}
|
|
344
|
+
else if (primaryLabel === 'WhatsAppGroup') {
|
|
345
|
+
const clientName = typeof props.clientName === 'string' ? props.clientName : '';
|
|
346
|
+
if (clientName.length > 0)
|
|
347
|
+
return clientName;
|
|
348
|
+
}
|
|
286
349
|
for (const k of ['name', 'title', 'summary', 'givenName', 'subject', 'text']) {
|
|
287
350
|
const v = props[k];
|
|
288
351
|
if (typeof v === 'string' && v.length > 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AA8GH,4CAOC;AAED,wCAEC;AAaD,8CAUC;AA2BD,gDAIC;AAGD,wDAIC;AAaD,wCA0DC;AAMD,0CAmCC;AApSD;;;;GAIG;AACU,QAAA,mBAAmB,GAA2B;IACzD,wCAAwC;IACxC,aAAa,EAAE,SAAS;IACxB,OAAO,EAAE,SAAS;IAClB,kBAAkB,EAAE,SAAS;IAC7B,yBAAyB,EAAE,SAAS;IAEpC,wEAAwE;IACxE,wEAAwE;IACxE,wEAAwE;IACxE,oDAAoD;IACpD,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAEhB,yEAAyE;IACzE,qEAAqE;IACrE,sEAAsE;IACtE,yEAAyE;IACzE,6DAA6D;IAC7D,4DAA4D;IAC5D,GAAG,EAAE,SAAS;IACd,aAAa,EAAE,SAAS;IACxB,cAAc,EAAE,SAAS;IACzB,aAAa,EAAE,SAAS;IACxB,UAAU,EAAE,SAAS;IACrB,aAAa,EAAE,SAAS;IAExB,0EAA0E;IAC1E,4EAA4E;IAC5E,yDAAyD;IACzD,YAAY,EAAE,SAAS;IAEvB,2CAA2C;IAC3C,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS;IAEtB,qEAAqE;IACrE,uEAAuE;IACvE,qEAAqE;IACrE,gEAAgE;IAChE,sBAAsB;IACtB,iBAAiB,EAAE,SAAS;IAC5B,mBAAmB,EAAE,SAAS;IAC9B,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,SAAS;IACvB,QAA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E,CAAA;IACzC,CAAC;IACD,OAAO,YAAY,IAAI,GAAG,CAAA;AAC5B,CAAC"}
|
|
@@ -112,3 +112,221 @@ describe("pickDisplayName", () => {
|
|
|
112
112
|
).toBe(longName);
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
|
+
|
|
116
|
+
describe("pickShortLabel — Job", () => {
|
|
117
|
+
it("composes client + #jobId", () => {
|
|
118
|
+
expect(
|
|
119
|
+
pickShortLabel({
|
|
120
|
+
id: "x",
|
|
121
|
+
labels: ["Job"],
|
|
122
|
+
properties: { client: "Mr R French", jobId: "1842" },
|
|
123
|
+
}),
|
|
124
|
+
).toBe("Mr R French #1842");
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it("client only", () => {
|
|
128
|
+
expect(
|
|
129
|
+
pickShortLabel({ id: "x", labels: ["Job"], properties: { client: "Mr R French" } }),
|
|
130
|
+
).toBe("Mr R French");
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it("jobId only", () => {
|
|
134
|
+
expect(
|
|
135
|
+
pickShortLabel({ id: "x", labels: ["Job"], properties: { jobId: "1842" } }),
|
|
136
|
+
).toBe("#1842");
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it("neither falls back to the label", () => {
|
|
140
|
+
expect(
|
|
141
|
+
pickShortLabel({ id: "x", labels: ["Job"], properties: { status: "quoting" } }),
|
|
142
|
+
).toBe("Job");
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it("truncates an over-cap composition to 24 chars + ellipsis", () => {
|
|
146
|
+
const out = pickShortLabel({
|
|
147
|
+
id: "x",
|
|
148
|
+
labels: ["Job"],
|
|
149
|
+
properties: { client: "Construction Client With An Extremely Long Trading Name Ltd", jobId: "1842" },
|
|
150
|
+
});
|
|
151
|
+
expect(out.length).toBeLessThanOrEqual(25);
|
|
152
|
+
expect(out.endsWith("…")).toBe(true);
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
describe("pickDisplayName — Job", () => {
|
|
157
|
+
it("returns the untruncated composition", () => {
|
|
158
|
+
expect(
|
|
159
|
+
pickDisplayName({
|
|
160
|
+
id: "x",
|
|
161
|
+
labels: ["Job"],
|
|
162
|
+
properties: { client: "Construction Client With An Extremely Long Trading Name Ltd", jobId: "1842" },
|
|
163
|
+
}),
|
|
164
|
+
).toBe("Construction Client With An Extremely Long Trading Name Ltd #1842");
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it("Job with neither falls back to the label", () => {
|
|
168
|
+
expect(
|
|
169
|
+
pickDisplayName({ id: "x", labels: ["Job"], properties: { status: "quoting" } }),
|
|
170
|
+
).toBe("Job");
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
describe("pickShortLabel — QuoteDocument", () => {
|
|
175
|
+
it("renders the ref document number", () => {
|
|
176
|
+
expect(
|
|
177
|
+
pickShortLabel({ id: "x", labels: ["QuoteDocument"], properties: { ref: "Q-1042" } }),
|
|
178
|
+
).toBe("Q-1042");
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it("falls back to the label when ref is absent", () => {
|
|
182
|
+
expect(
|
|
183
|
+
pickShortLabel({ id: "x", labels: ["QuoteDocument"], properties: { status: "draft" } }),
|
|
184
|
+
).toBe("QuoteDocument");
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
it("truncates an over-cap ref to 24 chars + ellipsis", () => {
|
|
188
|
+
const out = pickShortLabel({
|
|
189
|
+
id: "x",
|
|
190
|
+
labels: ["QuoteDocument"],
|
|
191
|
+
properties: { ref: "Q-this-quote-reference-is-far-too-long-to-fit" },
|
|
192
|
+
});
|
|
193
|
+
expect(out.length).toBeLessThanOrEqual(25);
|
|
194
|
+
expect(out.endsWith("…")).toBe(true);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
describe("pickDisplayName — QuoteDocument", () => {
|
|
199
|
+
it("returns the untruncated ref", () => {
|
|
200
|
+
expect(
|
|
201
|
+
pickDisplayName({
|
|
202
|
+
id: "x",
|
|
203
|
+
labels: ["QuoteDocument"],
|
|
204
|
+
properties: { ref: "Q-this-quote-reference-is-far-too-long-to-fit" },
|
|
205
|
+
}),
|
|
206
|
+
).toBe("Q-this-quote-reference-is-far-too-long-to-fit");
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it("falls back to the label when ref is absent", () => {
|
|
210
|
+
expect(
|
|
211
|
+
pickDisplayName({ id: "x", labels: ["QuoteDocument"], properties: { status: "draft" } }),
|
|
212
|
+
).toBe("QuoteDocument");
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
describe("pickShortLabel — InboundInvoice", () => {
|
|
217
|
+
it("composes supplier + #confirmationNumber", () => {
|
|
218
|
+
expect(
|
|
219
|
+
pickShortLabel({
|
|
220
|
+
id: "x",
|
|
221
|
+
labels: ["InboundInvoice"],
|
|
222
|
+
properties: { supplier: "Travis Perkins", confirmationNumber: "88123" },
|
|
223
|
+
}),
|
|
224
|
+
).toBe("Travis Perkins #88123");
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it("supplier only", () => {
|
|
228
|
+
expect(
|
|
229
|
+
pickShortLabel({ id: "x", labels: ["InboundInvoice"], properties: { supplier: "Travis Perkins" } }),
|
|
230
|
+
).toBe("Travis Perkins");
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it("confirmationNumber only", () => {
|
|
234
|
+
expect(
|
|
235
|
+
pickShortLabel({ id: "x", labels: ["InboundInvoice"], properties: { confirmationNumber: "88123" } }),
|
|
236
|
+
).toBe("#88123");
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
it("neither falls back to the label", () => {
|
|
240
|
+
expect(
|
|
241
|
+
pickShortLabel({ id: "x", labels: ["InboundInvoice"], properties: { status: "pending" } }),
|
|
242
|
+
).toBe("InboundInvoice");
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
it("truncates an over-cap composition to 24 chars + ellipsis", () => {
|
|
246
|
+
const out = pickShortLabel({
|
|
247
|
+
id: "x",
|
|
248
|
+
labels: ["InboundInvoice"],
|
|
249
|
+
properties: { supplier: "Builders Merchant With An Extremely Long Trading Name Ltd", confirmationNumber: "88123" },
|
|
250
|
+
});
|
|
251
|
+
expect(out.length).toBeLessThanOrEqual(25);
|
|
252
|
+
expect(out.endsWith("…")).toBe(true);
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
describe("pickDisplayName — InboundInvoice", () => {
|
|
257
|
+
it("returns the untruncated composition", () => {
|
|
258
|
+
expect(
|
|
259
|
+
pickDisplayName({
|
|
260
|
+
id: "x",
|
|
261
|
+
labels: ["InboundInvoice"],
|
|
262
|
+
properties: { supplier: "Builders Merchant With An Extremely Long Trading Name Ltd", confirmationNumber: "88123" },
|
|
263
|
+
}),
|
|
264
|
+
).toBe("Builders Merchant With An Extremely Long Trading Name Ltd #88123");
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
it("neither falls back to the label", () => {
|
|
268
|
+
expect(
|
|
269
|
+
pickDisplayName({ id: "x", labels: ["InboundInvoice"], properties: { status: "pending" } }),
|
|
270
|
+
).toBe("InboundInvoice");
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
describe("pickShortLabel — WhatsAppGroup", () => {
|
|
275
|
+
it("renders clientName", () => {
|
|
276
|
+
expect(
|
|
277
|
+
pickShortLabel({ id: "x", labels: ["WhatsAppGroup"], properties: { clientName: "Mr R French", groupId: "123@g.us" } }),
|
|
278
|
+
).toBe("Mr R French");
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
it("falls back to the label when clientName is absent (groupId is not used for display)", () => {
|
|
282
|
+
expect(
|
|
283
|
+
pickShortLabel({ id: "x", labels: ["WhatsAppGroup"], properties: { groupId: "123@g.us" } }),
|
|
284
|
+
).toBe("WhatsAppGroup");
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it("truncates an over-cap clientName to 24 chars + ellipsis", () => {
|
|
288
|
+
const out = pickShortLabel({
|
|
289
|
+
id: "x",
|
|
290
|
+
labels: ["WhatsAppGroup"],
|
|
291
|
+
properties: { clientName: "Construction Client With An Extremely Long Trading Name Ltd" },
|
|
292
|
+
});
|
|
293
|
+
expect(out.length).toBeLessThanOrEqual(25);
|
|
294
|
+
expect(out.endsWith("…")).toBe(true);
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
describe("pickDisplayName — WhatsAppGroup", () => {
|
|
299
|
+
it("returns the untruncated clientName", () => {
|
|
300
|
+
expect(
|
|
301
|
+
pickDisplayName({
|
|
302
|
+
id: "x",
|
|
303
|
+
labels: ["WhatsAppGroup"],
|
|
304
|
+
properties: { clientName: "Construction Client With An Extremely Long Trading Name Ltd" },
|
|
305
|
+
}),
|
|
306
|
+
).toBe("Construction Client With An Extremely Long Trading Name Ltd");
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
it("falls back to the label when clientName is absent", () => {
|
|
310
|
+
expect(
|
|
311
|
+
pickDisplayName({ id: "x", labels: ["WhatsAppGroup"], properties: { groupId: "123@g.us" } }),
|
|
312
|
+
).toBe("WhatsAppGroup");
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
describe("regression — Job and generic labels unaffected by the new branches", () => {
|
|
317
|
+
it("Job still composes client + #jobId", () => {
|
|
318
|
+
expect(
|
|
319
|
+
pickShortLabel({ id: "x", labels: ["Job"], properties: { client: "Mr R French", jobId: "1842" } }),
|
|
320
|
+
).toBe("Mr R French #1842");
|
|
321
|
+
});
|
|
322
|
+
it("Person still composes given+family", () => {
|
|
323
|
+
expect(
|
|
324
|
+
pickShortLabel({ id: "x", labels: ["Person"], properties: { givenName: "Dan", familyName: "Brett" } }),
|
|
325
|
+
).toBe("Dan Brett");
|
|
326
|
+
});
|
|
327
|
+
it("generic name-bearing node unaffected", () => {
|
|
328
|
+
expect(
|
|
329
|
+
pickShortLabel({ id: "x", labels: ["LocalBusiness"], properties: { name: "Acme" } }),
|
|
330
|
+
).toBe("Acme");
|
|
331
|
+
});
|
|
332
|
+
});
|
|
@@ -203,8 +203,11 @@ export function formatMessageTimestamp(iso: string): string | null {
|
|
|
203
203
|
/**
|
|
204
204
|
* 24-char canvas label for a node. Label precedence per label family
|
|
205
205
|
* (ToolCall.toolName, WorkflowRun startedAt formatted, WorkflowStep.label,
|
|
206
|
-
* Person givenName+familyName compose, Agent displayName/slug,
|
|
207
|
-
*
|
|
206
|
+
* Person givenName+familyName compose, Agent displayName/slug, Job
|
|
207
|
+
* client+#jobId compose, QuoteDocument ref, InboundInvoice
|
|
208
|
+
* supplier+#confirmationNumber compose, WhatsAppGroup clientName,
|
|
209
|
+
* Message role+timestamp), then a generic
|
|
210
|
+
* fallthrough across curated keys
|
|
208
211
|
* (name, title, summary, givenName, subject, text) — :ConversationArchive
|
|
209
212
|
* rows (Task 397) carry a stable `title` written by the writer so they pick
|
|
210
213
|
* up the generic-fallback `title` key naturally. Finally a
|
|
@@ -244,6 +247,34 @@ export function pickShortLabel(node: GraphNodeLike): string {
|
|
|
244
247
|
if (v.length > 0) {
|
|
245
248
|
return v.length > 24 ? v.slice(0, 24) + '…' : v
|
|
246
249
|
}
|
|
250
|
+
} else if (primaryLabel === 'Job') {
|
|
251
|
+
const client = typeof props.client === 'string' ? props.client : ''
|
|
252
|
+
const jobId = typeof props.jobId === 'string' ? props.jobId : ''
|
|
253
|
+
const composed = [client, jobId.length > 0 ? `#${jobId}` : '']
|
|
254
|
+
.filter((s) => s.length > 0)
|
|
255
|
+
.join(' ')
|
|
256
|
+
if (composed.length > 0) {
|
|
257
|
+
return composed.length > 24 ? composed.slice(0, 24) + '…' : composed
|
|
258
|
+
}
|
|
259
|
+
} else if (primaryLabel === 'QuoteDocument') {
|
|
260
|
+
const ref = typeof props.ref === 'string' ? props.ref : ''
|
|
261
|
+
if (ref.length > 0) {
|
|
262
|
+
return ref.length > 24 ? ref.slice(0, 24) + '…' : ref
|
|
263
|
+
}
|
|
264
|
+
} else if (primaryLabel === 'InboundInvoice') {
|
|
265
|
+
const supplier = typeof props.supplier === 'string' ? props.supplier : ''
|
|
266
|
+
const conf = typeof props.confirmationNumber === 'string' ? props.confirmationNumber : ''
|
|
267
|
+
const composed = [supplier, conf.length > 0 ? `#${conf}` : '']
|
|
268
|
+
.filter((s) => s.length > 0)
|
|
269
|
+
.join(' ')
|
|
270
|
+
if (composed.length > 0) {
|
|
271
|
+
return composed.length > 24 ? composed.slice(0, 24) + '…' : composed
|
|
272
|
+
}
|
|
273
|
+
} else if (primaryLabel === 'WhatsAppGroup') {
|
|
274
|
+
const clientName = typeof props.clientName === 'string' ? props.clientName : ''
|
|
275
|
+
if (clientName.length > 0) {
|
|
276
|
+
return clientName.length > 24 ? clientName.slice(0, 24) + '…' : clientName
|
|
277
|
+
}
|
|
247
278
|
} else if (primaryLabel === 'Message') {
|
|
248
279
|
const role = typeof props.role === 'string' ? props.role : ''
|
|
249
280
|
const roleShort =
|
|
@@ -300,6 +331,26 @@ export function pickDisplayName(node: GraphNodeLike): string {
|
|
|
300
331
|
const slug = typeof props.slug === 'string' ? props.slug : ''
|
|
301
332
|
const v = dn.length > 0 ? dn : slug
|
|
302
333
|
if (v.length > 0) return v
|
|
334
|
+
} else if (primaryLabel === 'Job') {
|
|
335
|
+
const client = typeof props.client === 'string' ? props.client : ''
|
|
336
|
+
const jobId = typeof props.jobId === 'string' ? props.jobId : ''
|
|
337
|
+
const composed = [client, jobId.length > 0 ? `#${jobId}` : '']
|
|
338
|
+
.filter((s) => s.length > 0)
|
|
339
|
+
.join(' ')
|
|
340
|
+
if (composed.length > 0) return composed
|
|
341
|
+
} else if (primaryLabel === 'QuoteDocument') {
|
|
342
|
+
const ref = typeof props.ref === 'string' ? props.ref : ''
|
|
343
|
+
if (ref.length > 0) return ref
|
|
344
|
+
} else if (primaryLabel === 'InboundInvoice') {
|
|
345
|
+
const supplier = typeof props.supplier === 'string' ? props.supplier : ''
|
|
346
|
+
const conf = typeof props.confirmationNumber === 'string' ? props.confirmationNumber : ''
|
|
347
|
+
const composed = [supplier, conf.length > 0 ? `#${conf}` : '']
|
|
348
|
+
.filter((s) => s.length > 0)
|
|
349
|
+
.join(' ')
|
|
350
|
+
if (composed.length > 0) return composed
|
|
351
|
+
} else if (primaryLabel === 'WhatsAppGroup') {
|
|
352
|
+
const clientName = typeof props.clientName === 'string' ? props.clientName : ''
|
|
353
|
+
if (clientName.length > 0) return clientName
|
|
303
354
|
}
|
|
304
355
|
for (const k of ['name', 'title', 'summary', 'givenName', 'subject', 'text']) {
|
|
305
356
|
const v = props[k]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: platform-architecture
|
|
3
3
|
description: Use when grounding any documented-surface claim about what Maxy ships — plugins, skills, specialists, install/deploy flows, internals. This is the install catalogue, not evidence of what is enabled on the current account. For install state on this account, call `capabilities-here`; for documented surface, cite the `Source:` URL inline.
|
|
4
|
-
content-hash: sha256:
|
|
4
|
+
content-hash: sha256:14ea06161a5423a4a55415fac3ef50699469968a7224fa04fa9ace74757c616f
|
|
5
5
|
brand: maxy-code
|
|
6
6
|
product-name: Maxy
|
|
7
7
|
---
|
|
@@ -2309,7 +2309,7 @@ either is a regression.
|
|
|
2309
2309
|
| `/sidebar-artefact-content` | Reads a single artefact's bytes for the artefact pane. |
|
|
2310
2310
|
| `/sidebar-artefact-save` | Persists an artefact edit. |
|
|
2311
2311
|
| `/attachment` | Per-attachment binary fetch (images, PDFs, etc.). |
|
|
2312
|
-
| `/files` | File browser CRUD (list, download, upload, delete). Listings put directories first, then files newest-first by `mtime` (name tie-break) so a just-changed file leads the panel. |
|
|
2312
|
+
| `/files` | File browser CRUD (list, download, upload, delete). Listings put directories first, then files newest-first by `mtime` (name tie-break) so a just-changed file leads the panel. Upload is a raw-body stream (file bytes are the request body; `session_key`/`path`/`filename` in the query) written to disk without buffering — ceiling 2 GB (`MAX_DATA_UPLOAD_BYTES`), over-ceiling bodies abort mid-stream with `413`; the client shows a determinate progress bar. Distinct from the 50 MB in-memory chat-attachment cap. |
|
|
2313
2313
|
|
|
2314
2314
|
**Artefact download resolution.** Clicking a sidebar Artefacts row
|
|
2315
2315
|
streams the `KnowledgeDocument`'s real backing file, which can live in one of
|
|
@@ -2337,6 +2337,24 @@ that folder instead of snapping back to the data root; the hash never reaches
|
|
|
2337
2337
|
the server and `/data` has no client router, so the channel is isolated.
|
|
2338
2338
|
`path=` is cleared at the root for a clean URL.
|
|
2339
2339
|
|
|
2340
|
+
**`/data` upload — button and drag-drop.** Besides the Upload button (one OS-picked
|
|
2341
|
+
file, stored under a timestamped name), files and whole folders can be dragged
|
|
2342
|
+
onto the file-browser body to upload into the open folder. A dropped folder's
|
|
2343
|
+
subtree is recreated under the open folder and every contained file uploaded,
|
|
2344
|
+
preserving source names and relative paths (a same-named file in an existing
|
|
2345
|
+
folder is overwritten; empty source subfolders are skipped). The drop region
|
|
2346
|
+
shows an active outline while a drag is over it and is inert wherever the open
|
|
2347
|
+
folder is not writable (outside the operator's own `accounts/<id>/…` subtree),
|
|
2348
|
+
rejecting the drop with the same "Open a folder inside your account to upload"
|
|
2349
|
+
guidance as the button. Each drop reports an uploaded/skipped summary; a file
|
|
2350
|
+
that fails the 50 MB limit, the MIME allowlist, or its HTTP write is skipped
|
|
2351
|
+
individually without aborting the rest, and every uploaded file is indexed for
|
|
2352
|
+
search exactly as the button path is. The server `/files/upload` endpoint takes
|
|
2353
|
+
an optional `relpath` form field (the file's path relative to the drop root); it
|
|
2354
|
+
recreates that path's directories under the open folder, scope-checked level by
|
|
2355
|
+
level, and writes the file under its original basename. A flat upload (no
|
|
2356
|
+
`relpath`) is unchanged.
|
|
2357
|
+
|
|
2340
2358
|
**`/data` operator surface.** `/data` mounts the operator
|
|
2341
2359
|
`HeaderMenu` (logo-left / name-centre / burger-right; flyout = Chat / Data /
|
|
2342
2360
|
Log out) above the toolbar — the burger's Chat item returns to `/`, replacing
|
|
@@ -2515,7 +2533,7 @@ authoritative. This section names the surfaces and what backs each.
|
|
|
2515
2533
|
| `+ New session` button | Opens `NewSessionModal`, which POSTs `{channel, permissionMode, model, initialMessage}` to `/api/admin/claude-sessions`. | `claude-sessions.ts` |
|
|
2516
2534
|
| Mode trigger | Per-`(accountId, userId)` `SpawnPreference` for `permissionMode` and `model`; persists across reload, tab, device. | `session-defaults.ts` |
|
|
2517
2535
|
| Nav rows (Chat / People / Agents / Projects / Tasks / Artefacts) | People, Agents, Tasks open the artefact-pane Graph filtered to the matching label. Chat selects the active conversation. Artefacts swaps the list to editable documents. | `graph-search.ts`, `graph-subgraph.ts`, `sidebar-artefacts.ts` |
|
|
2518
|
-
| Sessions list (Active / Archived / All) | Live row store driven by SSE; manual reconcile button on the segmented control re-fetches the full id set. Every
|
|
2536
|
+
| Sessions list (Active / Archived / All) | Live row store driven by SSE; manual reconcile button on the segmented control re-fetches the full id set. Every listed row carries two launch actions: the claude.ai/code resume (`ExternalLink`) and a chat-launch (`MessageSquare`) that opens `/chat?session=<full sessionId>` — the admin webchat pointed at that exact session; sending there resumes a stopped session with the webchat channel bound to that id (see `admin-webchat-native-channel.md`, "Session-targeted mode"). At the ≤720 px drawer breakpoint each row stacks into two lines — dot + title + id/stamp, then the action icons — with a divider between rows and actions at full opacity (the desktop hover-gated 0.5 opacity never resolves on touch). | `/claude-sessions/events`, `/claude-sessions` |
|
|
2519
2537
|
| Channel reader nav rows (WhatsApp / Telegram) | One conditional nav row **per interactive channel that has ≥1 admin session**. Each row carries its brand glyph (WhatsApp `#25D366`, Telegram `#229ED9`); a channel with no admin session shows no row, and no install ever shows an always-empty "No conversations" row. The channel list loads **once on sidebar mount** (the per-channel counts must be known before the nav renders), so a failed load shows one muted, non-clickable line instead of channel rows. Clicking a channel row lists that channel's admin conversations; each conversation row shows a **display name** resolved by precedence `operatorName ?? whatsappName ?? senderId ?? title`: the bound `Person givenName familyName` when a `senderId`→`userId` binding exists, else the persisted WhatsApp display name (`pushName`, read from the latest `:Message:WhatsAppMessage.senderName`), else the raw `senderId`, else the agent title; the agent session title is the hover tooltip only. Under the name each row shows a **last-message-time breadcrumb** (`conv-timestamp`, same markup as the Sessions rows) formatted from the row's `lastMessageAt` (the last parseable turn's `ts`); a session with no parseable turn shows no time, never "Invalid Date". A click on a conversation **opens its transcript on the home surface**: on `/` it selects in place, and from any other route (`/graph`, `/data`, `/browser`) it navigates to `/?wa=<sessionId>&projectDir=<dir>`, which the root shell hydrates on mount (then strips the query so a later refresh does not re-pin a closed conversation). Server logs `[wa-reader] op=operator-name-fallback senderId=… source=whatsapp-pushname` when the pushName fallback fires and `[wa-reader] op=conversations count=<n> withTimestamp=<m>` per list build; the client logs `[admin-ui] wa-open route=… via=<in-place\|navigate> …` and `[admin-ui] wa-hydrate route=/ …`. | `/whatsapp-reader/conversations` |
|
|
2520
2538
|
| Channel transcript (`<Transcript>`) | Reads one session's JSONL over SSE (`/whatsapp-reader/stream`) and renders both sides plus tool calls — the turns claude.ai/code hides because channel inbound is stamped `isMeta`. Every turn shows its time-of-day (HH:MM from the turn's `ts`; a null/unparseable `ts` shows no time, never "Invalid Date"). `tool-call`/`tool-result` turns render as **collapsed cards** (chevron + label + time, default collapsed, expandable per card; one card's state never affects another) so the human↔agent text is not buried in JSON; the three conversation kinds always render in full. The thread **follows the tail**: it opens at the newest turn and pins to the bottom on each live append **only while the operator is already within 32 px of the bottom** — a scroll up suppresses the jump so reading history is never yanked. While the operator is scrolled up a **jump-to-bottom control** (`.wa-jump`, bottom-right of the viewport) appears; clicking it scrolls to the newest turn and re-arms follow-tail, and it hides again at the bottom. The thread scrolls inside its grid cell (header/sidebar/footer fixed). The stream sends a 20 s heartbeat so an idle Cloudflare tunnel does not idle-drop, tags each frame with a byte-offset `id:`, and resumes from the client's `Last-Event-ID` on reconnect (no duplicate backlog); the client clears the "Stream disconnected" banner on reopen and latches it only on a terminal CLOSED state. The thread also interleaves a collapsed `⚙ directive injected (N B)` row per turn, sorted by timestamp just before the turn it informed; expanding one fetches the exact stored `prompt-optimiser-directive` bytes for that turn. The entries are listed by `GET /whatsapp-reader/directives?sessionId=` and the bytes served by `GET /whatsapp-reader/directive?sessionId=&name=`, both admin-gated and account-scoped; a missing store degrades to no rows. | `/whatsapp-reader/stream`, `/whatsapp-reader/directives`, `/whatsapp-reader/directive` |
|
|
2521
2539
|
| Conversations row hover actions | Inline rename, archive, delete, JSONL view / download per row. The historical `.conversations-modal` CSS block exists in `globals.css` but is no longer mounted from any TSX — Sidebar.tsx now owns every per-row affordance directly. | `claude-sessions.ts` |
|
|
@@ -78,7 +78,7 @@ either is a regression.
|
|
|
78
78
|
| `/sidebar-artefact-content` | Reads a single artefact's bytes for the artefact pane. |
|
|
79
79
|
| `/sidebar-artefact-save` | Persists an artefact edit. |
|
|
80
80
|
| `/attachment` | Per-attachment binary fetch (images, PDFs, etc.). |
|
|
81
|
-
| `/files` | File browser CRUD (list, download, upload, delete). Listings put directories first, then files newest-first by `mtime` (name tie-break) so a just-changed file leads the panel. |
|
|
81
|
+
| `/files` | File browser CRUD (list, download, upload, delete). Listings put directories first, then files newest-first by `mtime` (name tie-break) so a just-changed file leads the panel. Upload is a raw-body stream (file bytes are the request body; `session_key`/`path`/`filename` in the query) written to disk without buffering — ceiling 2 GB (`MAX_DATA_UPLOAD_BYTES`), over-ceiling bodies abort mid-stream with `413`; the client shows a determinate progress bar. Distinct from the 50 MB in-memory chat-attachment cap. |
|
|
82
82
|
|
|
83
83
|
**Artefact download resolution.** Clicking a sidebar Artefacts row
|
|
84
84
|
streams the `KnowledgeDocument`'s real backing file, which can live in one of
|
|
@@ -106,6 +106,24 @@ that folder instead of snapping back to the data root; the hash never reaches
|
|
|
106
106
|
the server and `/data` has no client router, so the channel is isolated.
|
|
107
107
|
`path=` is cleared at the root for a clean URL.
|
|
108
108
|
|
|
109
|
+
**`/data` upload — button and drag-drop.** Besides the Upload button (one OS-picked
|
|
110
|
+
file, stored under a timestamped name), files and whole folders can be dragged
|
|
111
|
+
onto the file-browser body to upload into the open folder. A dropped folder's
|
|
112
|
+
subtree is recreated under the open folder and every contained file uploaded,
|
|
113
|
+
preserving source names and relative paths (a same-named file in an existing
|
|
114
|
+
folder is overwritten; empty source subfolders are skipped). The drop region
|
|
115
|
+
shows an active outline while a drag is over it and is inert wherever the open
|
|
116
|
+
folder is not writable (outside the operator's own `accounts/<id>/…` subtree),
|
|
117
|
+
rejecting the drop with the same "Open a folder inside your account to upload"
|
|
118
|
+
guidance as the button. Each drop reports an uploaded/skipped summary; a file
|
|
119
|
+
that fails the 50 MB limit, the MIME allowlist, or its HTTP write is skipped
|
|
120
|
+
individually without aborting the rest, and every uploaded file is indexed for
|
|
121
|
+
search exactly as the button path is. The server `/files/upload` endpoint takes
|
|
122
|
+
an optional `relpath` form field (the file's path relative to the drop root); it
|
|
123
|
+
recreates that path's directories under the open folder, scope-checked level by
|
|
124
|
+
level, and writes the file under its original basename. A flat upload (no
|
|
125
|
+
`relpath`) is unchanged.
|
|
126
|
+
|
|
109
127
|
**`/data` operator surface.** `/data` mounts the operator
|
|
110
128
|
`HeaderMenu` (logo-left / name-centre / burger-right; flyout = Chat / Data /
|
|
111
129
|
Log out) above the toolbar — the burger's Chat item returns to `/`, replacing
|
|
@@ -284,7 +302,7 @@ authoritative. This section names the surfaces and what backs each.
|
|
|
284
302
|
| `+ New session` button | Opens `NewSessionModal`, which POSTs `{channel, permissionMode, model, initialMessage}` to `/api/admin/claude-sessions`. | `claude-sessions.ts` |
|
|
285
303
|
| Mode trigger | Per-`(accountId, userId)` `SpawnPreference` for `permissionMode` and `model`; persists across reload, tab, device. | `session-defaults.ts` |
|
|
286
304
|
| Nav rows (Chat / People / Agents / Projects / Tasks / Artefacts) | People, Agents, Tasks open the artefact-pane Graph filtered to the matching label. Chat selects the active conversation. Artefacts swaps the list to editable documents. | `graph-search.ts`, `graph-subgraph.ts`, `sidebar-artefacts.ts` |
|
|
287
|
-
| Sessions list (Active / Archived / All) | Live row store driven by SSE; manual reconcile button on the segmented control re-fetches the full id set. Every
|
|
305
|
+
| Sessions list (Active / Archived / All) | Live row store driven by SSE; manual reconcile button on the segmented control re-fetches the full id set. Every listed row carries two launch actions: the claude.ai/code resume (`ExternalLink`) and a chat-launch (`MessageSquare`) that opens `/chat?session=<full sessionId>` — the admin webchat pointed at that exact session; sending there resumes a stopped session with the webchat channel bound to that id (see `admin-webchat-native-channel.md`, "Session-targeted mode"). At the ≤720 px drawer breakpoint each row stacks into two lines — dot + title + id/stamp, then the action icons — with a divider between rows and actions at full opacity (the desktop hover-gated 0.5 opacity never resolves on touch). | `/claude-sessions/events`, `/claude-sessions` |
|
|
288
306
|
| Channel reader nav rows (WhatsApp / Telegram) | One conditional nav row **per interactive channel that has ≥1 admin session**. Each row carries its brand glyph (WhatsApp `#25D366`, Telegram `#229ED9`); a channel with no admin session shows no row, and no install ever shows an always-empty "No conversations" row. The channel list loads **once on sidebar mount** (the per-channel counts must be known before the nav renders), so a failed load shows one muted, non-clickable line instead of channel rows. Clicking a channel row lists that channel's admin conversations; each conversation row shows a **display name** resolved by precedence `operatorName ?? whatsappName ?? senderId ?? title`: the bound `Person givenName familyName` when a `senderId`→`userId` binding exists, else the persisted WhatsApp display name (`pushName`, read from the latest `:Message:WhatsAppMessage.senderName`), else the raw `senderId`, else the agent title; the agent session title is the hover tooltip only. Under the name each row shows a **last-message-time breadcrumb** (`conv-timestamp`, same markup as the Sessions rows) formatted from the row's `lastMessageAt` (the last parseable turn's `ts`); a session with no parseable turn shows no time, never "Invalid Date". A click on a conversation **opens its transcript on the home surface**: on `/` it selects in place, and from any other route (`/graph`, `/data`, `/browser`) it navigates to `/?wa=<sessionId>&projectDir=<dir>`, which the root shell hydrates on mount (then strips the query so a later refresh does not re-pin a closed conversation). Server logs `[wa-reader] op=operator-name-fallback senderId=… source=whatsapp-pushname` when the pushName fallback fires and `[wa-reader] op=conversations count=<n> withTimestamp=<m>` per list build; the client logs `[admin-ui] wa-open route=… via=<in-place\|navigate> …` and `[admin-ui] wa-hydrate route=/ …`. | `/whatsapp-reader/conversations` |
|
|
289
307
|
| Channel transcript (`<Transcript>`) | Reads one session's JSONL over SSE (`/whatsapp-reader/stream`) and renders both sides plus tool calls — the turns claude.ai/code hides because channel inbound is stamped `isMeta`. Every turn shows its time-of-day (HH:MM from the turn's `ts`; a null/unparseable `ts` shows no time, never "Invalid Date"). `tool-call`/`tool-result` turns render as **collapsed cards** (chevron + label + time, default collapsed, expandable per card; one card's state never affects another) so the human↔agent text is not buried in JSON; the three conversation kinds always render in full. The thread **follows the tail**: it opens at the newest turn and pins to the bottom on each live append **only while the operator is already within 32 px of the bottom** — a scroll up suppresses the jump so reading history is never yanked. While the operator is scrolled up a **jump-to-bottom control** (`.wa-jump`, bottom-right of the viewport) appears; clicking it scrolls to the newest turn and re-arms follow-tail, and it hides again at the bottom. The thread scrolls inside its grid cell (header/sidebar/footer fixed). The stream sends a 20 s heartbeat so an idle Cloudflare tunnel does not idle-drop, tags each frame with a byte-offset `id:`, and resumes from the client's `Last-Event-ID` on reconnect (no duplicate backlog); the client clears the "Stream disconnected" banner on reopen and latches it only on a terminal CLOSED state. The thread also interleaves a collapsed `⚙ directive injected (N B)` row per turn, sorted by timestamp just before the turn it informed; expanding one fetches the exact stored `prompt-optimiser-directive` bytes for that turn. The entries are listed by `GET /whatsapp-reader/directives?sessionId=` and the bytes served by `GET /whatsapp-reader/directive?sessionId=&name=`, both admin-gated and account-scoped; a missing store degrades to no rows. | `/whatsapp-reader/stream`, `/whatsapp-reader/directives`, `/whatsapp-reader/directive` |
|
|
290
308
|
| Conversations row hover actions | Inline rename, archive, delete, JSONL view / download per row. The historical `.conversations-modal` CSS block exists in `globals.css` but is no longer mounted from any TSX — Sidebar.tsx now owns every per-row affordance directly. | `claude-sessions.ts` |
|
|
@@ -59,6 +59,10 @@ const ALLOWLIST = new Set([
|
|
|
59
59
|
// before the `../paths` mock fires, to point USERS_FILE/REMOTE_PASSWORD_FILE
|
|
60
60
|
// at a temp dir off the operator's real home config.
|
|
61
61
|
'platform/ui/app/lib/__tests__/remote-auth-per-admin.test.ts',
|
|
62
|
+
// Same vi.hoisted pattern: the files-write test builds a tmp platform/data
|
|
63
|
+
// tree and sets MAXY_PLATFORM_ROOT before the route module (and its
|
|
64
|
+
// data-path/attachments deps) read the env at import.
|
|
65
|
+
'platform/ui/server/routes/admin/__tests__/files-write.test.ts',
|
|
62
66
|
])
|
|
63
67
|
|
|
64
68
|
const REQUIRE_CALL_RE = /\brequire\s*\(/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAY3B,OAAO,EAgBL,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAY3B,OAAO,EAgBL,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;AAsBzB,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,iBAAiB,CAAA;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAgFhE,eAAO,MAAM,kBAAkB,QAA2B,CAAA;AAS1D,eAAO,MAAM,4BAA4B,QAAS,CAAA;AAIlD,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,SAAS,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC7E;;qEAEiE;IACjE,MAAM,CAAC,EAAE,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