feat: add web form and lobby for idea submission - #161
Open
akurukunda01 wants to merge 1 commit into
Open
Conversation
Adds a standalone localhost page for creating, previewing, viewing, and editing research ideas without hand-writing YAML (part of ChicagoHAI#52). - src/cli/submit_web.py opens the page; token-gated, localhost-only - Form covers required fields plus optional background, methodology, and constraints sections; YAML is previewed with validation errors and warnings before anything is written - Submission goes through the existing IdeaManager path, so results are identical to CLI-submitted ideas - Lobby lists existing ideas; submitted ideas can be edited (form sections replaced, all other stored fields preserved); ideas a run has consumed are view-only, enforced server-side - 20 tests: spec builder units plus HTTP integration over a live server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Submitting an idea currently requires writing YAML against the schema and reading validation errors from the terminal. This PR adds a browser form (task part of issue #52). it is a standalone local page for creating, previewing, viewing, and
editing ideas, with no change to any existing path.
pr.52.workthrough.mp4
Changes
Run with
uv run python src/cli/submit_web.py: it prints a one-time token URL bound to localhost (same token/cookie/same-origin/CSP model as the HITL web server) and follows the static assets pattern ofhitl_web_server.py.The form requires the title, domain, and hypothesis, with additional optional sections that cover background, methodology, and constraints. The domain dropdown and its descriptions are read live from
config/domains.yamlBefore anything is written, a preview shows the generated YAML with validation errors and warnings inline.
submission goes through the existing
IdeaManager.validate_idea()/submit_idea()path, so the written YAML is identical to the existing CLI submission.The page lists existing ideas with status. Submitted ideas can be loaded back into the form and edited.
Copy buttons (inlined Lucide icons) with hover tooltips for the idea id and the generated YAML.
Changes to Docs:
docs/IDEA_SUBMISSION_WEB.md, plus one-line rows in the README submission table and the docs index.All files are new, no existing module is modified. The only integration points are read only imports of
IdeaManagerandConfigLoader.Testing
tests/test_submit_web.pycontains 20 new tests: unit coverage of the form-to-spec builder, and HTTP integration over a live server instance.uv run pytest tests/188 passed.Scope notes
./neurico submit-web) iwas not included to keepdocker/run.shuntouched. happy to add it here or as a follow-up.