Skip to main content

Custom Columns Editor

The Custom Columns feature lets you customise the columns that appear in built-in tables across the app — the Run Sheet Main tab, the Board grid, the Setups grid, etc.

Find the editor at Admin → Custom Columns. Route: /admin/custom-columns.

How it's modelled

A custom column profile is a row in custom_columns keyed by (accountId, entityType) with one or more named profiles. Each profile carries a list of column specs:

FieldNotes
parameterParameter name to bind to (e.g. BrakeTempAvg)
labelDisplay label
widthPixel width
formatFormat string (see Format Strings)
sortablebool
frozenbool — frozen columns stay visible when the grid scrolls
alignleft / center / right
visiblebool — toggleable in the column picker

A profile can be marked isDefault: true. Grids that consume profiles read customColumnsForEntityProvider(entityType) and pick the first default.

Nine entity types

You can author profiles for nine entity types today:

Lap, Run, RunSheet, Setup, Tyre, TyreSet, BoardCard, Weather,
LapMarker

Layout

Master/detail like the other admin screens:

  • Left — profile list grouped by entity type
  • Right — column editor for the selected profile

How profiles flow into grids

apps/client/lib/src/customization/column_mapper.dart is the adapter that turns a profile into the runtime DataGridColumn list. The Run Sheet Main tab, the Board grid, and the Setups grid all call into this adapter:

  1. The screen reads customColumnsForEntityProvider('Lap') (or BoardCard, …).
  2. The mapper produces DataGridColumn instances with the profile's width / align / format.
  3. Each row's cells are populated by looking up the column's parameter against the row JSON's parameters blob (with a fallback to the row top-level field).

If no profile is found, each grid falls back to a sensible hand-coded default — so the UI never goes blank because an admin hasn't authored a profile yet.

What you can do today

  • Author profiles for any of the 9 entity types
  • Two seeded profiles ship (Lap and RunSheet)
  • Full CRUD via /custom-columns
  • The Run Sheet Main, Board, and Setups grids consume profiles via column_mapper.dart
  • Per-user "last used profile" memory in last_used_profile.dart — switching profiles persists across sessions

What's coming

  • Column picker UI in the grids themselves so users can toggle visibility / reorder columns without leaving the screen
  • Per-user column preferences layered on top of the account-level profile (last-used profile is in; per-column overrides are queued)
  • More consumers — Tyres / TyreSets / Wear / Weather grids still hard-code their columns