Skip to content

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

Kogan.com Dev Blog 5 min read Case study mediumAdept

Improving Frontend Regression Testing with Chromatic

Kogan.com added Chromatic visual regression testing on top of Storybook after migrating its frontend to Remix, catching spacing, typography and layout regressions that unit tests miss. UI Review is the default mode: approval is flexible and persists across later commits. Visual Tests are an optional paid mode that treats diffs as authoritative, re-requires approval on each change, can restrict who approves and can run across browsers and viewports. To keep stories realistic, a script parses the OpenAPI schema and Remix route definitions, finds API-client imports via the AST, and generates MSW handlers with schema-derived example responses, so the schema is the single source of truth. Key lessons: good Storybook coverage and deliberate baseline approval are essential, and configuration choices drive both cost and developer friction.

Assumes: StorybookOpenAPI schemasMock Service Worker

Related posts

  • Autoresearch isn’t just for training models

    Shopify Engineering easyNovice

    Generalizing Karpathy's Autoresearch beyond model training, Shopify built pi-autoresearch, an extension for the Pi agent harness that runs an agent in an endless loop against a single measurable metric: establish a baseline, form a hypothesis, test it, keep improvements and discard crashes or regressions. Applied to the Polaris build, it cut build time 65% by skipping a redundant full component pipeline before Storybook and limiting a TypeScript transform to the 105 of 580 files that needed it, though humans still had to discard hacks like deleting files. Tobi Lütke added multi-metric support and auto-commits, then ran it on Liquid for 53% faster parse+render and 61% fewer allocations. The open-sourced tool has been used internally to speed up unit tests, React mounting, Playwright tests and pnpm.

  • Remixing Shopify's Admin: How We Made It 30% Faster and AI-Ready

    Shopify Engineering mediumAdept

    Shopify migrated its Admin (67 million daily page views, 101 teams, ~350 PRs merged daily, 3M+ lines of TypeScript) to Remix in SPA mode with Vite. The result is a 30% improvement in perceived load times. Statically globbed, typed route manifests replaced a runtime getRoutes function and give Search and Sidekick a single source of truth for all 1,017 routes. Remix loaders remove the code-then-data waterfall by fetching a 3.2kb loader in parallel with a 914kb component bundle, and idle-time prefetching of loaders warms an Apollo cache persisted in IndexedDB. Adding Remix actions and zod schemas lets the Sidekick AI fill and submit forms without loading UI JavaScript.

  • Ready, steady, goa: our API setup

    incident.io mediumAdept

    incident.io defines its HTTP API in Goa's design-first DSL, which generates net/http transport handlers, validation code, typed Go service interfaces, OpenAPI 3.0 specs and Go clients. This replaces hand-written Gin handlers with manual parsing, auth and serialization. On top of Goa, a `make generate-api` pipeline pretty-prints and merges the OpenAPI output and filters it into internal, mobile and public variants. Those variants feed specialised clients: typed TypeScript for the React frontend, lean mobile clients and Go test clients. A single DSL change then flows through to server code, docs and compile-time-checked frontend types.

  • Design system annotations, part 2: Advanced methods of annotating components

    GitHub Engineering mediumAdept

    Design system teams can build their own "Preset annotations": Figma annotation components that carry accessibility details not conveyed visually, in component properties, or in code. GitHub picked ten Primer components using usage data from its Primer Query tool, audit frequency, React availability and org priorities. It then mapped the missing properties by cross-referencing Primer docs, Storybook demos, Figma asset properties, team experience and audit findings. Presets help newer teams most but need ongoing maintenance as components change, and the property mapping is groundwork for automated annotation. Figma Code Connect with hidden layers (e.g. an aria-label text property on IconButton) can bypass annotations entirely, with tips on consistency, branching and visual regression testing.

  • How we Rebuilt the Cloud Console (While Running It)

    ClickHouse mediumAdept

    ClickHouse rebuilt its Cloud Console by merging a legacy Angular control plane and a React SQL console (from the Arctype acquisition) into a single React app, backed by a token-driven design pipeline. Design tokens are managed in Figma via Tokens Studio, exported as JSON, and compiled per theme into CSS variables by Amazon Style Dictionary for use with styled-components in Click UI, an open-source component library built on headless Radix-UI with Storybook visual testing and Vercel PR previews. To balance flexibility against consistency, flexible internal components are composed into stricter external ones. The migration ran in two phases, with some critical features built twice and regressions hitting the legacy console, before the unified console was rolled out gradually behind a feature flag.

The quest for software engineering knowledge.

Look:
Layout: