CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-lightdash--common

tessl install tessl/npm-lightdash--common@0.2231.5

Shared TypeScript library for the Lightdash platform containing common types, utilities, and business logic for analytics workflows

Agent Success

Agent success rate when using this tile

72%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.09x

Baseline

Agent success rate without this tile

66%

rubric.jsonevals/scenario-20/

{
  "context": "This criteria evaluates how well the engineer uses @lightdash/common's dashboard types, tile creation patterns, tab validation utilities, layout positioning logic, and filter targeting system. The focus is on correctly using DashboardTile types, DashboardTileTypes enum, DashboardFilters, and utility functions like validateSelectedTabs and getDashboardFiltersForTile.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Tile Type Construction",
      "description": "Uses correct @lightdash/common tile types for creating dashboard tiles. Creates DashboardChartTile with type DashboardTileTypes.SAVED_CHART and proper properties structure (savedChartUuid, hideTitle, belongsToDashboard). Creates DashboardMarkdownTile with type DashboardTileTypes.MARKDOWN and properties containing title and content. Uses the DashboardTileBase structure with required fields: uuid, type, x, y, w, h, and optional tabUuid.",
      "max_score": 25
    },
    {
      "name": "Tab Validation Logic",
      "description": "Implements tab validation following @lightdash/common patterns. Extracts tile.tabUuid from each DashboardTile in the collection. Filters out null/undefined tabUuid values. Checks if at least one selectedTab exists in the collected tab UUIDs. Throws ParameterError from @lightdash/common when validation fails with message 'None of the selected tabs exist in the dashboard'. Handles null or empty selectedTabs arrays appropriately (no error thrown).",
      "max_score": 20
    },
    {
      "name": "Grid Layout Algorithm",
      "description": "Implements grid-based positioning logic similar to @lightdash/common's defaultTileSize pattern. Uses x, y coordinates for position and w, h for dimensions. Calculates next available position by analyzing existing tile positions. Avoids overlaps by checking occupied grid spaces. Supports optional gridWidth parameter (commonly 30 units in Lightdash). Returns position object with x and y properties following @lightdash/common coordinate conventions.",
      "max_score": 20
    },
    {
      "name": "Filter Targeting System",
      "description": "Applies dashboard filter targeting using @lightdash/common patterns. Processes DashboardFilters structure with dimensions, metrics, and tableCalculations arrays. For each DashboardFilterRule, checks tileTargets record for the specific tileUuid. When tileTargets[tileUuid] is false, excludes the filter from results. When tileTargets[tileUuid] is undefined, includes the filter with original target. When tileTargets[tileUuid] is a DashboardFieldTarget, includes filter with replaced target. Filters out disabled filters (rule.disabled === true). Returns a DashboardFilters object with same structure.",
      "max_score": 25
    },
    {
      "name": "Type Imports",
      "description": "Imports correct types from @lightdash/common package: DashboardTile, DashboardChartTile, DashboardMarkdownTile, DashboardTileTypes enum, DashboardFilters, DashboardFilterRule, DashboardFieldTarget, ParameterError. Uses these types properly in function signatures and return types. Demonstrates understanding of @lightdash/common's dashboard type system.",
      "max_score": 10
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@lightdash/common@0.2231.x
tile.json