Skip to content

Convert to vite native tooling#2118

Open
ejsmith wants to merge 3 commits intomainfrom
vite-native
Open

Convert to vite native tooling#2118
ejsmith wants to merge 3 commits intomainfrom
vite-native

Conversation

@ejsmith
Copy link
Member

@ejsmith ejsmith commented Feb 17, 2026

This pull request introduces Oxlint and Oxfmt into the project's frontend workflow to improve code quality and formatting consistency. It updates configuration files, scripts, and dependencies to integrate these tools alongside existing linting and formatting solutions. The changes also adjust the ESLint and Vite configurations to support Oxlint, and update the package.json to use the latest rolldown-vite build.

Tooling and Linting Integration:

  • Added .oxlintrc.json and .oxfmtrc.json configuration files to define project-specific rules for Oxlint and Oxfmt. [1] [2]
  • Updated eslint.config.js to include eslint-plugin-oxlint and to load Oxlint configuration, ensuring ESLint rules do not overlap with Oxlint. [1] [2]
  • Integrated vite-plugin-oxlint into the Vite configuration, enabling Oxlint checks during the build process. [1] [2]

Scripts and Dependency Updates:

  • Modified package.json scripts to add lint:oxfmt, lint:oxlint, and corresponding format commands, and to ensure Oxlint and Oxfmt are run as part of the main linting and formatting workflows.
  • Added eslint-plugin-oxlint, vite-plugin-oxlint, oxlint, and oxfmt to devDependencies.
  • Switched the vite dependency to use the latest rolldown-vite build and updated the overrides section accordingly.

These changes help enforce stricter code standards and ensure a more consistent codebase by leveraging the latest linting and formatting tools.

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Insulation 24% 23% 208
Exceptionless.Core 66% 59% 7446
Exceptionless.AppHost 26% 14% 55
Exceptionless.Web 55% 42% 3489
Summary 61% (11865 / 19532) 53% (5655 / 10706) 11198

@ejsmith
Copy link
Member Author

ejsmith commented Mar 16, 2026

@copilot update this PR now that vite 8 final is out. Update any deps to latest versions. Get the build working.

Copy link
Contributor

Copilot AI commented Mar 16, 2026

@ejsmith I've opened a new pull request, #2152, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* Update to Vite 8 final and latest dependencies

Co-authored-by: ejsmith <282584+ejsmith@users.noreply.github.com>

* Update all deps to latest, fix eslint 10 compatibility, fix formatting

Co-authored-by: ejsmith <282584+ejsmith@users.noreply.github.com>

* Fix oxfmt endOfLine: change crlf to lf to match .gitattributes normalization

Co-authored-by: ejsmith <282584+ejsmith@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ejsmith <282584+ejsmith@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 16:10
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ejsmith
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
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

This PR updates the ClientApp frontend toolchain to incorporate Oxlint/Oxfmt alongside ESLint/Prettier, and updates Vite-related dependencies/config to use newer native tooling.

Changes:

  • Added Oxlint/Oxfmt configuration and wired them into npm run lint / npm run format.
  • Updated ESLint flat config to integrate eslint-plugin-oxlint and avoid overlapping rules.
  • Updated Vite config to run vite-plugin-oxlint and refreshed frontend dependencies (including Vite).

Reviewed changes

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

Show a summary per file
File Description
src/Exceptionless.Web/ClientApp/vite.config.ts Adds vite-plugin-oxlint to Vite plugins.
src/Exceptionless.Web/ClientApp/src/routes/(auth)/login/+page.svelte Formatting changes in the password label markup.
src/Exceptionless.Web/ClientApp/src/lib/features/auth/schemas.ts Reformats schema definition for readability.
src/Exceptionless.Web/ClientApp/package.json Adds Oxlint/Oxfmt scripts, adjusts Prettier scope to Svelte, and updates dependencies.
src/Exceptionless.Web/ClientApp/eslint.config.js Integrates eslint-plugin-oxlint, disables a Svelte false-positive rule, and loads Oxlint config.
src/Exceptionless.Web/ClientApp/.oxlintrc.json New Oxlint configuration (plugins, rules, ignores).
src/Exceptionless.Web/ClientApp/.oxfmtrc.json New Oxfmt configuration (style + EOL).
src/Exceptionless.Web/ClientApp/.npmrc Enables legacy-peer-deps.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +101 to +104
<Field.Label for={field.name}
>Password <Muted class="float-right"><A href={resolve('/(auth)/forgot-password')} tabindex={6}>Forgot password?</A></Muted
></Field.Label
>
"singleQuote": true,
"trailingComma": "none",
"endOfLine": "lf",
"ignorePatterns": []
@ejsmith
Copy link
Member Author

ejsmith commented Mar 19, 2026

@copilot can you rebase this PR

Copy link
Contributor

Copilot AI commented Mar 19, 2026

@ejsmith I've opened a new pull request, #2163, to work on those changes. Once the pull request is ready, I'll request review from you.

* Improves serialization and project config

Addresses issues with serialization of various models, ensuring data integrity during round trips.

Specifically:
- Uses init accessors for SettingsDictionary to enable STJ to populate during deserialization.
- Adds JToken handling in ObjectToInferredTypesConverter to correctly serialize JObject and JArray types.
- Updates ExtendedEntityChanged properties to use setter injection instead of create method to support STJ deserialization via message bus.
- Adds tests to validate serialization of core models.
- Improves Project Configuration management.

* Fixed linting errors

* Optimize CloseInactiveSessionsJob: batch Redis calls (#2119)

* Optimize the close inactive sessions job

* Feedback

* refactor: return tuples from GetHeartbeatsBatchAsync for cleaner foreach loop

Address PR feedback:
- Remove weird IReadOnlyList cast at call site
- GetHeartbeatsBatchAsync now returns (PersistentEvent, HeartbeatResult?) tuples
- Caller uses simple foreach instead of index-based for loop
- Accept IReadOnlyCollection to avoid cast at call site

* Filter messages that nobody is listening for

* Fixes previous day/week/month range selection

Updates the quick ranges in the date range picker to correctly select the previous day, week, and month. The previous implementation was selecting from the end of the previous period to the end of the current period.

* Adds index to stack and event queries

Improves stack and event query performance by adding the index to the query.

This change ensures that date range queries on stacks and events leverage the index for faster retrieval.

* Improves stack usage tracking and serialization

Refactors stack usage tracking to use a record struct for cache keys, ensuring proper serialization and distinct keys for accurate accounting.

#2124
#2113
Enables field inclusion in JsonSerializerOptions to correctly serialize tuples and records with their field names, instead of default Item1, Item2. This is crucial for the stack usage key to be properly serialized in Redis.

Also fixes a date range filter on the stacks controller and adds a test case.

Fixes #2124
Fixes #2113

* Optimizes daily summary job and email sending

Improves the daily summary job by removing an unnecessary index call, streamlining stack retrieval.

Enhances email sending robustness by preventing cancellation exceptions from being caught during health checks, ensuring more accurate error reporting.

* Fixes stack stats with a work item job (#2129)

* Fixes stack stats with a work item job

Addresses an issue where stack statistics may become inaccurate due to a bug.

Introduces a work item handler and job to recalculate stack stats based on event data within a specified time range. An admin endpoint has been added to queue the work item.

Adds tests to ensure the stats are correctly repaired.

* PR feedback

* increased batch size

* Improves stack event stats calculation

Refactors the stack event stats calculation to use aggregations,
resulting in significantly improved performance.
Removes unnecessary data loading, and simplifies the stats computation logic.

* Fixes stack stats job logic

Ensures the stack stats job correctly processes and updates stack statistics by adjusting the UTC timestamp handling and fixing validation issues.

Improves the accuracy of the fix stack stats job and updates related tests to reflect the changes and ensure they account for all edge cases.

* Refactors stack stats fix job

Refactors the stack stats fix job to improve performance and correctness.

The job now processes stacks within a specific organization or all organizations with events in the time window.
It also uses aggregations to calculate stack event stats more efficiently and avoid unnecessary stack updates.
The previous implementation was inefficient and could lead to incorrect stack stats.

* Renames `Organization` to `OrganizationId`

Updates the `FixStackStatsWorkItem` model and related code to use `OrganizationId` instead of `Organization` for clarity and consistency with the rest of the codebase.

This change ensures that the correct organization is targeted when fixing stack statistics.

* Ensures stack change notifications are sent

Refactors stack patching to ensure that notifications are always sent after a stack is updated. This addresses an issue where the stack usage job was not triggering notifications due to a conditional check.

* Replaces DocumentNotFoundException and handles missing stacks.

Replaces the custom DocumentNotFoundException with the one provided by Foundatio.

Handles potential DocumentNotFoundException when patching a stack, preventing unexpected errors if a stack has been deleted.

* Handles missing stacks during event counting

Ensures that stack event counter updates succeed even if the stack document does not exist.

This prevents issues in background jobs that process event counts asynchronously, where the stack may have been deleted between event processing and the update operation.

* Removes unused Foundatio references

Removes the `Foundatio.Repositories.Extensions` and other unused references.

These references were no longer required after a refactoring.
Cleaning up unused dependencies improves build times and reduces potential conflicts.

* Updated agent skills

* Updates dependencies

Updates various NuGet packages, including .NET extensions to 10.0.4, Aspire to 13.1.2, and several testing and instrumentation libraries.

* Updated next deps

* Fixed skill names

* fixed lint

* Add project notification settings maintenance cleanup (#2145)

* Add project notification settings maintenance cleanup

* Fix organization cleanup review feedback

* Revert cleanup notes from agents

* Refine notification cleanup logic and update agent skills

Adjusts the processing loop in the notification settings cleanup job to improve batch handling and timing. Also updates AI agent skill documentation to provide clearer usage instructions and normalize code formatting across the skill library.

* Update agent skills documentation and consistency rules

Fixes broken relative links across the skill library and updates backend testing snippets to use System.Text.Json-based serializers. Additionally, adds a strict consistency rule for frontend development requiring the use of shared formatter components.

* Implement AI agent framework and skill evolution protocol

Introduces specialized personas for engineering, triaging, and code review alongside a formal "observe-inspect-amend" cycle for self-improving agent skills. This establishes a structured, automated workflow for the development lifecycle, including security-first PR reviews and root-cause-driven triage.

* Add context-aware default build task to VS Code

Introduces a smart build task that detects the active file extension and automatically executes the appropriate build command (npm or dotnet). This streamlines the development workflow when switching between frontend and backend files.

* Update dependencies and adopt new repository APIs

Updates Foundatio and Microsoft library versions. This includes migrating from `AddPropertyRequiredForRemove` to `AddRequiredField` and optimizing cache invalidation logic by checking `PatchAsync` results.

* Optimize models with nullable properties and migrate tests to System.Text.Json

Removes default initializers for dictionary properties in core models to reduce unnecessary allocations and handles resulting nullability in the event pipeline. This also completes the migration of the test suite from Newtonsoft.Json to System.Text.Json, updating serialization logic and helpers.

* Use Update for appsettings files in project configuration

Switches from Include to Update for appsettings.yml files to avoid potential item duplication, as these files are typically already included by the .NET SDK's default globbing patterns.

* Update stack action response codes to 200 OK

Changes the response status code for marking stacks as fixed or snoozed from 202 Accepted to 200 OK to accurately reflect that the operations are completed. This also updates the corresponding XML documentation and OpenAPI specification.

* Enhance engineer agent workflow for PR context and specify agent models

Updates agent definitions to include preferred model assignments (Sonnet and Opus) and adds a new pre-planning step for the engineer agent to fetch PR comments and CI status via the GitHub CLI. This also restructures the review loop to be non-blocking, allowing the agent to address existing feedback while waiting for CI and automated reviews to complete.

* refactor: Migrate from AutoMapper to Mapperly (#2093)

* refactor: migrate from AutoMapper to Mapperly

- Replace AutoMapper (runtime reflection) with Mapperly (compile-time source generation)
- Add Riok.Mapperly 4.2.1 to Exceptionless.Web
- Remove AutoMapper 14.0.0 from Exceptionless.Core

Breaking changes:
- Controllers now use abstract mapping methods instead of generic MapAsync<T>
- Base controllers require derived classes to implement MapToModel, MapToViewModel, MapToViewModels

Mapping structure:
- Created dedicated mapper files per type in src/Exceptionless.Web/Mapping/
  - OrganizationMapper: NewOrganization -> Organization, Organization -> ViewOrganization
  - ProjectMapper: NewProject -> Project, Project -> ViewProject
  - TokenMapper: NewToken -> Token, Token -> ViewToken
  - UserMapper: User -> ViewUser
  - WebHookMapper: NewWebHook -> WebHook
  - InvoiceMapper: Stripe.Invoice -> InvoiceGridModel
- ApiMapper facade delegates to individual mappers

Testing:
- Added comprehensive unit tests for all mappers (29 tests)
- Tests follow backend-testing skill patterns

Benefits:
- Compile-time type safety for mappings
- Better performance (no runtime reflection)
- Cleaner separation of concerns with per-type mappers

refactor: improve Mapperly mapper safety and configuration

- Add [MapperIgnoreTarget] for computed/populated-later properties on
  OrganizationMapper (IsOverRequestLimit, IsThrottled, ProjectCount,
  StackCount, EventCount) and ProjectMapper (HasPremiumFeatures,
  OrganizationName, StackCount, EventCount)
- Upgrade UserMapper to RequiredMappingStrategy.Target since it only
  maps Model→ViewModel; new ViewUser properties will produce compile
  warnings unless explicitly mapped or ignored
- Add [MapperIgnoreTarget] for ViewUser.IsInvite (manually constructed)
- Let Mapperly generate collection methods (MapToViewTokens,
  MapToViewUsers) natively instead of manual .Select().ToList()
- Add SuspensionCode enum→string mapping tests
- Fix StackService ValueTuple serialization bug (restore StackUsageKey)
- Update Mapperly 4.2.1 → 4.3.1

* PR feedback

* fix: align serialization input with localhost domain and update stale AutoMapper comments

The event-serialization-input.json still used test.example.com while the response
baseline was updated to test.localhost, causing CI failure. Also updated stale
AutoMapper references in test comments to reflect Mapperly migration.

* Apply suggestion from @niemyjski

* fix: deep-copy Roles and OrganizationIds in UserMapper

Mapperly does shallow reference assignments for collection properties, which
means mutating ViewUser.Roles (e.g. removing GlobalAdmin in UserController)
would also mutate the source User model. Fixed by using a core mapper plus
manual deep-copy via HashSet constructor. Added regression test.

* refactor: clarify TokenMapper Type test name and comment

NewToken has no Type property, so the test was really just asserting
the C# enum default (Authentication=0). Rename the test and update the
comment to explain: NewToken lacks Type, [MapperIgnoreTarget] makes the
intent explicit, and the controller sets Type=Access in AddModelAsync.

* Next: System Admin Page (#2151)

* System Admin Page

* fix: address PR review feedback

- Fix typo: 'Highest completed versioned' → 'Highest completed version'
- Fix Migrations sidebar icon: Play → DatabaseZap to match routes.svelte.ts
- Fix nullable dereference warnings in AdminControllerTests: split Terms()?.Buckets into separate assertions
- Fix generic catch clause in AdminController: catch Exception, log error before returning Problem

* pr feedback

* fix: replace all underscores in snapshot status

Update the snapshot status cell to use `replaceAll` instead of `replace`, ensuring that status values with multiple underscores are correctly formatted with spaces in the UI.

* PR Feedback

* PR Feedback

* PR feedback

* PR Feedback

* Update agent descriptions with usage guidelines and trigger phrases

Enhance agent metadata in both the individual agent definitions and AGENTS.md to include specific "Use when" scenarios and keyword triggers. This helps improve agent selection and intent matching for tasks like feature implementation, PR reviews, and issue triage.

* Bump Scalar.AspNetCore from 2.13.8 to 2.13.9 (#2158)

* Update deps

* Initial plan

---------

Co-authored-by: Blake Niemyjski <bniemyjski@gmail.com>
Co-authored-by: Eric J. Smith <eric@codesmithtools.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Comment on lines +431 to +435
catch (Exception ex)
{
_logger.LogError(ex, "Unable to retrieve snapshot information");
return Problem(title: "Unable to retrieve snapshot information.");
}
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.

4 participants