Repository navigation
Use the apphost.mts layout in Japanese TypeScript AppHost docs - #2003
David Pine (IEvangelist) merged 2 commits into
Conversation
The Japanese resource hierarchies TypeScript sample still imported the pre-13.4 SDK path ./.modules/aspire.js under an apphost.ts title, which does not resolve in projects created by current Aspire CLIs and fails to type-check against the documented SDK. The Japanese multi-language architecture page also described the guest as apphost.ts with a .modules/ SDK. Align both with the English pages (apphost.mts and ./.aspire/modules/aspire.mjs) and add a unit check that TypeScript samples in every locale import the generated SDK from the current path. Co-authored-by: Copilot <[email protected]>
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the Japanese AppHost documentation alignment and accompanying regression-test changes.
No open issues 🎉
What changed in this PR
Updates the Japanese TypeScript AppHost architecture docs to match the current apphost.mts layout used by the English documentation.
Changes:
- Corrects the SDK import and filename in the resource-hierarchies sample.
- Updates the guest-process description, diagram, and SDK-generation paths.
- Adds a cross-locale regression test for legacy SDK imports and mismatched sample titles, excluding release notes.
| File | Description |
|---|---|
src/frontend/tests/unit/typescript-apphost-sdk-imports.vitest.test.ts |
Adds layout checks across documentation locales and fixture coverage. |
src/frontend/src/content/docs/ja/architecture/resource-hierarchies.mdx |
Changes the sample to apphost.mts and ./.aspire/modules/aspire.mjs. |
src/frontend/src/content/docs/ja/architecture/multi-language-architecture.mdx |
Aligns prose and diagram paths with the current AppHost layout. |
Review effort: Balanced
Documentation accuracy review [partial][partial — phase A: 7 of 7 edited claims evaluated; phase B: rendering and compilation passed, full runtime validation blocked] Reviewed PR #2003 against Result: No documentation defect established in the edited claims. Phase A: 7 verified, 0 verified-with-nuance, 0 unverifiable, 0 contradicted. Phase B: both affected Japanese pages exercised; 0 critical issues, 2 validation-limit warnings. Full runtime behavior was not verified because the sample references an external Worker project that was not present. This is a top-level report, not a formal review verdict. Owning source: Phase A — Claim verificationAll seven edited claims and pinned source evidenceLocations below are relative to
Release cross-check: The modern default does not mean legacy projects stop working: the owning CLI explicitly retains the old layout for detected legacy AppHosts. That does not contradict these modern-layout edits. Unchanged architecture claims and unchanged sample APIs were not expanded into an unrelated audit. Phase B — Independent doc-tester report (verbatim)Documentation Test Report — FrozenFocus: Phase B only, microsoft/aspire.dev PR #2003 Summary
Counts represent scoped checks, not certification of unchanged architectural claims. Scope and IndependenceLoaded Did not read owning Aspire source, test files, or other reviewer conclusions. Documentation was inspected as displayed through Routes and EnvironmentConfirmed owned local URL:
Port 4321 belonged to another checkout. Initial observations there were discarded; both checks were repeated against the confirmed owned server on 4322. Critical IssuesNone established within the changed sections. Warnings1. Runtime verification stopped at an external Worker prerequisiteThe displayed sample was copied verbatim into a freshly scaffolded TypeScript AppHost. Its generated SDK import resolved, and execution reached Assessment: Runtime validation is partial. Redis orchestration, Worker environment injection, and final application behavior were not verified. The missing Worker is not evidence that the changed filename or import is defective. 2. Installed CLI’s default staging scaffolding failedInstalled Aspire CLI: Default scaffolding failed because its staging feed returned missing-package errors for Assessment: Environment/feed limitation, not a documentation defect. Passed Checks
No changed hyperlinks required additional target checks; unrelated navigation was not audited. Exact Command OutcomesBun commands after installation used
Browser DOM evaluations verified displayed content, sample text, and rendered Mermaid SVG. Console/network inspection found Knowledge Gaps and Limitations
Recommendations
Cleanup State
This report consumes the documentation stage for this PR regardless of head changes or its partial runtime status; it is not queued for an automatic rerun. The applicable code review follows separately. |
Code correctness reviewReviewed the new MediumLines 20-22 — CRLF Markdown is silently skipped, so the corpus test can pass without checking any examples on Windows. Confidence: 10/10.
Why it matters: this repository uses Confirmed reproduction using the unchanged helper functions: LF: 1 fence, ["line 1: ./.modules/aspire.js"] |
Split fences on \r?\n so CRLF checkouts don't silently skip every TypeScript fence, and add a CRLF fixture covering both the legacy import and the apphost.ts title cases. Co-authored-by: Copilot <[email protected]>
|
Thanks David Pine (@IEvangelist) — confirmed the CRLF false negative. Fixed in e5c8d3d:
Validation (from 🤖 Posted by AspireAgent (AI Agent) |
docs-pr-reviewer report — [partial — phase A: key claims evaluated; phase B: not run (docs site was not served in this automated run)]Recommendation: needs human Source used: n/a — localization fix; checked against English layout ( Phase A — claims
Phase B — doc-testerNot run; rendering of the changed pages is not browser-checked. 🤖 Posted by aspire.dev - squad (AI Agent) |
Summary
The Japanese TypeScript AppHost docs still described the pre-13.4
apphost.tslayout, while the English pages useapphost.mtsand./.aspire/modules/aspire.mjs. I found this with a type-check audit of the localized TypeScript AppHost samples, using the same twoslash compiler andsrc/data/twoslash/aspire.d.tssetup as the English audit.ja/architecture/resource-hierarchies.mdx: theEndpointReferenceExpressionTypeScript sample imported./.modules/aspire.jsunder the titleTypeScript — apphost.ts..aspire/modules/aspire.mjs, so readers who copy the sample getCannot find module './.modules/aspire.js'(TS2307 in the audit)../.aspire/modules/aspire.mjs,apphost.mts.ja/architecture/multi-language-architecture.mdx: the guest/host description, the Mermaid diagram and the code-generation steps called the guestapphost.tsand the SDK folder.modules/. They now match the English page:apphost.mts,.aspire/modules/.Legacy
apphost.ts/./.modules/aspire.jsreferences that remain are intentional. The Aspire 13.4 release notes and the "projects created before 13.4" asides describe that layout for migration.Regression check: new
tests/unit/typescript-apphost-sdk-imports.vitest.test.ts../.aspire/modules/aspire.mjs, or when a current-layout fence is titledapphost.ts.whats-new/are skipped because they intentionally show the layout they migrate from.On
mainit fails:After this change it passes.
Localized audit counts
twoslashblocks, which the build already type-checks. 49 non-twoslash AppHost blocks were compiled (31 full samples and 18 fragments with acreateBuilderpreamble).main; 25 after this change. The resource-hierarchies block now compiles cleanly.createReferenceExpression, a known SDK gap.addMy*integrations..d.tsoptions heuristic.fundamentals/custom-resource-commands.mdxcallsaddNodeAppwith two arguments in both the English and Japanese pages, but the SDK requires(name, appDirectory, scriptPath). I left it out because open PR Add the config-driven AppHost language foundation #1634 rewrites that English page.No open issue or PR touches these Japanese files.
Screenshots
Captured with Playwright on
astro dev: desktop 1280px, light theme, TypeScript tab./ja/architecture/resource-hierarchies/, TypeScript sample/ja/architecture/multi-language-architecture/, guest process diagramThird-party links and affiliations
None.
Validation
npx vitest run tests/unit/typescript-apphost-sdk-imports.vitest.test.ts: fails onmain(output above) and passes with this change.npx vitest run: 85 files, 1122 passed, 1 skipped.npx eslint . --max-warnings 0: clean. The new test is Prettier-formatted.resource-hierarchiesblock no longer reports TS2307.🤖 Posted by AspireAgent (AI Agent)