fix(composer): label skill inputs properly and stop free-texting enums/documents - #126
Open
sergiomaldo wants to merge 1 commit into
Open
fix(composer): label skill inputs properly and stop free-texting enums/documents#126sergiomaldo wants to merge 1 commit into
sergiomaldo wants to merge 1 commit into
Conversation
…s/documents Real-user feedback (finding LegalQuants#8): skill-input forms showed only the raw description above unlabeled boxes, so users couldn't tell which field was which — and document-type inputs rendered as a free-text box that should never be typed in. - Render the input name as a title-cased field label with a * marker for required inputs; the description moves to smaller help text underneath. - Descriptions shaped like "a | b | c. …" (pipe-separated options before the first period) now render as a <select> with those options plus an empty choice; free text remains the fallback. - type=document inputs render an attach-hint chip (clip button) instead of a text box, and no longer gate Send in allRequiredFilled. Component tests cover the label + marker, the parsed-enum select, the free-text fallback, and the document hint. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
The composer's skill-input form renders each typed input as its description text above an unlabeled text box. The input's name (
perspective,depth,document, ...) is never displayed, so users cannot tell which field is which without parsing the description prose, and cannot match fields to a prompt that references inputs by name. Required fields are not visually marked beyond the top slot.Worse,
type: documentinputs also render as free-text boxes — but the api never binds files to skill inputs (file_idsis a separate channel), so typing in that box is a pure trap: the correct action is always "leave it blank and attach the file to the message".Observed: a skill with 1 required + 5 optional inputs where only the enum lists hinted at field identity.
Fix
*marker for required inputs; the description moves to smaller help text underneath.a | b | c. ...(pipe-separated options before the first period) render as a<select>with those options plus an empty choice; free text remains the fallback.type=documentinputs render an attach-hint chip (pointing at the clip button) instead of a text box, and no longer gate Send inallRequiredFilled.Tests
Component tests cover the label + required marker, the parsed-enum select, the free-text fallback, and the document attach hint;
attach.svelte.test.tscovers theallRequiredFilledchange.Provenance
Found operating a production self-hosted legal deployment (a law firm running Donna v0.6.2 fully local).
CI note:
prettier --checkcurrently fails onmainitself (docs/superpowers/HANDOFF-v0.6.2-release.md); #122 fixes it, so this branch's lint job goes green once that lands.svelte-check,eslint, and vitest all pass on this branch.🤖 Generated with Claude Code