Repository navigation
Slack's Activity list works again, shows what each item says, and its badge counts only unread items - #978
Open
skullvalanche wants to merge 8 commits into
Open
Slack's Activity list works again, shows what each item says, and its badge counts only unread items#978skullvalanche wants to merge 8 commits into
skullvalanche wants to merge 8 commits into
Conversation
…s its real item types
…ago no longer keeps a conversation in it
… with one messages.list
…nd serve real item shapes
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 changed and why
Slack's Activity list was always empty. The app asked
activity.feedwith a guessed request, and Slack refused it asinvalid_arguments, which the window hid. It now sends the request Slack's own web client sends, reads the item shapes Slack really returns (thread and app items keep their message underbundle_info), and fetches each row's message text with one batchedmessages.listper page, so rows show a preview.Three smaller changes make Activity honest. The Activity badge counted any conversation where one of my messages ever got a reaction, so it showed a number while the list had nothing unread. It now counts only unread items. The list says why it could not load instead of looking empty. Rows are left-aligned with a thin separator.
Type
Platforms
Proof
Scenario: e2e/scenarios/slack-activity-feed
Lab run: the lab posts it under
e2e-proofonce this is open.The scenario starts this build's
chatdwithTINYCLIENT_PROVE=slack-activity-feed. It checks the feed request (mode, the Activity flag, each tab's types, the cursor) and that mentions, thread replies, reactions and app messages are read from the places Slack puts them. A build from before this change ignores the variable and serves forever, so the driver fails there.Unit and integration tests: the fake Slack in
crates/chatd/tests/slack.rsnow refuses a feed call withoutmodeandtypesas Slack does, serves the item shapes captured from a real workspace, and answersmessages.list.slack_activity_feed_lists_mentions_threads_reactions_and_marks_readfails onmain("Slack refused the request") and passes here. A store test,the_activity_count_wants_an_unread_reaction_not_one_seen_long_ago, fails with the old badge rule.Compatibility
No protocol change and no new field.
activity.feedandmessages.listare Slack web-client calls, not documented ones, so Slack can change them. The request and thetypesvalues were read from Slack's own web client (the All, Mentions and Threads tabs and the Reactions, Apps and Invitations filters).One behaviour change to know about: the Activity badge no longer counts a reaction to my message unless the network says it is unread. Only the Telegram adapter records that today, so on Slack, Discord and Mattermost reactions no longer raise the badge. The Activity list still shows them. Counting them would need chatd to keep the feed's per-item
is_unread, which this does not do.Risk and rollback
If Slack changes either call, the Activity list now says Slack refused it instead of showing nothing, and rows that cannot be fetched show no preview but still appear. Revert the pull request to undo it. The badge change is one SQL condition (
IS_ACTIVITYincrates/chatd/src/store.rs).Release note
Slack's Activity list works again, shows what each item says, and the Activity badge counts only what is unread.