Skip to content

Conversation

@JakubKida
Copy link
Contributor

@JakubKida JakubKida commented Dec 16, 2025

Description

Adds support for taxonomy field suggestions in the metadata sidebar fetcher. Taxonomy suggestions are now properly mapped with value and displayValue properties for AI-generated suggestions.

Related issues

N/A

Changes made

  • Updated useSidebarMetadataFetcher to map taxonomy field suggestions with value and displayValue properties
  • Added test coverage for taxonomy field suggestion mapping

Type of change

  • New feature (non-breaking change adding functionality)
  • Bug fix (non-breaking change addressing an issue)
  • Breaking change (fix or feature causing existing functionality to change)
  • Code refactor (no functional changes)
  • Documentation update
  • Performance improvement
  • Test addition or update
  • CI/CD configuration change

Testing done

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Screenshots/Videos

image

Dependencies

None

Deployment notes

None

How to test

N/A

How to review

Review the implementation in useSidebarMetadataFetcher.ts to ensure taxonomy suggestions are properly mapped. Verify the test case covers the expected behavior.

Self-review checklist

  • Code follows the project's style guidelines
  • Code is properly documented (comments, JSDoc/docstrings, etc.)
  • Changes are covered by tests
  • All tests pass locally
  • No unnecessary console logs or debugging code
  • No sensitive information is exposed
  • No new warnings or errors are introduced
  • PR title follows conventional commit format

Additional notes

None

Summary by CodeRabbit

  • Chores

    • Updated UI component dependencies to latest versions.
  • Bug Fixes

    • Improved AI suggestion formatting for taxonomy metadata fields to display values with proper display names.

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

@JakubKida JakubKida requested review from a team as code owners December 16, 2025 16:13
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Updates Box UI dependencies to newer versions and modifies taxonomy field suggestion formatting in the metadata sidebar to map suggestions to objects with value and displayValue properties, with corresponding test coverage.

Changes

Cohort / File(s) Summary
Dependency Updates
package.json
Updates @box/blueprint-web (^12.98.0 → ^12.104.1), @box/combobox-with-api (^1.3.11 → ^1.18.0), and @box/metadata-editor (^1.5.3 → ^1.18.0) across dev and peer dependencies.
Taxonomy Suggestion Formatting
src/elements/content-sidebar/hooks/useSidebarMetadataFetcher.ts
Modifies extractSuggestions to construct aiSuggestion for taxonomy fields with value as an array of objects containing {value: item.id, displayValue: item.displayName} instead of leaving them unchanged.
Test Coverage
src/elements/content-sidebar/__tests__/useSidebarMetadataFetcher.test.tsx
Adds test cases verifying taxonomy field suggestions are mapped to objects with value and displayValue properties, with mocked taxonomy suggestions containing id and displayName.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Attention areas:
    • Verify the taxonomy suggestion mapping logic (item.idvalue, item.displayNamedisplayValue) aligns with downstream consumer expectations
    • Confirm test coverage adequately validates both taxonomy and non-taxonomy field paths in extractSuggestions

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • bkepka-box
  • tjuanitas
  • mborkowski-box

Poem

🐰 With hoppy steps and twitchy nose,
We bump dependencies—see how it flows!
Taxonomy now speaks in pairs so neat,
Value and display—a suggestion complete!
Tests align, the logic's bright,
Box UI elements feel just right! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically describes the main feature: adding support for parsing autofill values correctly for taxonomy fields in the metadata editor, which aligns with the changeset.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering all essential sections: clear description of changes, related issues, specific changes made, type of change (new feature), testing done (unit tests), self-review checklist completion, and review guidance.

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.

@JakubKida JakubKida closed this Dec 16, 2025
@mergify
Copy link
Contributor

mergify bot commented Dec 16, 2025

⚠️ The sha of the head commit of this PR conflicts with #4398. Mergify cannot evaluate rules on this PR. ⚠️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants