fix(pages): comment box polish — selection lock, plain Enter to send, hide resolved pins (SUPER-2252, SUPER-2272, SUPER-2201)
What
SUPER-2252 — while a pick's toolbar, composer, or an existing thread's popover is open, the page could show two highlighted select areas at once and a click on another part of the page would silently jump the selection instead of requiring the open one to be dismissed first.
SUPER-2272 — the comment composer required Cmd/Ctrl+Enter to submit, with a "⌘↵ to send" hint taking up footer space. Plain Enter now submits (Shift+Enter still inserts a newline), and the hint is removed.
SUPER-2201 — resolved comment pins stayed on the page indefinitely, cluttering content that's already been addressed. Resolved threads no longer render a pin at all (no filter toggle — they're just gone).
Why / Fix
2252: the injected page runtime (page-comments-runtime.ts) only gated hover/click reporting on enabled (comment mode on/off), not on whether a pick was already open.
set-modenow carries alockedflag (draft, selection, or an active thread popover open).- The runtime stops emitting
hover/pickwhile locked — clicks are still swallowed (preventDefault/stopPropagation) so the underlying page doesn't react, but they no longer start a new pick. - Host-side (
PageCommentsView.tsx) ignores hover updates and straypickmessages while locked as a second guard. - Ported the same
lockedcomputation to the mobile viewer (PageDetailScreen.tsx), which sendsset-modeindependently.
2272: CommentComposer.tsx — swapped the metaKey || ctrlKey check for a plain Enter && !shiftKey check, and dropped the now-unused hint text and its i18n entry (bun run check:i18n regenerated all locale catalogs clean, 0 missing).
2201: both viewers (PageCommentsView.tsx on web, PageDetailScreen.tsx on mobile) filter threads to unresolved ones before computing pin positions, tracking anchors, and rendering — a resolved thread simply stops getting a pin.
Testing
bun run --filter=@superset/shared --filter=@superset/ui --filter=@superset/web typecheck— passbun run --filter=@superset/mobile typecheck— same pre-existing failures as main (unrelatedHostWorkspaceItem/ChangesetFiletypes), nothing new from this changebun run --filter=@superset/shared test— passbun run check:i18n— clean, 0 missing across all localesbiome checkon touched files — clean
Closes SUPER-2252, SUPER-2272, SUPER-2201.
https://claude.ai/code/session_01V89xJG2G36ArAT9XM9WygA
Summary by CodeRabbit
-
Bug Fixes
- Prevented page selections while a comment popover is open, including hover highlights and cursor changes.
- Resolved comment threads no longer appear as pins or bubbles or participate in page tracking.
- Improved comment selection behavior when a popover is open.
- Enter during IME composition no longer submits comments.
-
Improvements
- Comments can now be submitted by pressing Enter without Shift.
- Removed the “⌘↵ to send” keyboard shortcut hint from supported translations.