@ai-matrx/associations 0.14.82 → 0.14.83

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/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
+ - **A comment the platform wrote is credited to the platform (2026-10-19).** An edit remark's thread opener is minted with `created_by_tier = 'system'` under the person whose remark it was; `CommentThread` named that person as its author. `toComment` now sets `authorSystem: true` (new optional field on `PlatformComment`) for a system row, and the thread credits it to `SYSTEM_AUTHOR_NAME` ("AI Matrx") with no profile door, no Agent badge and no Edit. Guard: `src/react/__tests__/comments.test.tsx` ("credits a system-written comment…"). Consumer action: none.
5
6
  - **A signed-out tab is told it is signed out (2026-10-19).** `mapPgError` used to read a 42501 `permission denied for function` as "Permission denied"; an anonymous caller (an ended or expired session) meets exactly that on every demanded door, so the remedy it named was wrong. Now PGRST301 / PGRST303 / 28000, and 42501 "permission denied for function" while the session is not attached, map to `unauthorized` with `SIGNED_OUT_MESSAGE` ("You're signed out. Sign in again — your text is kept here."). With the session attached a 42501 stays `forbidden_org` (a real grant gap). New optional ports: `identity.sessionAttached()` and the React `signIn` port (CommentThread shows a Sign in button beside a signed-out post or load failure). Guard: `src/core/__tests__/rpcResult.test.ts`. Consumer action: bind `identity.sessionAttached` (matrx-frontend: `sessionStateNow() === "attached"`) and `signIn` on `AssociationsProvider` (open login in a new tab); without `sessionAttached` every such 42501 reads as signed out.
6
7
  - **The attach pickers put the cursor in their search box on open.** `UniversalAssociationPicker` (the `+ Add` panel of `AssociationList`) and the per-type `AssociationPicker` search inputs now `autoFocus`. Guard: `src/react/__tests__/faces.test.tsx` ("puts the cursor in the search box when it opens"). Consumer action: none.
7
8
  - **Shared code ships once per side (2026-10-18).** The root and `/core` were each built `splitting: false`, so each inlined the 420 KB entity-type vocabulary (`src/entity-types.generated.ts`) plus three more modules: a host importing both paid twice. ESM now builds root + `/core` in one split pass (`chunk-server-*.js`, no banner) and `/react` + `/react/lazy` in another (stamped). CJS unsplit; declarations unchanged. ESM JS 1,177,448 -> 756,462 bytes; root + `/core` closure 947 KB -> 520 KB; every entry's export names identical (ESM and CJS). Guard: `../scripts/check-ships-once.mjs`, run in `build`. Consumer action: none.
@@ -10,11 +11,20 @@
10
11
  - **`AssociationList` takes `title`.** Default stays "Resources"; pass a string to rename the heading, or `null` when the host card already titles the list (the attach controls stay, right-aligned). Guard: `src/react/__tests__/association-list-title.test.tsx`. Consumer action: replace any host CSS that hides the list's `h3` (matrx-frontend: `HIDE_LIST_HEADING` in `BrandResearchCard.tsx`, `ResearchTopicLinks.tsx`) with `title={null}`.
11
12
  - **Linking records no longer freezes a name onto the edge.** `useContainerLinksAdapter().attach` (and `AssociationCard`'s picker) used to store the picked record's title as the association label, so a research topic linked to brand "AI Matrx" listed on that brand as "AI Matrx". The picked title is no longer stored; each side shows the linked record's own current name from the title resolver. A deliberate label is still stored via `useContainerLinks().attach(token, id, label)`. Guard: `src/react/__tests__/outgoing-links.test.tsx` ("attach never freezes a name"). Consumer action: remove any adapter wrapper that blanks `label` (matrx-frontend: `useNeutralLinksAdapter`) and use `useContainerLinksAdapter` directly; edges already written with a label keep it until cleared.
12
13
 
13
- ## 0.14.82
14
+ ## 0.14.83
14
15
 
15
16
  UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
16
17
  Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/associations/src`.
17
18
 
19
+ ## 0.14.82
20
+
21
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
22
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
23
+ Diff: `git diff 3e26272e1e f37869f518 -- apps/shared/associations/src`
24
+
25
+ Changed shipped source files (1):
26
+ - `apps/shared/associations/src/association-types.generated.ts`
27
+
18
28
  ## 0.14.81
19
29
 
20
30
  SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
@@ -449,6 +449,11 @@ interface PlatformComment {
449
449
  * authority it ran under — an agent's comment is never "mine" and has no Edit.
450
450
  */
451
451
  authorAgent: CommentAgentAuthor | null;
452
+ /**
453
+ * The platform itself wrote this comment (`created_by_tier = 'system'`, e.g. the opener of
454
+ * an edit remark's thread): credited to the system, never to `createdBy`, never editable.
455
+ */
456
+ authorSystem?: boolean;
452
457
  /** The comment's anchor (`text_anchor` passage, `part_anchor` part, ...), or null for the whole record. */
453
458
  anchor: CommentAnchor | null;
454
459
  }
@@ -449,6 +449,11 @@ interface PlatformComment {
449
449
  * authority it ran under — an agent's comment is never "mine" and has no Edit.
450
450
  */
451
451
  authorAgent: CommentAgentAuthor | null;
452
+ /**
453
+ * The platform itself wrote this comment (`created_by_tier = 'system'`, e.g. the opener of
454
+ * an edit remark's thread): credited to the system, never to `createdBy`, never editable.
455
+ */
456
+ authorSystem?: boolean;
452
457
  /** The comment's anchor (`text_anchor` passage, `part_anchor` part, ...), or null for the whole record. */
453
458
  anchor: CommentAnchor | null;
454
459
  }
@@ -4230,6 +4230,7 @@ function toComment(row) {
4230
4230
  avatarUrl: row.author_avatar_url ?? null
4231
4231
  },
4232
4232
  authorAgent: row.author_agent_id ? { id: row.author_agent_id, name: row.author_agent_name ?? null } : null,
4233
+ ...row.created_by_tier === "system" && !row.author_agent_id ? { authorSystem: true } : {},
4233
4234
  anchor: row.anchor && typeof row.anchor === "object" ? row.anchor : null
4234
4235
  };
4235
4236
  }