GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: match PR number prefixes in chat search by ibetitsmike · Pull Request #30404 · coder/coder

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Chat search now matches PR numbers by prefix, so typing 3028 already finds the chat for PR 30281 instead of showing zero results mid-typing.

The free-text search: branch in GetChats switches from pr_number = @search::bigint to pr_number::text LIKE @search || '%', still guarded by a digits-only regex so the value can never carry LIKE wildcards. The lookup stays a correlated per-chat EXISTS on the chat_diff_statuses primary key, which leads with chat_id, so the cost is the same as before and no new index is needed. The explicit pr: filter stays exact, and ordering is unchanged (no exact-match ranking) so cursor pagination is unaffected.

Behavior note: values with leading zeros (030281) no longer match PR 30281, since the old bigint cast normalized them. PR numbers never have leading zeros, so this seemed fine.

Closes CODAGT-1342

Testing

  • TestGetChatsSearch gains prefix (4 -> PR 42), no-infix (2 -> none), and LIKE-wildcard (4% -> none) cases; the prefix case fails on the old predicate.
  • Dogfood UAT through Coder Agents on the branch: searching 3, 302, 3028, 30281 all surface the PR-linked chat; 0281 and 302810 do not; pr:3028 stays exact.

Note

This PR was created by Xum acting on behalf of @ibetitsmike.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
ibetitsmike added 2 commits October 6, 2026 09:38
@ibetitsmike
feat: match PR number prefixes in chat search
d26728e
Free-text chat search now matches PR numbers by prefix, so typing 3028
finds PR 30281. The explicit pr: filter stays an exact match.

Refs CODAGT-1342
@ibetitsmike
test(coderd/database): guard LIKE wildcards in PR number search
e5dcdfd
The digit-only guard now keeps LIKE metacharacters out of the PR
number prefix lookup. The old non-numeric case passed whether or not
the guard existed, so use a wildcard input that matches every PR when
the guard is removed.
@linear-code

linear-code Bot commented Oct 6, 2026

Copy link
Copy Markdown

CODAGT-1342

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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-06T10:55:14.426142Z a679f0d Manual request
ℹ️ 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned ibetitsmike Oct 6, 2026
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 6, 2026
View reviewed changes

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

Copy link
Copy Markdown

There was a problem hiding this comment.

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: e5dcdfdc8d

ℹ️ 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".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/ai-coder/agents/chat-search-syntax.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

ibetitsmike added 2 commits October 6, 2026 10:38
@ibetitsmike
Merge remote-tracking branch 'origin/main' into mike/chat-search-pr-p…
444c8f5
…refix

# Conflicts:
#	coderd/database/queries.sql.go
@ibetitsmike
docs: keep the PR number prefix sentence on one line
a679f0d
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

  • docs/ai-coder/agents/chat-search-syntax.md
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike

ibetitsmike commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: a679f0d362

ℹ️ 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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pr-queue-manager
pr-queue-manager Bot requested review from ThomasK33 and f0ssel and removed request for ThomasK33 October 6, 2026 13:56
f0ssel
f0ssel approved these changes Oct 6, 2026
View reviewed changes
@ibetitsmike
ibetitsmike merged commit e468234 into main Oct 6, 2026
32 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ibetitsmike
ibetitsmike deleted the mike/chat-search-pr-prefix branch October 6, 2026 20:43
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
@f0ssel f0ssel f0ssel approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ibetitsmike ibetitsmike

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ibetitsmike @f0ssel
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.