Skip to content

fix(studio): use slotStart instead of removed slotLeft on row-action menu items - #1297

Draft
aray12 wants to merge 1 commit into
mainfrom
dropdown-icons/alray
Draft

fix(studio): use slotStart instead of removed slotLeft on row-action menu items#1297
aray12 wants to merge 1 commit into
mainfrom
dropdown-icons/alray

Conversation

@aray12

@aray12 aray12 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

@nvidia/foundations-react-core's Dropdown renamed its menu-item icon slot from slotLeft/slotRight to slotStart/slotEnd; every rowActionsColumn call site in Studio still used the old slotLeft key, so row-action icons were silently dropped (the KUI Dropdown only reads item.slotStart). This PR renames all affected call sites and adds explicit DropdownEntry[] return types to every rowActions callback so TypeScript's excess-property check catches this class of typo going forward — it didn't catch it here because the callbacks were untyped inline arrow functions returned from a callback-argument position, which TypeScript does not excess-property-check.

Related Issue

None.

Changes

  • Renamed slotLeftslotStart on row-action menu items in: FileRowEditor/columns.tsx, SecretsDataView, DeploymentsDataView, MembersDataView, GuardrailsDataView, and the shared StudioDataView.stories.tsx (3 story blocks).
  • Added explicit DropdownEntry[] return-type annotations to the rowActions callback on all of the above, plus six more rowActionsColumn call sites that were already correct but shared the same untyped-callback blind spot: InferenceProvidersDataView, VirtualModelsDataView, AgentsDataView, DatasetsTable, OptimizerRoute, CustomModelsDataView.
  • No behavior change other than the row-action icons now rendering; the hardening-only files have identical menu items/behavior, just compiler-checked now.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with documentation updates
  • Documentation only
  • Contributor tooling or automation
  • CI, build, or test infrastructure

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification: pure prop rename + type annotation, no new logic; existing component/data-view tests continue to exercise these rowActionsColumn call sites and would fail on a real regression to the menu structure.
  • Tests not applicable — justification:
  • Documentation updated for user-visible behavior
  • Documentation not applicable — justification: no user-facing docs describe this internal Dropdown prop.

Verification

  • Pull request title follows the repository's Conventional Commit format
  • Every commit includes an appropriate Signed-off-by: trailer
  • uv run pre-commit run -a passes, or any blocked checks are identified below
  • Targeted tests pass, or tests are marked not applicable above
  • No secrets, API keys, or credentials are included

Targeted validation:

  • pnpm --filter nemo-studio-ui typecheck — passed
  • pnpm --filter @nemo/common typecheck — passed
  • pnpm --filter="...[origin/main]" run --parallel --if-present typecheck (PR-scoped, mirrors CI) — passed
  • pnpm lint:fix (web/) — passed, no warnings
  • uv run pre-commit run -a — passed, with two pre-existing environment-only failures unrelated to this change (not caused by any file in this PR): helm-docs hook fails because the helm-docs binary isn't installed in this sandbox; uv-lock hook fails because the sandbox's local uv (0.9.28) differs from the pinned platform uv (0.9.14). Neither hook touched a file in this diff (0 Helm/Python/uv.lock files changed).
  • pnpm --filter="...[origin/main]" run --parallel --if-present test:ci (PR-scoped, packages/common + packages/studio) — passed, exit code 0, no failing tests.
  • Manual sanity check: temporarily reintroduced a typo'd extra prop on one fixed call site (SecretsDataView) and confirmed tsc now reports TS2353: Object literal may only specify known properties, then reverted — confirms the excess-property check is genuinely restored, not just cosmetically annotated.
  • Manual browser verification (opening each affected data view/Storybook story to visually confirm icons render) was not performed in this session — flagging as still worth a look before merge.

…menu items

KUI's Dropdown renamed its item icon slot from slotLeft/slotRight to
slotStart/slotEnd; every rowActionsColumn call site still used
slotLeft, so icons silently dropped since Dropdown only reads
item.slotStart. TypeScript missed this because the rowActions
callbacks were untyped inline arrow functions, which skips excess-
property checks on their returned object literals. Fix the six
affected call sites (five data views/tables plus the shared
StudioDataView stories) and add explicit DropdownEntry[] return
types to every rowActionsColumn callback, including ones that were
already correct, so this class of typo is caught by the compiler
going forward.

Signed-off-by: Alex Ray <alray@nvidia.com>
@github-actions github-actions Bot added the fix label Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 33340/42105 79.2% 64.1%
Integration Tests N/A N/A N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant