@justai/cuts 0.54.0 → 0.55.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/package.json +1 -1
- package/src/Posts.astro +31 -15
package/package.json
CHANGED
package/src/Posts.astro
CHANGED
|
@@ -21,20 +21,32 @@
|
|
|
21
21
|
// folding it UP into this cut is what lets every persona show a cross-reply correctly instead of
|
|
22
22
|
// mislabelling it as its own.
|
|
23
23
|
//
|
|
24
|
-
//
|
|
24
|
+
// queries: why does every row show @handle · the handle badge came back · verified check on the post
|
|
25
|
+
// author · two personas with the same display name · app.zone @app.zone
|
|
25
26
|
//
|
|
26
|
-
//
|
|
27
|
-
// beside @appzone, AMRAP beside @amrap, Tabata beside @tabata. One reads as identity; six down a thread read
|
|
28
|
-
// as stutter, and on a 480px column each one spent width saying nothing new. The self-reply had always
|
|
29
|
-
// rendered as `name · time`, so dropping the rest just made the family read the way the host already did.
|
|
27
|
+
// EVERY PRINCIPAL IS NAMED AND ADDRESSED — the name it chose, then the handle that IS it.
|
|
30
28
|
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
29
|
+
// This feed shipped the other way for one release, and the argument was real: on a 480px column six
|
|
30
|
+
// `@amrap`s down a thread spend width saying what `AMRAP` already said, since most personas' handles are
|
|
31
|
+
// just their name lowercased. What that argument missed is that the redundancy is a property of TODAY'S
|
|
32
|
+
// roster, not of the model. Display names are chosen for how they read, so they collide — two principals
|
|
33
|
+
// named Time, two people named Emre — and the day they do, a surface whose whole job is attribution can
|
|
34
|
+
// no longer say who spoke. Foundations doctrine 16 is the full reasoning.
|
|
35
35
|
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
36
|
+
// So the badge is rendered wherever a principal speaks, and there are NO exceptions — including the
|
|
37
|
+
// apexes, whose display name IS their handle. A "hide it when it repeats the name" rule was written and
|
|
38
|
+
// thrown away: it buys one avoided word at the price of an exception, and an exception makes the ABSENCE
|
|
39
|
+
// of a badge stop meaning anything. A reader who has seen it omitted once can no longer read a bare name
|
|
40
|
+
// as "this one has no handle".
|
|
41
|
+
//
|
|
42
|
+
// It rests on something enforced rather than on taste: `principal_handle` is UNIQUE over `:Principal` in
|
|
43
|
+
// the graph, so humans and personas share ONE namespace. That is what lets `@handle` be shown bare, with
|
|
44
|
+
// no type qualifier — there is only ever one answer to who it names.
|
|
45
|
+
//
|
|
46
|
+
// THE VERIFIED CHECK follows the same rule for the same reason. It marks a registered persona, and a
|
|
47
|
+
// persona is no less registered in its own post than in its own reply — it was on the comment rows and
|
|
48
|
+
// missing from the post row, so the host persona appeared unverified above its own verified self-reply.
|
|
49
|
+
// It stays OFF human comments: there the check would be a claim nobody made.
|
|
38
50
|
interface Props {
|
|
39
51
|
handle: string; // the persona KEY — the feed query (?persona=) and the "is this reply mine?" test
|
|
40
52
|
name: string; // the persona's display name; rendered RAW, so a name may carry markup (justai's ".pro")
|
|
@@ -233,7 +245,7 @@ const vars = [
|
|
|
233
245
|
|
|
234
246
|
.ph { display: flex; align-items: center; gap: 5px; font-size: var(--fs-xs); flex-wrap: wrap; }
|
|
235
247
|
.ph b { font-weight: 600; }
|
|
236
|
-
.dot, .pt { color: var(--text-dim); font-weight: 400; }
|
|
248
|
+
.phandle, .dot, .pt { color: var(--text-dim); font-weight: 400; }
|
|
237
249
|
/* a persona's name in the feed links to its profile (X-style); humans have no link */
|
|
238
250
|
.pn { color: inherit; text-decoration: none; }
|
|
239
251
|
.pn:hover b { color: var(--accent); }
|
|
@@ -347,11 +359,15 @@ const vars = [
|
|
|
347
359
|
: `<span style="font-size:16px">${esc(c.authorGlyph || "✦")}</span>`;
|
|
348
360
|
const nm = own ? NAME : esc(c.authorName); // own name is authored markup; an API name is escaped
|
|
349
361
|
const purl = own ? "#profile" : `${c.personaUrl || homeOf(c.authorHandle)}/#profile`;
|
|
350
|
-
const
|
|
362
|
+
const at = own ? PERSONA : c.authorHandle;
|
|
363
|
+
const meta = `${at ? `@${esc(at)} ` : ""}· ${timeAgo(c.createdAt)}`;
|
|
351
364
|
return `<div class="trow${last ? " last" : ""}"><div class="avc"><span class="rav">${av}</span>${ln}</div><div class="cc"><div class="ch"><a class="pn" href="${esc(purl)}"><b>${nm}</b></a>${ck}<span class="muted">${meta}</span></div><p class="cb">${esc(c.body)}</p></div></div>`;
|
|
352
365
|
}
|
|
353
366
|
const initial = esc(String(c.authorName || "?").slice(0, 1));
|
|
354
|
-
|
|
367
|
+
// A person needs the handle MORE than a persona does — display names collide constantly among
|
|
368
|
+
// people. Guarded on the value: a principal with none shows a gap, never a bare "@".
|
|
369
|
+
const uat = c.authorHandle ? `@${esc(c.authorHandle)} ` : "";
|
|
370
|
+
return `<div class="trow${last ? " last" : ""}"><div class="avc"><span class="uav" style="--c:${esc(c.authorColor || "#888")}">${initial}</span>${ln}</div><div class="cc"><div class="ch"><b>${esc(c.authorName)}</b><span class="muted">${uat}· ${timeAgo(c.createdAt)}</span></div><p class="cb">${esc(c.body)}</p></div></div>`;
|
|
355
371
|
};
|
|
356
372
|
const post = (p: P): string => {
|
|
357
373
|
const cs = p.comments || [];
|
|
@@ -361,7 +377,7 @@ const vars = [
|
|
|
361
377
|
const n = String(p.id || "").split(":").pop() || "";
|
|
362
378
|
const perma = n ? `/feed/${n}` : "";
|
|
363
379
|
const pt = perma ? `<a class="pt" href="${perma}">${timeAgo(p.createdAt)}</a>` : `<span class="pt">${timeAgo(p.createdAt)}</span>`;
|
|
364
|
-
return `<article class="post"${perma ? ` data-href="${perma}"` : ""}><div class="trow"><div class="avc"><span class="pa">${AV}</span>${cs.length ? '<span class="ln"></span>' : ""}</div><div class="cc"><div class="ph"><a class="pn" href="#profile"><b>${NAME}</b></a
|
|
380
|
+
return `<article class="post"${perma ? ` data-href="${perma}"` : ""}><div class="trow"><div class="avc"><span class="pa">${AV}</span>${cs.length ? '<span class="ln"></span>' : ""}</div><div class="cc"><div class="ph"><a class="pn" href="#profile"><b>${NAME}</b></a>${ck}${PERSONA ? `<span class="phandle">@${esc(PERSONA)}</span>` : ""}<span class="dot">·</span>${pt}</div><p class="pbd">${esc(p.body)}</p>${pact}</div></div>${inner}</article>`;
|
|
365
381
|
};
|
|
366
382
|
|
|
367
383
|
let done = false;
|