Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Palantir 8 min read Case study mediumAdept

Frontend Engineering at Palantir: Engineering Multilingual Collaboration

Dossier, Palantir's collaborative rich-text editor, gained a read-only translation mode that routes all text through an in-house Language Model Service so content never leaves secure or air-gapped networks. Documents are chunked at the block level (paragraphs, list items, table cells) to balance model context against latency. Only blocks entering the viewport are translated, detected via IntersectionObserver, with batching, debouncing and caching to limit backend load. Translation state lives in a dedicated Redux slice with a per-block cache keyed by element ID, which is invalidated on live edits. Inline formatting is stripped before translation because splitting sentences around bold or link spans breaks grammar, so the translated view is currently plain text.

Assumes: React hooksRedux state managementIntersectionObserver API

Related posts

  • Forays in Fancy Formatting

    incident.io mediumAdept

    Supporting rich text in incident summaries and updates means translating between Slack's new rich text input and ProseMirror in the dashboard, plus one-way exports to Jira, Confluence, Notion, Google Docs and email, each with different formatting rules. Because Slack only supports single-level lists, incident.io restricted dashboard lists to one level rather than flattening them, keeping the experience consistent. Debrief templates were the hardest case, since an embedded summary might land inside a heading, table or list. Unsupported combinations are handled by "downgrading" the formatting: bullet characters stand in for lists in tables, bold text replaces headings in lists, and inline code replaces code blocks in quotes.

  • Sidekick’s Improved Streaming Experience

    Shopify Engineering mediumAdept

    Shopify's Sidekick fixes two LLM chat streaming problems: Markdown rendering jank, where partial syntax shows up as raw text, and the long wait while tool calls finish. A character-level finite state machine in a Node.js Transform stream buffers ambiguous Markdown sequences, such as links and asterisks, until they either complete or prove to be false positives. The LLM is prompted to emit special "card:" Markdown links as placeholders. The same parser detects these links and kicks off asynchronous content resolution, which is multiplexed into one Server-Sent Events stream that the UI demultiplexes, so the main answer streams immediately and tool results fill in later.

  • Neural Machine Translation Engine for Firefox Translations add-on

    Mozilla Hacks mediumAdept

    Firefox Translations runs neural machine translation entirely on the client by compiling the Bergamot Translator engine, a C++ layer on the Marian framework, to WebAssembly. Wasm won over native Firefox integration and native messaging because it was safer, cross-platform and could be shipped as a single binary. The first prototype was unusable: about 8 seconds to start, 95 words per second and a ~250 MB binary. Loading models as byte buffers instead of bundling them, swapping hot try/catch paths for if/else, and adding experimental, non-standard and native GEMM intrinsics in Firefox brought this to ~1 second startup, ~870 wps for English to German and a ~4.94 MB binary. ARM performance and multithreading still depend on standardized Wasm GEMM and SharedArrayBuffer.

  • Micro Frontends: Deep Dive into Rendering Engine (Part 2)

    Zalando Engineering mediumAdept

    Zalando's Interface Framework replaces Mosaic HTML fragments with Renderers: declarative TypeScript modules that state their data needs as GraphQL queries and render a single Entity type as a React component. A Node.js Rendering Engine maps Entities to Renderers through rendering rules, recursively and asynchronously resolves the entity tree, and streams server-rendered HTML that is later progressively hydrated on the client. A custom React reconciler lets the same Renderers emit JSON layouts for the iOS and Android apps. The engine also handles batched, cached data fetching (DataLoader, Perron circuit breakers), persisted queries, code splitting, Web Vitals collection and Mosaic backward compatibility.

  • Micro Frontends: from Fragments to Renderers (Part 1)

    Zalando Engineering easyNovice

    Zalando replaced its Mosaic micro-frontend architecture, built on team-owned page Fragments, with Interface Framework, a unified platform where pages are trees of typed Entities (Product, Collection, Outfit) mapped via declarative rendering rules to React Renderers that declare data needs in GraphQL. A Node.js/browser Rendering Engine resolves and renders the Entity tree chosen by the recommendation system, with built-in monitoring, batched A/B testing, deployment previews against production, and performance gates such as Lighthouse CI, bundle size limits and Web Vitals reporting. Moving teams into a monorepo with a shared stack lowered the entry barrier and improved UX consistency, at the cost of blurred ownership. A hybrid mode serving Fragments and Renderers together eased migration, and about 90% of traffic now runs on IF.

The quest for software engineering knowledge.

Look:
Layout: