[docs] Document WithTerminal Columns/Rows validation - #1479
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Pull request overview
Updates the WithTerminal documentation to reflect the new fail-fast validation for terminal grid sizing options (Columns/Rows) introduced in the main Aspire repo, so users learn about the >= 1 constraint and the earlier exception behavior.
Changes:
- Added a note clarifying that
ColumnsandRowsmust be1or greater. - Documented that invalid values throw an exception during terminal configuration rather than later during terminal-host startup.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| | `ShowTerminalHost` | `false` | Whether the hidden per-replica terminal host resources appear in the dashboard and CLI resource lists. Set to `true` to diagnose terminal-host startup or connectivity issues. | | ||
|
|
||
| <Aside type="note"> | ||
| `Columns` and `Rows` must each be `1` or greater. Setting either to zero or a negative value throws an `ArgumentOutOfRangeException` immediately when you set the option, rather than surfacing later as an opaque terminal-host startup failure. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 32c349b4-907d-42e9-aad8-2f0edc267779
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
Docs accuracy review — automated (Phase A + Phase B)
Verdict: APPROVE — the single behavioral claim is exact against the source, and the page renders cleanly.
- Phase A source of truth:
microsoft/aspirerelease/13.5@8ab6999850d96e0023670799edbd4bdc245ad63c - Claims extracted: 1 — ✅ verified: 1, 🟡 verified-with-nuance: 0, ⚪ unverifiable: 0, ❌ contradicted: 0
- Phase B (doc-tester): exercised
/app-host/with-terminal/— 0 critical, 0 warnings; page renders (HTTP 200, 0 console errors).
This PR adds an <Aside> documenting that Columns and Rows must be 1 or greater and that invalid values throw ArgumentOutOfRangeException from the WithTerminal(...) callback. That is exactly what the source does.
Phase A — Claim verification
No contradicted or unverifiable claims — no blocking inline comments. Evidence below.
Verified claims (1)
| ID | PR location | Claim | Verdict | Evidence (microsoft/aspire @ 8ab6999850) |
|---|---|---|---|---|
| A1 | Aside (new L79–81) | Columns and Rows must each be 1 or greater; a zero or negative value set in the WithTerminal(...) callback throws ArgumentOutOfRangeException immediately, rather than failing later at terminal-host startup. |
✅ verified | src/Aspire.Hosting/ApplicationModel/TerminalAnnotation.cs — the Columns setter (L106–114) and Rows setter (L120–128) both call ArgumentOutOfRangeException.ThrowIfNegativeOrZero(value); the XML docs state "The value must be greater than zero" and <exception cref="ArgumentOutOfRangeException">Thrown when set to zero or a negative value.</exception>. src/Aspire.Hosting/TerminalResourceBuilderExtensions.cs L78–79 invokes the callback synchronously (var options = new TerminalOptions(); configure?.Invoke(options);) during WithTerminal(...), so the throw happens at app-model build time — "immediately", not during host startup. Exception type, the >= 1 bound, and the timing all match. |
Phase B — Doc-tester results (blind user, no source access)
Routes exercised: /app-host/with-terminal/ (the only route affected by this PR's diff).
Critical issues: none.
Warnings: none.
Passed checks:
- Page compiles and renders (HTTP 200) with 0 console errors / 0 warnings.
- The new note renders as a standard Starlight
<Aside type="note">immediately after the terminal-options table and reads clearly: "ColumnsandRowsmust each be1or greater. Configuring either with zero or a negative value in theWithTerminal(...)callback throws anArgumentOutOfRangeExceptionimmediately instead of failing later during terminal-host startup."
Recommendations: none.
Knowledge gaps: none that affect this PR's changed content.
Test-environment note: the
with-terminalpage is new onrelease/13.5and is not yet present on this review worktree's base branch, so its sidebar-topic registration was added locally only to render the page. That scaffolding was reverted afterward and is not part of the PR; it did not alter the page body under test.
Documents changes from microsoft/aspire#18992
@mitchdennyTargeting
release/13.5based on the source PR milestone13.5.Why
microsoft/aspire#18992 adds fail-fast validation to
TerminalOptions.ColumnsandTerminalOptions.Rows: setting either to zero or a negative value now throws anArgumentOutOfRangeExceptionimmediately at theWithTerminal()call site, instead of surfacing later as an opaqueAspire.TerminalHoststartup failure (the host's--columns/--rowsvalidators require>= 1). Valid usage (including the boundary value1) is unchanged.The
Configure the terminalsection of theWithTerminaldocs page already documents theColumns/Rowsoptions and their defaults, but didn't mention this new validation behavior.What changed
src/frontend/src/content/docs/app-host/with-terminal.mdx: added a note under the options table stating thatColumns/Rowsmust be1or greater and that invalid values throwArgumentOutOfRangeExceptionat configuration time.No new pages were created; this is a targeted update to an existing page.