How to permalink a comment

Reproduction Instructions

  • Have a long Maniphest task.
  • Click on the anchor/timstamp of an early comment.
  • Link someone to the resulting address, e.g. open in a new tab.

Expected: The browser opens the task and scrolls the comment in questin into the view.

Actual: The task is opened on its default view with the last few comments, and the anchor appears to be ignored/dead-end.

Example: https://phabricator.wikimedia.org/T176916#4293822 (meant to point to a 15 Jun 2018 comment of mine).

Phabricator/Arcanist Version

I’ve tried to workaround through a handcrafted URL that I don’t expect to be supported, but seemed to get close: https://phabricator.wikimedia.org/T176916?after=4431923#4293822 Using the after parameter, I forced it to load the relevant HTML. However it seems stuff shuffles around in the wrong order so the comment in question doesn’t end up anywhere near the viewport.

EDIT: Okay, so, when I open the original example in private browsing mode (logged-out), it actually works! This is what I remember… So it seems to only not work when I’m logged-in?

weird, it works for me™ when logged in, using the url with or without the after= query param.

1 Like

There are two pieces of folding logic: one folds older comments, and one folds comments from before your most recent comment. The latter piece of logic only activates if you’re logged in and have previously commented.

This might be an interaction between the “your most recent comment” code and the “jump to anchor” code. If so, the reproduction instructions may be something like this:

  • Create a task (or other object with transactions).
  • Have users other than you apply some transactions to the task.
  • Comment on the task.
  • Visit a permalink to some comment (earlier than your most recent comment?) on the the task.

I’ll see if I can reproduce this, but it may be a pretty narrow issue.

1 Like