fix: show no tooltip for text the reserved system author holds - #141
Conversation
Etherpad attributes inserts to `a.etherpad-system` when no real author made them — the default pad content written on pad creation, HTTP API setText/appendText/setHTML calls without an authorId, server-side imports. Core deliberately ships no `globalAuthor:` record for it and keeps it out of `historicalAuthorData` and `listAuthorsOfPad` (ether/etherpad#8044), so hovering over the welcome text fell all the way through to the "Unknown Author" fallback. Nobody wrote that text, so show nothing rather than claiming an unknown someone did. Adds Playwright coverage for both sides: a tooltip still appears over your own writing, and none appears over system-authored text. The latter fails on the pre-fix build with "UNKNOWN AUTHOR". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code Review by Qodo
1.
|
PR Summary by QodoFix: suppress author tooltip for Etherpad system-authored text
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
Review catch: the early return skipped showAuthor.destroy(), and tooltips stay on screen for ~1.2s while they fade, so moving the pointer from a real author's text onto system-authored text could leave the previous author's label visible over text nobody wrote. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follow-up to ether/etherpad#8044 / ether/etherpad#8090, on the plugin side.
Problem
a.etherpad-systemis the reserved id Etherpad attributes inserts to when no real author made them: the default pad content written on pad creation, HTTP APIsetText/appendText/setHTMLwithout anauthorId, and server-side imports. It's changeset bookkeeping, not a contributor — core ships noglobalAuthor:record for it and filters it out ofhistoricalAuthorDataandlistAuthorsOfPad.So hovering the welcome text on any fresh pad fell through every lookup (not me → not in the user list → not in
historicalAuthorData) and landed on the "Unknown Author" fallback. Verified in a browser before the fix — the tooltip reads UNKNOWN AUTHOR.Fix
Return early in
show()when the hovered span belongs to the system author. Nobody wrote that text, so no tooltip is better than naming an unknown someone.Tests
Two new Playwright specs:
The second one fails on the pre-fix build with
Received: "UNKNOWN AUTHOR"and passes after. Both were run against a local Etherpad with this branch installed — 4/4 green.🤖 Generated with Claude Code