fix(studio): use slotStart instead of removed slotLeft on row-action menu items - #1297
Draft
aray12 wants to merge 1 commit into
Draft
fix(studio): use slotStart instead of removed slotLeft on row-action menu items#1297aray12 wants to merge 1 commit into
aray12 wants to merge 1 commit into
Conversation
…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>
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@nvidia/foundations-react-core'sDropdownrenamed its menu-item icon slot fromslotLeft/slotRighttoslotStart/slotEnd; everyrowActionsColumncall site in Studio still used the oldslotLeftkey, so row-action icons were silently dropped (the KUIDropdownonly readsitem.slotStart). This PR renames all affected call sites and adds explicitDropdownEntry[]return types to everyrowActionscallback 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
slotLeft→slotStarton row-action menu items in:FileRowEditor/columns.tsx,SecretsDataView,DeploymentsDataView,MembersDataView,GuardrailsDataView, and the sharedStudioDataView.stories.tsx(3 story blocks).DropdownEntry[]return-type annotations to therowActionscallback on all of the above, plus six morerowActionsColumncall sites that were already correct but shared the same untyped-callback blind spot:InferenceProvidersDataView,VirtualModelsDataView,AgentsDataView,DatasetsTable,OptimizerRoute,CustomModelsDataView.Type of Change
Quality Gates
rowActionsColumncall sites and would fail on a real regression to the menu structure.Verification
Signed-off-by:traileruv run pre-commit run -apasses, or any blocked checks are identified belowTargeted validation:
pnpm --filter nemo-studio-ui typecheck— passedpnpm --filter @nemo/common typecheck— passedpnpm --filter="...[origin/main]" run --parallel --if-present typecheck(PR-scoped, mirrors CI) — passedpnpm lint:fix(web/) — passed, no warningsuv 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-docshook fails because thehelm-docsbinary isn't installed in this sandbox;uv-lockhook fails because the sandbox's localuv(0.9.28) differs from the pinned platformuv(0.9.14). Neither hook touched a file in this diff (0 Helm/Python/uv.lockfiles changed).pnpm --filter="...[origin/main]" run --parallel --if-present test:ci(PR-scoped,packages/common+packages/studio) — passed, exit code 0, no failing tests.SecretsDataView) and confirmedtscnow reportsTS2353: Object literal may only specify known properties, then reverted — confirms the excess-property check is genuinely restored, not just cosmetically annotated.