Skip to content

Make the start point search ignore case - #546

Merged
lmonteirotech merged 2 commits into
mainfrom
fix/start-point-search-case
Oct 28, 2026
Merged

lmonteirotech merged 2 commits into
mainfrom
fix/start-point-search-case

Conversation

@lmonteirotech

Copy link
Copy Markdown
Contributor

Requested by Leo · project thread

Fixes #535.

What

The start point picker (Maps → Start → Choose the start point) passed the typed query as is to matches, which only lowercases the entry name. A query with a capital letter ("Laranjeiras") found nothing. The picker now lowercases and trims the query through a small entry_matches helper.

Tests

New unit test start_point_search_ignores_case (capitalised, upper case, padded, empty and non-matching queries). Written against the old behaviour it fails for "Laranjeiras". Not run locally (the container lacks system libs for the build); CI runs it.

Scope

No new strings, no behaviour change besides the search. The map preview in this picker showing only entry points (no streets) was reported as probably performance on the tester's laptop and is deliberately not touched here.

Provenance

Own change, no third-party code.


Generated by Claude Code

Fixes #535.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MpWbDtJZDUXbNzqBGZthUm
@lmonteirotech lmonteirotech self-assigned this Oct 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T11:37:20.927175Z 8a4432e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lmonteirotech lmonteirotech left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CHANGES REQUESTED (one small point, on the head 8a4432e; posted as a comment because the PR is on the same account as this review)

Independent review against main f6a59fe (the head is based on current main).

Fine

  • Scope is minimal: one filter line in start_point, a small entry_matches helper, one changelog line. super::ui::matches already expects a lowercased query, so lowercasing and trimming in the helper is the right fix, and the empty case still shows every entry.
  • No new strings and no locale impact. The changelog line sits under Fixed and cites #535. Provenance is clean (own change), and the commit message has nothing forbidden.
  • The test covers "Laranjeiras", " LARANJEIRAS ", lowercase, empty and a non-match. It would fail on the old behaviour for the capitalised query.

To change

  • #527 (merged into main minutes ago) moved every launcher test out of src/, and its description says that after it omsi-app has no test left in src/. This PR adds an inline #[cfg(test)] mod tests to crates/omsi-app/src/launcher/start.rs, which goes against that convention. Please move the test to crates/omsi-app/tests/app/launcher/start.rs, which already does use openomsi_game::testing::launcher::start::*;. That needs entry_matches to be pub (the module is re-exported through testing::launcher). Visibility is the only change outside the test.

Not verified

  • CI was still running on this head when I looked (only provenance had finished, green). The test has not been run by anyone yet. After the move, the merge rule still needs CI 7/7 on the new head.

Generated by Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a4432e917

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/omsi-app/src/launcher/start.rs Outdated
Comment on lines +849 to +851
#[cfg(test)]
mod tests {
use super::entry_matches;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move the regression test into the existing integration suite

The new inline test module violates the repository's explicit testing convention: CONTRIBUTING.md, made mandatory by AGENTS.md, requires tests under each crate's tests/ directory and access to internals through testing behind test-support. This module already has tests in crates/omsi-app/tests/app/launcher/start.rs and a corresponding testing::launcher::start export. Add the regression there and expose the helper through the established testing surface rather than reintroducing tests under src/.

AGENTS.md reference: AGENTS.md:L43-L43

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4b93bd1: the test now lives in crates/omsi-app/tests/app/launcher/start.rs, entry_matches is pub (reached through testing::launcher::start), and the inline mod tests is gone.


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MpWbDtJZDUXbNzqBGZthUm

@lmonteirotech lmonteirotech left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVED on the head 4b93bd1 (posted as a comment because the PR is on the same account as this review)

Re-reviewed the exact head against main f6a59fe (still the base).

  • The point from my earlier review is fixed: the inline mod tests is gone from src/, the test start_point_search_ignores_case now lives in crates/omsi-app/tests/app/launcher/start.rs (which already imports testing::launcher::start::*), and entry_matches is pub, the only visibility change, as #527 did.
  • Scope stays minimal: one filter line, the helper, the test and one Fixed line in the changelog citing #535. No new strings, no locale impact. Provenance is clean and neither commit message has anything forbidden.
  • The test covers a capitalised, upper-case padded, lowercase, empty and non-matching query, and fails on the old behaviour for "Laranjeiras".

Condition for merging: CI 7/7 on this exact head. I did not run the tests here, and I did not wait for CI.


Generated by Claude Code

@lmonteirotech
lmonteirotech merged commit 7bc4472 into main Oct 28, 2026
7 checks passed
@ZaneThurston
ZaneThurston deleted the fix/start-point-search-case branch October 29, 2026 15:55
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.

Start point search finds nothing when the query has a capital letter

2 participants