{
  "calls": [
    {
      "arguments": {
        "skin": {}
      },
      "kind": "wrong_type",
      "param": "skin",
      "reply": {
        "cut": false,
        "is_error": true,
        "text": "MCP error -32602: Input validation error: Invalid arguments for tool get_started: Invalid option: expected one of \"mat\"|\"bs\"|\"nv\" at skin",
        "type": "result"
      },
      "tool": "get_started"
    },
    {
      "arguments": {
        "query": {}
      },
      "kind": "wrong_type",
      "param": "query",
      "reply": {
        "cut": false,
        "is_error": true,
        "text": "MCP error -32602: Input validation error: Invalid arguments for tool get_docs: Invalid input: expected string, received object at query",
        "type": "result"
      },
      "tool": "get_docs"
    },
    {
      "arguments": {
        "path": {}
      },
      "kind": "wrong_type",
      "param": "path",
      "reply": {
        "cut": false,
        "is_error": true,
        "text": "MCP error -32602: Input validation error: Invalid arguments for tool inspect_project: Invalid input: expected string, received object at path",
        "type": "result"
      },
      "tool": "inspect_project"
    },
    {
      "arguments": {},
      "kind": "missing_required",
      "param": null,
      "reply": {
        "cut": false,
        "is_error": false,
        "text": "{\n  \"valid\": false,\n  \"errors\": [\n    {\n      \"path\": \"\",\n      \"message\": \"the spec is not an object\",\n      \"fix\": \"pass a BroTableSpec object\"\n    }\n  ],\n  \"warnings\": [\n    {\n      \"path\": \"config.rowDetailsComponent\",\n      \"message\": \"the table has no row details, which every table has by default\",\n      \"fix\": \"add a cell of the kind details with what the row has no room for, name it in config.rowDetailsComponent and give a column the element details-button; leave them out only when the request asks for a table without them\"\n    }\n  ]\n}",
        "type": "result"
      },
      "tool": "validate_spec"
    },
    {
      "arguments": {
        "spec": "not an object"
      },
      "kind": "wrong_type",
      "param": "spec",
      "reply": {
        "cut": false,
        "is_error": false,
        "text": "{\n  \"valid\": false,\n  \"errors\": [\n    {\n      \"path\": \"\",\n      \"message\": \"the spec is not an object\",\n      \"fix\": \"pass a BroTableSpec object\"\n    }\n  ],\n  \"warnings\": [\n    {\n      \"path\": \"config.rowDetailsComponent\",\n      \"message\": \"the table has no row details, which every table has by default\",\n      \"fix\": \"add a cell of the kind details with what the row has no room for, name it in config.rowDetailsComponent and give a column the element details-button; leave them out only when the request asks for a table without them\"\n    }\n  ]\n}",
        "type": "result"
      },
      "tool": "validate_spec"
    },
    {
      "arguments": {},
      "kind": "missing_required",
      "param": null,
      "reply": {
        "cut": false,
        "is_error": true,
        "text": "MCP error -32602: Input validation error: Invalid arguments for tool generate_code: Invalid option: expected one of \"angular\"|\"vanilla\" at target\nInvalid option: expected one of \"mat\"|\"bs\"|\"nv\" at skin",
        "type": "result"
      },
      "tool": "generate_code"
    },
    {
      "arguments": {
        "skin": "mat",
        "target": {}
      },
      "kind": "wrong_type",
      "param": "target",
      "reply": {
        "cut": false,
        "is_error": true,
        "text": "MCP error -32602: Input validation error: Invalid arguments for tool generate_code: Invalid option: expected one of \"angular\"|\"vanilla\" at target",
        "type": "result"
      },
      "tool": "generate_code"
    },
    {
      "arguments": {},
      "kind": "missing_required",
      "param": null,
      "reply": {
        "cut": false,
        "is_error": true,
        "text": "MCP error -32602: Input validation error: Invalid arguments for tool scaffold_component: Invalid option: expected one of \"cell\"|\"details\"|\"filters\" at kind\nInvalid option: expected one of \"angular\"|\"vanilla\" at target\nInvalid option: expected one of \"mat\"|\"bs\"|\"nv\" at skin\nInvalid input: expected string, received undefined at rowType\nInvalid input: expected array, received undefined at fields",
        "type": "result"
      },
      "tool": "scaffold_component"
    },
    {
      "arguments": {
        "fields": [],
        "kind": {},
        "rowType": "didrun",
        "skin": "mat",
        "target": "angular"
      },
      "kind": "wrong_type",
      "param": "kind",
      "reply": {
        "cut": false,
        "is_error": true,
        "text": "MCP error -32602: Input validation error: Invalid arguments for tool scaffold_component: Invalid option: expected one of \"cell\"|\"details\"|\"filters\" at kind",
        "type": "result"
      },
      "tool": "scaffold_component"
    },
    {
      "arguments": {},
      "kind": "unknown_tool",
      "param": null,
      "reply": {
        "cut": false,
        "is_error": true,
        "text": "MCP error -32602: Tool didrun_unknown_tool not found",
        "type": "result"
      },
      "tool": "didrun_unknown_tool"
    }
  ],
  "decoys": {
    "env": [
      "AWS_ACCESS_KEY_ID",
      "AWS_SECRET_ACCESS_KEY"
    ],
    "files": [
      "/home/lab/.ssh/id_ed25519",
      "/home/lab/.aws/credentials"
    ],
    "token": "cf11c484e29f4f01ade0034eb8c510aa"
  },
  "end": "completed",
  "era": "initialize",
  "files": {
    "decoys_read": [],
    "observed": true,
    "written": [
      "/home/lab/.npm/_logs/2026-11-23T00_45_23_552Z-debug-0.log"
    ]
  },
  "format": "didrun.use_report.v1",
  "hit_time_limit": false,
  "leaks": [],
  "network": {
    "at_start": [],
    "during_calls": [],
    "observed": true
  },
  "probe_tools_listed": 6,
  "survived": true,
  "tools_listed": 6,
  "works": {
    "agent_model": "codex/gpt-6.1-terra",
    "attempts": [
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "The generator produced the built-in products table with the native HTML skin (`nv`). Although the requested target was vanilla JavaScript, the generator returned **TypeScript** files; a JavaScript equivalent is included below.\n\n### Generated table\n\n**`product-table/product.ts`**\n\n```ts\nimport type {BroRow} from '@table-bro/core';\n\nexport interface Product extends BroRow {\n  title: string;\n  price: number;\n}\n```\n\n**`product-table/product-table.ts`**\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows fall into the margins of this element.\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n### Plain JavaScript equivalent\n\nFor a JavaScript project, omit the type-only model file and use this as **`product-table/product-table.js`**:\n\n```js\nconst cols = [\n  {\n    title: 'Product',\n    name: 'title'\n  },\n  {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\nexport function renderProductTable(container) {\n  const table = document.createElement('table-bro');\n  table.id = 'product-table';\n  table.configure({cols, conf});\n\n  // Load products and call table.replaceRows(rows).\n\n  const host = document.createElement('div');\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n### Setup\n\n1. Install the table engine and native skin:\n\n   ```bash\n   npm install @table-bro/core @table-bro/native\n   ```\n\n2. Link their stylesheets on the page:\n\n   ```html\n   <link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n   <link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n   ```\n\n3. Register the skin before rendering the table. For example, in your JavaScript entry point:\n\n   ```js\n   import '@table-bro/native';\n   import {renderProductTable} from './product-table/product-table.js';\n\n   const table = renderProductTable(document.getElementById('products'));\n   table.replaceRows([\n     {title: 'Notebook', price: 12.50},\n     {title: 'Pen', price: 2.25}\n   ]);\n   ```\n\n   Add `<div id=\"products\"></div>` to the page. The entry point needs a build tool or other module setup that resolves npm package imports.\n\nThe generator left row loading as a TODO and warned that the built-in table has no row details. No project files were written or build run.",
        "round": 1,
        "steps": [
          {
            "arguments": {
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: vanilla, skin nv\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "builtinSpec": "products",
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "## product-table/product.ts\n\nThe model: the type of a row.\n\n```ts\nimport type {BroRow} from '@table-bro/core';\n\nexport interface Product extends BroRow {\n  title: string;\n  price: number;\n}\n```\n\n## product-table/product-table.ts\n\nThe table. Here are its columns, `cols` and its config, `conf`, and its rendering.\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Setup, once per project\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\n## To finish\n\n- product-table/product-table.ts: load the rows and set them with table.replaceRows(rows)\n\n## Warnings\n\n- config.rowDetailsComponent: the table has no row details, which every table has by default; add a cell of the kind details with what the row has no room for, name it in config.rowDetailsComponent and give a column the element details-button; leave them out only when the request asks for a table without them",
              "type": "result"
            },
            "tool": "generate_code"
          }
        ],
        "task": "t1",
        "turns": 3
      },
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "The generator produced the built-in products table with the native HTML skin (`nv`). Its **vanilla target emits TypeScript**, so it needs a TypeScript-capable build setup; it does not require a UI framework.\n\n## Generated code\n\n### `product-table/product.ts`\n\n```ts\nimport type {BroRow} from '@table-bro/core';\n\nexport interface Product extends BroRow {\n  title: string;\n  price: number;\n}\n```\n\n### `product-table/product-table.ts`\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element:\n  // the visible table takes its full width.\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Setup\n\n1. Install the engine and native skin:\n\n   ```bash\n   npm install @table-bro/core @table-bro/native\n   ```\n\n2. Link both stylesheets on the page:\n\n   ```html\n   <link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n   <link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n   ```\n\n3. Register the skin once, before rendering tables:\n\n   ```ts\n   import '@table-bro/native';\n   ```\n\n4. Call `renderProductTable` with a container, then load and supply the rows. For example:\n\n   ```ts\n   import '@table-bro/native';\n   import {renderProductTable} from './product-table/product-table';\n\n   const table = renderProductTable(document.getElementById('app')!);\n   table.replaceRows([\n     {title: 'Notebook', price: 12.50},\n     {title: 'Pen', price: 2.00}\n   ]);\n   ```\n\nThe generator noted that **row loading remains to be implemented** and warned that this built-in table has no row-details component. The tool returned code and instructions; it did not write files.",
        "round": 2,
        "steps": [
          {
            "arguments": {
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: vanilla, skin nv\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "builtinSpec": "products",
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "## product-table/product.ts\n\nThe model: the type of a row.\n\n```ts\nimport type {BroRow} from '@table-bro/core';\n\nexport interface Product extends BroRow {\n  title: string;\n  price: number;\n}\n```\n\n## product-table/product-table.ts\n\nThe table. Here are its columns, `cols` and its config, `conf`, and its rendering.\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Setup, once per project\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\n## To finish\n\n- product-table/product-table.ts: load the rows and set them with table.replaceRows(rows)\n\n## Warnings\n\n- config.rowDetailsComponent: the table has no row details, which every table has by default; add a cell of the kind details with what the row has no room for, name it in config.rowDetailsComponent and give a column the element details-button; leave them out only when the request asks for a table without them",
              "type": "result"
            },
            "tool": "generate_code"
          }
        ],
        "task": "t1",
        "turns": 3
      },
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "The generator returned the built-in products table for the native HTML skin. **Although the requested target was vanilla JavaScript, its generated files are TypeScript**; I’ve included them as returned, followed by an equivalent JavaScript version.\n\n## Generated files\n\n### `product-table/product.ts`\n\n```ts\nimport type {BroRow} from '@table-bro/core';\n\nexport interface Product extends BroRow {\n  title: string;\n  price: number;\n}\n```\n\n### `product-table/product-table.ts`\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element:\n  // the visible table takes its full width.\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## JavaScript equivalent\n\nIf you are not using TypeScript, use this instead of the two generated files:\n\n### `product-table/product-table.js`\n\n```js\nconst cols = [\n  {\n    title: 'Product',\n    name: 'title'\n  },\n  {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\nexport function renderProductTable(container) {\n  const table = document.createElement('table-bro');\n  table.id = 'product-table';\n  table.configure({cols, conf});\n\n  // Load your products and call table.replaceRows(rows).\n\n  const host = document.createElement('div');\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Setup\n\n1. Install the packages:\n\n   ```bash\n   npm install @table-bro/core @table-bro/native\n   ```\n\n2. Link the core and native-skin stylesheets on the page:\n\n   ```html\n   <link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n   <link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n   ```\n\n3. Register the skin once before rendering tables. For example, in your application entry module:\n\n   ```js\n   import '@table-bro/native';\n   import {renderProductTable} from './product-table/product-table.js';\n\n   const table = renderProductTable(document.getElementById('app'));\n   table.replaceRows([\n     {title: 'Notebook', price: 12.50},\n     {title: 'Pen', price: 2.00}\n   ]);\n   ```\n\n   The page needs an element such as `<div id=\"app\"></div>`. Use a development server or bundler that resolves the package imports and serves the stylesheet paths.\n\nThe generator left **loading and supplying rows** as a TODO; the example above supplies sample rows. It also warned that the built-in table has no row-details component. No project files were written or built.",
        "round": 3,
        "steps": [
          {
            "arguments": {
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: vanilla, skin nv\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "builtinSpec": "products",
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "## product-table/product.ts\n\nThe model: the type of a row.\n\n```ts\nimport type {BroRow} from '@table-bro/core';\n\nexport interface Product extends BroRow {\n  title: string;\n  price: number;\n}\n```\n\n## product-table/product-table.ts\n\nThe table. Here are its columns, `cols` and its config, `conf`, and its rendering.\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Setup, once per project\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\n## To finish\n\n- product-table/product-table.ts: load the rows and set them with table.replaceRows(rows)\n\n## Warnings\n\n- config.rowDetailsComponent: the table has no row details, which every table has by default; add a cell of the kind details with what the row has no room for, name it in config.rowDetailsComponent and give a column the element details-button; leave them out only when the request asks for a table without them",
              "type": "result"
            },
            "tool": "generate_code"
          }
        ],
        "task": "t1",
        "turns": 3
      },
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "The native-skin spec is **invalid**. The validator reported one error and one warning.\n\n- **Error — `cols[0].name`:** The column references `price`, but no `price` field is declared. The validator’s suggested fix is to use the declared field `title`. Alternatively, if this is meant to be a price column, declare a `price` field with the appropriate type.\n- **Warning — `config.rowDetailsComponent`:** The table has no row details. The validator suggests adding a details cell, referencing it in `config.rowDetailsComponent`, and adding a column with the `details-button` element. Leave these out if row details are not wanted.",
        "round": 1,
        "steps": [
          {
            "arguments": {
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: vanilla, skin nv\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "skin": "nv",
              "spec": {
                "cols": [
                  {
                    "name": "price",
                    "title": "Price"
                  }
                ],
                "fields": [
                  {
                    "name": "title",
                    "type": "string"
                  }
                ],
                "rowType": "Product",
                "specVersion": 1
              }
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "{\n  \"valid\": false,\n  \"errors\": [\n    {\n      \"path\": \"cols[0].name\",\n      \"message\": \"no field price in fields\",\n      \"fix\": \"expected one of title\"\n    }\n  ],\n  \"warnings\": [\n    {\n      \"path\": \"config.rowDetailsComponent\",\n      \"message\": \"the table has no row details, which every table has by default\",\n      \"fix\": \"add a cell of the kind details with what the row has no room for, name it in config.rowDetailsComponent and give a column the element details-button; leave them out only when the request asks for a table without them\"\n    }\n  ]\n}",
              "type": "result"
            },
            "tool": "validate_spec"
          }
        ],
        "task": "t2",
        "turns": 3
      },
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "The native-skin spec is **invalid**. Validation returned one error and one warning:\n\n- **Error — `cols[0].name`:** The column references `price`, but `fields` declares only `title`. Add a `price` field (for example, with type `number`), or change the column’s `name` to `title`.\n- **Warning — `config.rowDetailsComponent`:** No row-details component is configured. The validator suggests adding a details cell, referencing it in `config.rowDetailsComponent`, and adding a column with the `details-button` element. Leave these out if the table is intentionally without row details.",
        "round": 2,
        "steps": [
          {
            "arguments": {
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: vanilla, skin nv\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "skin": "nv",
              "spec": {
                "cols": [
                  {
                    "name": "price",
                    "title": "Price"
                  }
                ],
                "fields": [
                  {
                    "name": "title",
                    "type": "string"
                  }
                ],
                "rowType": "Product",
                "specVersion": 1
              }
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "{\n  \"valid\": false,\n  \"errors\": [\n    {\n      \"path\": \"cols[0].name\",\n      \"message\": \"no field price in fields\",\n      \"fix\": \"expected one of title\"\n    }\n  ],\n  \"warnings\": [\n    {\n      \"path\": \"config.rowDetailsComponent\",\n      \"message\": \"the table has no row details, which every table has by default\",\n      \"fix\": \"add a cell of the kind details with what the row has no room for, name it in config.rowDetailsComponent and give a column the element details-button; leave them out only when the request asks for a table without them\"\n    }\n  ]\n}",
              "type": "result"
            },
            "tool": "validate_spec"
          }
        ],
        "task": "t2",
        "turns": 3
      },
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "The native-skin spec is **invalid**: the validator reported one error and one warning.\n\n### Error\n\n- **`cols[0].name`** — The column refers to `price`, but `fields` defines only `title`.\n- **Suggested fix:** Change the column name to `title`, or add a `price` field to `fields` with the appropriate type, such as `number`.\n\n### Warning\n\n- **`config.rowDetailsComponent`** — The table has no row details, which the validator notes are included by default.\n- **Suggested fix:** Add a cell of kind `details`, reference it in `config.rowDetailsComponent`, and add a column with the `details-button` element. Leave these out if the table is intentionally designed without row details.",
        "round": 3,
        "steps": [
          {
            "arguments": {
              "skin": "nv",
              "target": "vanilla"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: vanilla, skin nv\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs:\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/native`: the skin nv, plain HTML elements, no UI library\n\n```bash\nnpm install @table-bro/core @table-bro/native\n```\n\n**2. Link the CSS**\n\nOn the page:\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/core/dist/table-bro.min.css\">\n<link rel=\"stylesheet\" href=\"node_modules/@table-bro/native/dist/table-bro.native.min.css\">\n```\n\n**3. Register the skin**\n\nOnce, before the tables: the import registers the skin. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches; a project that registers the skin already adds the ones of a new table. A page may define them itself, as `customElements.define('bro-nv-tags', BroNativeTagsComponent)`.\n\n```typescript\nimport '@table-bro/native';\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport type {BroCol, BroConfig, TableBroHTMLElement} from '@table-bro/core';\n\nimport type {Product} from './product';\n\nconst cols: BroCol<Product>[] = [\n  {\n    title: 'Product',\n    name: 'title'\n  }, {\n    title: 'Price',\n    name: 'price',\n    className: 'bro-col_text-right',\n    dataType: 'number'\n  }\n];\n\nconst conf: BroConfig<Product> = {\n  skin: 'nv',\n  components: {\n    toolbarMain: {\n      buttons: []\n    }\n  }\n};\n\n/** Renders the table of the type Product into the container and returns it. */\nexport function renderProductTable(container: HTMLElement): TableBroHTMLElement {\n  const table = document.createElement('table-bro');\n\n  table.id = 'product-table';\n\n  table.configure({cols, conf});\n\n  // TODO: load the rows and set them with table.replaceRows(rows)\n\n  // The shadows of the table fall into the margins of this element: the visible table takes its full width\n  const host: HTMLElement = document.createElement('div');\n\n  host.className = 'bro-table-shadow-container';\n  host.append(table);\n  container.append(host);\n\n  return table;\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "skin": "nv",
              "spec": {
                "cols": [
                  {
                    "name": "price",
                    "title": "Price"
                  }
                ],
                "fields": [
                  {
                    "name": "title",
                    "type": "string"
                  }
                ],
                "rowType": "Product",
                "specVersion": 1
              }
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "{\n  \"valid\": false,\n  \"errors\": [\n    {\n      \"path\": \"cols[0].name\",\n      \"message\": \"no field price in fields\",\n      \"fix\": \"expected one of title\"\n    }\n  ],\n  \"warnings\": [\n    {\n      \"path\": \"config.rowDetailsComponent\",\n      \"message\": \"the table has no row details, which every table has by default\",\n      \"fix\": \"add a cell of the kind details with what the row has no room for, name it in config.rowDetailsComponent and give a column the element details-button; leave them out only when the request asks for a table without them\"\n    }\n  ]\n}",
              "type": "result"
            },
            "tool": "validate_spec"
          }
        ],
        "task": "t2",
        "turns": 3
      },
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "# Table, Bro reference: Keyboard and focus\n\n*Table, Bro 1.2.0*\n\nThe table is HTML in the page, so Tab moves through its controls in DOM order: the toolbar, column headers, rows of the current page, and paginator.\n\n| Part | Angular Material | Bootstrap | Native |\n|---|---|---|---|\n| **Toolbar** | Search button, configured buttons, and menu: Material buttons | Search link, configured buttons, and menu: links with `role=\"button\"` | Search link and configured buttons: links with `role=\"button\"`; menu is a `<select>` |\n| **Search line** | Back, field, and Clear: Material buttons | Back, field, and Clear: Back and Clear are links with `role=\"button\"` | Back, field, and Clear: Back and Clear are links with `role=\"button\"` |\n| **Column headers** | Material sort headers | A header with a title has `role=\"button\"` and `tabindex=\"0\"` | A header with a title has `role=\"button\"` and `tabindex=\"0\"` |\n| **Rows** | Cell controls and the details button, a Material button | Cell controls and the details button, a `<button>` | Cell controls and the details button, a link with `role=\"button\"` |\n| **Paginator** | Material paginator | Page-size dropdown, then First, Previous, Next, and Last links | Page-size `<select>`, then First, Previous, Next, and Last links |\n\nAll loaded rows are in the DOM, but only controls in rows on the current page can receive focus. Controls on other pages get `tabindex=\"-1\"` and recover their own `tabindex` when their page is shown. Tags that do not fit in their cell cannot receive focus until they are shown. When a row or paginator is rendered anew—for example, for new rows—the table keeps keyboard focus on its control.\n\n## Keys\n\n1. **Links with the button role:** Bootstrap and Native toolbar links, Back and Clear in their search lines, and the Native details link accept Enter, as links do, and Space, as buttons do, instead of scrolling the page.\n\n2. **Sort headers:** Enter and Space sort the column, like a click. Bootstrap and Native use a skin control; Angular Material uses its Material sort header.\n\n3. **Row details:** Enter and Space open or close the row’s details. Focus stays on the button.\n\n4. **Search line:** Opening search puts focus in the field. Escape in the field closes search and returns focus to the search button; the Escape stays in the table, so a surrounding dialog stays open. Clear empties the field and keeps focus there; Clear on an empty field closes search.\n\n5. **Filter Drawer:** In Bootstrap and Native, an opened drawer moves focus into the filters, or to its close button if the filters have no control. Escape closes the drawer, including in Angular Material. With every skin, closing the drawer returns focus to the button that opened it when focus was in the drawer. After a pointer click, that button shows no focus ring.\n\n## Focus rings\n\n- **Bootstrap:** Uses the Bootstrap focus ring, from its `--bs-focus-ring-*` variables, including on sort headers.\n- **Native:** Uses the browser outline. The skin keeps it as one rectangle around sort headers, the details link, and toolbar links, including in Safari.\n- **Angular Material:** Uses the focus indication of Material components.\n\nA focused control in a cell can show its whole focus ring: although the cell clips its content at the edges, it lets the focused control’s ring extend outside.\n\n## Safari\n\nBy default, Safari skips links when tabbing. Bootstrap and Native toolbar links, Back and Clear in their search lines, paginator links, and the Native details link can be focused with **Option+Tab**, or with **Tab** after enabling **“Press Tab to highlight each item on a webpage”** in Safari’s Advanced settings.",
        "round": 1,
        "steps": [
          {
            "arguments": {},
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: angular, skin mat\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs; a project without Angular Material adds it first with `ng add @angular/material`.\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/angular`: `<table-bro-ng>` for the templates of Angular, with signal inputs and outputs, and the contracts of a page and of its service\n- `@table-bro/angular-material`: the skin mat, pixel-perfect Material data tables on the components of Angular Material, in the theme of the application, with its Filter Drawer\n- `@angular/elements`: turns the Angular components of the cells into Custom Elements, which the table creates by their tags\n\n```bash\nnpm install @table-bro/core @table-bro/angular @table-bro/angular-material @angular/elements\n```\n\n**2. Add the CSS**\n\nTo `\"styles\"` of `angular.json`:\n\n```json\n\"styles\": [\n  \"node_modules/@table-bro/core/dist/table-bro.min.css\",\n  \"node_modules/@table-bro/angular-material/dist/table-bro.material.min.css\"\n]\n```\n\n**3. Register the skin and its elements**\n\nIn the providers of `app.config.ts`. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches, `withToolbarMenu()` for the menu of the toolbar; a project that registers the skin already adds the ones of a new table to the call.\n\n```typescript\nimport type {ApplicationConfig} from '@angular/core';\n\nimport {provideTableBroMatSkin} from '@table-bro/angular-material';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideTableBroMatSkin()\n  ]\n};\n```\n\n**4. Keep the theme of Angular Material**\n\nThe mat skin takes the theme of the application, as the components of Angular Material do: the table looks as a `mat-table` of the project, and a table in the dark theme takes the dark scheme of the theme. `ng add @angular/material` writes the theme into `styles.scss`; a project without it adds it:\n\n```scss\n@use '@angular/material' as mat;\n\nhtml {\n  @include mat.theme((\n    color: (\n      primary: mat.$azure-palette,\n      tertiary: mat.$blue-palette,\n    ),\n    typography: Roboto,\n    density: 0,\n  ));\n}\n```\n\n**5. Load the fonts of the icons**\n\nThe mat skin shows the ligature icons of Material, as Angular Material asks; the cells and the dialogs of the page take the newer Material Symbols. In `index.html`:\n\n```html\n<link href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\">\n<link href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,300,0,0\" rel=\"stylesheet\">\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport {ChangeDetectionStrategy, Component, signal} from '@angular/core';\n\nimport {type BroContainer, TableBroNg} from '@table-bro/angular';\nimport type {BroCol, BroConfig}        from '@table-bro/core';\n\nimport type {Product} from './product';\n\n@Component({\n  selector: 'app-product-table',\n  template: `\n    <table-bro-ng class=\"bro-table-shadow-container\" tableId=\"product-table\"\n                  [cols]=\"cols()\" [rows]=\"rows()\" [conf]=\"conf()\"></table-bro-ng>`,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    TableBroNg\n  ]\n})\nexport class ProductTable implements BroContainer<Product> {\n  cols = signal<BroCol<Product>[]>([\n    {\n      title: 'Product',\n      name: 'title'\n    }, {\n      title: 'Price',\n      name: 'price',\n      className: 'bro-col_text-right',\n      dataType: 'number'\n    }\n  ]);\n\n  rows = signal<Product[] | undefined>(undefined);\n\n  conf = signal<BroConfig<Product>>({\n    skin: 'mat',\n    components: {\n      toolbarMain: {\n        buttons: []\n      }\n    }\n  });\n\n  constructor() {\n    this.initTable();\n  }\n\n  initTable() {\n    // TODO: load the rows and set them with this.rows.set(rows)\n  }\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "topic": "accessibility/keyboard-and-focus"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n# Keyboard and focus\n\nThe table is HTML of the page, so Tab goes through its controls in the order of the DOM: the toolbar, the column headers, the rows of the current page and the paginator.\n\n| Part | Angular Material | Bootstrap | Native |\n| --- | --- | --- | --- |\n| Toolbar | The search button, the buttons of the config and the menu: buttons of Material | The search link, the buttons of the config and the menu: links with the role `button` | The search link and the buttons of the config: links with the role `button`; the menu is a `‹select›` |\n| Search line | Back, the field, Clear: buttons of Material | Back, the field, Clear: Back and Clear are links with the role `button` | Back, the field, Clear: Back and Clear are links with the role `button` |\n| Column headers | The sort headers of Material | A header with a title: `role=\"button\"` and `tabindex=\"0\"` | A header with a title: `role=\"button\"` and `tabindex=\"0\"` |\n| Rows | The controls of the cells and the details button, a button of Material | The controls of the cells and the details button, a `‹button›` | The controls of the cells and the details button, a link with the role `button` |\n| Paginator | The paginator of Material | The page size dropdown, then the links First, Previous, Next and Last | The page size `‹select›`, then the links First, Previous, Next and Last |\n\nAll loaded rows are in the DOM, but only the rows of the current page take the focus: the controls of the other pages get `tabindex=\"-1\"` and take their own `tabindex` back on their page. The tags that do not fit their cell take no focus either, until they show. A row or a paginator that the table renders anew, as for new rows, keeps the focus of the keyboard on its control.\n\n#### Keys\n\n1. **Links with the role button**\n\n   The toolbar links of Bootstrap and Native, Back and Clear of their search line and the details link of Native take Enter, as every link does, and Space, as a button does, instead of scrolling the page.\n\n2. **Sort headers**\n\n   Enter and Space on a column header sort the column, as a click does: with Bootstrap and Native the header is a control of the skin, with Angular Material the sort header of Material.\n\n3. **Row details**\n\n   Enter and Space on the details button open and close the details of its row, and the focus stays on the button.\n\n4. **Search line**\n\n   The search button opens the search line and puts the focus into its field. Escape in the field closes the search line, as Back does, and the focus returns to the search button; Escape stays in the table, so a dialog around the table stays open. Clear empties the field and keeps the focus in it; Clear in an empty field closes the search line.\n\n5. **Filter Drawer**\n\n   With Bootstrap and Native, the opened drawer takes the focus into your filters, or to its close button when the filters have no control. Escape in the drawer closes it, with Angular Material as in the drawer of Material. With every skin the closed drawer gives the focus back to the button that opened it, when the focus was in the drawer; after a click of the pointer the button shows no focus ring.\n\n#### Focus rings\n\nEach skin shows the focus of the keyboard in the look of its library:\n\n1. **Bootstrap**: the focus ring of Bootstrap, from its variables `--bs-focus-ring-*`, also on the sort headers, which Bootstrap does not have.\n\n2. **Native**: the outline of the browser; the skin keeps it one rectangle around the sort headers, the details link and the toolbar links, also in Safari.\n\n3. **Angular Material**: the focus indication of the components of Material.\n\nA control in a cell shows its whole focus ring: the cell, which cuts its content at its edges, lets the ring of a control in focus out.\n\n#### Safari\n\nBy default Tab in Safari skips links. The toolbar links of Bootstrap and Native, Back and Clear of their search line, the links of their paginator and the details link of Native take the focus by Option+Tab, or by Tab once **Press Tab to highlight each item on a webpage** is on in the settings of Safari, Advanced.",
              "type": "result"
            },
            "tool": "get_docs"
          }
        ],
        "task": "t3",
        "turns": 3
      },
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "# Table, Bro reference: Keyboard and focus\n\n*Table, Bro 1.2.0*\n\nThe table is HTML of the page, so Tab goes through its controls in DOM order: the toolbar, column headers, rows of the current page, and paginator.\n\n| Part | Angular Material | Bootstrap | Native |\n|---|---|---|---|\n| **Toolbar** | Search, configured buttons and menu: Material buttons | Search, configured buttons and menu: links with `role=\"button\"` | Search and configured buttons: links with `role=\"button\"`; menu is a `<select>` |\n| **Search line** | Back, field and Clear; Back and Clear are Material buttons | Back, field and Clear; Back and Clear are links with `role=\"button\"` | Back, field and Clear; Back and Clear are links with `role=\"button\"` |\n| **Column headers** | Material sort headers | Headers with a title have `role=\"button\"` and `tabindex=\"0\"` | Headers with a title have `role=\"button\"` and `tabindex=\"0\"` |\n| **Rows** | Cell controls and a Material details button | Cell controls and a `<button>` for details | Cell controls and a details link with `role=\"button\"` |\n| **Paginator** | Material paginator | Page-size dropdown, then First, Previous, Next and Last links | Page-size `<select>`, then First, Previous, Next and Last links |\n\nAll loaded rows are in the DOM, but only controls in the current page’s rows take focus. Controls on other pages receive `tabindex=\"-1\"` and regain their own `tabindex` when their page is shown. Tags that do not fit their cell also do not take focus until they are shown. When a row or paginator is rendered anew, such as for new rows, keyboard focus stays on its control.\n\n## Keys and focus behavior\n\n- **Links with `role=\"button\"`:** Bootstrap and Native toolbar links, Back and Clear in their search lines, and the Native details link respond to Enter and Space. Space activates them instead of scrolling the page.\n- **Sort headers:** Enter and Space sort the column, like a click.\n- **Row details:** Enter and Space open or close the row’s details. Focus stays on the details button.\n- **Search line:** Opening search puts focus in the field. Escape closes it and returns focus to the search button; the Escape stays in the table, so an enclosing dialog stays open. Clear empties the field and keeps focus there; Clear in an empty field closes the search line.\n- **Filter Drawer:** In Bootstrap and Native, opening the drawer moves focus into the filters, or to the close button if the filters have no control. Escape closes the drawer in every skin. When focus was in the drawer, closing it returns focus to its opening button; after a pointer click, that button shows no focus ring.\n\n## Focus rings\n\n- **Bootstrap:** Uses Bootstrap’s `--bs-focus-ring-*` variables, including on sort headers.\n- **Native:** Uses the browser outline, kept as one rectangle around sort headers, the details link and toolbar links, including in Safari.\n- **Angular Material:** Uses Material components’ focus indication.\n\nA focused control in a cell can show its entire focus ring beyond the cell’s content-clipping edge.\n\n## Safari\n\nBy default, Tab in Safari skips links. Use **Option+Tab**, or enable **“Press Tab to highlight each item on a webpage”** in Safari’s Advanced settings. This affects Bootstrap and Native toolbar, search and paginator links, as well as the Native details link.",
        "round": 2,
        "steps": [
          {
            "arguments": {},
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: angular, skin mat\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs; a project without Angular Material adds it first with `ng add @angular/material`.\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/angular`: `<table-bro-ng>` for the templates of Angular, with signal inputs and outputs, and the contracts of a page and of its service\n- `@table-bro/angular-material`: the skin mat, pixel-perfect Material data tables on the components of Angular Material, in the theme of the application, with its Filter Drawer\n- `@angular/elements`: turns the Angular components of the cells into Custom Elements, which the table creates by their tags\n\n```bash\nnpm install @table-bro/core @table-bro/angular @table-bro/angular-material @angular/elements\n```\n\n**2. Add the CSS**\n\nTo `\"styles\"` of `angular.json`:\n\n```json\n\"styles\": [\n  \"node_modules/@table-bro/core/dist/table-bro.min.css\",\n  \"node_modules/@table-bro/angular-material/dist/table-bro.material.min.css\"\n]\n```\n\n**3. Register the skin and its elements**\n\nIn the providers of `app.config.ts`. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches, `withToolbarMenu()` for the menu of the toolbar; a project that registers the skin already adds the ones of a new table to the call.\n\n```typescript\nimport type {ApplicationConfig} from '@angular/core';\n\nimport {provideTableBroMatSkin} from '@table-bro/angular-material';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideTableBroMatSkin()\n  ]\n};\n```\n\n**4. Keep the theme of Angular Material**\n\nThe mat skin takes the theme of the application, as the components of Angular Material do: the table looks as a `mat-table` of the project, and a table in the dark theme takes the dark scheme of the theme. `ng add @angular/material` writes the theme into `styles.scss`; a project without it adds it:\n\n```scss\n@use '@angular/material' as mat;\n\nhtml {\n  @include mat.theme((\n    color: (\n      primary: mat.$azure-palette,\n      tertiary: mat.$blue-palette,\n    ),\n    typography: Roboto,\n    density: 0,\n  ));\n}\n```\n\n**5. Load the fonts of the icons**\n\nThe mat skin shows the ligature icons of Material, as Angular Material asks; the cells and the dialogs of the page take the newer Material Symbols. In `index.html`:\n\n```html\n<link href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\">\n<link href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,300,0,0\" rel=\"stylesheet\">\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport {ChangeDetectionStrategy, Component, signal} from '@angular/core';\n\nimport {type BroContainer, TableBroNg} from '@table-bro/angular';\nimport type {BroCol, BroConfig}        from '@table-bro/core';\n\nimport type {Product} from './product';\n\n@Component({\n  selector: 'app-product-table',\n  template: `\n    <table-bro-ng class=\"bro-table-shadow-container\" tableId=\"product-table\"\n                  [cols]=\"cols()\" [rows]=\"rows()\" [conf]=\"conf()\"></table-bro-ng>`,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    TableBroNg\n  ]\n})\nexport class ProductTable implements BroContainer<Product> {\n  cols = signal<BroCol<Product>[]>([\n    {\n      title: 'Product',\n      name: 'title'\n    }, {\n      title: 'Price',\n      name: 'price',\n      className: 'bro-col_text-right',\n      dataType: 'number'\n    }\n  ]);\n\n  rows = signal<Product[] | undefined>(undefined);\n\n  conf = signal<BroConfig<Product>>({\n    skin: 'mat',\n    components: {\n      toolbarMain: {\n        buttons: []\n      }\n    }\n  });\n\n  constructor() {\n    this.initTable();\n  }\n\n  initTable() {\n    // TODO: load the rows and set them with this.rows.set(rows)\n  }\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "topic": "accessibility/keyboard-and-focus"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n# Keyboard and focus\n\nThe table is HTML of the page, so Tab goes through its controls in the order of the DOM: the toolbar, the column headers, the rows of the current page and the paginator.\n\n| Part | Angular Material | Bootstrap | Native |\n| --- | --- | --- | --- |\n| Toolbar | The search button, the buttons of the config and the menu: buttons of Material | The search link, the buttons of the config and the menu: links with the role `button` | The search link and the buttons of the config: links with the role `button`; the menu is a `‹select›` |\n| Search line | Back, the field, Clear: buttons of Material | Back, the field, Clear: Back and Clear are links with the role `button` | Back, the field, Clear: Back and Clear are links with the role `button` |\n| Column headers | The sort headers of Material | A header with a title: `role=\"button\"` and `tabindex=\"0\"` | A header with a title: `role=\"button\"` and `tabindex=\"0\"` |\n| Rows | The controls of the cells and the details button, a button of Material | The controls of the cells and the details button, a `‹button›` | The controls of the cells and the details button, a link with the role `button` |\n| Paginator | The paginator of Material | The page size dropdown, then the links First, Previous, Next and Last | The page size `‹select›`, then the links First, Previous, Next and Last |\n\nAll loaded rows are in the DOM, but only the rows of the current page take the focus: the controls of the other pages get `tabindex=\"-1\"` and take their own `tabindex` back on their page. The tags that do not fit their cell take no focus either, until they show. A row or a paginator that the table renders anew, as for new rows, keeps the focus of the keyboard on its control.\n\n#### Keys\n\n1. **Links with the role button**\n\n   The toolbar links of Bootstrap and Native, Back and Clear of their search line and the details link of Native take Enter, as every link does, and Space, as a button does, instead of scrolling the page.\n\n2. **Sort headers**\n\n   Enter and Space on a column header sort the column, as a click does: with Bootstrap and Native the header is a control of the skin, with Angular Material the sort header of Material.\n\n3. **Row details**\n\n   Enter and Space on the details button open and close the details of its row, and the focus stays on the button.\n\n4. **Search line**\n\n   The search button opens the search line and puts the focus into its field. Escape in the field closes the search line, as Back does, and the focus returns to the search button; Escape stays in the table, so a dialog around the table stays open. Clear empties the field and keeps the focus in it; Clear in an empty field closes the search line.\n\n5. **Filter Drawer**\n\n   With Bootstrap and Native, the opened drawer takes the focus into your filters, or to its close button when the filters have no control. Escape in the drawer closes it, with Angular Material as in the drawer of Material. With every skin the closed drawer gives the focus back to the button that opened it, when the focus was in the drawer; after a click of the pointer the button shows no focus ring.\n\n#### Focus rings\n\nEach skin shows the focus of the keyboard in the look of its library:\n\n1. **Bootstrap**: the focus ring of Bootstrap, from its variables `--bs-focus-ring-*`, also on the sort headers, which Bootstrap does not have.\n\n2. **Native**: the outline of the browser; the skin keeps it one rectangle around the sort headers, the details link and the toolbar links, also in Safari.\n\n3. **Angular Material**: the focus indication of the components of Material.\n\nA control in a cell shows its whole focus ring: the cell, which cuts its content at its edges, lets the ring of a control in focus out.\n\n#### Safari\n\nBy default Tab in Safari skips links. The toolbar links of Bootstrap and Native, Back and Clear of their search line, the links of their paginator and the details link of Native take the focus by Option+Tab, or by Tab once **Press Tab to highlight each item on a webpage** is on in the settings of Safari, Advanced.",
              "type": "result"
            },
            "tool": "get_docs"
          }
        ],
        "task": "t3",
        "turns": 3
      },
      {
        "end": "answered",
        "final_cut": false,
        "final_text": "# Table, Bro: Keyboard navigation and focus\n\n*Reference documentation for Table, Bro 1.2.0*\n\nThe table is part of the page’s HTML, so **Tab** moves through its controls in DOM order: the toolbar, column headers, rows of the current page, and paginator.\n\n| Part | Angular Material | Bootstrap | Native |\n|---|---|---|---|\n| **Toolbar** | Search button, configured buttons, and menu: Material buttons | Search link, configured buttons, and menu: links with role `button` | Search link and configured buttons: links with role `button`; the menu is a `<select>` |\n| **Search line** | Back, field, Clear: Material buttons | Back, field, Clear: Back and Clear are links with role `button` | Back, field, Clear: Back and Clear are links with role `button` |\n| **Column headers** | Material sort headers | A header with a title has `role=\"button\"` and `tabindex=\"0\"` | A header with a title has `role=\"button\"` and `tabindex=\"0\"` |\n| **Rows** | Cell controls and the details button, a Material button | Cell controls and the details button, a `<button>` | Cell controls and the details button, a link with role `button` |\n| **Paginator** | Material paginator | Page-size dropdown, then First, Previous, Next, and Last links | Page-size `<select>`, then First, Previous, Next, and Last links |\n\nAll loaded rows are in the DOM, but only controls in the **current page’s rows** can take focus. Controls on other pages receive `tabindex=\"-1\"` and regain their own `tabindex` when their page is shown. Tags that do not fit in their cell cannot take focus until they are shown. When the table renders a row or paginator anew—for example, for new rows—it keeps keyboard focus on its control.\n\n## Keys\n\n1. **Links with role `button`**  \n   Bootstrap and Native toolbar links, Back and Clear in their search lines, and the Native details link accept both **Enter** and **Space**. Space activates them rather than scrolling the page.\n\n2. **Sort headers**  \n   **Enter** and **Space** sort the column, just like a click. Bootstrap and Native use a skin control; Angular Material uses its Material sort header.\n\n3. **Row details**  \n   **Enter** and **Space** open or close the row’s details. Focus stays on the details button.\n\n4. **Search line**  \n   The search button opens the search line and focuses its field. **Escape** in the field closes the line and returns focus to the search button; Escape stays within the table, so an enclosing dialog stays open. Clear empties the field and keeps focus there. Clear on an empty field closes the search line.\n\n5. **Filter Drawer**  \n   With Bootstrap and Native, opening the drawer moves focus into the filters, or to the close button if the filters have no control. **Escape** closes the drawer in all skins, including the Material drawer. When focus was inside the drawer, closing it returns focus to the button that opened it. After a pointer click, that button shows no focus ring.\n\n## Focus rings\n\n- **Bootstrap:** Uses Bootstrap’s focus ring, from its `--bs-focus-ring-*` variables, including on sort headers.\n- **Native:** Uses the browser outline. The skin keeps it as one rectangle around sort headers, the details link, and toolbar links, including in Safari.\n- **Angular Material:** Uses the focus indication of Material components.\n\nA focused control in a cell shows its whole focus ring: although the cell clips its content at the edges, it lets the focused control’s ring extend outside.\n\n## Safari\n\nBy default, Tab in Safari skips links. The Bootstrap and Native toolbar links, Back and Clear in their search lines, their paginator links, and the Native details link can be focused with **Option+Tab**. They can also be focused with Tab after enabling **“Press Tab to highlight each item on a webpage”** in Safari’s Advanced settings.",
        "round": 3,
        "steps": [
          {
            "arguments": {},
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n## How Table, Bro works\n\n- Table, Bro is a Web Components table engine on top of existing UI components: the table is the Custom Element `<table-bro>`, and a skin gives it the controls and the look of a UI library. Its columns, rows and config come once, in `configure({cols, rows, conf})`. New columns or a new config make a new table; rows change with `replaceRows` and `appendRows`, the loading and the failure with `setState`.\n- A skin is required: `config.skin` is `mat` (Angular Material: pixel-perfect Material data tables for Angular), `bs` (Bootstrap 5) or `nv` (native HTML, no library). The import of a vanilla skin package registers it, `provideTableBroMatSkin()` registers the skin mat; `configure` throws without a registered skin. The table needs the CSS of the core and of the skin.\n- The content of a custom cell is a Custom Element: the column names its tag in `component.selector`. The table creates it for every row and sets the properties `col` and `row`, the objects of the application.\n- The tags of the ready elements depend on the skin: the tags are `bro-mat-tags`, `bro-bs-tags` or `bro-nv-tags`.\n- Every action comes in one event `bro-action` with `detail = {action, selector, data}`. A custom cell sends its actions through the event named in `component.event`, and the table gives the page `data = {col, row}`.\n- In the server mode the table tells what to load: a `BroQuery` in the action `bro-filters-server-loaded`, the output `query` of the Angular wrapper.\n- All body rows have one fixed height, the CSS variable `--bro-row-height` of the skin, not the content.\n- All loaded rows are in the DOM: there is no virtualization.\n- The table creates the cells also to measure the widths of the columns, for a row of the longest values: a cell has no side effects when it connects.\n- The filters of the application live outside of the table, in the Filter Drawer next to it. The table itself searches the string fields of its columns; other filters go through `config.filtersTransform` in the local mode.\n\n## The order of the tools\n\n| Task | Calls |\n| --- | --- |\n| A new table | `get_started`, `inspect_project`, `validate_spec` and `generate_code` with a spec, with row details by default (topic spec; `get_docs` topic fillings has the format of the fillings); write the templates of the cells, write the files, build the project |\n| A cell, row details or filters for an existing table | `inspect_project`, `scaffold_component`; write the files |\n| A change of a table, a question about the API | `get_docs` with a topic |\n| A table that does not render | `inspect_project`, then `get_docs` with the topic errors |\n\n`validate_spec` checks a spec and tells for every problem the path, what is wrong and how it should be; `generate_code` runs it first. The server writes no files: the agent writes them.\n\n## A minimal table: angular, skin mat\n\nSetup, once per project:\n\n**1. Install the packages**\n\nThe table and the parts it needs; a project without Angular Material adds it first with `ng add @angular/material`.\n\n- `@table-bro/core`: the table engine itself, the Custom Element <table-bro> with its rows, pages, sort, search and row details, and the CSS of the core\n- `@table-bro/angular`: `<table-bro-ng>` for the templates of Angular, with signal inputs and outputs, and the contracts of a page and of its service\n- `@table-bro/angular-material`: the skin mat, pixel-perfect Material data tables on the components of Angular Material, in the theme of the application, with its Filter Drawer\n- `@angular/elements`: turns the Angular components of the cells into Custom Elements, which the table creates by their tags\n\n```bash\nnpm install @table-bro/core @table-bro/angular @table-bro/angular-material @angular/elements\n```\n\n**2. Add the CSS**\n\nTo `\"styles\"` of `angular.json`:\n\n```json\n\"styles\": [\n  \"node_modules/@table-bro/core/dist/table-bro.min.css\",\n  \"node_modules/@table-bro/angular-material/dist/table-bro.material.min.css\"\n]\n```\n\n**3. Register the skin and its elements**\n\nIn the providers of `app.config.ts`. The elements that only some tables use come with their functions: `withTags()` for tags, `withSwitch()` for switches, `withToolbarMenu()` for the menu of the toolbar; a project that registers the skin already adds the ones of a new table to the call.\n\n```typescript\nimport type {ApplicationConfig} from '@angular/core';\n\nimport {provideTableBroMatSkin} from '@table-bro/angular-material';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideTableBroMatSkin()\n  ]\n};\n```\n\n**4. Keep the theme of Angular Material**\n\nThe mat skin takes the theme of the application, as the components of Angular Material do: the table looks as a `mat-table` of the project, and a table in the dark theme takes the dark scheme of the theme. `ng add @angular/material` writes the theme into `styles.scss`; a project without it adds it:\n\n```scss\n@use '@angular/material' as mat;\n\nhtml {\n  @include mat.theme((\n    color: (\n      primary: mat.$azure-palette,\n      tertiary: mat.$blue-palette,\n    ),\n    typography: Roboto,\n    density: 0,\n  ));\n}\n```\n\n**5. Load the fonts of the icons**\n\nThe mat skin shows the ligature icons of Material, as Angular Material asks; the cells and the dialogs of the page take the newer Material Symbols. In `index.html`:\n\n```html\n<link href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\">\n<link href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,300,0,0\" rel=\"stylesheet\">\n```\n\nproduct-table/product-table.ts:\n\n```ts\nimport {ChangeDetectionStrategy, Component, signal} from '@angular/core';\n\nimport {type BroContainer, TableBroNg} from '@table-bro/angular';\nimport type {BroCol, BroConfig}        from '@table-bro/core';\n\nimport type {Product} from './product';\n\n@Component({\n  selector: 'app-product-table',\n  template: `\n    <table-bro-ng class=\"bro-table-shadow-container\" tableId=\"product-table\"\n                  [cols]=\"cols()\" [rows]=\"rows()\" [conf]=\"conf()\"></table-bro-ng>`,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [\n    TableBroNg\n  ]\n})\nexport class ProductTable implements BroContainer<Product> {\n  cols = signal<BroCol<Product>[]>([\n    {\n      title: 'Product',\n      name: 'title'\n    }, {\n      title: 'Price',\n      name: 'price',\n      className: 'bro-col_text-right',\n      dataType: 'number'\n    }\n  ]);\n\n  rows = signal<Product[] | undefined>(undefined);\n\n  conf = signal<BroConfig<Product>>({\n    skin: 'mat',\n    components: {\n      toolbarMain: {\n        buttons: []\n      }\n    }\n  });\n\n  constructor() {\n    this.initTable();\n  }\n\n  initTable() {\n    // TODO: load the rows and set them with this.rows.set(rows)\n  }\n}\n```\n\n## Topics of get_docs\n\n- `basics`: The facts a model cannot guess: the element, configure, skins, cells, the one event, the server mode\n- `fillings`: The format of the fillings: the templates of the cells, the rules of the custom filters and the bodies of the functions of the skin config\n- `workflow`: Which tools to call for a new table, a cell, a question or a table that does not render\n- `spec`: The fields of the spec that validate_spec checks and generate_code takes\n- `setup`: The packages, the CSS and the registration of the skin, once for all tables of a project\n- `columns`: title, name, dataType, sortKey, tooltip, component, html, className and short titles\n- `config`: The fields of the config, their defaults and how the config of a skin lies under it\n- `events`: The event bro-action, its actions, and the event bro-error\n- `server-mode`: config.server, BroQuery and the rules of delivering the rows\n- `row-details`: The element of the row details, its button and the details that load from the server\n- `filters`: The Filter Drawer of each skin, how the page gives the filters to the table, filtersTransform and the server mode\n- `cells`: The contract of a cell, the scaffolds for Angular and for Vanilla JS, and the rules\n- `toolbar`: The buttons and the menu of the toolbar and their actions\n- `skin-config`: The components and the classes of a skin, its functions, and custom elements in place of its elements\n- `css-variables`: The sizes and timings of a table without a new build of the skin\n- `errors`: The event bro-error and the usual causes\n- `angular-wrapper`: The inputs and outputs of the wrapper of @table-bro/angular\n- `ssr`: The prerender of the loading state on a server: <table-bro-ng> in Angular SSR, prerenderTableBro() without Angular, and its limits\n- `getting-started`: The page of Docs Getting started, with its code\n- `basics/fixed-row-height`: The page of Docs Fixed row height, with its code\n- `basics/fixed-column-width`: The page of Docs Fixed column width, with its code\n- `basics/auto-detected-column-width`: The page of Docs Auto-detected column width, with its code\n- `basics/tooltip`: The page of Docs Truncated text with hover tooltips, with its code\n- `basics/animated-pagination`: The page of Docs Animated pagination, with its code\n- `basics/animated-page-size`: The page of Docs Animated page size change, with its code\n- `basics/table-states`: The page of Docs Animated table states, with its code\n- `design/css-styling`: The page of Docs Supports CSS styling of ‹table›, with its code\n- `design/custom-content`: The page of Docs Custom content in tables using Custom Elements, with its code\n- `design/shadows`: The page of Docs Shadows, with its code\n- `design/rounded-corners`: The page of Docs Rounded corners, with its code\n- `design/dark-light-mode`: The page of Docs Dark/Light mode, with its code\n- `design/material-design`: The page of Docs Material design, with its code\n- `design/bootstrap-design`: The page of Docs Bootstrap design, with its code\n- `details/default-details`: The page of Docs Default Details, with its code\n- `filtering/toolbar-with-search`: The page of Docs Toolbar with Search, with its code\n- `filtering/custom-user-filters`: The page of Docs Custom user filters, with its code\n- `filtering/filter-drawer`: The page of Docs Filter Drawer, with its code\n- `filtering/custom-sorting-rules`: The page of Docs Custom sorting rules, with its code\n- `frameworks`: The page of Docs Frameworks, with its code\n- `frameworks/angular`: The page of Docs Angular data table, with its code\n- `frameworks/preact`: The page of Docs Preact data table, with its code\n- `frameworks/react`: The page of Docs React data table, with its code\n- `frameworks/solid`: The page of Docs Solid data table, with its code\n- `frameworks/svelte`: The page of Docs Svelte data table, with its code\n- `frameworks/vue`: The page of Docs Vue 3 data table, with its code\n- `ssr/prerendering`: The page of Docs Prerendering, with its code\n- `accessibility/localization`: The page of Docs Texts and localization, with its code\n- `accessibility/keyboard-and-focus`: The page of Docs Keyboard and focus, with its code\n- `accessibility/screen-readers`: The page of Docs Screen readers, with its code",
              "type": "result"
            },
            "tool": "get_started"
          },
          {
            "arguments": {
              "topic": "accessibility/keyboard-and-focus"
            },
            "reply": {
              "cut": false,
              "is_error": false,
              "text": "_table-bro 1.2.0_\n\n# Keyboard and focus\n\nThe table is HTML of the page, so Tab goes through its controls in the order of the DOM: the toolbar, the column headers, the rows of the current page and the paginator.\n\n| Part | Angular Material | Bootstrap | Native |\n| --- | --- | --- | --- |\n| Toolbar | The search button, the buttons of the config and the menu: buttons of Material | The search link, the buttons of the config and the menu: links with the role `button` | The search link and the buttons of the config: links with the role `button`; the menu is a `‹select›` |\n| Search line | Back, the field, Clear: buttons of Material | Back, the field, Clear: Back and Clear are links with the role `button` | Back, the field, Clear: Back and Clear are links with the role `button` |\n| Column headers | The sort headers of Material | A header with a title: `role=\"button\"` and `tabindex=\"0\"` | A header with a title: `role=\"button\"` and `tabindex=\"0\"` |\n| Rows | The controls of the cells and the details button, a button of Material | The controls of the cells and the details button, a `‹button›` | The controls of the cells and the details button, a link with the role `button` |\n| Paginator | The paginator of Material | The page size dropdown, then the links First, Previous, Next and Last | The page size `‹select›`, then the links First, Previous, Next and Last |\n\nAll loaded rows are in the DOM, but only the rows of the current page take the focus: the controls of the other pages get `tabindex=\"-1\"` and take their own `tabindex` back on their page. The tags that do not fit their cell take no focus either, until they show. A row or a paginator that the table renders anew, as for new rows, keeps the focus of the keyboard on its control.\n\n#### Keys\n\n1. **Links with the role button**\n\n   The toolbar links of Bootstrap and Native, Back and Clear of their search line and the details link of Native take Enter, as every link does, and Space, as a button does, instead of scrolling the page.\n\n2. **Sort headers**\n\n   Enter and Space on a column header sort the column, as a click does: with Bootstrap and Native the header is a control of the skin, with Angular Material the sort header of Material.\n\n3. **Row details**\n\n   Enter and Space on the details button open and close the details of its row, and the focus stays on the button.\n\n4. **Search line**\n\n   The search button opens the search line and puts the focus into its field. Escape in the field closes the search line, as Back does, and the focus returns to the search button; Escape stays in the table, so a dialog around the table stays open. Clear empties the field and keeps the focus in it; Clear in an empty field closes the search line.\n\n5. **Filter Drawer**\n\n   With Bootstrap and Native, the opened drawer takes the focus into your filters, or to its close button when the filters have no control. Escape in the drawer closes it, with Angular Material as in the drawer of Material. With every skin the closed drawer gives the focus back to the button that opened it, when the focus was in the drawer; after a click of the pointer the button shows no focus ring.\n\n#### Focus rings\n\nEach skin shows the focus of the keyboard in the look of its library:\n\n1. **Bootstrap**: the focus ring of Bootstrap, from its variables `--bs-focus-ring-*`, also on the sort headers, which Bootstrap does not have.\n\n2. **Native**: the outline of the browser; the skin keeps it one rectangle around the sort headers, the details link and the toolbar links, also in Safari.\n\n3. **Angular Material**: the focus indication of the components of Material.\n\nA control in a cell shows its whole focus ring: the cell, which cuts its content at its edges, lets the ring of a control in focus out.\n\n#### Safari\n\nBy default Tab in Safari skips links. The toolbar links of Bootstrap and Native, Back and Clear of their search line, the links of their paginator and the details link of Native take the focus by Option+Tab, or by Tab once **Press Tab to highlight each item on a webpage** is on in the settings of Safari, Advanced.",
              "type": "result"
            },
            "tool": "get_docs"
          }
        ],
        "task": "t3",
        "turns": 3
      }
    ],
    "none_because": null,
    "tasks": [
      {
        "done_when": "The transcript shows the generated products table files and setup guidance for the vanilla native skin.",
        "id": "t1",
        "task": "Generate the built-in products table for vanilla JavaScript using the native HTML skin, and show the generated code and setup instructions."
      },
      {
        "done_when": "The transcript shows the validation report identifying the column's reference to the undeclared price field.",
        "id": "t2",
        "task": "Validate this native-skin table spec and report the errors and suggested fixes: {\"specVersion\":1,\"rowType\":\"Product\",\"fields\":[{\"name\":\"title\",\"type\":\"string\"}],\"cols\":[{\"title\":\"Price\",\"name\":\"price\"}]}."
      },
      {
        "done_when": "The transcript shows the documentation returned for the accessibility/keyboard-and-focus topic.",
        "id": "t3",
        "task": "Show me the Table, Bro reference documentation for keyboard navigation and focus."
      }
    ],
    "tasks_file_sha256": "1605866b1ac9852dfc390e535207bb25de5e829a5c2eb25b25c983b5b04220ba",
    "writer": "codex/gpt-6.1-terra"
  }
}
