Repository navigation
Conversation
The chatsvc REST API rejects reaction writes (the emotions property setter returns 400 for every body shape) and the native protocol rides a WebSocket inside a SharedWorker, so reactions are driven through the logged-in Playwright browser profile (same one uses): - opens the chat natively from the chat list (accessibility-name match, candidate loop β the same 1:1 can render as several rows) - locates the message row by snippet text (group row or DOM rect; the role=heading match can be a 1x1 accessibility marker) - hovers the row's top edge (the quick bar does not trigger from the row center) with an offset sweep + retries - clicks the reaction on the hover quick bar: like, heart, laugh, surprised. The expanded 'More reactions' picker is deliberately not wired: its flyout can anchor to an adjacent row and react to the wrong message. - verifies server-side by re-reading the message emotions property; re-reacting with an emoji you already set is refused (the UI toggle would remove it) Reacted 2 live cycles end-to-end (like add/remove, heart add/remove) with server-side verification.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
teams react <chat> [emoji]β react to a message (likedefault, alsoheart,laugh,surprised), with--msg <id>to target a specific message and--removeto take your reaction off.--headedshows the drive for debugging.Why not the API
The chatsvc REST API rejects reaction writes outright β
PUT .../messages/<id>/properties?name=emotionsreturns400 errorCode 201 "Invalid format of emotions property"for every body shape I tried (12, including the exact doc the GET returns, keyed-dict forms, and stringified variants), and the native protocol rides a WebSocket inside a SharedWorker that a CLI cannot join. The web UI is the only scriptable path.How it works
Reuses the persistent browser profile
teams loginalready maintains:Unread message/Chatprefix), iterating candidates (one 1:1 can render as several rows) until the target message's heading is found. Opening through the search page was avoided: the thread renders in an embedded pane that can fail with an "Oops" error.role=headingmatch can resolve to a 1x1 accessibility marker, so the drive prefers the group row's bounding box and falls back to walking the DOM from the deepest visible text node.message-actions-*button or the picker entry counts as "bar up".[data-tid="message-actions-<key>"].The expanded "More reactions" picker is deliberately not wired: its flyout can anchor to an adjacent message row and react to the wrong message (observed live during testing). Scope stays on the four hover-quick-bar reactions.
Safety
emotionsproperty is asserted (your MRI present/absent), with retries for propagation lag.--removewhen you have no such reaction.getEmotions/hasMyReactionhelpers that tolerate both the plain-array and stringified-JSON property shapes the API returns.Testing
Also bumps
playwrightto^1.63.0(the version the feature was developed and live-tested against).