Files
sim/scripts
Theodore LiandClaude Opus 4.8 c90a1eb4a6 feat(tables): row-gutter drag-select, Cmd+F find, and select-all polish (#4901)
* feat(ui): allow dragging on row gutters

* feat(tables): Cmd+F find across cells + row-gutter UI polish

Find:
- New GET /api/table/[tableId]/rows/find endpoint + contract + useFindTableRows hook
- findRowMatches: case-insensitive substring search across every cell via a
  row_number() CTE + jsonb_each_text + ILIKE, returning each matching cell with
  its ordinal in the filtered/sorted view. Shared buildRowOrderBySql keeps the
  find ordinals aligned with the paginated list (with an id tiebreak).
- Cmd/Ctrl+F floating find box (search-on-Enter), cell-by-cell next/prev that
  loads the target row then reveals the cell via the existing anchor scroll.

Gutter UI:
- Row number/checkbox centered in the region left of the run button; the
  select-all header checkbox centers in the same region so they line up.
- emcn Checkbox gains an indeterminate (minus) state; select-all shows the minus
  on any partial selection and clears everything on click.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(tables): inline rename from the list context menu

Wire the existing "Rename" item in the per-table context menu to inline rename
(useInlineRename + InlineRenameInput via the Resource name cell's `content`
override), matching the Files list. Enter/blur saves, Esc cancels; replaces the
prior modal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* style(tables): restyle Cmd+F find box to match workflow search

Reuse the workflow search visual language (surface-1 panel, emcn Input, muted
"k of N" counter, size-8 ghost chevron buttons) instead of the flat custom input.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(resource): move "Clear sort" to top of the sort menu

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 01:28:12 -04:00
..

Block Documentation Generator

This directory contains scripts to automatically generate documentation for all blocks in the Sim platform.

Available Scripts

  • generate-docs.ts: Generates documentation for all blocks. Run via bun run generate-docs from apps/sim, or directly with bun run scripts/generate-docs.ts from the repo root.

How It Works

The documentation generator:

  1. Scans the apps/sim/blocks/blocks/ directory for all block definition files
  2. Extracts metadata from each block including:
    • Name, description, and category
    • Input and output specifications
    • Configuration parameters
  3. Generates standardized Markdown documentation for each block
  4. Updates the navigation metadata in meta.json

Running the Generator

# From the repo root
bun run scripts/generate-docs.ts

Dependencies are managed by Bun workspaces — bun install at the repo root installs everything needed.

CI Integration

The documentation generator runs automatically as part of the CI/CD pipeline whenever changes are pushed to the main branch. The updated documentation is committed back to the repository.

Adding Support for New Block Properties

If you add new properties to block definitions that should be included in the documentation, update the generateMarkdownForBlock function in scripts/generate-docs.ts.

Preserving Manual Content

The documentation generator now supports preserving manually added content when regenerating docs. This allows you to enhance the auto-generated documentation with custom examples, additional context, or any other content without losing your changes when the docs are regenerated.

How It Works

  1. The generator creates clean documentation without any placeholders or markers
  2. If you add manual content to a file using special comment markers, that content will be preserved during regeneration
  3. The manual content is intelligently inserted at the appropriate section when docs are regenerated

Using Manual Content Markers

To add custom content to any tool's documentation, insert MDX comment blocks with section markers:

{/_ MANUAL-CONTENT-START:sectionName _/}
Your custom content here (Markdown formatting supported)
{/_ MANUAL-CONTENT-END _/}

Replace sectionName with one of the supported section names:

  • intro - Content at the top of the document after the BlockInfoCard
  • usage - Additional usage instructions and examples
  • configuration - Custom configuration details
  • outputs - Additional output information or examples
  • notes - Extra notes at the end of the document

Example

To add custom examples to a tool doc:

{/_ MANUAL-CONTENT-START:usage _/}

## Examples

### Basic Usage

```json
{
  "parameter": "value",
  "anotherParameter": "anotherValue"
}
```

Advanced Configuration

Here's how to use this tool for a specific use case... {/_ MANUAL-CONTENT-END _/}


When the documentation is regenerated, your manual content will be preserved in the appropriate section automatically. The script will not add any placeholders or markers to files by default.