Skip to content

Commit ba033e4

Browse files
velt-node-v1.0.5 (#227)
Co-authored-by: Rakesh <rakesh@snippyly.com>
1 parent f115f95 commit ba033e4

5 files changed

Lines changed: 106 additions & 2 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Release Update Plan for Velt Node SDK v1.0.5
2+
3+
## Overview
4+
- Release Type: Patch (tiny — 4 files, +33/-3 in SDK; single self-hosting field rename)
5+
- Key Changes: `PartialReactionAnnotation.user` renamed to `from` (reacting user), matching the frontend SDK's `PartialReactionAnnotation.from`. Affects self-hosting reaction resolvers (`sdk.selfHosting.getReactions().saveReactions()` persists `from`; resolved reactions expose `from`).
6+
- Breaking Changes: Yes — clean rename, no backward-compat read shim documented (unlike velt-py v0.1.12).
7+
8+
> CRITICAL FRAMING: This is NOT a find-and-replace rename. The Node docs on `main` ALREADY use `from` for reactions (verified). There is NO stale `user` reaction-author field anywhere in the repo. The real work is illustrative/clarifying additions so the renamed field is actually shown in examples and the SH request type. Agent-3/6 must NOT fabricate a `user``from` rename.
9+
10+
## Areas Requiring Updates
11+
12+
### 1. Data Models — `SaveReactionsRequest` SH (Node)
13+
- File: `api-reference/sdk/models/data-models.mdx` (~line 10826, heading `### \`SaveReactionsRequest\` SH (Node)`)
14+
- Changes: Update the `reactionAnnotation` field's inline shape from `Record<string, { annotationId: string; icon: string; metadata: object }>` to include the renamed field: `Record<string, { annotationId: string; icon?: string; from?: PartialUser; metadata?: object }>`. This reflects that the reacting user is now carried as `from`.
15+
- Priority: Medium
16+
17+
### 2. Data Models — `PartialReactionAnnotation` (NO CHANGE — confirm only)
18+
- File: `api-reference/sdk/models/data-models.mdx` (~line 4921, `#### PartialReactionAnnotation`)
19+
- Changes: NONE. Table already lists `| \`from\` | \`PartialUser\` | No | User who created the reaction annotation |` (verified line 4930). Do NOT duplicate, do NOT re-add, do NOT rename.
20+
- Priority: N-A (confirm correct, leave untouched)
21+
22+
### 3. Documentation — `backend-sdks/node.mdx` `#### saveReactions` example
23+
- File: `backend-sdks/node.mdx` (~line 279, under `### Reactions``#### saveReactions`)
24+
- Changes: The example object currently OMITS the reacting user (`{ annotationId, icon, metadata }`). Add `from: { userId: 'u-1' }` to the `'reaction-1'` reaction object so the renamed field is shown. Optionally add a one-line note that the reacting user is set via `from` (renamed from `user` in v1.0.5), making the `#reactions` anchor target meaningful for the changelog link.
25+
- Priority: High (this is the changelog's `Learn more` link target)
26+
27+
### 4a. UI Customization — Wireframes
28+
- N/A — no UI/wireframe changes in this release.
29+
30+
### 4b. UI Customization — Primitives
31+
- N/A — no new primitive components or props.
32+
33+
### 5. Upgrade Guide
34+
- SKIP. `release-notes/version-5/upgrade-guide.mdx` is the JS v4→v5 guide. A Node-SDK self-hosting field rename does NOT belong there (consistent with velt-py v0.1.12 precedent). The changelog Breaking Changes entry + the node.mdx example/note are sufficient.
35+
36+
### Other SKIP / N-A
37+
- `api-reference/sdk/api/api-methods.mdx` — SKIP (no method signature change).
38+
- `docs.json` — no navigation change.
39+
40+
## Anchor Verification
41+
- Changelog `Learn more` link in `release-notes/version-5/velt-node-changelog.mdx` (line 14) targets `/backend-sdks/node#reactions`.
42+
- `backend-sdks/node.mdx` line 247 has `### Reactions`, which slugifies to `reactions`. CONFIRMED: the anchor resolves correctly. No anchor fix needed.
43+
44+
## Implementation Sequence
45+
1. Agent-3: Add `from: { userId: 'u-1' }` to the `saveReactions` example in `backend-sdks/node.mdx` (~line 282); optionally add the one-line `from` (renamed from `user`) note. (Small)
46+
2. Agent-3: Update `SaveReactionsRequest` SH (Node) `reactionAnnotation` inline shape in `data-models.mdx` (~line 10833) to include `from?: PartialUser`. (Small)
47+
3. Agent-3: Confirm `#### PartialReactionAnnotation` already shows `from` (line 4930) — leave untouched. (Verify only)
48+
4. Agent-6: Confirm NO stale `user` reaction-author field exists repo-wide; do NOT introduce a rename. (Verify only)
49+
50+
## Quality Checklist
51+
- [ ] `SaveReactionsRequest` SH (Node) `reactionAnnotation` shape updated to include `from?: PartialUser`
52+
- [ ] `saveReactions` example in node.mdx shows `from: { userId: 'u-1' }`
53+
- [ ] `#### PartialReactionAnnotation` confirmed already correct (`from`), NOT duplicated or re-renamed
54+
- [ ] No stale `user` reaction-author field introduced anywhere (it does not exist on main)
55+
- [ ] `#reactions` anchor confirmed resolving to node.mdx `### Reactions`
56+
- [ ] Breaking change kept in changelog only; NOT added to upgrade-guide.mdx
57+
- [ ] api-methods.mdx, UI/wireframes/primitives, docs.json untouched
58+
- [ ] Log file written to `.claude/logs/agent-2-planning-velt-node-1.0.5.md`
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## QA Summary for @veltdev/node v1.0.5
2+
3+
### Issues Found: 0
4+
5+
No corrective edits required. All three changed files passed every checklist item.
6+
7+
### Verification Coverage
8+
9+
**release-notes/version-5/velt-node-changelog.mdx**
10+
- `<Update label="1.0.5" description="June 16, 2026">` placed above v1.0.2 (intentional v1.0.3/v1.0.4 gap confirmed absent)
11+
- First `### Breaking Changes` section in this changelog — correct; one bold-title bullet (`PartialReactionAnnotation.user``from`)
12+
- Bullet ends with `[Learn more →](/backend-sdks/node#reactions)`
13+
- `<Update>` tags balanced (2 open / 2 close)
14+
15+
**backend-sdks/node.mdx**
16+
- `#### saveReactions` example object includes `from: { userId: 'u-1' }`
17+
- Note bullet present and accurate (renamed from `user` in v1.0.5, matches frontend `PartialReactionAnnotation.from`)
18+
- `ts` fence closed; fence count even (434); no other method altered
19+
- `#reactions` anchor resolves to `### Reactions` (line 247)
20+
21+
**api-reference/sdk/models/data-models.mdx**
22+
- `SaveReactionsRequest` SH (Node) `reactionAnnotation` type includes `from?: PartialUser`
23+
- Table row well-formed (4 cells)
24+
- `#### PartialReactionAnnotation` heading still lists `from`; not duplicated; untouched
25+
26+
**Cross-file consistency**
27+
- example `from: { userId }` ↔ SH type `from?: PartialUser``PartialReactionAnnotation.from` — aligned
28+
- No stale reaction-author `user` field in any file; all `user` occurrences are rename prose or unrelated `userId`
29+
- No `user``from` global replace performed (would corrupt `userId`/Mongo strings); velt-py `from_` not cross-aligned
30+
- Service count unchanged (17, v1.0.4 baseline); no v1.0.3/v1.0.4 content introduced
31+
32+
### Summary
33+
34+
- Files corrected: 0
35+
- Critical issues: 0
36+
- Scope confirmed: only the 3 expected files modified (`git diff --stat`)
37+
- Overall: PASS

api-reference/sdk/models/data-models.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10830,7 +10830,7 @@ Request payload for `sdk.selfHosting.getReactions().saveReactions`.
1083010830
| Field | Type | Required | Description |
1083110831
|-------|------|----------|-------------|
1083210832
| `metadata` | `{ organizationId: string; documentId: string }` | Yes | Organization and document context. |
10833-
| `reactionAnnotation` | `Record<string, { annotationId: string; icon: string; metadata: object }>` | Yes | Reaction annotations keyed by annotationId. |
10833+
| `reactionAnnotation` | `Record<string, { annotationId: string; icon?: string; from?: PartialUser; metadata?: object }>` | Yes | Reaction annotations keyed by annotationId. The reacting user is set via `from` (renamed from `user` in v1.0.5). |
1083410834

1083510835
### `SaveRecorderAnnotationRequest` SH (Node)
1083610836

backend-sdks/node.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,14 @@ const result = await reactionsService.getReactions({
273273
- Persists reactions to MongoDB.
274274
- Params: [SaveReactionsRequest (SH)](/api-reference/sdk/models/data-models#savereactionsrequest-sh-node)
275275
- Returns: [VeltSelfHostingResponse](/api-reference/sdk/models/data-models#veltselfhostingresponse-node)
276+
- The reacting user is set via `from` (renamed from `user` in **v1.0.5**, matching the frontend `PartialReactionAnnotation.from`).
276277

277278
```ts
278279
const reactionsService = await sdk.selfHosting.getReactions();
279280
const result = await reactionsService.saveReactions({
280281
metadata: { organizationId: 'org-123', documentId: 'doc-1' },
281282
reactionAnnotation: {
282-
'reaction-1': { annotationId: 'reaction-1', icon: 'thumbsup', metadata: {} },
283+
'reaction-1': { annotationId: 'reaction-1', icon: 'thumbsup', from: { userId: 'u-1' }, metadata: {} },
283284
},
284285
});
285286
```

release-notes/version-5/velt-node-changelog.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ description: Release Notes of changes added to the Velt Node.js/TypeScript SDK (
77
### Libraries
88
- `@veltdev/node`
99

10+
<Update label="1.0.5" description="June 16, 2026">
11+
12+
### Breaking Changes
13+
14+
- **`PartialReactionAnnotation.user` renamed to `from`**: The reacting-user field on `PartialReactionAnnotation` is renamed from `user` to `from`, matching the Velt frontend SDK's `PartialReactionAnnotation.from` (and `ReactionAnnotation.from`). This affects self-hosting reaction resolvers (`sdk.selfHosting.getReactions()`): `saveReactions()` now persists the reacting user under `from`, and resolved reactions expose `from`. Code that reads or writes the reacting user must use `from` instead of `user`. [Learn more →](/backend-sdks/node#reactions)
15+
16+
</Update>
17+
1018
<Update label="1.0.4" description="June 16, 2026">
1119

1220
### New Features

0 commit comments

Comments
 (0)