Skip to content

fix(app): hydrate session before prompt submit#26414

Open
jeremyakers wants to merge 1 commit intoanomalyco:devfrom
jeremyakers:jeremy/prompt-submit-hydration-23903
Open

fix(app): hydrate session before prompt submit#26414
jeremyakers wants to merge 1 commit intoanomalyco:devfrom
jeremyakers:jeremy/prompt-submit-hydration-23903

Conversation

@jeremyakers
Copy link
Copy Markdown

@jeremyakers jeremyakers commented May 8, 2026

Issue for this PR

Closes #23903

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Submitting on an existing session route used local input.info() immediately. After a refresh or restart, that local session list can still be hydrating even though the backend session exists, so prompt submit could fail before sending.

This waits for sync.session.sync(params.id) when an existing route is missing local session info, then re-reads input.info(). If sync fails or the session is still missing, it still fails instead of creating fake session state. The tests cover both the hydrated valid-session path and the genuinely missing-session path.

How did you verify your code works?

  • PATH="/home/jeremy/.bun/bin:$PATH" /home/jeremy/.bun/bin/bun run test:unit -- src/components/prompt-input/submit.test.ts from packages/app (330 pass, 0 fail)
  • /home/jeremy/.bun/bin/bun typecheck from packages/app
  • PATH="/home/jeremy/.bun/bin:$PATH" /home/jeremy/.bun/bin/bun run build from packages/app
  • GIT_MASTER=1 git diff --check origin/dev...HEAD
  • Pre-push hook: bun turbo typecheck (14/14 packages passed)

Screenshots / recordings

Not included; this is a prompt submit behavior fix with no visual UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Fixes anomalyco#23903.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@jeremyakers jeremyakers requested a review from adamdotdevin as a code owner May 8, 2026 22:11
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Web UI: Failed to send prompt. Unable to retrieve session.

1 participant