Skip to content

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
TinyComms:mainfrom
skullvalanche:skull/slack-activity
Open

skullvalanche wants to merge 8 commits into
TinyComms:mainfrom
skullvalanche:skull/slack-activity

Conversation

@skullvalanche

Copy link
Copy Markdown

What changed and why

Slack's Activity list was always empty. The app asked activity.feed with a guessed request, and Slack refused it as invalid_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 under bundle_info), and fetches each row's message text with one batched messages.list per 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

  • feature
  • fix
  • perf
  • refactor
  • chore
  • docs

Platforms

  • windows
  • macos
  • linux
  • android
  • ios

Proof

Scenario: e2e/scenarios/slack-activity-feed

Lab run: the lab posts it under e2e-proof once this is open.

The scenario starts this build's chatd with TINYCLIENT_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.rs now refuses a feed call without mode and types as Slack does, serves the item shapes captured from a real workspace, and answers messages.list. slack_activity_feed_lists_mentions_threads_reactions_and_marks_read fails on main ("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.feed and messages.list are Slack web-client calls, not documented ones, so Slack can change them. The request and the types values 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_ACTIVITY in crates/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant