[PR #7157] [MERGED] Creative search: match every tooltip line in the selected language #7382

Closed
opened 2026-11-03 06:38:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7157
Author: @DUzzL
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/7023-creative-search


📝 Commits (2)

  • 3b421a0 Creative search: match every tooltip line in the selected language
  • 5f65649 Creative search: build the localized tooltip lines once per language

📊 Changes

1 file changed (+82 additions, -21 deletions)

View changed files

📝 crates/horizon-client/src/creative.rs (+82 -21)

📄 Description

🤖 Opened by DUzzL's AI agent (Claude Code), not by DUzzL himself.

Fixes #7023

What / why: The creative search matched only the item's localized name plus the English tooltip lines baked into the export. In another language (ru_ru) vanilla matches the localized tooltip lines (lore, effects, enchantments, ...), so items whose non-name lines match were missing, and English-only matches showed up that vanilla would not show. Now search_results also rebuilds every tooltip line through the selected language (item_tooltip::lines); the exported English lines only apply while the language is English.

Vanilla reference: SessionSearchTrees.updateCreativeTooltips builds a FullTextSearchTree over getTooltipLines(stack, Item.TooltipContext, TooltipFlag.Default.NORMAL.asCreative()) (localized, lower-cased with Locale.ROOT); CreativeModeInventoryScreen.refreshSearchResults queries it.

Verification: Rust unit test search_matches_every_localized_tooltip_line (+ existing creative tests: 5 passed). I did not compare against the issue screenshots or a Java oracle, so the exact "пч"/"еда" result lists are unverified. Known gap: attribute and jukebox-song lines need ItemInfo, which is not passed here (None).

pr_ready (--quick): scope, Cargo.lock, public tree, 611 python tests, rustfmt, clippy pass. tests: horizon-client-lib and doc tests failed on my machine with E0433 cannot find prepared_files in horizon_core in horizon-client-render (also on untouched upstream/main; cargo check and cargo test -p horizon-client --lib creative pass). Parity left to CI.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7157 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/7023-creative-search` --- ### 📝 Commits (2) - [`3b421a0`](https://github.com/horizon-rust/horizon/commit/3b421a0b6cc3ad46a3de9811951ba387afbf3524) Creative search: match every tooltip line in the selected language - [`5f65649`](https://github.com/horizon-rust/horizon/commit/5f656499f593d81c0fe5dc4ac19723f8cd662f62) Creative search: build the localized tooltip lines once per language ### 📊 Changes **1 file changed** (+82 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/creative.rs` (+82 -21) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent (Claude Code), not by DUzzL himself. Fixes #7023 **What / why:** The creative search matched only the item's localized name plus the *English* tooltip lines baked into the export. In another language (ru_ru) vanilla matches the localized tooltip lines (lore, effects, enchantments, ...), so items whose non-name lines match were missing, and English-only matches showed up that vanilla would not show. Now `search_results` also rebuilds every tooltip line through the selected language (`item_tooltip::lines`); the exported English lines only apply while the language is English. **Vanilla reference:** `SessionSearchTrees.updateCreativeTooltips` builds a `FullTextSearchTree` over `getTooltipLines(stack, Item.TooltipContext, TooltipFlag.Default.NORMAL.asCreative())` (localized, lower-cased with Locale.ROOT); `CreativeModeInventoryScreen.refreshSearchResults` queries it. **Verification:** Rust unit test `search_matches_every_localized_tooltip_line` (+ existing creative tests: 5 passed). I did not compare against the issue screenshots or a Java oracle, so the exact "пч"/"еда" result lists are unverified. Known gap: attribute and jukebox-song lines need `ItemInfo`, which is not passed here (`None`). pr_ready (--quick): scope, Cargo.lock, public tree, 611 python tests, rustfmt, clippy pass. `tests: horizon-client-lib` and doc tests failed on my machine with `E0433 cannot find prepared_files in horizon_core` in `horizon-client-render` (also on untouched upstream/main; `cargo check` and `cargo test -p horizon-client --lib creative` pass). Parity left to CI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:38:42 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7382
No description provided.