Skip to content

feat(infinity-slack-bot): "Fork from here" message shortcut - #145

Closed
akainth015 wants to merge 1 commit into
pr/slack-stop-interruptfrom
pr/slack-rewind-shortcut
Closed

akainth015 wants to merge 1 commit into
pr/slack-stop-interruptfrom
pr/slack-rewind-shortcut

Conversation

@akainth015

@akainth015 akainth015 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Message shortcut (callback_id kept as rewind_to_here for manifest compatibility): opens a modal prefilled with the clicked turn's text; on submit the bot posts a new top-level thread ("⏪ Forked from ") plus a cross-link in the original thread, forks the session via ForkSession, and sends the edited turn as the fork's first input. The original thread and session are untouched.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Deploying infinity with  Cloudflare Pages  Cloudflare Pages

Latest commit: bc873ca
Status: ✅  Deploy successful!
Preview URL: https://808c00ff.infinity-dc7.pages.dev
Branch Preview URL: https://pr-slack-rewind-shortcut.infinity-dc7.pages.dev

View logs

@akainth015
akainth015 added this pull request to stack #149 October 16, 2026 17:01
@akainth015
akainth015 force-pushed the pr/slack-rewind-shortcut branch from 6339ac9 to 9b86ea8 Compare October 16, 2026 17:02
@akainth015
akainth015 requested a review from a team October 16, 2026 17:02
@akainth015
akainth015 force-pushed the pr/slack-rewind-shortcut branch from 9b86ea8 to 4324e18 Compare October 16, 2026 17:43
@akainth015
akainth015 force-pushed the pr/daemon-rewind branch 2 times, most recently from 377735b to dd406d1 Compare October 19, 2026 20:31
@akainth015
akainth015 force-pushed the pr/slack-rewind-shortcut branch from 4324e18 to a3da634 Compare October 19, 2026 20:31
Base automatically changed from pr/daemon-rewind to pr/slack-stop-interrupt October 19, 2026 20:31
@akainth015 akainth015 changed the title feat(infinity-slack-bot): "Rewind to here" message shortcut feat(infinity-slack-bot): "Fork from here" message shortcut Oct 19, 2026
@akainth015
akainth015 removed this pull request from stack #149 October 19, 2026 22:08
@akainth015
akainth015 force-pushed the pr/slack-stop-interrupt branch from a5e3abb to bdc7579 Compare October 19, 2026 23:51
@akainth015
akainth015 force-pushed the pr/slack-rewind-shortcut branch from a3da634 to 50e6d6d Compare October 19, 2026 23:51
@akainth015
akainth015 force-pushed the pr/slack-stop-interrupt branch from bdc7579 to 1f2fec3 Compare October 20, 2026 00:17
@akainth015
akainth015 force-pushed the pr/slack-rewind-shortcut branch from 50e6d6d to dffe1eb Compare October 20, 2026 00:17
@akainth015
akainth015 marked this pull request as draft October 20, 2026 02:52
@akainth015
akainth015 force-pushed the pr/slack-stop-interrupt branch from 1f2fec3 to a969704 Compare October 20, 2026 17:42
@akainth015
akainth015 force-pushed the pr/slack-rewind-shortcut branch from dffe1eb to 70474b2 Compare October 20, 2026 17:42
Adds a message shortcut (callback id `rewind_to_here`, named "Fork from
here") that forks the conversation from the selected user turn into a NEW
session in a NEW Slack thread, with a modal pre-filled with that turn's text
for edit-and-resubmit. Non-destructive: the original thread and its session
are left untouched and keep working.

* The bot maps the clicked message to a turn index by counting human
  messages in `conversations.replies`; bot messages map to the nearest
  preceding human turn.
* On submit the I/O layer posts a top-level anchor ("⏪ Forked from <link>",
  quoting the edited turn) plus a cross-link in the original thread, then
  feeds a fork-ready event keyed on the anchor back into the dataflow, which
  starts the fork like any new thread: `DaemonCommand::ForkSession` →
  `ClientMessage::ForkSession` on a fresh connection, whose `Connected` maps
  the new thread to the forked session and sends the edited turn.
* Subagent threads and sessionless threads are rejected with an ephemeral
  error.

Requires adding the message shortcut to the Slack app (manifest updated in
docs; manifests replace, don't merge).
@akainth015
akainth015 force-pushed the pr/slack-stop-interrupt branch from a969704 to d9f870c Compare October 22, 2026 01:18
@akainth015
akainth015 force-pushed the pr/slack-rewind-shortcut branch from 70474b2 to bc873ca Compare October 22, 2026 01:18
@akainth015

Copy link
Copy Markdown
Member Author

Closing: the Slack bot now lives in hydro-project/infinity-slack. The "Fork from here" shortcut will be reopened there once #166 lands.

@akainth015 akainth015 closed this Nov 4, 2026
@akainth015
akainth015 deleted the pr/slack-rewind-shortcut branch November 4, 2026 23:43
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