proomt

Search

Search posts, papers, and topics

All posts

InfoQDaniel Curtis2 min readrelease notesintermediate

htmx 4.0: a Fetch-Based Rewrite, Built-In Morphing Swaps, and Explicit Attribute Inheritance

Summary

htmx 4.0 replaces XHR with fetch (enabling streaming), adds built‑in morphing swaps via idiomorph, introduces hx‑partial for multi‑target updates, makes attribute inheritance explicit with a :inherited suffix, renames several attributes/events, adds a 60 s request timeout, and ships under npm's `next` tag with a CLI upgrade checker.

  • Fetch API replaces XMLHttpRequest, keeping the library ~14 KB and unlocking native response streaming.
  • Morphing swaps (idiomorph) preserve DOM state (e.g., input focus) during updates.
  • New `hx-partial` attribute lets a single response update multiple targets, simplifying out‑of‑band swaps.
  • Attribute inheritance is opt‑in via `:inherited`; missing the suffix can silently break things like CSRF header propagation.

The fetch rewrite modernizes htmx’s transport layer, enabling streaming and smaller payloads while preserving its low‑JS philosophy. Explicit inheritance reduces accidental security regressions (e.g., CSRF token loss). Built‑in morphing improves UX without extra JavaScript. The CLI upgrade path eas…

5/10

Related reading

  1. Article: Your Next DSL Author Is a Language Model

    Typed Domain Grounding (TDG) embeds a DSL inside a mainstream language the LLM already knows (e.g., Kotlin) and uses the host compiler as an oracle. The author describes five building blocks—embedding, choosing a host language with high training‑data frequency, compiler‑driven type safety, a generate‑compile‑repair loop, and an on‑demand teaching tool—and shows measured results from kUML, a Kotli…

    InfoQinfoq.com18 min
  2. Migrating the GitHub Copilot runtime to Rust, using Copilot

    The Copilot agent runtime was rewritten from a 130‑k‑line TypeScript/Node.js codebase into a native Rust library (~830 k lines of Rust) to reduce startup latency, memory use, and improve reliability. The migration was done incrementally (in‑place) across 128 PRs, with AI‑generated code handling most of the work. The new runtime exposes a C ABI for in‑process embedding by all six Copilot SDK langu…

    GitHub Oldgithub.blog65 minHN188
  3. Replica-aware routing public beta

    Replica‑aware routing (public beta) lets ClickHouse Cloud users pin a query stream to a specific replica by sending a custom header (HTTP) or overriding the TLS SNI (native). The proxy (Envoy) hashes the tag and consistently forwards all requests with the same tag to that replica, giving read‑after‑write consistency for temporary tables, session objects, and warm replica caches. Stickiness is bes…

    ClickHouseclickhouse.com6 min
  4. Building Composite Model Context Protocol (MCP) Gateways in TypeScript

    Step‑by‑step tutorial showing how to build a stateless composite Model Context Protocol (MCP) gateway in TypeScript using Hono, Zod, and the MCP SDK. It covers config‑driven upstream registration, namespaced tool discovery, JSON‑RPC routing, per‑tool auth middleware, and a token‑bucket rate limiter, with concrete code snippets and design trade‑offs.

    SitePointsitepoint.com16 min
  5. Article: Beyond Relevance: A Governance-First Architecture for Enterprise Personalization

    The article proposes a governance‑first architecture for enterprise personalization, where policy‑driven steps (memory, journey graph, AI routing, scoring, trust checks, outcome simulation) shape the recommendation before it is returned. A reference FastAPI implementation demonstrates the pattern with external YAML policies and optional LLM assistance.

    InfoQinfoq.com19 min