Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@

# GitHub Actions helper scripts run under Bash on Linux.
.github/scripts/*.sh text eol=lf

# Frontend sources use LF on every platform so `npm run build` produces identical committed output.
src/Dashboard/Orleans.Dashboard.App/** text=auto eol=lf
# Generated assets keep their exact bytes, including whitespace in minified code and upstream notices.
src/Dashboard/Orleans.Dashboard.App/dist/** -text -whitespace linguist-generated=true
7 changes: 0 additions & 7 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ inputs:
artifact-name:
description: Test output artifact name.
required: true
build-external-assets:
description: Build external assets required by the selected tests.
required: false
default: 'false'
filter-query:
description: Optional Microsoft Testing Platform query filter.
required: false
Expand Down Expand Up @@ -49,7 +45,6 @@ runs:
env:
# The nested composite action supplies its own inputs context when continue-on-error is evaluated.
ORLEANS_TEST_RETRY: ${{ inputs.retry }}
BuildExternalAssets: ${{ inputs['build-external-assets'] }}
- name: Retry tests
id: retry
if: inputs.retry == 'true' && steps.test.outcome == 'failure'
Expand All @@ -61,8 +56,6 @@ runs:
result-id: ${{ format('{0}-attempt2', inputs.artifact-name) }}
solution: ${{ inputs.solution }}
coverage: ${{ runner.os == 'Linux' && inputs.framework == 'net10.0' }}
env:
BuildExternalAssets: ${{ inputs['build-external-assets'] }}
- name: Archive test results
if: always()
uses: ./.github/actions/archive-test-results
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/analyzer-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
RESULTS_DIRECTORY: Artifacts/AnalyzerAudit/Roslyn
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: "24.x"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,6 @@ env:
TESTCONTAINERS_RYUK_IMAGE: testcontainers/ryuk:0.14.0
ZOOKEEPER_IMAGE: zookeeper:3.9
jobs:
dashboard-ui:
name: Dashboard UI regressions
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/Dashboard/Orleans.Dashboard.App
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '24.x'
- name: Cache npm downloads
uses: ./.github/actions/cache-dependencies
with:
nuget: 'false'
npm: 'true'
- run: npm ci --no-audit --no-fund
- run: npx playwright install --with-deps chromium
- run: npm run test:ui
whitespace:
name: Whitespace formatting
runs-on: ubuntu-latest
Expand All @@ -82,18 +63,12 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '24.x'
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Cache dependencies
uses: ./.github/actions/cache-dependencies
with:
npm: 'true'
- name: Test coverage reporting
if: matrix.os == 'ubuntu-latest'
shell: pwsh
Expand Down Expand Up @@ -831,22 +806,10 @@ jobs:
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup Node.js
if: matrix.suite == 'BVT'
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '24.x'
- name: Cache npm downloads
if: matrix.suite == 'BVT'
uses: ./.github/actions/cache-dependencies
with:
nuget: 'false'
npm: 'true'
- name: Test
uses: ./.github/actions/run-tests
with:
artifact-name: test_output_${{ github.job }}_${{ matrix.suite }}_${{ matrix.os }}_${{ matrix.framework }}
build-external-assets: ${{ matrix.suite == 'BVT' && 'true' || 'false' }}
filter-query: /[(Provider=None)&(Suite=${{ matrix.suite }})&(Area!=CodeGen)]
framework: ${{ matrix.framework }}
test-codegenerator:
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Dashboard
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- src/Dashboard/Orleans.Dashboard.App/**
- .github/workflows/dashboard.yml
push:
branches:
- main
paths:
- src/Dashboard/Orleans.Dashboard.App/**
- .github/workflows/dashboard.yml
permissions:
contents: read
jobs:
assets:
name: Dashboard assets
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/Dashboard/Orleans.Dashboard.App
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version-file: src/Dashboard/Orleans.Dashboard.App/.node-version
- name: Cache npm downloads
uses: ./.github/actions/cache-dependencies
with:
nuget: 'false'
npm: 'true'
- name: Test npm installation recovery
run: npm run test:install
- run: npm run restore -- --no-audit --no-fund
- run: npm run build
- name: Verify committed assets match the build
run: |
if [ -n "$(git status --porcelain --untracked-files=all -- dist)" ]; then
git status --short --untracked-files=all -- dist
echo "::error::src/Dashboard/Orleans.Dashboard.App/dist differs from 'npm run build'. Run 'npm run restore' and 'npm run build' in src/Dashboard/Orleans.Dashboard.App, then commit dist/."
exit 1
fi
ui:
name: Dashboard UI regressions
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/Dashboard/Orleans.Dashboard.App
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version-file: src/Dashboard/Orleans.Dashboard.App/.node-version
- name: Cache npm downloads
uses: ./.github/actions/cache-dependencies
with:
nuget: 'false'
npm: 'true'
- run: npm run restore -- --no-audit --no-fund
- run: npx playwright install --with-deps chromium
- run: npm run test:ui
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ jobs:
./samples/Validate-Samples.ps1 -NoBuild

- name: Build and test documentation projects
run: dotnet test --solution docs/Docs.slnx --configuration Release --framework net10.0 -p:BuildExternalAssets=false -bl:docs-projects.binlog --minimum-expected-tests 1 --max-parallel-test-modules 1
run: dotnet test --solution docs/Docs.slnx --configuration Release --framework net10.0 -bl:docs-projects.binlog --minimum-expected-tests 1 --max-parallel-test-modules 1

- name: Build samples against local Orleans packages
shell: pwsh
# Keep sample compiler processes isolated through .NET runtime 10.0.12. After the
# SDK carries 10.0.13+, validate shared compilation in repeated runs before removal.
# See #11235, dotnet/roslyn#85656, and dotnet/runtime#132631.
run: ./samples/Build-Samples.ps1 -Configuration Release -NoIncremental -SkipExternalAssets -DisableSharedCompilation
run: ./samples/Build-Samples.ps1 -Configuration Release -NoIncremental -DisableSharedCompilation

- name: Upload build diagnostics
if: always()
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/macos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,10 @@ jobs:
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup Node.js
if: matrix.suite == 'BVT'
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '24.x'
- name: Cache npm downloads
if: matrix.suite == 'BVT'
uses: ./.github/actions/cache-dependencies
with:
nuget: 'false'
npm: 'true'
- name: Test
uses: ./.github/actions/run-tests
with:
artifact-name: test_output_${{ github.job }}_${{ matrix.suite }}_macos-latest_${{ matrix.framework }}
build-external-assets: ${{ matrix.suite == 'BVT' && 'true' || 'false' }}
filter-query: /[(Provider=None)&(Suite=${{ matrix.suite }})&(Area!=CodeGen)]
framework: ${{ matrix.framework }}
test-codegenerator:
Expand Down
2 changes: 1 addition & 1 deletion docs/site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ may use a prerelease of `10.2.2` with the same property and a specific reason. T
build and test the documentation projects locally, run:

```powershell
dotnet test --solution ../Docs.slnx --configuration Release --framework net10.0 -p:BuildExternalAssets=false --minimum-expected-tests 1 --max-parallel-test-modules 1
dotnet test --solution ../Docs.slnx --configuration Release --framework net10.0 --minimum-expected-tests 1 --max-parallel-test-modules 1
```

Build samples through `samples/Build-Samples.ps1`, which packs the current Orleans
Expand Down
3 changes: 0 additions & 3 deletions samples/Build-Samples.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
param(
[string] $Configuration = 'Release',
[switch] $NoIncremental,
[switch] $SkipExternalAssets,
[switch] $DisableSharedCompilation
)

Expand All @@ -13,7 +12,6 @@ $sampleSolution = Join-Path $PSScriptRoot 'Samples.slnx'
$packageSource = Join-Path $repositoryRoot "Artifacts/Samples/$Configuration/packages"
$sampleBinlog = Join-Path $repositoryRoot "Artifacts/Samples/$Configuration/samples.binlog"
$packageVersion = "10.0.0-dev.$([System.DateTime]::UtcNow.Ticks)"
$buildExternalAssets = (-not $SkipExternalAssets).ToString().ToLowerInvariant()

if (Test-Path -LiteralPath $packageSource) {
Remove-Item -LiteralPath $packageSource -Recurse -Force
Expand All @@ -23,7 +21,6 @@ if (Test-Path -LiteralPath $packageSource) {
--configuration $Configuration `
--output $packageSource `
-p:Version=$packageVersion `
-p:BuildExternalAssets=$buildExternalAssets `
--nologo
if ($LASTEXITCODE -ne 0) {
throw "Orleans package build failed with exit code $LASTEXITCODE."
Expand Down
1 change: 0 additions & 1 deletion src/Dashboard/Orleans.Dashboard.App/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ out

# Nuxt.js build / generate output
.nuxt
dist
.output

# Gatsby files
Expand Down
1 change: 1 addition & 0 deletions src/Dashboard/Orleans.Dashboard.App/.node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.22.2
88 changes: 21 additions & 67 deletions src/Dashboard/Orleans.Dashboard.App/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
# Orleans Dashboard App

This directory contains the frontend web application for the Orleans Dashboard, built with React and Vite.
This directory contains the frontend web application for the Orleans Dashboard, built with React and Vite. The production build is committed under `dist/`, and building the Orleans.Dashboard C# project embeds every file in `dist/` as a resource. .NET builds do not require Node.js or npm.

## Structure

```
Orleans.Dashboard.App/
├── src/ # React application source code
│ ├── components/ # Reusable React components
│ ├── grains/ # Grain-specific views
│ ├── logstream/ # Log streaming components
│ ├── overview/ # Dashboard overview components
│ ├── reminders/ # Reminders view components
│ ├── silos/ # Silo management components
│ ├── lib/ # Utility libraries
│ └── index.jsx # Application entry point
├── public/ # Static assets (copied to build output)
│ ├── favicon.ico
│ ├── OrleansLogo.png
│ └── *.css, *.js # Third-party CSS/JS libraries
├── public/ # Static assets copied to the build output
├── scripts/ # npm installation helper and its tests
├── dist/ # Committed production build, embedded by Orleans.Dashboard
├── screenshots/ # Dashboard screenshots for documentation
├── tests/ # Playwright navigation tests
├── index.html # HTML template
├── package.json # npm dependencies and scripts
├── vite.config.ts # Vite build configuration
Expand All @@ -28,75 +20,37 @@ Orleans.Dashboard.App/

## Development

### Prerequisites
Use the Node.js version in `.node-version` with the npm version in `package.json`. From this directory:

- Node.js (v24 or later)
- npm

### Setup

```bash
cd src/Dashboard/Orleans.Dashboard.App
npm install
```

### Development Server

Run the Vite development server for hot module replacement:

```bash
```shell
npm run restore
npm run dev
```

This will start the development server at `http://localhost:5173` (or another port if 5173 is in use).
`npm run restore` runs `npm ci` and restarts the clean installation, up to three attempts, when npm reports a connection reset while downloading a package. Other failures are reported immediately.

The development server provides hot module replacement at `http://localhost:5173`.

### Building
## Updating the committed build

To build the production bundle:
After changing the frontend or its dependencies, rebuild and commit `dist/` with the source change:

```bash
```shell
npm run restore
npm run build
```

This builds the application to `../Orleans.Dashboard/wwwroot/` which is then embedded as resources in the Orleans.Dashboard C# project.
The build writes the bundle, source map, fonts, images, and `THIRD-PARTY-NOTICES.md`, which Vite generates from the licenses of the bundled dependencies. The NuGet package also includes the notices as a standalone file.

### Navigation Tests
The `Dashboard` workflow runs when a pull request or push changes this directory. It runs the same commands and fails if the output differs from the committed `dist/`, and runs the navigation tests. Frontend sources use LF line endings on every platform, so builds on Windows, Linux, and macOS produce identical files.

## Navigation tests

The browser tests exercise the production bundle's counter refresh, slow requests, route changes, narrow-screen navigation, keyboard dismissal, and desktop breakpoint:

```bash
```shell
npx playwright install chromium
npm run test:ui
```

### Preview Production Build

To preview the production build locally:

```bash
npm run preview
```

## Integration with Orleans.Dashboard

The frontend application is automatically built when you build the Orleans.Dashboard C# project. The build process is managed by `Orleans.Dashboard.Frontend.targets` which:

1. Installs npm packages if `node_modules` doesn't exist
2. Runs `npm run build` to compile the frontend
3. Embeds the built assets as resources in the Orleans.Dashboard assembly

The build uses incremental compilation, so the frontend is only rebuilt when source files change.

## Migration from Browserify

This project was migrated from Browserify to Vite for improved:
- Build performance
- Development experience with HMR
- Modern JavaScript/TypeScript support
- Better tree-shaking and optimization

The migration updated:
- React from v15 to v18
- Chart.js from v2 to v4
- Build tooling from Browserify/Babel to Vite
- Module system from CommonJS to ESM
`npm run preview` serves the production build locally.
Loading
Loading