@mohsinonxrm/pptb-dataverse-request-studio 1.1.2 → 1.1.3

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
@@ -1,291 +1,311 @@
1
- # Changelog
2
-
3
- All notable changes to Dataverse Request Studio will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.1.2] - 2026-06-08
9
-
10
- ### 🐛 Fixed
11
-
12
- - **`refreshAll()` race condition** (`metadataProvider.ts`) — the Settings
13
- "Refresh metadata" button now drains any in-flight `buildTable` promises via
14
- `Promise.allSettled` before clearing the cache. Previously an orphaned fetch
15
- that settled after the clear could call `__registerLiveTable` with
16
- pre-refresh data, silently overwriting the fresh registration.
17
-
18
- - **Silent bad-hop in OData parse validation** (`odataParser.ts`) — when the
19
- parser walks a nav-path `$filter` column and encounters an unknown or
20
- non-ManyToOne navigation segment, it now emits an actionable warning (naming
21
- the bad segment and its owner table) instead of silently skipping validation.
22
- A separate warning is emitted when the related entity's metadata times out
23
- during the walk.
24
-
25
- - **`resolveNavPath` leaf lookup now matches `oDataName`** (`mock/metadata.ts`)
26
- — the leaf-column search now also checks `ColumnMeta.oDataName` (e.g.
27
- `_primarycontactid_value`) in addition to `logicalName`. This closes a gap
28
- where a round-tripped or pasted OData `$filter` that preserved the lookup
29
- wire form as the path leaf would resolve to `undefined`, causing the `$filter`
30
- encoder to fall back to string-quoting a value that should be unquoted
31
- (GUID / integer).
32
-
33
- ## [1.1.1] - 2026-06-08
34
-
35
- ### 🐛 Fixed
36
-
37
- - **Custom OptionSet (and other typed) values incorrectly quoted as strings in
38
- `$filter` over a lookup navigation** ([#33](https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio/issues/33)).
39
- Filtering on a related-entity column via a nav path — e.g.
40
- `msdyn_opportunityid/abc_salesstage eq 809770000` — emitted the value as a
41
- quoted `Edm.String` (`'809770000'`), which Dataverse rejects with HTTP 500
42
- / `0x80060888`. Standard columns appeared to work only by coincidence (the
43
- root entity happened to own a same-named column). Root cause: the `$filter`
44
- encoder resolved the leaf column against the **root** table instead of
45
- walking the relationship to the **related** entity, so the leaf's
46
- `AttributeType` never drove the quoting decision. The encoder now resolves
47
- nav-path leaves against the correct related entity, so numeric/boolean/choice
48
- types are emitted unquoted and strings/GUIDs are quoted, consistently.
49
-
50
- ### ✨ Added / Changed (architecture)
51
-
52
- - **Single, metadata-driven nav-path resolver (`resolveNavPath`)** in
53
- `mock/metadata.ts` — now the one source of truth for resolving a
54
- slash-delimited path (`nav/.../leaf`, alias-aware) to its leaf `ColumnMeta`,
55
- owner table, visited chain, and first not-yet-loaded hop. The `$filter`
56
- encoder (`colLookup`), the filter editor's leaf/pending-target resolution,
57
- and the `$orderby` warnings all route through it, eliminating duplicated
58
- walk logic that had drifted out of sync.
59
- - **Related-entity metadata pre-warming (`useWarmReferencedTables`)** — the
60
- Retrieve Multiple / Retrieve Single modes now walk the `$filter`, `$expand`,
61
- `$apply`, and `$orderby` trees and pre-fetch the related entities they
62
- reference. This makes correct type resolution independent of whether the
63
- user opened the relevant editor — covering **saved-request reload**,
64
- **pasted OData URLs**, and **direct Execute**. Targeted (only referenced
65
- entities) and self-healing across multi-hop paths, so it stays clear of the
66
- 100-concurrent-request cap.
67
- - **Paste-OData parsing** now validates and pre-loads nav-path filter leaves
68
- instead of skipping them.
69
- - **Metadata cache TTL raised from 5 minutes to 1 hour**, with a new
70
- **Settings → Refresh metadata** button (`metadata.refreshAll`) to force a
71
- fresh pull after publishing schema changes mid-session.
72
-
73
- ## [1.1.0] - 2026-05-25
74
-
75
- ### ✨ Added
76
-
77
- - **Scope-setup guidance banner** — when the tool loads with the entity scope
78
- unconfigured (i.e. `entityScopeMode` is `publisher-solution` or
79
- `solution-only` but no solutions have been selected), a contextual
80
- `MessageBar` (warning intent) is shown at the top of the Target pane across
81
- **all 14 modes** that use `TargetEditor`. The banner provides a mode-specific
82
- hint and an **Open Settings** button that opens the Settings drawer directly.
83
- It disappears automatically once the user selects a publisher / solution (or
84
- switches to *All Entities*) — no dismiss cookie required, because the
85
- condition is purely reactive to the persisted `DisplaySettings` state.
86
-
87
- - **`OpenSettingsProvider` / `useOpenSettings` / `useRegisterOpenSettings`**
88
- (`src/host/useOpenSettings.tsx`) — new React context that provides a
89
- stable `() => void` callback to open the Settings drawer from any component
90
- in the tree without prop-drilling. Uses a ref-based registration pattern
91
- (zero provider re-renders). `FrameHeader` registers the callback on mount;
92
- any consumer calls `useOpenSettings()` to get it.
93
-
94
- - **`useScopedEntities` now exposes `needsSetup: boolean` and
95
- `scopeMode: EntityScopeMode`** — consumers can detect the
96
- unconfigured-scope condition and tailor guidance text accordingly.
97
-
98
- ### 🔍 Settings persistence confirmation
99
-
100
- - Verified that all `DisplaySettings` (scope mode, selected publisher /
101
- solution IDs, display flags) are persisted via `window.toolboxAPI.settings`
102
- under the namespaced key `pptb-dataverse-request-studio:displaySettings`.
103
- The prefix is distinct from other PPTB tools (e.g. FetchXML Studio). No
104
- changes to the persistence layer were required.
105
-
106
- ---
107
-
108
- ## [1.0.0] - 2026-05-24
109
-
110
- Initial public release of Dataverse Request Studio — a metadata-driven studio
111
- for composing, previewing, and executing Microsoft Dataverse Web API requests
112
- inside Power Platform ToolBox.
113
-
114
- ### ✨ Added
115
-
116
- #### 📖 Read group (4 modes)
117
-
118
- - **Retrieve Multiple** — full OData composer:
119
- `$select` / `$filter` / `$orderby` / `$expand` / `$top` / `$skip` /
120
- `$count` / `$apply` (groupby + aggregate). Filter tree with AND/OR
121
- combinators, group nesting, NOT toggles, column-vs-column comparisons,
122
- lambda `any`/`all` on collection-valued navs, and the full Dataverse
123
- query-function family (`Microsoft.Dynamics.CRM.*`). Virtualized results
124
- grid with infinite scroll via `@odata.nextLink`.
125
- - **Retrieve Single** — by primary key OR alternate key (composite alternate
126
- keys supported via `(col1='v1',col2='v2')` URL syntax).
127
- - **Retrieve NextLink** — paste a server-emitted `@odata.nextLink` URL to
128
- continue paging any prior query.
129
- - **Predefined Query** — execute saved-query (`?savedQuery=<id>`) and
130
- user-query (`?userQuery=<id>`) requests with a layout-aware results grid
131
- that mirrors the source view's column order from `layoutxml`.
132
-
133
- #### ✏️ Write group (5 modes)
134
-
135
- - **Create Record** — `POST /<set>` with metadata-driven `FieldSetEditor`,
136
- required-field guard, `Prefer: return=representation` toggle, return-set
137
- `$select`, Form ↔ JSON body-mode switcher (Monaco editor for JSON edits),
138
- and the `MSCRM.*` bypass-header family.
139
- - **Update Record** — `PATCH /<set>(<id>)` multi-field OR `PUT /<set>(<id>)/<col>`
140
- single-column. Diff view (before → after) with per-row drill-down that
141
- flips the method pill from PATCH to PUT automatically.
142
- - **Upsert Record** — full upsert / create-only / update-only / etag-guarded
143
- variants. By GUID OR alternate key.
144
- - **Delete Record** — `DELETE /<set>(<id>)` with a typed-confirmation safety
145
- affordance + cascade-impact preview. Single-property delete via
146
- `DELETE /<set>(<id>)/<col>` and `PUT /<set>(<id>)/<col>` with `{"value": null}`
147
- also supported.
148
- - **Merge Records** — `POST /Merge` for `account` / `contact` / `incident`
149
- with target + subordinate record cards, field-override matrix, and
150
- PerformParentingChecks / SuppressDuplicateDetection settings.
151
-
152
- #### 🔗 Relate group (2 modes)
153
-
154
- - **Associate** — collection-valued `POST /<set>(<id>)/<nav>/$ref` OR
155
- single-valued `PATCH @odata.bind`. Cardinality detected from metadata; verb
156
- auto-flips with the nav picker. Polymorphic lookups (Customer, Owner,
157
- `regardingobjectid`) emit the correct target-disambiguated
158
- `<navName>@odata.bind` binding shape.
159
- - **Disassociate** — collection-valued `DELETE /<set>(<id>)/<nav>(<targetId>)/$ref`
160
- OR single-valued `PATCH @odata.bind: null`. Same polymorphism story.
161
-
162
- #### ⚡ Execute group (3 modes)
163
-
164
- - **Execute Action** — OOB / Custom API / Custom Action invocation via
165
- bound `POST /<set>(<id>)/Microsoft.Dynamics.CRM.<Action>` OR unbound
166
- `POST /<Action>`. CSDL-driven parameter form with type-aware controls:
167
- EntityReference (record picker), EntityCollection (multi-record picker),
168
- Edm primitives (typed inputs), Enum / Status-code OptionSet (live-resolved
169
- picker), ComplexType (nested form). Required-first UX with optional params
170
- collapsed into an Accordion; Form ↔ JSON toggle via Monaco; Request body
171
- preview card.
172
- - **Execute Function** — OData function calls with `?@p1=...` parameter
173
- aliasing OR inline literal encoding. Colorized URL preview. Same
174
- type-aware controls as actions.
175
- - **Execute Workflow** — runs on-demand workflows via
176
- `POST /workflows(<id>)/Microsoft.Dynamics.CRM.ExecuteWorkflow` with the
177
- bound record id. Live picker over activated, on-demand process workflows
178
- (`statecode eq 1 and type eq 1 and ondemand eq true and category eq 0`).
179
-
180
- #### 💾 Binary group (3 modes)
181
-
182
- - **Manage File Data** — File-column upload / download / delete pipelines:
183
- - 3 upload paths — single-request `PATCH /<set>(<id>)/<col>` with
184
- `x-ms-file-name` header, chunked PATCH with session token in `Location`
185
- response, or `InitializeFileBlocksUpload` / `UploadBlock` /
186
- `CommitFileBlocksUpload` messages.
187
- - 4 download paths — single GET `/$value`, ranged GET with `Range` header,
188
- message-based block download via `InitializeFileBlocksDownload` /
189
- `DownloadBlock`, or `GetFileSasUrl` function for SAS-URL handoff.
190
- - Delete via `DELETE /<set>(<id>)/<col>` OR `POST /DeleteFile {FileId}`.
191
- - **Manage Image Data** — Image columns with thumbnail vs full-size download
192
- (`?size=full`), `CanStoreFullImage` awareness, and explicit pointers to
193
- the file-column messages path for full-size uploads. Three doc-equivalent
194
- delete forms (DELETE, PATCH-to-null, PUT-with-null).
195
- - **Manage Attachment / Note** — `activitymimeattachment.body` and
196
- `annotation.documentbody`. Inline base 64 (≲ 4 MB) OR
197
- `Initialize{Attachment|Annotation}BlocksUpload` /
198
- `Commit{Attachment|Annotation}BlocksUpload` messages. Single-request
199
- GET `/$value` OR message-based block download.
200
-
201
- #### 🔍 Cross-cutting capabilities
202
-
203
- - **Live Dataverse metadata** — tables, columns, relationships, alternate
204
- keys, action / function CSDL all fetched lazily from the host's
205
- `dataverseAPI`. Singleton TTL cache (5-minute TTL) with in-flight promise
206
- dedup. Type-specific column properties (Targets, OptionSet, MaxLength,
207
- MinValue / MaxValue, Format) loaded on-demand per column.
208
- - **Antipattern advisories** — real-time guidance per the Microsoft
209
- query-antipatterns doc: `FilteringOnCalculatedColumns`,
210
- `LargeAmountOfLogicalAttributes`, large-text `contains`, leading-wildcard
211
- rewrites. Surfaces inline at the source AND aggregates into an Advisory
212
- drawer in the URL bar.
213
- - **Polymorphic lookup support** — Customer, Owner, and multi-target
214
- lookups (`regardingobjectid`) emit the correct target-disambiguated
215
- `<navName>@odata.bind` binding shape automatically.
216
- - **Code generators** — every mode emits the same request as
217
- `Xrm.WebApi.online.execute` (single + `executeMultiple` batch), `fetch`,
218
- `curl`, and PowerShell `Invoke-RestMethod` snippets. Multi-request
219
- pipelines (chunked uploads, message-based binary ops) render as full
220
- ordered sequences in the Code tab.
221
- - **Saved-request library** — per-org localStorage persistence (50-entry
222
- cap per org), auto-suggested names, rename / delete / overwrite, dirty-state
223
- detection. Cross-tab sync via `storage` event listener.
224
- - **Results grid** — virtualized via `@fluentui-contrib/react-data-grid-react-window`
225
- for smooth scrolling of large result sets. Per-AttributeTypeCode cell
226
- renderers (Switch for Boolean, Badge for Picklist / Status, lookup
227
- formatted-value rendering, locale-formatted dates / numbers / money).
228
- Sort indicators driven by `$orderby` state. Search bar + density toggle.
229
- Infinite scroll fires `onLoadMore` 10 rows from the bottom; Retrieve-All
230
- walks every page until exhausted.
231
- - **PPTB host integration** — `isEmbedded()`-aware UI: theme syncs with the
232
- host, environment-aware URLs resolve via `getSession().environmentUrl`,
233
- header / theme controls hide when the host owns them. Bypass headers
234
- surface in the Code tab for external execution.
235
- - **Standalone mode** — runs in a regular browser via `npm run dev`. Execute
236
- returns `501 Not Implemented` (no host bridge), but the URL bar, body
237
- preview, and Code tab work end-to-end.
238
-
239
- #### 🎨 UX
240
-
241
- - **Required-first parameter UX** — required action params / required
242
- create columns surface in the main pane; optional params collapse into
243
- an Accordion with a "N of M set" badge.
244
- - **Two-dropdown cascading picker** — Scope (group / bound entity) +
245
- Operation for Execute modes. Picking a scope filters the operation list;
246
- scope change cascades-resets the operation.
247
- - **Form ↔ JSON toggle** — Monaco-backed JSON editor for action params and
248
- create / update bodies. Two-way live sync via `setValues` so edits in JSON
249
- reflect in the form and vice versa.
250
- - **Diff view in Update mode** — fetches the current record on entry,
251
- shows changed rows (before → after) with color coding, unchanged rows
252
- collapsed under a "Show unchanged" toggle.
253
- - **Operation-specific result narratives** — `WriteResultCard` renders
254
- per-operation success / failure copy (Create returns 204 with
255
- `OData-EntityId`; Delete returns 204; binary ops return 501 framed as
256
- "request built, run externally"; ETag-stale 412 has its own narrative).
257
- - **Sidebar with clause tree** — every mode has the same shell: target
258
- pane on the left, active editor in the center, URL bar + Execute on the
259
- bottom. Sections expand into clause sub-items with dirty markers.
260
- - **Theme support** — light + dark via Fluent v9 themes, with studio-owned
261
- CSS variables for brand / method palettes. Group-color cascade overrides
262
- Fluent's brand tokens per mode group (Read = blue, Write = green,
263
- Relate = purple, Execute = orange, Binary = brown-red).
264
-
265
- ### 🏗️ Technical
266
-
267
- - **TypeScript strict mode** — zero `any` (with eslint-escape-hatched
268
- exceptions documented inline). Discriminated unions for `ColumnMeta`,
269
- `FileUploadMethod`, `Advisory`, every clause node type.
270
- - **Vite 7** — production build splits Monaco into its own chunk
271
- (~3.7 MB on disk, lazy-loaded on Code-tab open). Main bundle ~1.87 MB
272
- raw / 494 KB gzipped.
273
- - **Fluent UI v9 (9.73)** — no v8 / v0 fallbacks. Custom `triggerButton`
274
- styling for `NavPathColumnPicker` uses `!important` over Fluent tokens
275
- to defeat the appearance-variant specificity in dark mode.
276
- - **`@pptb/types` 1.2.1** — official Power Platform ToolBox type
277
- definitions; `features.minAPI: "1.2.0"` in the manifest pins the
278
- required host version.
279
- - **AGPL-3.0-only** license.
280
-
281
- ### 🔗 References
282
-
283
- - [Use the Dataverse Web API](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview)
284
- - [Query antipatterns](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/query-antipatterns)
285
- - [File column data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/file-column-data)
286
- - [Image column data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/image-column-data)
287
- - [Attachment & Note file data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/attachment-annotation-files)
288
- - [Use Web API actions](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-actions)
289
- - [Use Web API functions](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-functions)
290
- - [Associate / Disassociate](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/associate-disassociate-entities-using-web-api)
291
- - [Retrieve and execute predefined queries](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries)
1
+ # Changelog
2
+
3
+ All notable changes to Dataverse Request Studio will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.1.3] - 2026-06-10
9
+
10
+ ### ✨ Added
11
+
12
+ - **Auto-switch to Builder tab on sidebar item click**
13
+ ([#32](https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio/issues/32))
14
+ — clicking any sidebar nav item while on the Code or Results tab now
15
+ automatically switches the active tab back to Builder, making the selected
16
+ editor panel immediately visible. Previously the tab had to be switched
17
+ manually first. Applies across all 17 modes.
18
+
19
+ ### 🔧 Internal
20
+
21
+ - **Prettier added as dev tooling** — `.prettierrc` (single quotes, 2-space
22
+ indent, semis, `printWidth: 100`), `.prettierignore`, `.gitattributes` (LF
23
+ line endings repo-wide), and `.vscode/settings.json` (Prettier as default
24
+ formatter with `formatOnSave`). Added `format` and `format:check` npm
25
+ scripts. Full codebase normalised in one pass to eliminate quote-style
26
+ inconsistency introduced by a recent VS Code built-in formatter change.
27
+
28
+ ## [1.1.2] - 2026-06-08
29
+
30
+ ### 🐛 Fixed
31
+
32
+ - **`refreshAll()` race condition** (`metadataProvider.ts`) — the Settings
33
+ "Refresh metadata" button now drains any in-flight `buildTable` promises via
34
+ `Promise.allSettled` before clearing the cache. Previously an orphaned fetch
35
+ that settled after the clear could call `__registerLiveTable` with
36
+ pre-refresh data, silently overwriting the fresh registration.
37
+
38
+ - **Silent bad-hop in OData parse validation** (`odataParser.ts`) — when the
39
+ parser walks a nav-path `$filter` column and encounters an unknown or
40
+ non-ManyToOne navigation segment, it now emits an actionable warning (naming
41
+ the bad segment and its owner table) instead of silently skipping validation.
42
+ A separate warning is emitted when the related entity's metadata times out
43
+ during the walk.
44
+
45
+ - **`resolveNavPath` leaf lookup now matches `oDataName`** (`mock/metadata.ts`)
46
+ — the leaf-column search now also checks `ColumnMeta.oDataName` (e.g.
47
+ `_primarycontactid_value`) in addition to `logicalName`. This closes a gap
48
+ where a round-tripped or pasted OData `$filter` that preserved the lookup
49
+ wire form as the path leaf would resolve to `undefined`, causing the `$filter`
50
+ encoder to fall back to string-quoting a value that should be unquoted
51
+ (GUID / integer).
52
+
53
+ ## [1.1.1] - 2026-06-08
54
+
55
+ ### 🐛 Fixed
56
+
57
+ - **Custom OptionSet (and other typed) values incorrectly quoted as strings in
58
+ `$filter` over a lookup navigation** ([#33](https://github.com/mohsinonxrm/pptb-mxrm-dataverse-request-studio/issues/33)).
59
+ Filtering on a related-entity column via a nav path — e.g.
60
+ `msdyn_opportunityid/abc_salesstage eq 809770000` — emitted the value as a
61
+ quoted `Edm.String` (`'809770000'`), which Dataverse rejects with HTTP 500
62
+ / `0x80060888`. Standard columns appeared to work only by coincidence (the
63
+ root entity happened to own a same-named column). Root cause: the `$filter`
64
+ encoder resolved the leaf column against the **root** table instead of
65
+ walking the relationship to the **related** entity, so the leaf's
66
+ `AttributeType` never drove the quoting decision. The encoder now resolves
67
+ nav-path leaves against the correct related entity, so numeric/boolean/choice
68
+ types are emitted unquoted and strings/GUIDs are quoted, consistently.
69
+
70
+ ### ✨ Added / Changed (architecture)
71
+
72
+ - **Single, metadata-driven nav-path resolver (`resolveNavPath`)** in
73
+ `mock/metadata.ts` — now the one source of truth for resolving a
74
+ slash-delimited path (`nav/.../leaf`, alias-aware) to its leaf `ColumnMeta`,
75
+ owner table, visited chain, and first not-yet-loaded hop. The `$filter`
76
+ encoder (`colLookup`), the filter editor's leaf/pending-target resolution,
77
+ and the `$orderby` warnings all route through it, eliminating duplicated
78
+ walk logic that had drifted out of sync.
79
+ - **Related-entity metadata pre-warming (`useWarmReferencedTables`)** — the
80
+ Retrieve Multiple / Retrieve Single modes now walk the `$filter`, `$expand`,
81
+ `$apply`, and `$orderby` trees and pre-fetch the related entities they
82
+ reference. This makes correct type resolution independent of whether the
83
+ user opened the relevant editor — covering **saved-request reload**,
84
+ **pasted OData URLs**, and **direct Execute**. Targeted (only referenced
85
+ entities) and self-healing across multi-hop paths, so it stays clear of the
86
+ 100-concurrent-request cap.
87
+ - **Paste-OData parsing** now validates and pre-loads nav-path filter leaves
88
+ instead of skipping them.
89
+ - **Metadata cache TTL raised from 5 minutes to 1 hour**, with a new
90
+ **Settings → Refresh metadata** button (`metadata.refreshAll`) to force a
91
+ fresh pull after publishing schema changes mid-session.
92
+
93
+ ## [1.1.0] - 2026-05-25
94
+
95
+ ### ✨ Added
96
+
97
+ - **Scope-setup guidance banner** — when the tool loads with the entity scope
98
+ unconfigured (i.e. `entityScopeMode` is `publisher-solution` or
99
+ `solution-only` but no solutions have been selected), a contextual
100
+ `MessageBar` (warning intent) is shown at the top of the Target pane across
101
+ **all 14 modes** that use `TargetEditor`. The banner provides a mode-specific
102
+ hint and an **Open Settings** button that opens the Settings drawer directly.
103
+ It disappears automatically once the user selects a publisher / solution (or
104
+ switches to *All Entities*) — no dismiss cookie required, because the
105
+ condition is purely reactive to the persisted `DisplaySettings` state.
106
+
107
+ - **`OpenSettingsProvider` / `useOpenSettings` / `useRegisterOpenSettings`**
108
+ (`src/host/useOpenSettings.tsx`) — new React context that provides a
109
+ stable `() => void` callback to open the Settings drawer from any component
110
+ in the tree without prop-drilling. Uses a ref-based registration pattern
111
+ (zero provider re-renders). `FrameHeader` registers the callback on mount;
112
+ any consumer calls `useOpenSettings()` to get it.
113
+
114
+ - **`useScopedEntities` now exposes `needsSetup: boolean` and
115
+ `scopeMode: EntityScopeMode`** — consumers can detect the
116
+ unconfigured-scope condition and tailor guidance text accordingly.
117
+
118
+ ### 🔍 Settings persistence confirmation
119
+
120
+ - Verified that all `DisplaySettings` (scope mode, selected publisher /
121
+ solution IDs, display flags) are persisted via `window.toolboxAPI.settings`
122
+ under the namespaced key `pptb-dataverse-request-studio:displaySettings`.
123
+ The prefix is distinct from other PPTB tools (e.g. FetchXML Studio). No
124
+ changes to the persistence layer were required.
125
+
126
+ ---
127
+
128
+ ## [1.0.0] - 2026-05-24
129
+
130
+ Initial public release of Dataverse Request Studio — a metadata-driven studio
131
+ for composing, previewing, and executing Microsoft Dataverse Web API requests
132
+ inside Power Platform ToolBox.
133
+
134
+ ### ✨ Added
135
+
136
+ #### 📖 Read group (4 modes)
137
+
138
+ - **Retrieve Multiple** — full OData composer:
139
+ `$select` / `$filter` / `$orderby` / `$expand` / `$top` / `$skip` /
140
+ `$count` / `$apply` (groupby + aggregate). Filter tree with AND/OR
141
+ combinators, group nesting, NOT toggles, column-vs-column comparisons,
142
+ lambda `any`/`all` on collection-valued navs, and the full Dataverse
143
+ query-function family (`Microsoft.Dynamics.CRM.*`). Virtualized results
144
+ grid with infinite scroll via `@odata.nextLink`.
145
+ - **Retrieve Single** — by primary key OR alternate key (composite alternate
146
+ keys supported via `(col1='v1',col2='v2')` URL syntax).
147
+ - **Retrieve NextLink** — paste a server-emitted `@odata.nextLink` URL to
148
+ continue paging any prior query.
149
+ - **Predefined Query** — execute saved-query (`?savedQuery=<id>`) and
150
+ user-query (`?userQuery=<id>`) requests with a layout-aware results grid
151
+ that mirrors the source view's column order from `layoutxml`.
152
+
153
+ #### ✏️ Write group (5 modes)
154
+
155
+ - **Create Record** — `POST /<set>` with metadata-driven `FieldSetEditor`,
156
+ required-field guard, `Prefer: return=representation` toggle, return-set
157
+ `$select`, Form ↔ JSON body-mode switcher (Monaco editor for JSON edits),
158
+ and the `MSCRM.*` bypass-header family.
159
+ - **Update Record** — `PATCH /<set>(<id>)` multi-field OR `PUT /<set>(<id>)/<col>`
160
+ single-column. Diff view (before → after) with per-row drill-down that
161
+ flips the method pill from PATCH to PUT automatically.
162
+ - **Upsert Record** — full upsert / create-only / update-only / etag-guarded
163
+ variants. By GUID OR alternate key.
164
+ - **Delete Record** — `DELETE /<set>(<id>)` with a typed-confirmation safety
165
+ affordance + cascade-impact preview. Single-property delete via
166
+ `DELETE /<set>(<id>)/<col>` and `PUT /<set>(<id>)/<col>` with `{"value": null}`
167
+ also supported.
168
+ - **Merge Records** — `POST /Merge` for `account` / `contact` / `incident`
169
+ with target + subordinate record cards, field-override matrix, and
170
+ PerformParentingChecks / SuppressDuplicateDetection settings.
171
+
172
+ #### 🔗 Relate group (2 modes)
173
+
174
+ - **Associate** — collection-valued `POST /<set>(<id>)/<nav>/$ref` OR
175
+ single-valued `PATCH @odata.bind`. Cardinality detected from metadata; verb
176
+ auto-flips with the nav picker. Polymorphic lookups (Customer, Owner,
177
+ `regardingobjectid`) emit the correct target-disambiguated
178
+ `<navName>@odata.bind` binding shape.
179
+ - **Disassociate** — collection-valued `DELETE /<set>(<id>)/<nav>(<targetId>)/$ref`
180
+ OR single-valued `PATCH @odata.bind: null`. Same polymorphism story.
181
+
182
+ #### ⚡ Execute group (3 modes)
183
+
184
+ - **Execute Action** — OOB / Custom API / Custom Action invocation via
185
+ bound `POST /<set>(<id>)/Microsoft.Dynamics.CRM.<Action>` OR unbound
186
+ `POST /<Action>`. CSDL-driven parameter form with type-aware controls:
187
+ EntityReference (record picker), EntityCollection (multi-record picker),
188
+ Edm primitives (typed inputs), Enum / Status-code OptionSet (live-resolved
189
+ picker), ComplexType (nested form). Required-first UX with optional params
190
+ collapsed into an Accordion; Form ↔ JSON toggle via Monaco; Request body
191
+ preview card.
192
+ - **Execute Function** — OData function calls with `?@p1=...` parameter
193
+ aliasing OR inline literal encoding. Colorized URL preview. Same
194
+ type-aware controls as actions.
195
+ - **Execute Workflow** — runs on-demand workflows via
196
+ `POST /workflows(<id>)/Microsoft.Dynamics.CRM.ExecuteWorkflow` with the
197
+ bound record id. Live picker over activated, on-demand process workflows
198
+ (`statecode eq 1 and type eq 1 and ondemand eq true and category eq 0`).
199
+
200
+ #### 💾 Binary group (3 modes)
201
+
202
+ - **Manage File Data** — File-column upload / download / delete pipelines:
203
+ - 3 upload paths — single-request `PATCH /<set>(<id>)/<col>` with
204
+ `x-ms-file-name` header, chunked PATCH with session token in `Location`
205
+ response, or `InitializeFileBlocksUpload` / `UploadBlock` /
206
+ `CommitFileBlocksUpload` messages.
207
+ - 4 download paths — single GET `/$value`, ranged GET with `Range` header,
208
+ message-based block download via `InitializeFileBlocksDownload` /
209
+ `DownloadBlock`, or `GetFileSasUrl` function for SAS-URL handoff.
210
+ - Delete via `DELETE /<set>(<id>)/<col>` OR `POST /DeleteFile {FileId}`.
211
+ - **Manage Image Data** — Image columns with thumbnail vs full-size download
212
+ (`?size=full`), `CanStoreFullImage` awareness, and explicit pointers to
213
+ the file-column messages path for full-size uploads. Three doc-equivalent
214
+ delete forms (DELETE, PATCH-to-null, PUT-with-null).
215
+ - **Manage Attachment / Note** — `activitymimeattachment.body` and
216
+ `annotation.documentbody`. Inline base 64 (≲ 4 MB) OR
217
+ `Initialize{Attachment|Annotation}BlocksUpload` /
218
+ `Commit{Attachment|Annotation}BlocksUpload` messages. Single-request
219
+ GET `/$value` OR message-based block download.
220
+
221
+ #### 🔍 Cross-cutting capabilities
222
+
223
+ - **Live Dataverse metadata** — tables, columns, relationships, alternate
224
+ keys, action / function CSDL all fetched lazily from the host's
225
+ `dataverseAPI`. Singleton TTL cache (5-minute TTL) with in-flight promise
226
+ dedup. Type-specific column properties (Targets, OptionSet, MaxLength,
227
+ MinValue / MaxValue, Format) loaded on-demand per column.
228
+ - **Antipattern advisories** — real-time guidance per the Microsoft
229
+ query-antipatterns doc: `FilteringOnCalculatedColumns`,
230
+ `LargeAmountOfLogicalAttributes`, large-text `contains`, leading-wildcard
231
+ rewrites. Surfaces inline at the source AND aggregates into an Advisory
232
+ drawer in the URL bar.
233
+ - **Polymorphic lookup support** — Customer, Owner, and multi-target
234
+ lookups (`regardingobjectid`) emit the correct target-disambiguated
235
+ `<navName>@odata.bind` binding shape automatically.
236
+ - **Code generators** — every mode emits the same request as
237
+ `Xrm.WebApi.online.execute` (single + `executeMultiple` batch), `fetch`,
238
+ `curl`, and PowerShell `Invoke-RestMethod` snippets. Multi-request
239
+ pipelines (chunked uploads, message-based binary ops) render as full
240
+ ordered sequences in the Code tab.
241
+ - **Saved-request library** — per-org localStorage persistence (50-entry
242
+ cap per org), auto-suggested names, rename / delete / overwrite, dirty-state
243
+ detection. Cross-tab sync via `storage` event listener.
244
+ - **Results grid** — virtualized via `@fluentui-contrib/react-data-grid-react-window`
245
+ for smooth scrolling of large result sets. Per-AttributeTypeCode cell
246
+ renderers (Switch for Boolean, Badge for Picklist / Status, lookup
247
+ formatted-value rendering, locale-formatted dates / numbers / money).
248
+ Sort indicators driven by `$orderby` state. Search bar + density toggle.
249
+ Infinite scroll fires `onLoadMore` 10 rows from the bottom; Retrieve-All
250
+ walks every page until exhausted.
251
+ - **PPTB host integration** — `isEmbedded()`-aware UI: theme syncs with the
252
+ host, environment-aware URLs resolve via `getSession().environmentUrl`,
253
+ header / theme controls hide when the host owns them. Bypass headers
254
+ surface in the Code tab for external execution.
255
+ - **Standalone mode** — runs in a regular browser via `npm run dev`. Execute
256
+ returns `501 Not Implemented` (no host bridge), but the URL bar, body
257
+ preview, and Code tab work end-to-end.
258
+
259
+ #### 🎨 UX
260
+
261
+ - **Required-first parameter UX** — required action params / required
262
+ create columns surface in the main pane; optional params collapse into
263
+ an Accordion with a "N of M set" badge.
264
+ - **Two-dropdown cascading picker** — Scope (group / bound entity) +
265
+ Operation for Execute modes. Picking a scope filters the operation list;
266
+ scope change cascades-resets the operation.
267
+ - **Form ↔ JSON toggle** — Monaco-backed JSON editor for action params and
268
+ create / update bodies. Two-way live sync via `setValues` so edits in JSON
269
+ reflect in the form and vice versa.
270
+ - **Diff view in Update mode** — fetches the current record on entry,
271
+ shows changed rows (before → after) with color coding, unchanged rows
272
+ collapsed under a "Show unchanged" toggle.
273
+ - **Operation-specific result narratives** — `WriteResultCard` renders
274
+ per-operation success / failure copy (Create returns 204 with
275
+ `OData-EntityId`; Delete returns 204; binary ops return 501 framed as
276
+ "request built, run externally"; ETag-stale 412 has its own narrative).
277
+ - **Sidebar with clause tree** — every mode has the same shell: target
278
+ pane on the left, active editor in the center, URL bar + Execute on the
279
+ bottom. Sections expand into clause sub-items with dirty markers.
280
+ - **Theme support** — light + dark via Fluent v9 themes, with studio-owned
281
+ CSS variables for brand / method palettes. Group-color cascade overrides
282
+ Fluent's brand tokens per mode group (Read = blue, Write = green,
283
+ Relate = purple, Execute = orange, Binary = brown-red).
284
+
285
+ ### 🏗️ Technical
286
+
287
+ - **TypeScript strict mode** — zero `any` (with eslint-escape-hatched
288
+ exceptions documented inline). Discriminated unions for `ColumnMeta`,
289
+ `FileUploadMethod`, `Advisory`, every clause node type.
290
+ - **Vite 7** — production build splits Monaco into its own chunk
291
+ (~3.7 MB on disk, lazy-loaded on Code-tab open). Main bundle ~1.87 MB
292
+ raw / 494 KB gzipped.
293
+ - **Fluent UI v9 (9.73)** — no v8 / v0 fallbacks. Custom `triggerButton`
294
+ styling for `NavPathColumnPicker` uses `!important` over Fluent tokens
295
+ to defeat the appearance-variant specificity in dark mode.
296
+ - **`@pptb/types` 1.2.1** — official Power Platform ToolBox type
297
+ definitions; `features.minAPI: "1.2.0"` in the manifest pins the
298
+ required host version.
299
+ - **AGPL-3.0-only** license.
300
+
301
+ ### 🔗 References
302
+
303
+ - [Use the Dataverse Web API](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview)
304
+ - [Query antipatterns](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/query-antipatterns)
305
+ - [File column data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/file-column-data)
306
+ - [Image column data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/image-column-data)
307
+ - [Attachment & Note file data](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/attachment-annotation-files)
308
+ - [Use Web API actions](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-actions)
309
+ - [Use Web API functions](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/use-web-api-functions)
310
+ - [Associate / Disassociate](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/associate-disassociate-entities-using-web-api)
311
+ - [Retrieve and execute predefined queries](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries)