Skip to content

Upgrade Effect to beta.103 - #5331

Merged
juliusmarminge merged 1 commit into
mainfrom
t3code/57434bfc
Aug 4, 2026
Merged

Upgrade Effect to beta.103#5331
juliusmarminge merged 1 commit into
mainfrom
t3code/57434bfc

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Aug 4, 2026

Copy link
Copy Markdown
Member

What Changed

  • Upgraded Effect packages from beta.102 to beta.103 and updated the lockfile and workspace configuration.
  • Migrated renamed Schema and SchemaIssue APIs across server, relay, client, and test code.
  • Replaced custom HTTP response compression with Effect’s HTTP compression middleware.
  • Enabled WebSocket per-message deflate with platform-specific compression settings.
  • Updated MCP transport configuration for protocol version 2025-06-18.
  • Adjusted related web styling and removed obsolete tests and compression helpers.

Why

Keeps the repository aligned with the latest Effect beta APIs and removes compatibility workarounds that are no longer needed. The HTTP and WebSocket updates adopt the platform-supported compression behavior while preserving existing server and client functionality.

UI Changes

The update includes minor code block and alert styling changes. Before/after screenshots are not included.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Wide dependency and API churn touches HTTP compression, WebSocket negotiation, MCP protocol version, and RPC client patches—core transport paths that need regression testing on Node and Bun.

Overview
Upgrades the monorepo from Effect 4.0.0-beta.102 to beta.103 (catalog, lockfile, workspace) and drops platform-bun/node patches that are now covered by upstream server options.

Schema / API migrations replace Schema.UnknownFromJsonString with Schema.fromJsonString(Schema.Unknown) and simplify SchemaIssue.InvalidValue (no Option wrapper) across server, relay, desktop, packages, and tests.

HTTP compression removes the custom HttpResponseCompression service and uses HttpMiddleware.compression() via httpCompressionLayer. The relay worker stub HttpPlatform adds a no-op compression surface for the web platform.

WebSockets configure perMessageDeflate on Bun (dedicated compress / shared decompress) and Node (perMessageDeflate: true), with a test layer that mirrors production deflate negotiation.

MCP targets McpProtocol.v2025_06_18 and tests expect structured InvalidParams for bad tool calls. Remaining effect and @effect/vitest patches adjust MCP DELETE handling and vite-plus/test imports.

Tests / tooling: CLI bootstrap FD lifecycle uses NodeFS.openSync with acquire/release; OTLP test tolerates string intValue on span attributes.

Reviewed by Cursor Bugbot for commit 3bba438. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Upgrade Effect to beta.103 and replace custom HTTP compression with HttpMiddleware.compression()

  • Bumps all @effect packages from 4.0.0-beta.102 to 4.0.0-beta.103 in pnpm-workspace.yaml and removes the platform-bun and platform-node patches that are no longer needed.
  • Replaces Schema.UnknownFromJsonString with Schema.fromJsonString(Schema.Unknown) across all JSON encode/decode utilities, following the new Effect Schema API.
  • Updates SchemaIssue.InvalidValue construction to drop the Option.some(value) argument, passing only a message, in all custom schema filters and validators.
  • Removes the custom HttpResponseCompression service and replaces it with HttpRouter.middleware(HttpMiddleware.compression(), { global: true }) in server.ts.
  • Adds WebSocket perMessageDeflate negotiation to both Bun (dedicated/shared) and Node server configs, and declares MCP HTTP server support for protocol version v2025_06_18.
  • Behavioral Change: HTTP response compression now applies globally to all response types via the Effect platform middleware, replacing the previous JSON-only gzip path with Accept-Encoding negotiation and size threshold.

Macroscope summarized 3bba438.

- Migrate schema and HTTP APIs to the new Effect release
- Enable built-in HTTP and WebSocket compression
- Update MCP transport to protocol 2025-06-18
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e97aa08b-9caf-4353-ba3a-1b96ce20aab6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Aug 4, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 3bba438

Dependency upgrade from Effect beta.102 to beta.103 with mechanical API migrations (schema constructors, error constructors) and adoption of built-in HTTP compression middleware. All changes follow library upgrade patterns with no novel runtime behavior.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge
juliusmarminge merged commit 2b1d4fe into main Aug 4, 2026
17 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/57434bfc branch August 4, 2026 11:56
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 4, 2026
## What's Changed
* fix(web): blink the terminal cursor again by @StiensWout in pingdotgg/t3code#5314
* fix(terminal): protect held Ctrl/Cmd+W close shortcut by @StiensWout in pingdotgg/t3code#5322
* fix(server): strip replayable terminal queries from history by @StiensWout in pingdotgg/t3code#5319
* fix(contracts): decode ServerProviders forward-compatibly by @Brechard in pingdotgg/t3code#5327
* fix(web): simplify chat code blocks by @t3-code[bot] in pingdotgg/t3code#5301
* fix(web): align multiline error alert controls by @t3-code[bot] in pingdotgg/t3code#5304
* Upgrade Effect to beta.103 by @juliusmarminge in pingdotgg/t3code#5331

## New Contributors
* @Brechard made their first contribution in pingdotgg/t3code#5327

**Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260804.993...v0.0.32-nightly.20260804.997

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260804.997
PauloDaniel1993 added a commit to PauloDaniel1993/t3code that referenced this pull request Aug 4, 2026
Brings in 17 upstream commits (base e60821f). Headline changes:

- Upgrade Effect to beta.103 (pingdotgg#5331), which removes the
  `Schema.UnknownFromJsonString` export and drops the positional actual
  argument from `SchemaIssue.InvalidValue`.
- Replace the hand-rolled gzip path with `HttpMiddleware.compression()`,
  deleting apps/server/src/httpCompression/ entirely (pingdotgg#5331).
- Extract desktop base/state dir resolution into DesktopStatePaths.ts, and
  add Linux secret storage, URL-scheme claiming, and early-startup modules
  (pingdotgg#2916, pingdotgg#5054).
- Mobile provider icons for Grok, Cursor, and OpenCode (pingdotgg#4586).
- Web polish: chat code blocks, tooltip z-index, spacing, loading screen,
  terminal cursor blink, terminal close-shortcut guard.

Manual resolution and why:

- apps/desktop/src/app/DesktopEnvironment.ts — semantic. Upstream deleted
  the `configuredBaseDir` local that the fork's branding override sat on
  top of, moving that logic into resolveDesktopBaseDir/resolveDesktopStateDir.
  Took upstream's extraction wholesale and re-applied the fork's
  displayNameOverride intent on it. The fork additionally gains upstream's
  trimming of a blank T3_HOME, which the old inline version did not do.

- apps/mobile/src/components/ProviderIcon.tsx — the fork had replaced raw
  `props.provider === ...` checks with a resolveProviderIconKind seam;
  upstream's three new icons used the raw form. Routed them through the
  seam instead of mixing both styles, extended ProviderIconKind, and added
  test coverage so the new kinds cannot silently fall back to the OpenAI
  icon.

- apps/server/src/textGeneration/CodexTextGeneration.ts — mechanical. Took
  upstream's one-line Schema change, kept the fork's rewrite of the rest.

Merge-caused fixes beyond the conflicts:

- Swept 15 fork-only call sites from `Schema.UnknownFromJsonString` to
  `Schema.fromJsonString(Schema.Unknown)`. These produced no conflict
  markers; the export simply no longer exists in beta.103. Upstream's own
  OrchestrationEventStore.ts survives only because it defines a local
  alias of the same name.

Verified: pnpm install, pnpm typecheck (15/15 projects clean), pnpm test.
Five failures remain in packages/shared (relayClient, logging); those four
files are byte-identical to both upstream/main and the pre-merge backup,
and assert POSIX-only behavior (linux-x64 fixture paths, forward-slash
path comparisons, ENAMETOOLONG). They cannot pass on Windows and are
unrelated to this merge.

Backup of the pre-merge tip: backup/dev-before-merge-20260804
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant