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

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