Skip to content

fix: display kind handling in primary kind resolution BED-9486 - #3219

Open
urangel wants to merge 1 commit into
mainfrom
BED-9486
Open

fix: display kind handling in primary kind resolution BED-9486#3219
urangel wants to merge 1 commit into
mainfrom
BED-9486

Conversation

@urangel

@urangel urangel commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

Handles display kind prioritization in client side primary kind resolution.

Motivation and Context

Resolves BED-9486

Display kinds are not being prioritized as expected in client side primary kind resolution.

How Has This Been Tested?

Kind prioritization tests added.

Screenshots (optional):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

@urangel urangel self-assigned this Aug 28, 2026
@urangel urangel added bug Something isn't working user interface A pull request containing changes affecting the UI code. javascript Pull requests that update javascript code labels Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 8d43d307-0961-4f3c-adb5-cd538d3dc790

📥 Commits

Reviewing files that changed from the base of the PR and between 047d177 and f837e39.

📒 Files selected for processing (2)
  • packages/javascript/bh-shared-ui/src/hooks/usePrimaryKind.test.ts
  • packages/javascript/bh-shared-ui/src/hooks/usePrimaryKind.ts

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

usePrimaryKind now loads custom node kinds and selects the first filtered display kind. It falls back to the first filtered kind when no display kind matches. Tests cover ordering, filtering, fallback behavior, and NodeKindRef inputs.

Changes

Primary kind selection

Layer / File(s) Summary
Display-kind selection logic
packages/javascript/bh-shared-ui/src/hooks/usePrimaryKind.ts
The hook loads custom node kinds, prioritizes the first filtered display kind, and retains the first filtered kind as the fallback.
Selection behavior coverage
packages/javascript/bh-shared-ui/src/hooks/usePrimaryKind.test.ts
Tests cover display-kind precedence, source and tag filtering, all-filtered fallback behavior, and NodeKindRef inputs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to f837e

This is a localized client-side fix for display-kind prioritization with accompanying tests, and no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the bug fix for display kind handling in client-side primary kind resolution and includes the associated ticket.
Description check ✅ Passed The description covers the change, motivation, associated ticket, testing, change type, and checklist. The testing details are brief but sufficient because the PR adds focused prioritization tests.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch BED-9486

Comment @coderabbitai help to get the list of available commands.

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

Labels

bug Something isn't working javascript Pull requests that update javascript code user interface A pull request containing changes affecting the UI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant