Repository navigation
Upgrade Aspire samples to 13.4 - #1656
Merged
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Generated TypeScript AppHost restore output now includes .aspire/integrations in addition to .aspire/modules. Ignore that generated path so validation restores do not leave untracked files. Co-authored-by: Copilot <[email protected]>
Restore .mts TypeScript AppHosts through the sample directory instead of passing the AppHost filename, which avoids the CI path-resolution failure in Aspire 13.4. Also make build/CI discovery .mts-only and simplify generated .aspire ignores. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the Aspire samples from 13.3.x to 13.4.0 and migrates TypeScript AppHosts from the legacy apphost.ts / .modules shape to the new apphost.mts / .aspire/modules flow, updating build/CI wiring accordingly.
Changes:
- Bump Aspire SDK / package references across samples and tests to 13.4.0.
- Migrate TypeScript AppHosts to
apphost.mtsand update config/lint/tsconfig/docs to reference./.aspire/modules/aspire.mjs. - Update build automation and CI to restore/build TypeScript AppHosts via
aspire restore --apphost ., and simplify ignore rules for generated.aspireoutput.
Reviewed changes
Copilot reviewed 89 out of 90 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/SamplesIntegrationTests/SamplesIntegrationTests.csproj | Update Aspire.Hosting test package refs to 13.4.0. |
| samples/volume-mount/VolumeMount.BlazorWeb/VolumeMount.BlazorWeb.csproj | Bump Aspire EF/Blobs packages to 13.4.0. |
| samples/volume-mount/VolumeMount.AppHost/VolumeMount.AppHost.csproj | Bump AppHost SDK + Hosting packages to 13.4.0. |
| samples/vite-yarp-static/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/vite-yarp-static/README.md | Update TypeScript AppHost import path to .aspire/modules/aspire.mjs. |
| samples/vite-yarp-static/package.json | Lint script now targets apphost.mts. |
| samples/vite-yarp-static/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/vite-yarp-static/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/vite-yarp-static/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/vite-react-fastapi/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/vite-react-fastapi/package.json | Lint script now targets apphost.mts. |
| samples/vite-react-fastapi/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/vite-react-fastapi/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/vite-react-fastapi/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/vite-csharp-postgres/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/vite-csharp-postgres/package.json | Lint script now targets apphost.mts. |
| samples/vite-csharp-postgres/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/vite-csharp-postgres/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/vite-csharp-postgres/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/vite-csharp-postgres/api/Api.csproj | Bump Aspire Npgsql EFCore package to 13.4.0. |
| samples/rag-document-qa-svelte/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/rag-document-qa-svelte/package.json | Lint script now targets apphost.mts. |
| samples/rag-document-qa-svelte/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/rag-document-qa-svelte/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/rag-document-qa-svelte/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/python-script/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/python-script/README.md | Update docs to refer to apphost.mts + .aspire/modules/aspire.mjs. |
| samples/python-script/package.json | Lint script now targets apphost.mts. |
| samples/python-script/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/python-script/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/python-script/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/python-openai-agent/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/python-openai-agent/README.md | Update docs to refer to apphost.mts + .aspire/modules/aspire.mjs. |
| samples/python-openai-agent/package.json | Lint script now targets apphost.mts. |
| samples/python-openai-agent/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/python-openai-agent/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/python-openai-agent/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/python-fastapi-postgres/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/python-fastapi-postgres/README.md | Update docs to refer to apphost.mts + .aspire/modules/aspire.mjs. |
| samples/python-fastapi-postgres/package.json | Lint script now targets apphost.mts. |
| samples/python-fastapi-postgres/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/python-fastapi-postgres/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/python-fastapi-postgres/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/polyglot-task-queue/worker-csharp/worker-csharp.csproj | Bump Aspire RabbitMQ client package to 13.4.0. |
| samples/polyglot-task-queue/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/polyglot-task-queue/package.json | Lint script now targets apphost.mts. |
| samples/polyglot-task-queue/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/polyglot-task-queue/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/polyglot-task-queue/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/orleans-voting/OrleansVoting.Service/OrleansVoting.Service.csproj | Bump Aspire Redis package to 13.4.0. |
| samples/orleans-voting/OrleansVoting.AppHost/OrleansVoting.AppHost.csproj | Bump AppHost SDK + Hosting packages to 13.4.0. |
| samples/node-express-redis/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/node-express-redis/package.json | Lint script now targets apphost.mts. |
| samples/node-express-redis/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/node-express-redis/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/node-express-redis/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/Metrics/MetricsApp.AppHost/MetricsApp.AppHost.csproj | Bump AppHost SDK + Hosting package to 13.4.0. |
| samples/image-gallery/worker/worker.csproj | Bump Aspire EF/Storage packages to 13.4.0. |
| samples/image-gallery/apphost.run.json | Remove obsolete ASPIRE_DASHBOARD_MCP_ENDPOINT_URL entries. |
| samples/image-gallery/apphost.cs | Bump script-based AppHost directives to 13.4.0. |
| samples/image-gallery/api/api.csproj | Bump Aspire EF/Storage packages to 13.4.0. |
| samples/health-checks-ui/HealthChecksUI.Web/HealthChecksUI.Web.csproj | Bump Aspire Redis output caching package to 13.4.0. |
| samples/health-checks-ui/HealthChecksUI.AppHost/HealthChecksUI.AppHost.csproj | Bump AppHost SDK + Hosting packages to 13.4.0. |
| samples/golang-api/tsconfig.apphost.json | Update TS AppHost include paths for .mts + .aspire/modules. |
| samples/golang-api/package.json | Lint script now targets apphost.mts. |
| samples/golang-api/eslint.config.mjs | ESLint config now targets apphost.mts. |
| samples/golang-api/aspire.config.json | Switch apphost path to apphost.mts and bump sdk/packages to 13.4.0. |
| samples/golang-api/apphost.mts | Migrate AppHost to .mts and .aspire/modules/aspire.mjs import. |
| samples/database-migrations/DatabaseMigrations.MigrationService/DatabaseMigrations.MigrationService.csproj | Bump Aspire EF SqlServer package to 13.4.0. |
| samples/database-migrations/DatabaseMigrations.AppHost/DatabaseMigrations.AppHost.csproj | Bump AppHost SDK + Hosting packages to 13.4.0. |
| samples/database-migrations/DatabaseMigrations.ApiService/DatabaseMigrations.ApiService.csproj | Bump Aspire EF SqlServer package to 13.4.0. |
| samples/database-containers/DatabaseContainers.AppHost/DatabaseContainers.AppHost.csproj | Bump AppHost SDK + Hosting packages to 13.4.0. |
| samples/database-containers/DatabaseContainers.ApiService/DatabaseContainers.ApiService.csproj | Bump Aspire DB client packages to 13.4.0. |
| samples/custom-resources/CustomResources.AppHost/CustomResources.AppHost.csproj | Bump AppHost SDK + Hosting package to 13.4.0. |
| samples/container-build/apphost.run.json | Remove obsolete ASPIRE_DASHBOARD_MCP_ENDPOINT_URL entry. |
| samples/container-build/apphost.cs | Bump script-based AppHost directive to 13.4.0. |
| samples/client-apps-integration/ClientAppsIntegration.AppHost/ClientAppsIntegration.AppHost.csproj | Bump AppHost SDK + Hosting package to 13.4.0. |
| samples/aspire-with-python/apphost.run.json | Remove obsolete ASPIRE_DASHBOARD_MCP_ENDPOINT_URL entries. |
| samples/aspire-with-python/apphost.cs | Bump script-based AppHost directives to 13.4.0. |
| samples/aspire-with-node/AspireWithNode.AppHost/AspireWithNode.AppHost.csproj | Bump AppHost SDK + Hosting packages to 13.4.0. |
| samples/aspire-with-javascript/AspireJavaScript.AppHost/AspireJavaScript.AppHost.csproj | Bump AppHost SDK + Hosting packages to 13.4.0. |
| samples/aspire-with-azure-functions/ImageGallery.AppHost/ImageGallery.AppHost.csproj | Bump AppHost SDK to 13.4.0. |
| samples/aspire-with-azure-functions/Directory.Packages.props | Bump centralized Aspire package versions to 13.4.0. |
| samples/aspire-shop/AspireShop.CatalogDbManager/AspireShop.CatalogDbManager.csproj | Bump Aspire Npgsql EFCore package to 13.4.0. |
| samples/aspire-shop/AspireShop.CatalogDb/AspireShop.CatalogDb.csproj | Bump Aspire Npgsql EFCore package to 13.4.0. |
| samples/aspire-shop/AspireShop.BasketService/AspireShop.BasketService.csproj | Bump Aspire Redis package to 13.4.0. |
| samples/aspire-shop/AspireShop.AppHost/AspireShop.AppHost.csproj | Bump AppHost SDK + Hosting packages to 13.4.0. |
| build/Build.proj | Build logic updated to detect apphost.mts and restore/build via aspire restore --apphost .. |
| .gitignore | Ignore all generated .aspire directories (replacing legacy .modules ignore). |
| .github/workflows/ci.yml | CI updated to restore .mts AppHosts and opt out of Aspire CLI telemetry. |
Comments suppressed due to low confidence (2)
samples/vite-yarp-static/README.md:58
- The README snippet still uses the pre-13.4
executionContext.get()/isRunMode.get()pattern, but the updated AppHost usesexecutionContext()/isRunMode(). As written, readers copy/pasting this snippet will get runtime/type errors with the new TypeScript AppHost API shape.
samples/aspire-shop/AspireShop.AppHost/AspireShop.AppHost.csproj:20 - The
Microsoft.Extensions.HostingPackageReference line is mis-indented within this ItemGroup, which makes the csproj harder to scan and is inconsistent with the surrounding formatting.
<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.4.0" />
<PackageReference Include="Aspire.Hosting.PostgreSQL" Version="13.4.0" />
<PackageReference Include="Aspire.Hosting.Redis" Version="13.4.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.8" />
<ProjectReference Include="..\AspireShop.BasketService\AspireShop.BasketService.csproj" />
<ProjectReference Include="..\AspireShop.CatalogDbManager\AspireShop.CatalogDbManager.csproj" />
<ProjectReference Include="..\AspireShop.CatalogService\AspireShop.CatalogService.csproj" />
<ProjectReference Include="..\AspireShop.Frontend\AspireShop.Frontend.csproj" />
</ItemGroup>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Align AppHost PackageReference and ProjectReference indentation with the surrounding ItemGroup formatting. Co-authored-by: Copilot <[email protected]>
Resolve AppHost XML indentation conflicts from the latest main package updates. Co-authored-by: Copilot <[email protected]>
Adam Ratzman (adamint)
approved these changes
Jun 2, 2026
Pin the Angular sample's transitive webpack-dev-server resolution to 5.2.4. Co-authored-by: Copilot <[email protected]>
David Pine (IEvangelist)
added a commit
to microsoft/aspire.dev
that referenced
this pull request
Jun 2, 2026
microsoft/aspire-samples#1656 (Upgrade Aspire samples to 13.4) renamed the TypeScript AppHost entry point from apphost.ts to apphost.mts (Aspire 13.4's new default layout, with the generated SDK moving from ./.modules/ to ./.aspire/modules/) and bumped the file-based AppHost samples from [email protected] to @13.4.0. Re-run pnpm update:samples to pick up the upstream changes. Eleven samples (golang-api, node-express-redis, polyglot-task-queue, python-fastapi-postgres, python-openai-agent, python-script, rag-document-qa-svelte, vite-csharp-postgres, vite-react-fastapi, vite-yarp-static, image-gallery already file-based) refreshed; all TypeScript samples now correctly resolve appHostPath to apphost.mts and the file-based AppHost samples carry the 13.4.0 SDK pin. Teach the data pipeline about the new file shape so detection survives both the legacy .ts and current .mts conventions: * scripts/update-samples.ts: detectAppHost regex now matches apphost.m?ts so the TypeScript AppHost takes precedence over the .cs fallback (previously the regex only matched apphost.ts, which caused every renamed sample to be misclassified as AppHost: null in the first attempt and lose its typescript tag). The TAG_RULES TypeScript pattern matches apphost.m?ts and .m?tsx? for the same reason. * src/utils/samples.ts: appHostCodeLang treats .mts as typescript so the rendered AppHost code block on /reference/samples/<slug>/ still uses TypeScript syntax highlighting after the rename. Verified live on /reference/samples/{golang-api,node-express-redis,vite-react-fastapi}/: code block title shows apphost.mts, language is typescript, and the GitHub link resolves to the renamed file. Unit tests (api-markdown + custom-components, 75 passed) and lint clean. Co-authored-by: Copilot <[email protected]>
David Pine (IEvangelist)
added a commit
to microsoft/aspire.dev
that referenced
this pull request
Jun 2, 2026
* chore: update Aspire samples data Co-authored-by: Copilot <[email protected]> * feat: add Aspire sample detail pages Co-authored-by: Copilot <[email protected]> * fix: polish Aspire sample detail rendering Co-authored-by: Copilot <[email protected]> * fix: improve sample README rendering Co-authored-by: Copilot <[email protected]> * fix: render sample README content accurately Co-authored-by: Copilot <[email protected]> * fix: render sample summaries as plain text Co-authored-by: Copilot <[email protected]> * fix: add subtle sample card hover animation Co-authored-by: Copilot <[email protected]> * Replace sample-hero circle with resource-graph backdrop Drop the decorative circle in favor of a small connected-nodes SVG that echoes Aspire's distributed-app story without copying TopicHero's grid plus floating-icon language. Highlights: - Animated dashed edges with a slow flow shader simulate data movement. - Five nodes positioned in a balanced layout; one pulses per sample, picked by hashing the sample slug so every page feels distinct. - Dual radial glows (primary at upper-right, secondary at lower-left) warm the hero without grid scaffolding. - Kicker becomes an inline pill with a tag-driven Starlight icon (Docker, db, Azure, dashboard, C#, TypeScript, or rocket fallback) to give each hero a quick visual cue about the sample's stack. - Existing CTAs, summary, tags, and accessibility hooks unchanged. - Animations gated behind prefers-reduced-motion. Co-authored-by: Copilot <[email protected]> * Detect AppHost flavor in samples generator and surface it in UI Fetch the sample directories' file tree once via the GitHub git-trees API and classify each sample as TypeScript (apphost.ts), file-based C# (apphost.cs), or csproj C# (*AppHost.csproj). Promote the detected language to a sample tag so the TypeScript filter chip lights up in the samples grid. Render the AppHost flavor as a pill on the sample card and as a sibling pill alongside the 'Aspire sample' kicker on the detail hero, with a dedicated TypeScript color treatment. Co-authored-by: Copilot <[email protected]> * Enable Copy Markdown / View Markdown page actions on sample detail pages The starlight-page-actions plugin fetches '<currentPath>.md' for both Copy Markdown and Open in Markdown, so a dynamic .md route at every sample slug has to exist. Generate one by mirroring the C#/TypeScript API reference pattern with a [sample].md.ts companion to the existing [sample]/index.astro route, prerendered per static path. Store the original upstream README (readmeRaw) in samples.json so the markdown payload stays portable when pasted into an LLM or opened in a browser. Relative image paths are rewritten to absolute raw.githubusercontent.com URLs so screenshots render anywhere the markdown is consumed. Flip 'pageActions: true' in the StarlightPage frontmatter of the detail page so the Copy / Open / Share buttons show up. Co-authored-by: Copilot <[email protected]> * De-duplicate sample hero summary and brand AppHost badges - Drop the leading paragraph from the rendered README when it matches the hero summary so the descriptive sentence only appears once on each sample detail page. - Always use a neutral 'rocket' icon for the 'Aspire sample' kicker pill so the language signal lives entirely on the AppHost pill. - Switch the .csproj AppHost icon to inline angle-brackets (XML-ish) so the C# logo glyph no longer collides with the 'C#' word in the label. - Apply official brand colors to the AppHost pills: #512BD4 for C# (csproj and file-based) and #3178C6 for TypeScript, on both SampleCard and SampleDetail. - Drop the redundant 'C#' word from the short label for file-based AppHosts since the seti C# glyph already carries the language signal. Co-authored-by: Copilot <[email protected]> * Show the AppHost entry point above each sample README Add an AppHost code section that renders right after the hero on every sample detail page so visitors immediately see the orchestration entry point for the sample they are looking at. - update-samples generator: extend the AppHost detection to return both the kind and the actual entry-point file path (prefers AppHost.cs over Program.cs adjacent to a *AppHost.csproj, picks apphost.ts for TS, and the standalone AppHost.cs for file-based AppHosts). - Fetch the entry-point file contents during generation and persist appHostCode + appHostPath alongside the existing appHost kind. Trim trailing whitespace and normalize line endings so the JSON stays stable across runs. - SampleDetail renders a new <section class='sample-apphost'> above the README with the section heading 'The <filename> entry point', a 'View on GitHub' link that points at the blob URL of the source file, and the code itself in an expressive-code <Code> block using the language inferred from the file extension (typescript / csharp / xml). - Add appHostCodeLang and appHostCodeTitle helpers so the lang and the rendered title can be derived without per-component duplication. - Add a SampleDetail vitest assertion covering the new section, the blob-URL source link, and the language attribute on the code block. Co-authored-by: Copilot <[email protected]> * Avoid nested Steps wrappers in sample README renderer Starlight's <Steps> component is meant for top-level numbered procedures. When a README has a numbered sub-list inside an outer step, the recursive <Astro.self ...> call inside SampleReadmeBlocks would wrap the inner ordered list in another <Steps>, producing double indents, large duplicate bullet circles, and a broken visual rhythm. Thread a ested prop through the recursive renders. The top-level invocation from SampleDetail (default alse) still wraps ordered lists in <Steps>; recursive renders pass ested={true}, which renders nested ordered lists as plain <ol> and unordered lists as plain <ul> without the Starlight step chrome. The blockquote branch propagates the current ested value so quoted procedures keep their containing context. Extends the SampleDetail vitest fixture with a nested ordered list and asserts the rendered HTML contains exactly one sl-steps class — one for the outer procedure, zero for the inner steps. Co-authored-by: Copilot <[email protected]> * Align sample hero, AppHost source, and README to a shared column width Previously, .sample-hero had no max-width while .sample-readme and .sample-apphost were each capped at 56rem. The hero stretched to fill the Starlight content area while the code block and README rendered noticeably narrower, producing a stepped right edge between the hero card and everything below it. Move the 56rem cap onto the .sample-detail wrapper so all three children inherit the same column. Removes the duplicate max-width from .sample-readme and .sample-apphost since they now derive their width from the shared parent. Co-authored-by: Copilot <[email protected]> * Polish sample card, detail, and README rendering * SampleCard: AppHost flavor badge now sits in the bottom-left corner opposite the View on GitHub link; footer uses margin-left: auto instead of a spacer div. The appHostIconName helper moved to utils/samples.ts so the card and detail page share one source. * SampleDetail: View on GitHub CTA now uses the GitHub mark on the leading edge instead of the trailing external-site arrow, matching the in-page footer link treatment. * SampleReadmeBlocks: README image groups no longer leave dangling paragraphs orphaned underneath the gallery. Trailing text after a grouped image set is now folded back into the gallery caption block so sections like /reference/samples/aspire-with-javascript/ render cleanly. Co-authored-by: Copilot <[email protected]> * Fix samples .md endpoint 404 and serve markdown inline The middleware-level trailing-slash redirect for .md routes was hard-coded to /reference/api/(csharp|typescript)/..., so navigating to /reference/samples/<slug>.md without a trailing slash always returned 404 instead of redirecting. Extend the regex to cover samples as well. While here, switch markdownResponse() to text/plain; charset=utf-8 so all .md endpoints (csharp, typescript, samples) render inline in a new tab on Chrome, Edge, and Safari. The browsers treat text/markdown as a binary download type, which made the "View as Markdown" page action save the file instead of opening it. The Copy Markdown action uses fetch().then(r => r.text()) so the Content-Type change has no effect there. Co-authored-by: Copilot <[email protected]> * Redesign samples filter UI and make the browse view shareable * Search box now has the standard X icon clear button embedded in the input (mirrors InpageSearch), hidden via the HTML hidden attribute until the user types. The UA-provided type="search" clear is suppressed so there is only one affordance. * Tag chips are quiet by default (transparent background, 1px gray-5 border, 0.78rem text, inline muted count). Active chips fill with a 14% mix of the accent color so they are the only loud item in the row. Tighter sizing on viewports up to 480px. * On viewports up to 768px the chip row collapses to ~4.5rem with a subtle bottom-fade mask and a chevron "Show all N tags" toggle. If a hidden chip is already active on URL hydrate, the row auto-expands so users can see what is filtering their view. * Replaced the duplicate "Filtered by" bar with a single subtle "Clear all" underlined text link in the results header. The active chips themselves remain the source of truth for active filters. * Search and tag state now syncs to ?q=<query>&tags=<slug,slug> via history.replaceState. Hydrating from the URL silently drops unknown tag slugs and ignores whitespace-only queries; updates use replaceState so the back/forward stack stays clean. Test updates: * custom-components.vitest.test.ts: assert the new data-clear-all link, the aria-label="Clear search" X icon, and that the readFiltersFromUrl/URLSearchParams/history.replaceState hooks ship in the rendered HTML. * custom-components.spec.ts: new Playwright case that loads /reference/samples/?q=redis&tags=databases,not-a-real-tag, asserts the input prefill, the active chip state, that unknown slugs are dropped from the URL, that toggling another tag appends to ?tags=, and that Clear all resets every filter and removes ?q=/?tags= from location.search. Co-authored-by: Copilot <[email protected]> * Align api-markdown unit test with text/plain content type The shared `readMarkdown()` helper asserts the content-type from `markdownResponse()`. We switched that response to `text/plain; charset=utf-8` (so browsers display raw markdown inline instead of triggering a download); the test was still asserting `text/markdown` and failing on CI for the TypeScript function and member route cases. Update the assertion to match the new behavior. Co-authored-by: Copilot <[email protected]> * Serve .md endpoints as text/markdown to match preview/production Reverts the SSR-only text/plain switch on .md endpoints. The production preview server (astro preview / sirv) infers Content-Type from the .md extension as text/markdown, so the markdownResponse() helper's text/plain header only took effect under SSR / astro dev. CI runs Playwright against astro preview and therefore saw text/markdown, failing the assertion across all 12 api-markdown route cases. The page-actions "Copy Markdown" button consumes the body as text directly and does not depend on the Content-Type. Browser inline display of "View Markdown" is a hosting-server concern; align the helper, unit assertion, and e2e assertion all back to text/markdown so they reflect what is actually served. Co-authored-by: Copilot <[email protected]> * Anchor samples-page collapse toggle into TOC bar via data-has-toc The sample detail page set tableOfContents: false on its StarlightPage frontmatter. Without a TOC, Starlight does not set the html[data-has-toc] attribute that our custom topic-sidebar CSS in Sidebar.astro relies on to inline the collapse/expand toggle into the mobile "On this page" bar at 50-100rem viewport widths. The toggle therefore floated at the top of the content column and visually overlapped the page H1 at 1024x600 (the title wrapped just below the toggle, putting its first character behind the button glyph). Other topic-nav pages such as /integrations/frameworks/go/go-get-started/ work correctly because their MDX frontmatter enables a TOC by default. Enable a real TOC (minHeadingLevel: 2, maxHeadingLevel: 3) on the sample detail page. The page has substantive H2 headings (the hero "Clone, run, and explore this sample" plus the README's h2/h3 sections) so a TOC is genuinely useful, not just a layout workaround. Verified at 1024x600: toggle anchors to (330, 63) inline with the mobile TOC bar and the H1 renders cleanly at (346, 152) — identical to the working integration page layout. Co-authored-by: Copilot <[email protected]> * Hide sidebar toggle on no-TOC pages between 50rem and 100rem The inline-with-TOC override in Sidebar.astro that anchors the collapse/expand toggle inside the mobile "On this page" bar at 50-100rem only fires when html[data-has-toc] is set. Landing pages such as /deployment/ set tableOfContents: false in their frontmatter, so without a TOC bar the toggle falls back to its floating-tab base position at the top of the article column where its leftmost ~48px overlap the page H1 at narrow widths — the H1 also starts at the article column's left edge, and at 1024x600 the two visibly collide ("A" in "Aspire deployment overview" sits behind the toggle glyph). Hide the topic-sidebar and api-ref toggles in the 50-100rem and 72-100rem ranges respectively when html[data-has-toc] is absent. At >= 100rem the article column has enough horizontal room that the floating-tab position clears the H1, and the existing hide rules already drop the toggles below their respective mobile-menu breakpoints, so the new rules target exactly the broken range. Add an e2e regression test against /deployment/ that asserts the toggle is hidden on no-TOC topic-nav landing pages at 50-100rem viewports. Mirrors the existing 'sidebar collapse toggle does not overlap the mobile On this page control' test alongside which it sits. Co-authored-by: Copilot <[email protected]> * Keep sidebar toggle visible on no-TOC pages, anchor it above the H1 Replaces the previous hide-toggle approach (d91c18a) with one that keeps the collapse/expand control accessible. On no-TOC topic-nav pages at 50-100rem and no-TOC api-ref pages at 72-100rem, anchor the toggle into a synthesized TOC-bar-height row at the top of the article column (matching the inline-with-TOC treatment used on TOC pages), and pad the first .content-panel > .sl-container by 3rem so the H1 starts below the toggle instead of behind it. The padding rule lives in site.css rather than Sidebar.astro because Astro's component-scoped styles add [data-astro-cid-*] attributes to selectors targeting non-component-owned elements like .content-panel, making the rule never match. The Sidebar.astro anchor rule uses literal 3rem rather than var(--sl-mobile-toc-height, 3rem) because Starlight defines the variable as 0rem outside [data-has-toc] scope, defeating the CSS fallback. Update the regression test to assert the toggle stays visible AND that its bounding box does not overlap the page-title H1, instead of asserting it is hidden. Co-authored-by: Copilot <[email protected]> * Refresh sample data for Aspire 13.4 apphost.mts rename microsoft/aspire-samples#1656 (Upgrade Aspire samples to 13.4) renamed the TypeScript AppHost entry point from apphost.ts to apphost.mts (Aspire 13.4's new default layout, with the generated SDK moving from ./.modules/ to ./.aspire/modules/) and bumped the file-based AppHost samples from [email protected] to @13.4.0. Re-run pnpm update:samples to pick up the upstream changes. Eleven samples (golang-api, node-express-redis, polyglot-task-queue, python-fastapi-postgres, python-openai-agent, python-script, rag-document-qa-svelte, vite-csharp-postgres, vite-react-fastapi, vite-yarp-static, image-gallery already file-based) refreshed; all TypeScript samples now correctly resolve appHostPath to apphost.mts and the file-based AppHost samples carry the 13.4.0 SDK pin. Teach the data pipeline about the new file shape so detection survives both the legacy .ts and current .mts conventions: * scripts/update-samples.ts: detectAppHost regex now matches apphost.m?ts so the TypeScript AppHost takes precedence over the .cs fallback (previously the regex only matched apphost.ts, which caused every renamed sample to be misclassified as AppHost: null in the first attempt and lose its typescript tag). The TAG_RULES TypeScript pattern matches apphost.m?ts and .m?tsx? for the same reason. * src/utils/samples.ts: appHostCodeLang treats .mts as typescript so the rendered AppHost code block on /reference/samples/<slug>/ still uses TypeScript syntax highlighting after the rename. Verified live on /reference/samples/{golang-api,node-express-redis,vite-react-fastapi}/: code block title shows apphost.mts, language is typescript, and the GitHub link resolves to the renamed file. Unit tests (api-markdown + custom-components, 75 passed) and lint clean. Co-authored-by: Copilot <[email protected]> * Remove TOC from sample detail pages Sample detail pages are short, predominantly card/grid-driven, and don't benefit from the inline `On this page` rail. Set tableOfContents: false in the [sample]/index.astro StarlightPage frontmatter so the page renders without the right-hand TOC and without the collapsed mobile TOC bar. The collapse/expand sidebar toggle continues to render cleanly at 1024-1600px: the no-TOC anchor rule in Sidebar.astro and the matching padding rule in site.css (added in c8142ad) detect `html:not([data-has-toc])` and reserve a synthesized TOC-bar-height row at the top of the article column so the H1 starts below the toggle instead of behind it. Verified live on /reference/samples/{golang-api,aspire-shop,vite-react-fastapi}/: hasToc=false, toggle visible at (330, 63, 48, 48), H1 at y=152, no overlap. Co-authored-by: Copilot <[email protected]> * Fix paragraphPlainText double-counting in SampleDetail marked carries both a ext field and a okens array on strong/em/del/link inline tokens (e.g. `**foo**` lexes to `{type:'strong', text:'foo', tokens:[{type:'text', text:'foo'}]}`). The previous implementation pushed `node.text` AND walked `node.tokens`, doubling characters from emphasized spans. That silently broke two downstream helpers: - dropLeadingSummaryParagraph: README first paragraphs that contained any inline emphasis no longer matched the summary head's startsWith check, so the leading sentence was rendered twice (hero summary + body paragraph). - paragraphIsShortLabel: an emphasized label longer than ~30 chars measured as >60 after doubling, was rejected as `not short`, and survived as an orphan paragraph in front of its extracted screenshot. Fix per reviewer suggestion: leaf-only token types (text, codespan) push their text field; wrapping types (em, strong, del, link) only recurse into tokens so the inner text/codespan contribute characters once. Replace `as any` casts with typed unions. Add a regression test that exercises both downstream code paths with an emphasized first paragraph and a 49-char emphasized label preceding a standalone image. Addresses #1089 (comment) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: David Pine <[email protected]> Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apphost.ts/.modulestoapphost.mts/.aspire/moduleswith.mjsimports.mtsTypeScript AppHost flowASPIRE_DASHBOARD_MCP_ENDPOINT_URLentries from sample run settingsValidation
aspire update --self --channel stable->13.4.0+becb48e2d61099e35ae336d527d3875e928d6594aspire docs get aspire --section "Build your AppHost"confirms current TypeScript examples useapphost.mtsand./.aspire/modules/aspire.mjsapphost.mts,aspire.config.jsonpoints toapphost.mts,tsconfig.apphost.jsonincludesapphost.mtsand.aspire/modules/**/*.mts, package/eslint config no longer referencesapphost.ts, and no actual or source references toapphost.tsremainsamples\golang-apiusingaspire restore --apphost . --non-interactive --nologofollowed bynpm ci --no-audit --no-funddotnet build .\build\Build.proj --nologo -m:1 -v:minimalsucceeded with TypeScript restore enabled.modules/aspire.js/apphost.tsreferences outside generated/build output