Skip to content

Commit a4b12e0

Browse files
v5.0.3 (#230)
* v5.0.3 * save --------- Co-authored-by: Rakesh <rakesh@snippyly.com>
1 parent 99e6e61 commit a4b12e0

9 files changed

Lines changed: 307 additions & 7 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Release Update Plan for v5.0.3
2+
3+
## Overview
4+
- Release Type: Minor (fully additive; no breaking changes)
5+
- Key Changes: Multi-org "Selected Teams" comment visibility — `organizationIds?: string[]` on `CommentVisibilityConfig`; `PrivateModeConfig` Omit widened; new `contactElement.updateOrgList()` API (+ `OrgContact`, `UpdateOrgListConfig` types); new `OrgPicker` primitive + matching wireframe component.
6+
- Breaking Changes: No. No `upgrade-guide.mdx` edit. Omit change is additive (a previously-omitted field is now accepted).
7+
- docs.json: No change. OrgPicker/updateOrgList land on existing pages already in nav (docs.json L399–401). Confirmed.
8+
- Bug fixes (7): Behavioral visibility-correctness fixes. Covered by the changelog; no separate doc-API edits. Confirmed.
9+
10+
## Areas Requiring Updates
11+
12+
### 1. Data Models — Agent-3 — Priority: High
13+
File: `api-reference/sdk/models/data-models.mdx`
14+
- `#### CommentVisibilityConfig` table (L271–276): add row `organizationIds` | `string[]` | No | "Target multiple organizations when `type` is `'organizationPrivate'`. Merged and de-duplicated with `organizationId`." Keep `organizationId` row.
15+
- `#### PrivateModeConfig` (L282–294): change Omit to `Omit<CommentVisibilityConfig, 'annotationId'>` (drop `| 'organizationId'`); update the prose at L282 (it currently says "excludes `annotationId` and `organizationId`"); add `organizationId` and `organizationIds` rows to the props table.
16+
- New types: add `OrgContact` (`id: string`; `name?: string`) and `UpdateOrgListConfig` (`orgList: OrgContact[]`). Place near contact/visibility models; mirror existing table format (Property | Type | Required | Description).
17+
18+
### 2. API Methods — Agent-3 — Priority: High
19+
File: `api-reference/sdk/api/api-methods.mdx`
20+
- New `#### updateOrgList()` immediately after `updateContactList()` (ends L676) / before `updateContactListScopeForOrganizationUsers()` (L678). Mirror the `updateContactList()` block format:
21+
- Params: [`config: UpdateOrgListConfig`](/api-reference/sdk/models/data-models#updateorglistconfig)
22+
- Returns: `void`; React Hook: `useContactUtils()`
23+
- Note full-replace semantics (every call replaces the list; `{ orgList: [] }` clears); exposed on `contactElement` only.
24+
- `updateVisibility()` (L138–143) and `enablePrivateMode()` (L145–150): add a one-line `organizationIds: string[]` note (multi-org target; merged + de-duped with `organizationId`).
25+
- `addCommentAnnotation()` (L9): note `visibility` accepts `organizationIds`.
26+
File: `async-collaboration/comments/customize-behavior.mdx`
27+
- `updateVisibility` full section (L2884–2964): add `organizationIds` to the `CommentVisibilityConfig` param bullets (after L2892) and add an `organizationPrivate` example using `organizationIds: ['org-1','org-2']` in BOTH tabs (React L2898+, Other Frameworks L2932+).
28+
- `enablePrivateMode` full section: add the same `organizationIds` mention/example.
29+
- Optional: add a brief `updateOrgList` mention near the `updateContactList` full section (L2115) if Agent-3 deems the picker needs a behavior anchor; otherwise the api-methods entry suffices.
30+
31+
### 4a. UI Customization — Wireframe — Agent-4 — Priority: Medium
32+
The wireframe `OrgPicker` is the team analogue of `UserPicker`. Mirror UserPicker's structure (container + Search/Header/Item sub-tree) ONLY IF the SDK ships those sub-parts; the release spec describes the picker as a single component analogue, so default to the container component plus the same sub-children pattern as UserPicker and confirm against the SDK. At minimum add the container entry.
33+
- File: `ui-customization/features/async/comments/comment-dialog-structure.mdx`
34+
- React tree: in `##### VeltCommentDialogWireframe.VisibilityBanner.Dropdown.Content` (L270–272), add `- VeltCommentDialogWireframe.VisibilityBanner.Dropdown.Content.OrgPicker` directly after the `...Content.UserPicker` line (L272). Add its own `#####` subsection after the UserPicker subsection (after L294) if sub-children are documented, mirroring L278–294.
35+
- HTML tree: after the user-picker wireframe block (L578, L584–600), add `velt-comment-dialog-visibility-banner-dropdown-content-org-picker-wireframe` entry mirroring the user-picker entry exactly.
36+
- File: `ui-customization/features/async/comments/comment-dialog/wireframes.mdx`
37+
- In `#### Content (Visibility Banner Dropdown)` (L4264–4293): add `<VeltCommentDialogWireframe.VisibilityBanner.Dropdown.Content.OrgPicker />` (React, after L4275) and `<velt-comment-dialog-visibility-banner-dropdown-content-org-picker-wireframe>` (HTML, after L4288).
38+
- Add a new `##### **OrgPicker (Visibility Banner Dropdown Content)**` subsection immediately after the UserPicker subsection (UserPicker starts L4360; its block ends ~L4591). Mirror the UserPicker subsection format exactly: bold h5 title, React/Other Frameworks `<Tabs>`, `<VeltWireframe>` wrapper. If documenting sub-children, mirror UserPicker's `**Search/Header/Item ...**` bold sub-entries with `(Visibility Banner Dropdown Content OrgPicker)` parenthetical suffixes.
39+
- File: `ui-customization/features/async/comments/comment-dialog/wireframe-variables.mdx`
40+
- Grep for the user-picker wireframe element here; add the analogous `OrgPicker` wireframe-variable entry only if UserPicker has one (mirror it). If UserPicker is absent from this file, no edit.
41+
42+
### 4b. UI Customization — Primitive — Agent-5 — Priority: Medium
43+
- File: `ui-customization/features/async/comments/comment-dialog/primitives.mdx`
44+
- New entry `### VeltCommentDialogVisibilityBannerDropdownContentOrgPicker` placed immediately after the UserPicker container entry `### VeltCommentDialogVisibilityBannerDropdownContentUserPicker` (L3545–3564) — i.e. insert after L3564 / before the `...UserPickerSearch` entry (L3568).
45+
- Mirror the UserPicker container entry exactly (L3545–3564):
46+
- One-line description (team analogue): "Team picker for selecting specific organizations/teams when visibility is set to `selected-teams`."
47+
- React tab: `<VeltCommentDialogVisibilityBannerDropdownContentOrgPicker annotationId="abc123" />`
48+
- Other Frameworks tab: `<velt-comment-dialog-visibility-banner-dropdown-content-org-picker annotation-id="abc123"></velt-comment-dialog-visibility-banner-dropdown-content-org-picker>`
49+
- Props/Attributes: "Common inputs only (see [Common Inputs](#common-inputs) section)." — the primitive's three props (`annotationId`, `defaultCondition`, `inlineCommentSectionMode`) are already the documented Common Inputs (L62–70). Do NOT add a separate props table; match the sibling.
50+
- Primitives belong ONLY here, NEVER in a wireframes/components page.
51+
52+
## Name-Mirror Spec (QA will diff exact strings)
53+
| Surface | React / dotted name | HTML element |
54+
| --- | --- | --- |
55+
| Primitive | `VeltCommentDialogVisibilityBannerDropdownContentOrgPicker` | `velt-comment-dialog-visibility-banner-dropdown-content-org-picker` |
56+
| Wireframe | `VeltCommentDialogWireframe.VisibilityBanner.Dropdown.Content.OrgPicker` | `velt-comment-dialog-visibility-banner-dropdown-content-org-picker-wireframe` |
57+
58+
Mirror rule: wireframe path = primitive name segment-by-segment. Primitive `...VisibilityBannerDropdownContentOrgPicker` ↔ wireframe `VisibilityBanner.Dropdown.Content.OrgPicker`; HTML wireframe = primitive HTML + `-wireframe` suffix. UserPicker is the exact sibling template for every entry. UI-customization headings use the full parent-path component name; wireframes.mdx h5 titles are bold.
59+
60+
## Implementation Sequence
61+
1. Agent-3: data-models.mdx (`organizationIds`, `PrivateModeConfig` Omit, `OrgContact`, `UpdateOrgListConfig`) then api-methods.mdx (`updateOrgList()` + notes) then customize-behavior.mdx examples.
62+
2. Agent-4: wireframe OrgPicker in comment-dialog-structure.mdx + wireframes.mdx (+ wireframe-variables.mdx if UserPicker present). Mirror UserPicker.
63+
3. Agent-5: OrgPicker primitive in comment-dialog/primitives.mdx, after UserPicker container entry. Mirror UserPicker, "Common inputs only".
64+
4. Agent-6: align terminology ("Selected Teams", OrgPicker, updateOrgList, organizationIds) repo-wide.
65+
5. Agent-7: QA — diff primitive vs wireframe name strings; confirm no breaking-change content leaked into the changelog.
66+
67+
## Quality Checklist
68+
- [ ] `organizationIds` added to `CommentVisibilityConfig` (data-models.mdx); `organizationId` retained.
69+
- [ ] `PrivateModeConfig` Omit widened to `Omit<CommentVisibilityConfig, 'annotationId'>`; prose + table updated.
70+
- [ ] `OrgContact` + `UpdateOrgListConfig` added to data-models.mdx.
71+
- [ ] `updateOrgList()` documented in api-methods.mdx after `updateContactList()`; full-replace + `contactElement`-only noted.
72+
- [ ] `organizationIds` notes added to `updateVisibility`/`enablePrivateMode`/`addCommentAnnotation` (api-methods + customize-behavior).
73+
- [ ] OrgPicker wireframe added to comment-dialog-structure.mdx (React + HTML trees) and wireframes.mdx, mirroring UserPicker; h5 titles bold.
74+
- [ ] OrgPicker primitive added to comment-dialog/primitives.mdx after UserPicker container; "Common inputs only".
75+
- [ ] Primitive/wireframe name strings mirror segment-by-segment (per Name-Mirror Spec).
76+
- [ ] All code examples include React / Next.js and Other Frameworks tabs.
77+
- [ ] No breaking-change content in the changelog; no upgrade-guide edit.
78+
- [ ] No docs.json change (verified pages already in nav).
79+
- [ ] Log written to `.claude/logs/agent-2-planning-5.0.3.md`.

.claude/logs/agent-7-qa-5.0.3.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Agent-7 QA — core Velt SDK v5.0.3 (multi-org "Selected Teams" comment visibility)
2+
3+
Branch: `main` · Scope confirmed: exactly the 7 expected files modified. Backend changelogs (velt-node/velt-py) and `docs.json` untouched. `.claude/logs/agent-2-planning-5.0.3.md` is an untracked planning log, not a doc change.
4+
5+
## Issues Found: 1 (fixed)
6+
7+
1. **primitives.mdx** (`comment-dialog/primitives.mdx`, OrgPicker entry) — The new OrgPicker primitive prose claimed the picker appears "when visibility is set to `selected-teams`", mirroring the UserPicker sibling's `selected-people`. But `selected-teams` is NOT a real value: the `Content.Item` `type` enum (structure.mdx + wireframes.mdx) only lists `'public' | 'org-users' | 'personal' | 'selected-people'`, and the feature targets teams via `organizationPrivate` + `organizationIds` surfaced by `updateOrgList()` — not a new Item type (the brief confirms v5.0.3 adds the component, not an Item type). `selected-teams` appeared in NO other shipped doc.
8+
- Fix: Reworded to "scoping an `organizationPrivate` comment to specific teams (the 'Selected Teams' picker)… appears automatically once a team list is provided via `contactElement.updateOrgList()`." Now matches the changelog, customize-behavior, and the wireframe subsection. No invented enum value.
9+
10+
## Verification Coverage (per file)
11+
12+
- **sdk-changelog.mdx**`<Update label="5.0.3" description="June 18, 2026">` sits above `5.0.2-beta.38`; `### New Features` (3) + `### Bug Fixes` (7), each a distinct `[**Comments**]` bullet (no merging); no code/wireframe blocks; all 4 learn-more anchors resolve; `<Update>` tags balanced (62/62 repo-wide); fences balanced.
13+
- **data-models.mdx**`CommentVisibilityConfig` has `organizationIds` row; `PrivateModeConfig = Omit<CommentVisibilityConfig, "annotationId">` (no longer omits `organizationId`) with `organizationId`/`organizationIds` rows; `OrgContact` + `UpdateOrgListConfig` sections well-formed; all `ts`/`typescript` fences balanced.
14+
- **api-methods.mdx**`updateOrgList()` present, mirrors `updateContactList()` format (no code examples — page convention; correct); `organizationIds` notes added to updateVisibility/enablePrivateMode/addCommentAnnotation.
15+
- **customize-behavior.mdx**`#### updateOrgList` section + React/Other Frameworks examples (React uses `client`, Other Frameworks uses `Velt` — correct); `organizationIds` examples added to updateVisibility/enablePrivateMode; fences balanced.
16+
- **comment-dialog-structure.mdx**`Content.OrgPicker` (React tree) + `…content-org-picker-wireframe` (HTML tree) added under VisibilityBanner.Dropdown.Content; consistent with existing tree.
17+
- **wireframes.mdx** — OrgPicker added to both wireframe trees; new `##### **OrgPicker (Visibility Banner Dropdown Content)**` subsection (bold h5, mirrors UserPicker); `<velt-wireframe style="display:none;">` present; HTML uses separate open/close tags; fences balanced.
18+
- **primitives.mdx** — OrgPicker entry mirrors UserPicker sibling (h3, "Common inputs only", no fabricated props table); primitive HTML has NO `-wireframe`; `#common-inputs` anchor resolves; fences balanced.
19+
20+
### Name mirror (exact strings, verified)
21+
- Primitive: `VeltCommentDialogVisibilityBannerDropdownContentOrgPicker` / `velt-comment-dialog-visibility-banner-dropdown-content-org-picker` — no `-wireframe`.
22+
- Wireframe: `VeltCommentDialogWireframe.VisibilityBanner.Dropdown.Content.OrgPicker` / `velt-comment-dialog-visibility-banner-dropdown-content-org-picker-wireframe` — has `-wireframe`.
23+
- Segment-by-segment match, no casing drift. UserPicker siblings unchanged.
24+
25+
### Link integrity
26+
All resolve: changelog → `#commentvisibilityconfig`, `#updateorglist`, `.../comment-dialog/primitives`; cross-doc → `#updateorglistconfig`, `#orgcontact`, `#privatemodeconfig`; customize-behavior anchor `#updateorglist`. Targets confirmed present in data-models.mdx (265/279/296/316), api-methods.mdx (681), customize-behavior.mdx (2159).
27+
28+
## Pre-existing flags (NOT fixed — out of scope)
29+
30+
- **Agent-6's reported `Content.Item` `type` enum drift could NOT be reproduced.** Agent-6 flagged a `selected-people` vs `selected-teams` split in structure.mdx's HTML tree. On inspection, structure.mdx uses `selected-people` consistently in BOTH the React tree (line 271) and the HTML tree (line 578); wireframes.mdx likewise uses `selected-people` throughout (lines 4274/4288/4299). The only `selected-teams` occurrence in shipped docs was the new OrgPicker primitive prose — which was a v5.0.3-introduced inaccuracy, now fixed above (Issue 1), not a pre-existing drift. No `selected-teams` Item type exists anywhere; flag is informational for the team in case the SDK ever introduces such a type.
31+
- **Minor (note only, acceptable):** `CommentVisibilityConfig` prose lacks an explicit v5.0.3 sentence (`PrivateModeConfig` got one), but the `organizationIds` row is present and the anchor resolves. Optional, not fixed.
32+
33+
## Summary
34+
35+
- Files corrected: 1 (primitives.mdx)
36+
- Genuine issues: 1 (fixed) — invented `selected-teams` enum value in OrgPicker prose
37+
- Pre-existing flags: 1 reported by Agent-6 could not be reproduced (clarified above)
38+
- Scope: 7/7 expected files; backend changelogs + docs.json untouched
39+
- Name mirror, fences, MDX/JSX tags, anchors, headings: all pass
40+
- **Overall: PASS.** Agent-1 ready for next release note.

api-reference/sdk/api/api-methods.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Add a new comment annotation.
1111
- Params: [AddCommentAnnotationRequest](/api-reference/sdk/models/data-models#addcommentannotationrequest)
1212
- Returns: [AddCommentAnnotationEvent](/api-reference/sdk/models/data-models#addcommentannotationevent)
1313
- React Hook: `useAddCommentAnnotation()`
14+
- Note: For `organizationPrivate` visibility, the visibility config accepts `organizationIds?: string[]` (multi-org) alongside `organizationId`; they are merged + de-duplicated. With neither provided, the comment defaults to the logged-in user's own org.
1415
- [Full Documentation →](/async-collaboration/comments/customize-behavior#addcommentannotation)
1516

1617
#### addCommentOnSelectedText()
@@ -140,13 +141,15 @@ Programmatically set comment visibility to `public`, `organizationPrivate`, or `
140141
- Params: `annotationId: string`, [`config: CommentVisibilityConfig`](/api-reference/sdk/models/data-models#commentvisibilityconfig)
141142
- Returns: `void`
142143
- React Hook: `n/a`
144+
- Note: For `organizationPrivate`, `config` accepts `organizationIds?: string[]` (multi-org) alongside `organizationId`; they are merged + de-duplicated. With neither provided, the comment defaults to the logged-in user's own org.
143145
- [Full Documentation →](/async-collaboration/comments/customize-behavior#updatevisibility)
144146

145147
#### enablePrivateMode()
146148
Enable private mode so new comments are created with restricted visibility by default.
147149
- Params: [`PrivateModeConfig`](/api-reference/sdk/models/data-models#privatemodeconfig)
148150
- Returns: `void`
149151
- React Hook: `n/a`
152+
- Note: `PrivateModeConfig` now accepts `organizationId` / `organizationIds?: string[]` for `organizationPrivate` mode; `organizationIds` is merged + de-duplicated with `organizationId`. With neither provided, comments default to the logged-in user's own org.
150153
- [Full Documentation →](/async-collaboration/comments/customize-behavior#enableprivatemode)
151154

152155
#### disablePrivateMode()
@@ -834,6 +837,13 @@ Update the contact list for the current user session.
834837
- React Hook: `useContactUtils()`
835838
- [Full Documentation →](/async-collaboration/comments/customize-behavior#updatecontactlist)
836839

840+
#### updateOrgList()
841+
Supplies the list of teams shown in the comment dialog's "Selected Teams" visibility picker. Unlike `updateContactList()`, this is a full replace on every call (it does not merge); pass `{ orgList: [] }` to clear the picker. Exposed on `contactElement` only.
842+
- Params: [`config: UpdateOrgListConfig`](/api-reference/sdk/models/data-models#updateorglistconfig) (`orgList` is an array of [`OrgContact`](/api-reference/sdk/models/data-models#orgcontact))
843+
- Returns: `void`
844+
- React Hook: `useContactUtils()`
845+
- [Full Documentation →](/async-collaboration/comments/customize-behavior#updateorglist)
846+
837847
#### updateContactListScopeForOrganizationUsers()
838848
Restrict which contacts are shown in the dropdown for organization users.
839849
- Params: `scopes: Array<'all' | 'organization' | 'organizationUserGroup' | 'document'>`

0 commit comments

Comments
 (0)