BloodHound icon indicating copy to clipboard operation
BloodHound copied to clipboard

feat: changed name member to object BED-6517

Open Holocraft opened this issue 1 month ago • 1 comments

Description

This changeset changes the naming of Members to Objects.

Motivation and Context

Resolves BED-6517

How Has This Been Tested?

Adjusted unit tests and tested manually.

Screenshots (optional):

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • [x] I have met the contributing prerequisites
    • Assigned myself to this PR
    • Added the appropriate labels
    • Associated an issue: https://github.com/SpecterOps/BloodHound/issues/672
    • Read the Contributing guide: https://github.com/SpecterOps/BloodHound/wiki/Contributing
  • [x] I have ensured that related documentation is up-to-date
    • Open API docs
    • Code comments (GoDocs / JSDocs)
  • [x] I have followed proper test practices
    • Added/updated tests to cover my changes
    • All new and existing tests passed

Summary by CodeRabbit

  • Chores

    • Added an Apache-2.0 license header to a project source file.
  • Style

    • Updated UI labels and terminology for consistency (e.g., "node/assets/Members" → "object/Objects") across headers, messages, and descriptions.
  • Tests

    • Updated a test to reflect the renamed UI label ("Objects") so sorting behavior assertions remain valid.

✏️ Tip: You can customize this high-level summary in your review settings.

Holocraft avatar Nov 26 '25 21:11 Holocraft

Walkthrough

This PR renames "Members" terminology to "Objects" across Privilege Zones UI and routing, updates related tests and client labels, adds an Apache-2.0 license header to a hook file, and conditionally changes the no-selection message in EntityInfoPanel when on the Privilege Zones page.

Changes

Cohort / File(s) Change Summary
License header
packages/javascript/bh-shared-ui/src/hooks/useTheme.tsx
Added Apache-2.0 license header; no functional changes.
Terminology — Privilege Zones UI
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/MembersList.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Details/MembersList.test.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/fragments.tsx, packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/SelectorForm/BasicInfo.tsx
Replaced displayed label/text from "Members"/"members" to "Objects"/"Objects" (including test click target and descriptive copy). No control-flow changes.
Route path constant
packages/javascript/bh-shared-ui/src/routes/index.tsx
Changed exported constant membersPath from 'members' to 'objects', updating URL segment for member-related routes.
Client library labels
packages/javascript/js-client-library/src/types.ts
Updated AssetGroupTagSelectorAutoCertifyMap display values: "Initial members" → "Initial Objects", "All members" → "All Objects".
EntityInfo no-selection message
packages/javascript/bh-shared-ui/src/components/EntityInfo/EntityInfoPanel.tsx
Imported privilegeZonesPath, computed isPrivilegeZonesPage from pathname, and show an alternate no-selection message when on the Privilege Zones page.
Manifest
package.json
(Touched in diff metadata)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Check route constant rename impact on internal links and any external consumers.
  • Verify EntityInfoPanel pathname detection and conditional message behavior.
  • Run and validate updated tests and UI copy consistency across components and client library.

Possibly related PRs

  • SpecterOps/BloodHound#2095 — Modifies Privilege Zones fragments/PageDescription and related UI text (strongly related).
  • SpecterOps/BloodHound#1792 — Related updates to js-client-library labels and asset-group tag UI terminology.
  • SpecterOps/BloodHound#1856 — Previously changed terminology/constant for members → objects in the same areas.

Suggested labels

enhancement

Suggested reviewers

  • specter-flq
  • urangel
  • mistahj67

Poem

🐰
I hopped from "Members" to "Objects" today,
Changing routes and labels along the way.
Tests clicked anew, a header now bright,
A license tucked in, tucked in just right.
Hop, code, hop — the UI's polite delight.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: renaming 'Members' to 'Objects' throughout the UI components, with the associated Jira ticket included.
Description check ✅ Passed The description addresses the core requirements: it explains the change, provides the Jira ticket reference, mentions testing approach, and confirms checklist completion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch BED-6517

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb8242878dff1da6c8028c6fd631b7496b543ee6 and b93dcdad9073de4986324aee3ab392891ca39285.

📒 Files selected for processing (2)
  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/SelectorForm/BasicInfo.tsx (1 hunks)
  • packages/javascript/js-client-library/src/types.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-07T22:29:44.150Z
Learnt from: sirisjo
Repo: SpecterOps/BloodHound PR: 2035
File: cmd/ui/src/views/Explore/ContextMenu/AssetGroupMenuItem.test.tsx:75-77
Timestamp: 2025-11-07T22:29:44.150Z
Learning: In the BloodHound codebase (SpecterOps/BloodHound), when renaming UI terminology from "Selectors" to "Rules", the backend API endpoints (e.g., `/api/v2/asset-groups/:assetGroupId/selectors`), API client method names (e.g., `updateAssetGroupSelector`), and payload field names (e.g., `selector_name`) should remain unchanged. Only user-facing labels and text in the UI should be updated to use "Rules" terminology.

Applied to files:

  • packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/SelectorForm/BasicInfo.tsx
  • packages/javascript/js-client-library/src/types.ts
📚 Learning: 2025-09-08T19:22:49.284Z
Learnt from: jvacca-specterops
Repo: SpecterOps/BloodHound PR: 1823
File: packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/TagToZoneLabelDialog.tsx:34-35
Timestamp: 2025-09-08T19:22:49.284Z
Learning: In BloodHound's TagToZoneLabelDialog component (packages/javascript/bh-shared-ui/src/views/Explore/ExploreSearch/SavedQueries/TagToZoneLabelDialog.tsx), importing AssetGroupTag type from 'js-client-library' to type tag shapes is incorrect - this type should not be used for typing tags in this context.

Applied to files:

  • packages/javascript/js-client-library/src/types.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build BloodHound Container Image / Build and Package Container
  • GitHub Check: build-ui
  • GitHub Check: run-tests
  • GitHub Check: run-analysis
🔇 Additional comments (2)
packages/javascript/js-client-library/src/types.ts (1)

180-181: LGTM! Terminology updated correctly.

The display labels have been updated from "Members" to "Objects" with consistent capitalization. This correctly follows the established pattern of updating only user-facing text while preserving API field names (like members in lines 133 and 185).

packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Save/SelectorForm/BasicInfo.tsx (1)

228-239: Verify file location and API field consistency for Automatic Certification section.

Update from "members" to "objects" terminology is appropriate. Confirm that:

  • Capitalization is consistent across lines 228-239 (lowercase or capitalized throughout)
  • AssetGroupTagSelectorAutoCertifyMap changes affect only display labels, not API payload field names (backend auto_certify field names must remain unchanged per API contract)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

coderabbitai[bot] avatar Nov 26 '25 21:11 coderabbitai[bot]

@specter-flq yeah we talked about that. For now, we're just concentrating on what the UI presents. It's possible we'll tackle the renaming fully down the road.

Holocraft avatar Dec 02 '25 20:12 Holocraft

@specter-flq yeah we talked about that. For now, we're just concentrating on what the UI presents. It's possible we'll tackle the renaming fully down the road.

Sounds good thanks @Holocraft !

specter-flq avatar Dec 02 '25 20:12 specter-flq