"New" Marker for Comments does not vanish The "New" marker above comments does not vanish in my theme. It is basically vanilla Bartik with some tweaks.
The marker is hidden by default and inserted via JS according to this comment in comment.html.twig:


  Hide the "new" indicator by default, let a piece of JavaScript ask the
  server which comments are new for the user. Rendering the final "new"
  indicator here would break the render cache.


This seems to be working as the marker is displayed after loading. The problem is that it is always displayed even on repeated views of the article. I have investigated it for some time now. It appears that the AJAX call to /history/NID/read always returns the current timestamp, not the timestamp of the previous view. Returning the timestamp of the current request does not make a lot of sense to me.

Is my analysis correct so far? Should /history/NID/read return the last instead of the current? If that is true, what could be going wrong here?

Thanks in advance,
Eric
Trying this out in vanilla Bartik doesnt have issues.
I couldn't say for sure without looking at your "modifications". But on digging a little deeper I assume it's one of the following

The reason for your issue is most likely your modifications to node.html.twig(or node--article.html.twig)


You would have rendered 'comments' outside of 

&lt;article{{ attributes}}&gt;
&lt;/article&gt;


in your template.
You would have removed a required attribute "data-history-node-id"
from

&lt;article&gt;
&lt;/article&gt;


tags in your template


Details:

/history/NID/read always returns the current timestamp

The module in question here is the new core 'history' module.
The path "/history/NID/read", if you check history.routing.yml, resolves to readNode() in HistoryController
In there you can find a call to 
history_write($node->id());
first and then followed by a call to 
history_read($node->id())
which would return the current timestamp (because it has just updated it in the previous history_write line)

According to the function description


  "Marks a node as read by the current user right now."


so it is used to mark a node as read by the user and not to get a node's last read timestamp.

The new marker logic is at core 'comments' module
comments/js/comment-new-indicator.js
processCommentNewIndicators() function.

The following line will not return a value

    var $node = $placeholder.closest('[data-history-node-id]');



if the $placeholder(marker) was not inside  tag with attribute "data-history-node-id"
if the article didn't have the attribute "data-history-node-id". Make sure you don't remove it from your node.html.twig (or equivalent)