Release v20.52.0
Summary
Two independent developer-experience improvements ship together here.
On the frontend, useDialog now infers the dialog component's input type, so dialog components can be used without the as unknown as ComponentType<TInput> cast, and a mismatched component becomes a compile-time error. The generic order is unchanged, so this is non-breaking — existing call sites keep compiling and can simply drop their cast.
On the backend, a set of Arc Roslyn analyzers now catch common command, authorization, and exception-handling mistakes at build time — with code fixes where the rewrite is unambiguous — so these slip-ups surface in the editor instead of at runtime.
Added
- Analyzer (ARC0010) that flags a
[Command]Handle()returningTask/Task<T>without awaiting anything — including theTask.FromResult/Task.CompletedTaskwrapper shape the compiler's own CS1998 does not catch — with a code fix that unwraps it to the synchronous return shape the command pipeline already accepts. - Analyzer (ARC0011) that flags a
[Roles(...)]string-literal argument, with a code fix that rewrites it tonameof(<EnumType>.<Member>)so a role rename becomes a compile error instead of a silent authorization failure. - Analyzer (ARC0012) that flags built-in exception types (
Exception,InvalidOperationException,ArgumentException, and the like) thrown from Arc artifacts — commandHandle()methods,CommandValidator<T>/ConceptValidator<T>validators, and reactor handlers — steering domain failures toward domain-named exception types.
Changed
useDialoginfers the dialog component's input type directly, so a component typed as(props: TInput) => JSX.Element(readingcloseDialogfromuseDialogContext) is accepted without anas unknown as ComponentType<TInput>cast, and a component whose input type does not match is now a compile error.