Back to Research

JavaScript Grids Built for Coding Agents

A Show HN JavaScript grid project explores how coding agents can assemble complex data views from safer primitives.

Chicago art inst innes heron, landscape painting by George Inness (1893).
Rogier MullerSeptember 11, 20269 min read

JavaScript grid and pivot library built for coding agents is a Show HN project from an independent developer who previously built Muze, a grammar-of-graphics library later associated with Mode Analytics. It tries to make grids, pivot tables, grouped views, filters, sort, pagination, virtualization, and custom renderers easier for coding agents to assemble from specifications. The useful idea is not “let the agent build any table”; it is “give the agent narrower UI primitives so the output is easier to review.”

A coding-agent UI primitive is a small, documented building block that an agent can combine without inventing the whole component from scratch. That matters in agentic coding because data grids are where simple prompts often turn into a pile of edge cases.

Start with the boring grid problem

The Show HN post landed because every frontend engineer has met this trap: the first table is easy, and the fifth table is a product surface. Add frozen columns, server pagination, keyboard behavior, row grouping, pivoting, custom cells, empty states, and exports, and “just render a table” stops being a small task.

That is exactly the space this project points at. The author is not pitching another chat wrapper. They are trying to expose grid and pivot primitives that coding agents can call when a user asks for a specific data display.

The interesting part is the constraint. A coding agent that has to invent virtualization and pivot semantics inside a React component is doing too much at once. A coding agent that can pick from well-shaped primitives has a smaller search space, and the human reviewer has something concrete to inspect.

The trap is assuming this removes product judgment. It does not. A library can encode mechanics, but it cannot decide whether a finance analyst needs subtotal rows above or below a group, whether a filter should be global or column-scoped, or whether a pivoted view should trade density for readability.

Treat primitives as the interface, not the implementation detail

The older Muze project is a useful clue. Grammar-of-graphics libraries work because developers describe intent at a higher level than pixels: map this field to an axis, aggregate this measure, color by this category. A grid library for coding agents seems to be reaching for a similar move, but for data interaction instead of charts.

That is why developers on Hacker News cared. Grids are not glamorous, but they are specification-heavy. They have lots of repeated structure, lots of sharp edges, and lots of “almost right” states that are expensive to catch by eyeballing generated code.

For Claude Code, Anthropic’s coding agent, the practical translation is simple: give the agent a small vocabulary before you ask for a full screen. “Use DataGrid, Column, PivotSpec, and CellRenderer from this package” is much easier to review than “build a dashboard table with grouping and pivoting.” Claude, Anysphere’s AI code editor, exposes a similar agent loop from the editor side, but the same rule applies: the narrower the component API, the less improvisation you have to audit.

The trap is hiding all complexity behind one mega-component. If the primitive accepts a huge JSON blob with undocumented behavior, the agent has not become more reliable. The ambiguity just moved from JSX into configuration.

Use a small Claude Code experiment

The right first test is not a rewrite of your reporting app. It is one disposable grid screen with one real data shape and two annoying requirements. For example: “show orders grouped by customer, support server pagination, and add a revenue pivot by month.”

In Claude Code, keep the task bounded with a slash-command style prompt. Put the library docs or local examples in context. Ask the agent to produce a receipt that names every primitive it used, every file it touched, and every grid behavior it did not implement.

A good experiment looks like this:

/grid-spike orders-pivot

Goal:
Build a prototype Orders grid using the approved grid primitives.

Data shape:
orders(id, customer_name, order_date, region, status, revenue)

Required behavior:
- server pagination
- grouped rows by customer_name
- pivot revenue by order month
- custom renderer for status

Boundaries:
- Do not create a new grid engine.
- Do not add a new table dependency.
- Do not change backend APIs.
- Keep the prototype under app/routes/_spikes/orders-grid.*

Receipt:
- list primitives used
- list assumptions
- list unsupported requirements
- include one manual test path

This is not a rollout plan. It is a way to learn whether the library’s mental model fits your product before you let an agent thread it through production code.

The trap is asking the agent to “make it production-ready” too early. Production readiness for grids includes accessibility, keyboard navigation, loading states, row identity, server contracts, and performance under real row counts. A spike should surface those questions, not pretend they are solved.

Try it when the grid spec is bigger than the component

This kind of project is a good fit when the product requirement is richer than the component code you want to write by hand. Internal analytics, admin consoles, customer reporting, ops dashboards, and data QA tools all tend to have the same shape: many tables, many variants, and very little joy in re-implementing sort or group behavior.

It is less compelling for a marketing pricing table, a five-row settings list, or a bespoke interface where the table is mostly layout. In those cases, a coding agent plus plain HTML or your existing component library may be simpler.

This sits in a practical corner of agentic coding governance: not policy first, but component boundaries first. If your risk is insecure generated code rather than UI drift, Security Cards Reduce Insecure AI Code covers a different control point.

The trap is measuring only whether the first generated grid compiles. Better questions are: can a reviewer understand the generated spec, can a second agent modify it safely, and can the app keep the grid behavior consistent across screens?

Copy this fit check before you try it

Use this as a lightweight experiment receipt. It keeps the test focused on the library’s fit, not on the agent’s ability to improvise.

## Grid-agent fit check

Prototype name:

Library or primitives tested:

Real product view being modeled:

Required grid behaviors:
- [ ] pagination
- [ ] virtualization
- [ ] sorting
- [ ] filtering
- [ ] grouped rows
- [ ] pivot table
- [ ] custom cell renderer
- [ ] keyboard or accessibility behavior

Agent boundary:
- [ ] used existing primitives only
- [ ] did not create a new grid engine
- [ ] did not add a second table dependency
- [ ] kept generated code in a spike folder

Review receipt:
- primitives used:
- assumptions made:
- unsupported behaviors:
- files changed:
- manual test path:

Fit verdict:
- [ ] strong fit: most behavior maps to documented primitives
- [ ] maybe: useful, but one core behavior is awkward
- [ ] poor fit: agent had to invent too much glue

Common questions

  • Is this only useful for coding agents?

    No. A grid primitive library can help humans too, especially when it makes complex table behavior declarative. The agent-specific value is that a documented primitive set gives the model fewer choices, which makes generated code easier to inspect than a hand-rolled table component with pagination, grouping, and pivots mixed together.

  • Why are grids so hard for AI coding tools?

    Grids combine UI, data contracts, performance, accessibility, and product semantics in one place. A prompt like “add a pivot table” can imply aggregation rules, column identity, empty states, virtual scrolling, and custom renderers. Without primitives, a coding agent may solve the visible case while missing the lifecycle details.

  • Should I replace AG Grid or TanStack Table with a new agent-focused library?

    Not by default. If your app already has a stable grid stack, first test whether agents can use that stack through examples, local docs, and narrow commands. A new library is worth considering when the agent repeatedly writes fragile glue or cannot express pivot and grouping behavior cleanly with your current tools.

  • How would this work with Claude Code?

    Use Claude Code to run a bounded spike, not a blind migration. Give it the library docs, a real data shape, and a command that forbids new grid engines or extra dependencies. The output should include a receipt: primitives used, assumptions made, unsupported behaviors, and one manual test path.

  • What is the main limitation of this approach?

    The main limitation is that primitives only help when the product behavior maps cleanly to them. If your table has highly custom interactions, unusual accessibility requirements, or deep backend coupling, the agent may still need bespoke code. In that case, the fit check should say “poor fit” quickly and cheaply.

Best ways to use this research

  • Best for: evaluating whether a grid or pivot library gives coding agents a safer vocabulary for complex data screens.
  • Best first artifact: a single spike receipt with required behaviors, primitive usage, unsupported cases, and files changed.
  • Best comparison angle: compare “agent builds table from scratch” against “agent composes documented primitives” on review time, missing behavior, and amount of glue code.
  • Best Claude Code move: turn the experiment into a slash command with hard boundaries, then keep the generated code in a spike folder until the fit is clear.

Further reading

Next step

Pick one annoying grid in your app and run the fit check as a spike. If the agent has to invent more than it composes, the library is not the boundary you need yet.

One methodology lens

One useful way to read this through our methodology is the Plan step: delegate first-pass decomposition and dependency mapping, review the sequencing and assumptions, and keep ownership of scope and priorities. If that split is still fuzzy, the workflow usually is too.

Related training topics

Put this into practice with your team. Harness Institute offers bespoke AI workshops on your own tasks, with a shared way to plan, build, and review. Start with the free methodology guide.

Related research

Continue through the research archive

Ready to start?

Transform how your team builds software.

Book a 15-minute sync