I have this user style: https://userstyles.world/style/13140/wikimedia-phabricator-reduce-gerritbot-comments
Many people told me they find it very useful, and that it should just be a default feature.
Let's see if we can make that happen.
| matmarex | |
| May 3 2025, 8:39 PM |
| F71470893: firefox_JVF5FVp2EM.webm | |
| Jan 8 2026, 8:18 PM |
| F71469058: firefox_ADGnKPC6yo.webm | |
| Jan 8 2026, 3:41 PM |
| F71467890: image.png | |
| Jan 8 2026, 10:44 AM |
| F59789403: Untitled.png | |
| May 8 2025, 9:23 PM |
| F59763881: firefox_dhUe4vcNRt.webm | |
| May 8 2025, 3:17 AM |
I have this user style: https://userstyles.world/style/13140/wikimedia-phabricator-reduce-gerritbot-comments
Many people told me they find it very useful, and that it should just be a default feature.
Let's see if we can make that happen.
| Title | Reference | Author | Source Branch | Dest Branch | |
|---|---|---|---|---|---|
| Expand Stashbot comments on hover | repos/phabricator/phabricator!112 | matmarex | reduce-bot-comments-stashbothover | wmf/stable | |
| Reduce bot comments and hide some bot actions | repos/phabricator/phabricator!90 | matmarex | reduce-bot-comments | wmf/stable |
I didn't quite get this done during the hackathon, but I talked to @Aklapper about how to do it and convinced him to accept it ;)
I also talked to @Aklapper and @valerio.bozzolan about whether any parts of the style could be implemented upstream in Phorge, and filed https://we.phorge.it/T16050 with some ideas, but other upstream devs don't seem to like the idea very much. We also talked a bit about introducing a new type of transaction that Gerritbot could use, or a new "parameter" for the comment transaction, but this seemed risky to add to Phorge and would also require changes on our side in Gerritbot, and I feel that nobody really wants to touch it.
If it’s enabled by default, will there be a user preference to disable it? I also love the style (don't get me wrong!), but I can imagine that there might be some times (e.g. debugging @gerritbot/@Maintenance_bot/etc) when I might want to temporarily disable it.
Judging by https://wikitech.wikimedia.org/wiki/Gerrit/Phabricator_integration, potentially at https://gerrit.googlesource.com/plugins/its-phabricator, with some local configuration in operations/puppet
I'm not planning to add a preference. For debugging, you can still view the original comment's source using the menu in the top-right corner of the comment, I hope that'll be good enough.
/* Hide #Patch-for-review added (gerritbot) */
/* Hide #Patch-for-review removed (Maintenance_bot) */
/* Hide "Stashbot mentioned this in…" when multiple patches are deployed at once */
.phui-timeline-minor-event a.phui-timeline-image[href="/p/gerritbot/"],
.phui-timeline-minor-event a.phui-timeline-image[href="/p/gerritbot/"] ~ .phui-timeline-wedge,
.phui-timeline-minor-event a.phui-timeline-image[href="/p/Maintenance_bot/"]:has( ~ .phui-timeline-group a.phui-handle[href="/tag/patch-for-review/"] ),
.phui-timeline-minor-event a.phui-timeline-image[href="/p/Maintenance_bot/"] ~ .phui-timeline-wedge:has( ~ .phui-timeline-group a.phui-handle[href="/tag/patch-for-review/"] ),
.phui-timeline-minor-event a.phui-timeline-image[href="/p/Stashbot/"],
.phui-timeline-minor-event a.phui-timeline-image[href="/p/Stashbot/"] ~ .phui-timeline-wedge{
display: none;
}
.phui-timeline-minor-event a.phui-timeline-image[href="/p/gerritbot/"] ~ .phui-timeline-group,
.phui-timeline-minor-event a.phui-timeline-image[href="/p/Maintenance_bot/"] ~ .phui-timeline-group:has( a.phui-handle[href="/tag/patch-for-review/"] ),
.phui-timeline-minor-event a.phui-timeline-image[href="/p/Stashbot/"] ~ .phui-timeline-group{
height: 0;
visibility: hidden;
pointer-events: none;
margin-top: -16px;
}Silently hiding information by default with no way of showing it seems downright scary. I, in particular, have been going through Patch-For-Review and removing tasks that don't have a patch pending review or switching to Patch-Needs-Improvement at various times , and figuring out when and why those tags were added and removed is sometimes helpful there.
Likewise hiding Stashbot mentions will result in the tasks being listed as related objects with no obvious reason why they're related.
(I'm also not convinced this is a good idea in the first place - it seems better to show what happened from a technical perspective rather then trying to present a cleaned-up veneer of it, but I'm well aware I'm a minority of one on that area)
T152729: Integrate Stashbot better visually with Phabricator has some discussion from the way long ago with @epriestley about similar topics for @Stashbot's on-task notes.
Just for you, I implemented something terrible:
When a timeline entry is hidden, a little chevron / expand icon appears next to the previous entry, which you can hover to view the hidden entry. I'm pretty sure you're the only person who's ever going to use these things. No more complaints please ;)
(I pushed the update to userstyles.world; this video was recorded using T374314#10129809 as the example)
matmarex opened https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/merge_requests/90
Reduce bot comments and hide some bot actions
I love how I failed following the GitLab docs rebasing Matmarex' proposed patch and instead ended up creating https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/tree/phabricator-reduce-bot-comments (which I now deleted again), without updating the actual merge request.
And pushing a rebase to https://gitlab.wikimedia.org/matmarex/phabricator/-/tree/reduce-bot-comments does not update https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/merge_requests/90/diffs.
GitLab... we are not best friends.
I updated the merge request (rebased and updated to the latest version of the user style from https://userstyles.world/style/13140, with some improvements suggested by @Krinkle).
The last step was git push git@gitlab.wikimedia.org:matmarex/phabricator.git reduce-bot-comments -f, which took effect on the existing merge request.
aklapper merged https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/merge_requests/90
Reduce bot comments and hide some bot actions
Is there a way to get the more verbose state back, I can see the initial benefit of deprioritizing this data in the UI, but for example, having no way to see the full message here or track whether Patch-For-Review was added (which is prefereable in multi-patch tasks) is imo a net negative change in this context. (attaching how cut-off messages).
FWIW I concur with generally wanting to see the full version of @Stashbot comments - I believe I made the same change to the user-styles myself locally before they were deployed with Phab - but I obviously don't know whether that opinion is shared by the majority of people who used these styles / who use Phabricator :)
(Also FWIW, I also just filed T414083: Create a user-preference to enable/disable the Phabricator style that reduces bot-comments, after a brief look at the code made it seem like (hopefully) a relatively easy thing to be able to implement)
For timeline items adding/removing Patch-For-Review, at least on desktop, there is supposed to be a little icon on the side where they are hidden that you can hover to reveal them. They don't appear right now due to some CSS processing Phabricator does that broke my CSS, but it will be fixed soon by @Pppery's patch.
For @Stashbot comments, you can click them to view the full SAL entry. I could make them also expand on hover, if that would be helpful?
matmarex opened https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/merge_requests/112
Expand Stashbot comments on hover
This is working towards one of my concerns (I'm no longer able to see complete SAL entry easily). Only one suggestion – could we make this on-click rather than on-hover? It would make it easier to copy things around and/or write a comment on the task without having to have my cursor on the SAL entry.
Only one suggestion – could we make this on-click rather than on-hover?
As long as the customizations use only CSS, that is not really possible :( You can however quote/view the text using the dropdown menu in top-right corner.
This also hurts mobile usability, where hovering is less of a thing. It does work (tested https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/blob/8be507311a1b5874416e09e85ed20365ac2b3651/webroot/rsrc/css/phui/phui-timeline-view-wikimedia.css on T413525 in Firefox for Android, your mileage in other browsers may vary), but it’s hard to discover.
Unless you piggyback on existing JavaScript code. A wild idea: expand it when the dropdown menu is open – for example,
.phui-timeline-major-event a.phui-timeline-image[href="/p/Stashbot/"] ~ .phui-timeline-group .phabricator-remarkup:hover {
would be expanded to
.phui-timeline-major-event a.phui-timeline-image[href="/p/Stashbot/"] ~ .phui-timeline-group .phabricator-remarkup:hover, .phui-timeline-major-event a.phui-timeline-image[href="/p/Stashbot/"] ~ .phui-timeline-group .phui-timeline-menu.phuix-dropdown-open .phabricator-remarkup {
aklapper merged https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/merge_requests/112
Expand Stashbot comments on hover
FYI we just deployed some additional improvements to this feature, based on provided feedback.
I tested the new version on mobile, and the triangles are simply off-screen (on body.device-phone, the margin of .phui-timeline-event-view is set to zero, thus not leaving enough space for the triangle), making it impossible to reveal the hidden entries. ☹ Please do something about this. One obvious option is simply constraining the styles to body.device-desktop, although the clutter is probably the most annoying exactly on mobile, due to the space constraints, so this option may not be the best one.
Any tips for disabling this locally? I'm interested in keeping Gerrit patch notifications at a higher weight than things like subscribing to the ticket (i.e. how things used to be).
I looked into adblocking the file phui-timeline-view-wikimedia.css, but it looks like it's bundled into a much bigger CSS file.
I have a tampermonkey script that AI wrote that kind of restores things, but it has a lot of bugs / is ugly.
I understand that I am probably in the minority so I am not asking for the feature to be reverted. Am just asking for help disabling it locally.
Although I'm not against this idea, an option in preferences should be welcome.
In addition, to improve consistency with Phab native actions, I would propose changes to relevant bot comments to mark usernames as bold, e.g.:
Highlighting change ID is also acceptable to me (see below), so I would like to hear your ideas on this, thanks.
I don’t have a strong opinion on the change in general, but I think both hiding the comment and requiring the user to hover over it to actually see it once it’s not hidden is a weird overkill that I don’t see any motivation for. If there is a (fairly prominent) UI part that shows the comment, then it should show the comment, not show the blurred version of it.
Agreed with stjn - the blur when hovering over the arrow icon could be dispensed with.
(Just wanted to make a note that I want to respond and make some improvements to the styles, but I haven't gotten around to it yet. I promise that I will, though.)