chat spaces find: substring match by default, --exact for legacy behavior#506
Closed
mvanhorn wants to merge 1 commit intoopenclaw:mainfrom
Closed
chat spaces find: substring match by default, --exact for legacy behavior#506mvanhorn wants to merge 1 commit intoopenclaw:mainfrom
mvanhorn wants to merge 1 commit intoopenclaw:mainfrom
Conversation
…vior Closes openclaw#503 `gog chat spaces find` previously required an exact, case-insensitive match on the full displayName. Searching "Project" against a space named "My Project Team" returned no results, forcing users to fall back to `gog chat spaces list --all -p | grep`. This changes `find` to substring match (case-insensitive) by default and adds an `--exact` flag to opt into the previous behavior. The underlying Google Chat `Spaces.List` API has no server-side display name filter, so both modes iterate the same paginated result set; substring matching is strictly more permissive. Scripts that relied on the exact-match behavior can add `--exact` to keep the old semantics. Tests: - TestExecute_ChatSpacesFind_Substring: default search "project" matches "My Project Team", "Project Alpha", and "Old Project Archive" but not "Random Channel". - TestExecute_ChatSpacesFind_Exact: --exact "project alpha" matches only the space whose displayName equals "Project Alpha" (case- insensitive). - Existing TestExecute_ChatSpacesFind_JSON still passes unchanged.
steipete
added a commit
that referenced
this pull request
Apr 20, 2026
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Collaborator
|
Landed manually on main with regression coverage for substring and --exact matching.
Thanks @mvanhorn! |
Contributor
Author
|
Thanks for landing this @steipete and for adding the regression coverage. Appreciate the ping on the Workspace account blocker too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #503
`gog chat spaces find` previously required an exact, case-insensitive match on the full `displayName`. Searching `Project` against a space named `My Project Team` returned no results, and the documented workaround was `gog chat spaces list --all -p | grep`, which is slower and less ergonomic.
This change makes `find` do substring matching (case-insensitive) by default and adds an `--exact` flag to opt into the previous behavior. The underlying Google Chat `Spaces.List` API has no server-side display name filter, so both modes iterate the same paginated result set; substring matching is strictly more permissive. Scripts that relied on the exact-match behavior can add `--exact` to keep the old semantics.
Examples:
```console
default (substring, case-insensitive)
gog chat spaces find Project
returns: My Project Team, Project Alpha, Old Project Archive
legacy exact match
gog chat spaces find --exact "Project Alpha"
returns: Project Alpha
```
Tests
`go test ./internal/cmd/ -run TestExecute_ChatSpacesFind` and `go build ./...` both clean locally.