Skip to content

Show Slack threads from before a person linked their account - #1061

Merged
motatoes merged 1 commit into
mainfrom
feat/backfill-slack-owners
Nov 18, 2026
Merged

motatoes merged 1 commit into
mainfrom
feat/backfill-slack-owners

Conversation

@opencomputer-app

Copy link
Copy Markdown
Contributor

Requested by @mohamed Habib in Slack.

A Slack thread gets a dashboard owner only when a message is delivered after its Slack person links their account (slackDelivery). Threads with no message since linking stayed out of that person's list.

Now, before each sessions list, ownerless Slack sessions whose Slack person (owner_id) has since linked are given to that person:

  • it sets owner_user_id and fills in a missing name or email, exactly as a delivery would;
  • it sends each session's access frame to a v4 host, so the person can open it.

This covers everyone who already linked as well as anyone who links later. It needs no change to the deploy overlay, because it goes through linkOfSlack.

Cost: one SELECT DISTINCT owner_id over ownerless Slack sessions per list, plus one link lookup per Slack person who has some. Rows that are already attached are never touched again.

Only sessions that already have a session id (cs_…) are included. Older threads that have no journal stay out until their next message.

Tests: a new case in computer-sessions-api.test.ts; the managed-agents computer suite passes (428/428), and so does tsc.

Before each sessions list, Slack sessions with no dashboard owner whose Slack person has
since linked become theirs (owner, name, email, access frame), as their next delivery would.
Linking used to show only threads with a message after it.
@manicule-agent

Copy link
Copy Markdown

View docs preview
Commit 4fcc241 · 80 pages

Docs hosted with Margin

@motatoes
motatoes merged commit d4cdd83 into main Nov 18, 2026
15 checks passed
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.

2 participants