~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

An issue's page shows the pulls that mention it

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:serve/item-references

What changes

Mentions on an issue's page. A pull whose title or body names an issue of its repository, by its at:// URI or its page, now shows on that issue's timeline from the time it was opened, with its state. One that names it after a closing keyword says it closes it once merged. Before, an issue showed a pull only once it had merged with Fixes. getThread answers these as mentionedBy on an issue, knotless show prints mentioned in <pull> lines, and MCP's show_item gives mentionedBy.

URIs as links. In a pull's or issue's body and its comments, a bare at:// URI of a pull or issue on the repository is drawn as a link to its page, showing its title. A Markdown link whose target is such a URI goes to the page too.

Templates. The pull and issue templates tell their writers, agents included, to name a pull or issue by its bare at:// URI, so it links.

Why

Fixes An issue's page shows nothing of the pulls that mention it until one closes it

An issue gave no sign that a pull was at work on it, or answered part of it, until that pull merged and closed it. And pull bodies, mostly written by agents, name issues by their at:// URIs, which showed as long plain text. The mentions are found from the repository's pulls and issues that getThread already has in hand, so no query or index is added.

How it was checked

Unit tests for which issues a text mentions, which pulls mention an issue, and how references are drawn. The serve forge test checks mentionedBy, the show lines and the drawn link; the MCP test checks show_item. The page was looked at with just look. The rest is left to CI.

Shortcomings

Only a pull's title and body count, not its comments, and only pulls, not issues that name other issues. No notification is sent to the issue's author. A URI of a pull or issue on another repository is left as text, since its page cannot be named from here.

🤖 Generated with Claude Code

Approved

This pull adds a mentionedBy list to an issue's thread. It lists the repository's pulls whose title or body name the issue, oldest first, with closes set after a closing keyword. The issue page, knotless show and MCP show_item all show it. A bare at:// URI of one of the repository's own pulls or issues is also drawn as a link with its title, and so is a Markdown link whose target is such a URI.

I found nothing that must change. I read the diff and could not run anything here.

  • The reference rewriting skips code, existing links and images, and a URI preceded by an alphanumeric character.
  • The text it emits is escaped, and the unit test covers a title containing <crash>.
  • The mentions come from all, which getThread already has, so no query is added and the plan check should be unaffected.
  • The lexicon change is optional and only grows the schema.
  • The docs pages for the API, CLI and MCP, the collaboration design page, the changeset and the templates are all updated with the change.

At the time of my review check had passed. test, shots, lexicons, e2e and docs were still queued, and web was running. I'm approving on the diff, and the pull still has to pass those. If shots reports a moved page, name it on a Shots-moved: line in the body.

Approved

The new commit changes only the show assertion in merges_close_the_issues_they_name, and it drops the trailing \n from the expected mention lines. The earlier test run failed on that assertion at forge.rs:644. Its output had the right two mentioned in … lines, so the test's expectation was wrong, not the code. I had nothing to change in the first round, and the one failing test looks fixed.

I can't run anything here, so I can't confirm the fix. check and test are still running on the new commit, and web, shots, lexicons, e2e and docs are queued. The earlier check, web, docs, lexicons, e2e and shots runs passed on the previous commit. The pull is already in the merge queue, so it needs test to pass before it lands. If shots reports a moved page, name it on a Shots-moved: line in the body.

Merged as 4a50b90
Merging this pull closed these issues