Skip to content

Feat/question widget#5733

Merged
RichardTang-Aden merged 30 commits intomainfrom
feat/question-widget
Mar 4, 2026
Merged

Feat/question widget#5733
RichardTang-Aden merged 30 commits intomainfrom
feat/question-widget

Conversation

@bryanadenhq
Copy link
Collaborator

Description

Adds structured question-asking for workers and the queen via a new QuestionWidget component. When a node calls ask_user with options, the widget renders clickable choices plus a free-text "Other" field at the bottom of the chat. Predefined answers route directly to the worker; "Other" answers go through the queen for evaluation before relay.

Also introduces SSE replay on reconnect so clients don't miss output, and a /queen-context endpoint for fire-and-forget background context.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #5731

Changes Made

  • Added QuestionWidget component with clickable options, free-text "Other" field, and keyboard shortcuts (1-N to select, Enter to submit)
  • Gave the queen access to ask_user tool (previously worker-only) with free-form support (no options required)
  • Added dual routing for worker questions: predefined answers go direct to worker, "Other" routes through queen for evaluation
  • Added /queen-context endpoint for fire-and-forget context updates (notifies queen of user selections without triggering an LLM response)
  • Added SSE event replay on reconnect so clients catch up on missed output and pending questions
  • Updated queen prompt with explicit ask_user instructions and new worker-question routing behavior
  • Replaced inline WorkerInputReply component with the bottom-anchored QuestionWidget in ChatPanel
  • Moved test dependencies to testing extra and dev group in pyproject

Testing

Describe the tests you ran to verify your changes:

  • Unit tests pass (cd core && pytest tests/)
  • Lint passes (cd core && ruff check .)
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Screenshot 2026-03-03 at 11 18 36 AM

TimothyZhang7 and others added 30 commits March 3, 2026 07:43
@RichardTang-Aden RichardTang-Aden merged commit 8daaf00 into main Mar 4, 2026
1 check passed
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.

[Feature]: Question Widget for Open Hive

3 participants