Skip to content

fix(tui): render submitted prompts optimistically#36436

Open
kitlangton wants to merge 1 commit into
v2from
optimistic-input
Open

fix(tui): render submitted prompts optimistically#36436
kitlangton wants to merge 1 commit into
v2from
optimistic-input

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Summary

  • generate the prompt message ID in the TUI and insert it into the normal pending-input store before the request
  • send the same ID to the server so session.input.admitted reconciles the local placeholder in place
  • roll back rejected prompts only while they remain unconfirmed
  • preserve a durably admitted prompt when the admission event arrives but the HTTP response is lost

Verification

  • bun typecheck in packages/tui
  • bun run test test/cli/tui/data.test.tsx test/cli/tui/session-rows.test.ts in packages/tui
  • 40 focused tests covering immediate insertion, authoritative admission replacement, admission-before-error, rollback-before-late-admission, and promotion
  • repository-wide pre-push typecheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant