Skip to content

feat: support scrollToBottom in useSendFollowUpMessage#611

Draft
Jean-crack wants to merge 1 commit intoalpic-ai:mainfrom
Jean-crack:fix/issue-512
Draft

feat: support scrollToBottom in useSendFollowUpMessage#611
Jean-crack wants to merge 1 commit intoalpic-ai:mainfrom
Jean-crack:fix/issue-512

Conversation

@Jean-crack
Copy link
Copy Markdown
Contributor

Summary

  • add optional scrollToBottom support to useSendFollowUpMessage
  • thread the option through the shared bridge types and Apps SDK adaptor
  • keep the MCP app adaptor API-compatible by accepting and ignoring the option there
  • document the new hook signature and add targeted tests

Changes

  • add SendFollowUpMessageOptions with scrollToBottom?: boolean
  • update Adaptor.sendFollowUpMessage(prompt, options?)
  • update Apps SDK types so window.openai.sendFollowUpMessage can receive scrollToBottom
  • update useSendFollowUpMessage to accept optional options
  • add hook runtime/type tests
  • update API docs examples

Testing

  • pnpm exec vitest run src/web/hooks/use-send-follow-up-message.test.ts
  • pnpm --filter skybridge test:type
  • pnpm --filter skybridge test:format

Notes

  • The repo advertises Node 24.x, while this machine is currently on Node 22.22.1.
  • The targeted checks above passed locally on this change set.

Fixes #512

@rodincave
Copy link
Copy Markdown
Contributor

rodincave commented Mar 26, 2026

did you run it locally @Jean-crack ?

@Jean-crack
Copy link
Copy Markdown
Contributor Author

Yes — I ran the targeted checks locally before opening this.

Passing locally:

  • pnpm exec vitest run src/web/hooks/use-send-follow-up-message.test.ts
  • pnpm --filter skybridge test:type
  • pnpm --filter skybridge test:format
  • pnpm --filter create-skybridge test:unit just passed again locally now

The failing CI job looks unrelated to this PR: packages/create-skybridge/src/index.test.ts timed out in the template-copy/download tests, so I've rerun the failed job.

@rodincave
Copy link
Copy Markdown
Contributor

@Jean-crack CI fails

@Jean-crack
Copy link
Copy Markdown
Contributor Author

Investigated this:

So this looks flaky rather than caused by the actual useSendFollowUpMessage change.

Most suspicious spots in packages/create-skybridge/src/index.test.ts:

  1. the should download template from repo test hits downloadTemplate(...) against github:alpic-ai/skybridge/examples/ecom-carousel, so the unit test depends on live network / remote fetch timing
  2. both tests have un-awaited rejection assertions (expect(...).rejects.toThrowError()), and Vitest is already warning about that

I’d suggest:

  • fixing those assertions to await expect(...).rejects...
  • and, ideally, rewriting the repo-download test so it doesn’t rely on the network in CI

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.

sendFollowUpMessage API extension

2 participants