Skip to content

Add project sample data generation#2231

Merged
ejsmith merged 7 commits into
mainfrom
project-sample-data-reset
May 18, 2026
Merged

Add project sample data generation#2231
ejsmith merged 7 commits into
mainfrom
project-sample-data-reset

Conversation

@ejsmith
Copy link
Copy Markdown
Member

@ejsmith ejsmith commented May 11, 2026

Adds a project-scoped sample data workflow so users can populate a newly configured project without wiring up a client first.

Summary:

  • Add API support to queue project sample data generation and project data reset work items.
  • Generate project sample events through the normal event pipeline.
  • Add configure-page sample data actions in both the legacy Angular UI and the Svelte UI.
  • Keep project reset available from project settings/manage rather than the configure flow.
  • Update OpenAPI baseline, HTTP samples, and project controller coverage.

Validation:

  • dotnet build with isolated output paths
  • Targeted ProjectControllerTests and OpenApiControllerTests
  • Svelte npm run check
  • ESLint on the touched Svelte configure page
  • Angular npm run lint
  • git diff --check
  • Local browser verification for Angular and Svelte configure pages

@ejsmith ejsmith force-pushed the project-sample-data-reset branch from 3e34251 to 66be09b Compare May 11, 2026 03:38
@ejsmith ejsmith force-pushed the project-sample-data-reset branch from 66be09b to c44274b Compare May 11, 2026 03:41
@ejsmith ejsmith requested a review from Copilot May 11, 2026 03:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a project-scoped “sample data” workflow so users can populate a newly configured project (via API + both UIs), and updates the existing project “reset data” flow to queue work items (now supporting POST while keeping the legacy GET).

Changes:

  • Add POST /projects/{id}/sample-data endpoint that enqueues project-scoped sample event generation.
  • Add POST /projects/{id}/reset-data (in addition to legacy GET) and implement a new ResetProjectDataWorkItem + handler to remove project data.
  • Wire new actions into both the Svelte configure page and the legacy Angular configure flow; update OpenAPI baseline, HTTP samples, and controller tests.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/http/projects.http Adds HTTP samples for sample-data generation and POST reset-data (keeps legacy GET).
tests/Exceptionless.Tests/Controllers/ProjectControllerTests.cs Adds coverage for project-scoped sample generation and updates reset-data behavior assertions.
tests/Exceptionless.Tests/Controllers/Data/openapi.json Updates OpenAPI baseline for new sample-data endpoint and reset-data POST.
src/Exceptionless.Web/Controllers/ProjectController.cs Adds POST {id}/sample-data; adds POST {id}/reset-data; switches reset work item to ResetProjectDataWorkItem.
src/Exceptionless.Web/ClientApp/src/routes/(app)/project/[projectId]/configure/+page.svelte Adds “Generate Sample Data” button/flow to Svelte configure page.
src/Exceptionless.Web/ClientApp/src/lib/features/projects/api.svelte.ts Adds generateSampleData mutation and updates resetData mutation to return WorkInProgressResult from 202.
src/Exceptionless.Web/ClientApp.angular/lang/zh-cn.json Adds translations for sample data generation UI strings.
src/Exceptionless.Web/ClientApp.angular/lang/en-us.json Adds translations for sample data generation UI strings.
src/Exceptionless.Web/ClientApp.angular/components/project/project-service.js Adds generateSampleData() API call; switches resetData() to POST.
src/Exceptionless.Web/ClientApp.angular/app/project/configure.tpl.html Adds a “Generate Sample Data” button to legacy Angular configure UI.
src/Exceptionless.Web/ClientApp.angular/app/project/configure-controller.js Implements legacy Angular controller behavior for queuing sample data generation.
src/Exceptionless.Core/Utility/SampleDataService.cs Adds a project-scoped enqueue method that returns the work item id.
src/Exceptionless.Core/Models/WorkItems/ResetProjectDataWorkItem.cs Introduces a new work item payload for project data reset.
src/Exceptionless.Core/Models/WorkItems/GenerateSampleEventsWorkItem.cs Extends sample event work item with optional OrganizationId/ProjectId for project-scoped generation.
src/Exceptionless.Core/Jobs/WorkItemHandlers/ResetProjectDataWorkItemHandler.cs Adds handler to remove stacks/events by project and clear related cache entries.
src/Exceptionless.Core/Jobs/WorkItemHandlers/GenerateSampleEventsWorkItemHandler.cs Adds project-scoped generation path and per-project work item locking.
src/Exceptionless.Core/Bootstrapper.cs Registers the new ResetProjectDataWorkItem handler.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Exceptionless.Core/Jobs/WorkItemHandlers/ResetProjectDataWorkItemHandler.cs Outdated
ejsmith added 3 commits May 18, 2026 10:27
…eset

# Conflicts:
#	src/Exceptionless.Web/ClientApp/src/routes/(app)/project/[projectId]/configure/+page.svelte
@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Web 60% 46% 3908
Exceptionless.AppHost 18% 9% 82
Exceptionless.Insulation 25% 23% 203
Exceptionless.Core 67% 61% 7728
Summary 63% (12759 / 20375) 55% (6315 / 11462) 11921

@ejsmith ejsmith merged commit d281201 into main May 18, 2026
9 checks passed
@ejsmith ejsmith deleted the project-sample-data-reset branch May 18, 2026 16:16
niemyjski pushed a commit that referenced this pull request May 19, 2026
* Add project sample data generation

* Address sample generation review feedback

* Format sample data configure action

* Address sample data PR feedback

* Format sample data configure button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants