[codex] Remove redundant Effect type annotations - #3229
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved Pure TypeScript type annotation cleanup with no runtime behavior changes. The explicit Effect/Layer type annotations being removed were redundant since TypeScript infers these types automatically. You can customize Macroscope's approvability policy. Learn more. |
Summary
Validation
Note
Low Risk
Annotation-only refactor with no runtime behavior changes; exported public types are preserved at API boundaries via explicit layer-source unions.
Overview
This PR strips explicit
Effect,Layer,ManagedRuntime, andReturnTypeannotations where TypeScript already infers the same types fromEffect.gen,Layer.effect, pipes, and similar patterns. Touch points include desktop observability/backend/menu/shell helpers, server MCP and provider registry layers, web DPoP key generation, tailscale status reading, and client-runtimeEnvironmentRpc.config.For web/mobile connection and app runtimes, intermediate composed layers (
connectionLayer,runtimeLayer,providedConnectionPlatformLayer) are left unannotated and often non-exported, while exported boundaries (connectionAtomRuntime,runtime,runtimeContextLayer) still declare portable types viaConnectionLayerSource/RuntimeLayerSourceunions instead oftypeofthe final merged layer.packages/client-runtimedrops unused imports tied to removedconfigtyping and relies on inference forconfig’s return effect type.Reviewed by Cursor Bugbot for commit 087299a. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Remove redundant explicit type annotations from Effect and Layer declarations
Removes explicit
Effect.EffectandLayer.Layertype parameters from utility functions and layer definitions across desktop, mobile, web, server, and package code, relying on TypeScript inference instead.runtimeLayer,connectionLayer) are un-exported and replaced with inferred type aliases (RuntimeLayerSource,ConnectionLayerSource) used by the exported runtimes and context layers.ServerConfig,ConnectionAttemptError) are removed frompackages/client-runtime/src/rpc/client.ts.connectionLayerandruntimeLayerare no longer exported from the mobile and web runtime modules; any external consumers of these symbols will break.Macroscope summarized 087299a.