OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-orgs commits / cddaec7

0.2.1: orgs gain an `about` markdown field
The README-equivalent for an org. Optional, free-form markdown, shown on the org's overview page above the Activity card. The existing `description` field stays as a one-line summary (rendered on the orgs index card and at the top of the show page); `about` covers long-form narrative. Schema changes: - `org:{name}.about` added to the view (default ''). Legacy records with `about` undefined are tolerated; renderer treats undefined as empty. - `create-org` op apply: `about: op.about || ''`. - `update-org` op apply: `if (op.about !== undefined) org.about = op.about`. API: - `orgs.create(name, type, { about, ... })` accepts about at create. - `orgs.update(name, { about, ... })` updates about. No validation on the field — markdown is free-form and any rendering guards live in the consumer (pear-git-v3's web SSR uses marked v14 with a try/catch fallback to plain-text). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
cddaec71b1978de812791e9dfb7a7f96075418fc
by plankatron <fleeky@gmail.com> · 2026-05-05T22:06:27.000Z

Changed files (2) +9 -1

lib/hyper-orgs.js +2 -0
……@@ -107,6 +107,7 @@ export class HyperOrgs {
107107 orgType: type,
108108 displayName: data.displayName || name,
109109 description: data.description || '',
110 about: data.about || '',
110111 userId: type === 'user' ? (data.userId || null) : null,
111112 members: type === 'group' ? (data.members || []) : [],
112113 visibility: data.visibility || 'public',
……@@ -133,6 +134,7 @@ export class HyperOrgs {
133134 const op = { type: 'update-org', name, timestamp: Date.now() }
134135 if (updates.displayName !== undefined) op.displayName = updates.displayName
135136 if (updates.description !== undefined) op.description = updates.description
137 if (updates.about !== undefined) op.about = updates.about
136138 if (updates.visibility !== undefined) op.visibility = updates.visibility
137139
138140 await this._room.append(op)
lib/schema.js +7 -1
……@@ -11,7 +11,7 @@
1111 * set-meta
1212 *
1313 * View schema (Hyperbee keys):
14 * org:{name} → { name, displayName, description, type, userId, members, resources, visibility, createdAt, updatedAt }
14 * org:{name} → { name, displayName, description, about, type, userId, members, resources, visibility, createdAt, updatedAt }
1515 * grant:{grantId} → { grantId, subjectType, subjectId, grantType, groupName, resourceName, permission, ... }
1616 * invite:{inviteId} → { inviteId, inviteType, targetGroup, targetResource, permission, maxUses, ... }
1717 * request:{requestId} → { requestId, subjectType, subjectId, requestType, groupName, resourceName, permission, status, ... }
……@@ -182,6 +182,11 @@ export const orgsSchema = jsonSchema({
182182 name: op.name,
183183 displayName: op.displayName || op.name,
184184 description: op.description || '',
185 // `about` is free-form markdown shown on the org's overview
186 // page (the README-equivalent for orgs). Optional; legacy
187 // records load with `about` undefined and the renderer treats
188 // that the same as empty.
189 about: op.about || '',
185190 type: op.orgType,
186191 userId: op.orgType === 'user' ? (op.userId || null) : null,
187192 members: op.members || [],
……@@ -199,6 +204,7 @@ export const orgsSchema = jsonSchema({
199204 const org = entry.value
200205 if (op.displayName !== undefined) org.displayName = op.displayName
201206 if (op.description !== undefined) org.description = op.description
207 if (op.about !== undefined) org.about = op.about
202208 if (op.visibility !== undefined) org.visibility = op.visibility
203209 org.updatedAt = op.timestamp
204210 await batch.put(`org:${op.name}`, org)