The in-page update for new questions (when sorting by Newest) or updated ones (when sorting by Activity) does not show up on Meta Stack Exchange. Both on the /questions page or a custom filter as well as when looking at tagged questions.
The socket is live - I still get updates for my notifications and achievements. Any messages for question activity seem to be ignored. Here is a log of the data I get through the websocket:
|Questions/List|394647|4541793|13594|meta.stackexchange.com|1727676892|
4-questions-active
4-394647-reputation
4541793-topbar
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":0}}"}
{"action":"4-questions-active","data":"{\"id\":\"403239\",\"tags\":[\"bug\"],\"siteid\":4,\"noAnswers\":true,\"hasBounty\":false}"}
{"action":"hb", "data":"pong"}
pong
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"4541793-topbar","data":"{\"Achievements\":{\"UnreadRepCount\":10}}"}
{"action":"hb", "data":"pong"}
pong
{"action":"4541793-topbar","data":"{\"Achievements\":{\"UnreadRepCount\":0,\"UnreadNonRepCount\":0}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":0}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":2}}"}
{"action":"hb", "data":"pong"}
pong
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":3}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":4}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":5}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":4}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":3}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":2}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":2}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":0}}"}
{"action":"hb", "data":"pong"}
pong
{"action":"hb", "data":"pong"}
pong
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":0}}"}
{"action":"hb", "data":"pong"}
pong
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":0}}"}
{"action":"hb", "data":"pong"}
pong
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"4541793-topbar","data":"{\"Achievements\":{\"UnreadRepCount\":0,\"UnreadNonRepCount\":0}}"}
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":0}}"}
{"action":"hb", "data":"pong"}
pong
{"action":"hb", "data":"pong"}
pong
{"action":"hb", "data":"pong"}
pong
{"action":"4-questions-active","data":"{\"id\":\"370131\",\"tags\":[\"bug\",\"status-bydesign\",\"safari\",\"mac\",\"dark-mode\"],\"siteid\":4,\"noAnswers\":false,\"hasBounty\":false}"}
{"action":"hb", "data":"pong"}
pong
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":1}}"}
{"action":"hb", "data":"pong"}
pong
{"action":"hb", "data":"pong"}
pong
{"action":"4541793-topbar","data":"{\"Inbox\":{\"UnreadInboxCount\":2}}"}
{"action":"4-questions-active","data":"{\"id\":\"402813\",\"tags\":[\"discussion\",\"featured\",\"announcements\",\"roadmap\"],\"siteid\":4,\"noAnswers\":false,\"hasBounty\":false}"}
{"action":"hb", "data":"pong"}
(I assume the "action":"4-questions-active"
entries are supposed to bring up the in-page notification that something was updated. But I did not get that.)
The cause of the bug is a combination of:
- Having set ignored tags to be hide.
- Not having any ignored tags.
The issue is in this code from full.en.js - when the websocket reports an activity, this code determines whether to show you that activity or not (if the active question is in your ignored and hidden tags):
const isIgnored = function (tags) {
if (!hideIgnored()) {
return false;
}
var $ignoredTags = find('.js-ignored-tag-list .post-tag');
var ignoredSelector = getTagsSelector($ignoredTags, true);
// translate return value (jquery specific selectors) of getSingleTagSelector to a regex we can test against a string
var ignoredTagExpressions = ignoredSelector.split(/,(?!\s)/).map((s) => {
const selectorStartsWith = /^\[class\*=' t-(.+?)'\]$/;
const selectorRegex = /^:regex\(class, t-(.+?)\)$/;
let regexStr;
if (selectorStartsWith.test(s)) {
// [class*=' t-tag'] > tag.*
regexStr = s.match(selectorStartsWith)[1] + '.*';
}
else if (selectorRegex.test(s)) {
// :regex(class, t-t.*name) > t.*name
regexStr = s.match(selectorRegex)[1];
}
else {
// .t-tagname > tagname
regexStr = s.replace(/^\.t-/, '');
}
// put the className reserved characters back, but escaped so they aren't mistaken for regex reserved characters
regexStr = regexStr.replace('ñ', '#').replace('ç', String.raw `\+`).replace('û', String.raw `\.`);
return new RegExp(regexStr);
});
return ignoredTagExpressions.length > 0 && tags.some((t) => ignoredTagExpressions.some((s) => s.test(t)));
};
The early exit at the start is bypassed because of 1. - the ignored tags are set to hide.
Then var ignoredSelector = getTagsSelector($ignoredTags, true);
returns an empty string because of 2. - I have no ignored tags.
That empty string is split and mapped over to get the list of ignores. The final result is one single regular expression that will be used to check if any of the tags in the question is ignored. That regular expression is /(?:)/
which matches an empty string. Therefore it will match anything:
const regex = /(?:)/;
console.log(regex.test("discussion"));
console.log(regex.test("bug"));
console.log(regex.test("support"));
console.log(regex.test("feature-request"));
console.log(regex.test("banana"));
console.log(regex.test(""));
Thus considering any activity to be "hidden".
As a workaround: either set an ignored tag or set the ignored tags to grey out.
isIgnored
function last changed in full.en.js sometime between 2022-01-26 and 2022-03-01. The version inisIgnored
on 2022-03-01 was the same as it is today. Thus, this being a recent thing for you is a function of your settings, not a change in SE's code. cc @ShadowWizard, as it's definitely not a result of the change you've linked that causes downvoted questions to be shown on the homepage.