Fix pull request links in bot answers including trailing punctuation #152

Open
opened 2026-07-28 21:43:07 +02:00 by retoor · 15 comments
Owner

Summary

When the bot posts a pull request URL at the end of a sentence, the trailing punctuation (e.g., a period) is included inside the hyperlink, making the URL invalid and resulting in a 404 error.

Steps to Reproduce

  1. The bot posts a comment containing a pull request URL at the end of a sentence.
  2. The URL is immediately followed by a punctuation mark (such as a period).

Expected Behaviour

The hyperlink should end at the URL and not include any trailing punctuation. The punctuation should appear outside the link.

Actual Behaviour

The punctuation is mixed into the hyperlink, causing the link to point to an invalid URL and return a 404 error.

Environment

Not provided.


Reported by Alice via DevPlace.

## Summary When the bot posts a pull request URL at the end of a sentence, the trailing punctuation (e.g., a period) is included inside the hyperlink, making the URL invalid and resulting in a 404 error. ## Steps to Reproduce 1. The bot posts a comment containing a pull request URL at the end of a sentence. 2. The URL is immediately followed by a punctuation mark (such as a period). ## Expected Behaviour The hyperlink should end at the URL and not include any trailing punctuation. The punctuation should appear outside the link. ## Actual Behaviour The punctuation is mixed into the hyperlink, causing the link to point to an invalid URL and return a 404 error. ## Environment Not provided. --- *Reported by **Alice** via DevPlace.*
Collaborator

I am picking this ticket up now.

First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.

I am picking this ticket up now. First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.
Collaborator

Starting research round 1 of at most 5.

I am now reading the relevant source, tests, and prior work in the live checkout to verify the ticket and gather the context needed for a concrete plan. This can take a while; I will post periodic progress updates until it completes.

Starting research round 1 of at most 5. I am now reading the relevant source, tests, and prior work in the live checkout to verify the ticket and gather the context needed for a concrete plan. This can take a while; I will post periodic progress updates until it completes.
Collaborator

Investigated the ticket against the current source and tests. The research findings confirm that both rendering.py and ContentRenderer.js match trailing punctuation as part of the URL, producing broken links. No existing fix addresses these specific renderers, and the ticket's description matches the observed defect.

The issue is clearly identified and actionable without further investigation. Decision: proceed. Next steps involve drafting a concrete implementation plan.

Investigated the ticket against the current source and tests. The research findings confirm that both `rendering.py` and `ContentRenderer.js` match trailing punctuation as part of the URL, producing broken links. No existing fix addresses these specific renderers, and the ticket's description matches the observed defect. The issue is clearly identified and actionable without further investigation. Decision: proceed. Next steps involve drafting a concrete implementation plan.
Collaborator

I am drafting the implementation plan now.

The research confirmed the ticket; I am turning the findings into a concrete, verifiable plan.

I am drafting the implementation plan now. The research confirmed the ticket; I am turning the findings into a concrete, verifiable plan.
Collaborator

The implementation plan has been drafted based on the investigation findings. The plan specifies changes to _embed_url in devplacepy/rendering.py and the client-side URL renderer in ContentRenderer.js to strip trailing punctuation from bare URLs and render it outside the <a> element. Unit tests are included for the server-side fix, and the definition of done outlines verification steps.

The plan is now being handed to the execution agent for implementation.

The implementation plan has been drafted based on the investigation findings. The plan specifies changes to `_embed_url` in `devplacepy/rendering.py` and the client-side URL renderer in `ContentRenderer.js` to strip trailing punctuation from bare URLs and render it outside the `<a>` element. Unit tests are included for the server-side fix, and the definition of done outlines verification steps. The plan is now being handed to the execution agent for implementation.
Collaborator

The full, verbatim implementation plan is attached: plan-ticket-152.md

The full, verbatim implementation plan is attached: [plan-ticket-152.md](https://retoor.molodetz.nl/attachments/affe9d0d-a00f-4834-a9e1-8f4b1be663b7)
Collaborator

Starting implementation attempt 1 of at most 5.

I am executing the plan inside this ticket's isolated workspace. This can take a while; I will post periodic progress updates until it completes.

Starting implementation attempt 1 of at most 5. I am executing the plan inside this ticket's isolated workspace. This can take a while; I will post periodic progress updates until it completes.
Collaborator

Progress update: implementation attempt 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: implementation attempt 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

Implementation attempt 1 finished; I am verifying it now.

Running the project's own build, test, and lint commands against the change.

Implementation attempt 1 finished; I am verifying it now. Running the project's own build, test, and lint commands against the change.
Collaborator

The change was implemented on the first attempt, and all configured build, test, and lint commands completed successfully. The project's own validation checks therefore passed without issue.

Next steps are to commit the work, push the branch, and open a pull request for review.

The change was implemented on the first attempt, and all configured build, test, and lint commands completed successfully. The project's own validation checks therefore passed without issue. Next steps are to commit the work, push the branch, and open a pull request for review.
Collaborator

I am delivering the change now.

Committing the verified change, pushing branch typosaurus/ticket-152, and opening a pull request.

I am delivering the change now. Committing the verified change, pushing branch `typosaurus/ticket-152`, and opening a pull request.
typosaurus referenced this issue from a commit 2026-07-28 22:03:04 +02:00
Collaborator

Pushed the change to branch typosaurus/ticket-152 and opened pull request #153. The implementation passed the project's internal checks. Monitoring the pull request for review, merge, or further feedback.

Pushed the change to branch `typosaurus/ticket-152` and opened pull request #153. The implementation passed the project's internal checks. Monitoring the pull request for review, merge, or further feedback.
Author
Owner

I mean, to be fair, it's valid to interprete a trailing period as potentially being part of the URL. I would suggest escaping the punctuation in the bot replies instead or using hyperlink markdown format to properly isolate the link in them. Changing how the automatic link detection works in general, just to remove an ending period, can potentially break it for others.


Posted by Alice via DevPlace.

I mean, to be fair, it's valid to interprete a trailing period as potentially being part of the URL. I would suggest escaping the punctuation in the bot replies instead or using hyperlink markdown format to properly isolate the link in them. Changing how the automatic link detection works in general, just to remove an ending period, can potentially break it for others. --- *Posted by **Alice** via DevPlace.*
Author
Owner

Thanks for delivering half of the solution bots.


Posted by retoor via DevPlace.

Thanks for delivering half of the solution bots. --- *Posted by **retoor** via DevPlace.*
Author
Owner

@retoor not just that, the bot that formats and "fixes" the issue reports before posting them, stripped my description by half the stuff I said lol


Posted by Alice via DevPlace.

@retoor not just that, the bot that formats and "fixes" the issue reports before posting them, stripped my description by half the stuff I said lol --- *Posted by **Alice** via DevPlace.*
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: retoor/devplacepy#152
No description provided.