Skip to content

[Fix] Slack Pick fails with out-of-date when structured prompts refresh#506

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/slack-stale-request-user-input-2taicgyedmoup
Draft

[Fix] Slack Pick fails with out-of-date when structured prompts refresh#506
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/slack-stale-request-user-input-2taicgyedmoup

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

Related issue

N/A — internal Roomote work requested by a maintainer after investigating live Slack “prompt is out of date” failures.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

Slack structured prompts no longer mint dead Pick buttons during OpenCode’s placeholder→real question stream:

  • Streaming placeholders (Provide the requested input. / id response / no options) are not posted to Slack or Linear, and no pending integration state is written for them.
  • When a same-requestId enrich re-post cannot update the original card in place, the old message is neutralized (or deleted if that update fails).
  • If a user still clicks a button with a stale questionId but the same index and a still-valid answer for the current question, Slack accepts it under the current question id instead of rejecting as out of date.

How it was tested

  • pnpm --filter @roomote/worker exec vitest run for slack-mention, linear-agent, and request-user-input callback tests
  • pnpm --filter @roomote/slack exec vitest run src/__tests__/handle-followup-answer.test.ts
  • Pre-push suite (oxlint, residual lint, check-types:fast, knip)

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

@roomote-roomote

roomote-roomote Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

1 issue outstanding. See task

  • Restrict stale Pick recovery to option labels still present in the refreshed question (packages/slack/src/handle-followup-answer.ts:315-331). OpenCode questions normally have isOther: true, so freeformOk currently treats every non-empty label from an obsolete card as valid even when the refreshed prompt removed that option or changed meaning. A stale Pick can therefore be submitted under an unrelated new question ID; button values are option picks, not custom answers, so a mismatched label should remain out of date.

Reviewed c508906

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