Skip to content

feat: add Persisted Operations dashboard pages#29

Merged
Theauxm merged 1 commit into
mainfrom
feature/persisted-ops-admin
May 11, 2026
Merged

feat: add Persisted Operations dashboard pages#29
Theauxm merged 1 commit into
mainfrom
feature/persisted-ops-admin

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented May 11, 2026

Summary

Adds three pages under /trax/data/persisted-operations for managing persisted GraphQL operations from the dashboard:

  • List: RadzenDataGrid of every row with Upload action.
  • Detail: read-only current document, full audit history, and Edit / Deactivate / Restore actions. Confirmation dialog with required reason for deactivate.
  • Editor (dialog): id, description, document, optional version, and a Bypass shape-diff checkbox. Catches PersistedOperationParseException, PersistedOperationValidationException, and ShapeDiffViolationException from the store and renders each as an inline panel with line numbers, validator messages, and fingerprints — never as toast spam.

The sidebar entry and the page itself are gated on IPersistedOperationsCapability via DI. When UsePersistedOperations(...) is not configured the sidebar item is hidden and direct navigation renders a "not enabled on this server" panel. Matches the existing precedent at EffectsSettingsPage.

Test plan

  • bUnit tests for sidebar gating: item hidden without capability, visible with capability.
  • 164/164 dashboard tests pass.
  • Manual smoke through the persisted-ops sample (see the corresponding Trax.Samples PR): upload, edit shape-preserving, edit shape-changing (rejected + bypass), deactivate, restore — every code path of the inline error UI exercised.

Notes

Depends on the IPersistedOperationsCapability marker and structured exception types added in the Trax.Api PR. The dashboard package now references Trax.Api.GraphQL.PersistedOperations.

Adds list, detail, and editor pages under /trax/data/persisted-operations
for managing persisted GraphQL operations end-to-end from the UI:

- List view with Upload button and links into each row's detail page.
- Detail page shows current document, audit history, and exposes
  Edit / Deactivate / Restore. Edit reuses the upload dialog with the
  row pre-filled and the shape-diff bypass checkbox visible.
- Editor renders parse, schema-validation, and shape-diff exceptions
  from IPersistedOperationStore as inline panels with line numbers and
  fingerprints, never as toast spam.

The sidebar entry and direct navigation are gated on
IPersistedOperationsCapability via DI: when UsePersistedOperations was
not configured the sidebar item is hidden and direct URLs render a
"not enabled on this server" panel.
@Theauxm Theauxm changed the title Persisted Operations dashboard pages feat: add Persisted Operations dashboard pages May 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

@Theauxm Theauxm merged commit d986b87 into main May 11, 2026
1 of 9 checks passed
@Theauxm Theauxm deleted the feature/persisted-ops-admin branch May 11, 2026 19:48
@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented May 11, 2026

This PR is included in version 1.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant