Skip to content

[Bug]: GitLab chat autocomplete resolves #issue references to merge requests #39182

Open

Description

@VolkerH

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web (also applies to the desktop chat composer)

Initial voice dictated/transcribed prompt

Can you do some research (look at open issues and MRs) So there's an issue where when you press an exclamation mark or actually this is wrong, there's an issue where if you pressure press a hash and a number when you're in a Gitlab project rather than a GitHub project, then it will rather than looking up the issue which for Gitlab is preceded with a hash, it will look up the merge request with the same number where Gitlab usually refers to merge requests with exclamation mark number, so this is handled incorrectly at least in the version that I'm currently using maybe this has already been fixed in a later version and maybe there's already an existing issue one way this manifests is that it appears that if it thinks it's linking to a merge request, say for example merge request six hundred and forty when I was trying to reference issue six hundred and forty it will go and find merge request six hundred and forty on Gitlab anyway and use the title of that for building the sidebar heading for that chat so it's very annoying because I've had basically completely unrelated titles to what I was working on

Steps to reproduce

  1. Open a GitLab project that has an issue and an unrelated merge request with the same project-local number, such as issue #640 and merge request !640.
  2. Start a new T3 Code chat for that project and type Investigate #640. Check the autocomplete suggestion.
  3. Accept the suggestion, send the message, and check the generated thread title in the sidebar.
  4. In a new draft, type Investigate !640 and check for a merge request suggestion.

Expected behavior

In a GitLab project, #640 should resolve to issue 640 and !640 should resolve to merge request 640. Accepting the issue suggestion should give the chat and title generator the issue's context. GitLab reference syntax

Actual behavior

The chat composer treats #640 as a pull request lookup, so it offers GitLab merge request !640. Typing !640 opens no reference menu. Accepting the #640 suggestion attaches the unrelated merge request, and a user reported that the generated sidebar title then reflected the merge request they never intended to reference.

The chat trigger classifies #640 as a pull request query. The selection handler attaches the selected merge request, and the title generation service can use linked source-control context.

Impact

Minor bug or occasional failure. The wrong item is brought into the conversation and can give the thread an unrelated title.

Version or commit

Verified the parser directly on stable v0.1.10, nightly v0.1.11-nightly.20261119.4941, and main at a1e7ac2b24. The sidebar symptom comes from the user report and the code trace.

Workaround

Paste the full GitLab issue URL ending in /-/issues/640 to bypass numeric autocomplete.

Related work

#30857 implements the GitLab # and ! distinction in merge request comments and descriptions. #27902 was a broader chat autocomplete proposal that was closed without merging.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions