Skip to content

fix(composer): label skill inputs properly and stop free-texting enums/documents - #126

Open
sergiomaldo wants to merge 1 commit into
LegalQuants:mainfrom
sergiomaldo:fix/skill-input-labels
Open

fix(composer): label skill inputs properly and stop free-texting enums/documents#126
sergiomaldo wants to merge 1 commit into
LegalQuants:mainfrom
sergiomaldo:fix/skill-input-labels

Conversation

@sergiomaldo

Copy link
Copy Markdown

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: document inputs also render as free-text boxes — but the api never binds files to skill inputs (file_ids is 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

  • 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) render as a <select> with those options plus an empty choice; free text remains the fallback.
  • type=document inputs render an attach-hint chip (pointing at the clip button) instead of a text box, and no longer gate Send in allRequiredFilled.

Tests

Component tests cover the label + required marker, the parsed-enum select, the free-text fallback, and the document attach hint; attach.svelte.test.ts covers the allRequiredFilled change.

Provenance

Found operating a production self-hosted legal deployment (a law firm running Donna v0.6.2 fully local).

CI note: prettier --check currently fails on main itself (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

…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>
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.

1 participant