Skip to content

fix(cli): forms accept file questions (questions add, create) - #156

Merged
xergioalex merged 1 commit into
mainfrom
fix__form_file_questions
Nov 24, 2026
Merged

xergioalex merged 1 commit into
mainfrom
fix__form_file_questions

Conversation

@mauriciomdb

Copy link
Copy Markdown
Contributor

Summary

dailybot form questions add --type file failed before reaching the server ("Invalid question type 'file'. Choose from: text, multiple_choice, boolean, numeric."), so an agent couldn't add a File question to a table. The API accepts file for forms (records) and refuses it on check-ins, and the web editor already offers it.

Reported in Product feedback (v4): https://app.dailybot.com/forms/f5893fa4-d2eb-464c-afc8-86fd4bbc3619/responses/cb7c2ca0-1f57-4bd1-be39-3d74e1617417 (found while adding an optional Screenshot field to that table).

Change Log

  • FORM_QUESTION_TYPES = the four types + file; check-ins keep VALID_QUESTION_TYPES unchanged.
  • build_question, parse_questions_file and build_questions_interactively take allowed_types; form questions add and form create (--questions-file / --interactive) pass the form set.
  • A file question can't be the blocker: the CLI fails fast with a clear message (same rule as the web editor).
  • --type help + an example on form questions add, form questions edit help, the invalid_question_type message, README and docs/API_REFERENCE.md mention file (forms only).
dailybot form questions add <form_uuid> --type file --question "Screenshot" --short-question "Screenshot" --optional

Tests

  • 13 new tests: helper rules (allowed for forms, refused by default, no blocker, no options, questions file both ways), form questions add --type file, --blocker refusal, help text, form create with a file question, checkin questions add --type file still refused.
  • Full suite: 4259 passed; ruff check, ruff format --check, mypy dailybot_cli clean.

Risks

  • None for check-ins (their set is unchanged).
  • Not in this PR: the vendored dailybot skill pack (.agents/skills/dailybot/forms/SKILL.md) still lists four types; it updates from its own repo. form submit's guided prompts don't upload files yet (a File question there is answered through the API's attachments endpoint).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AY6kxNxkCZG2pPJSh1Bxer

## Summary
`dailybot form questions add --type file` failed before reaching the
server ("Invalid question type 'file'"), so an agent couldn't add a File
question (for example an optional Screenshot) to a table. The API has
accepted `file` for forms since its file-question release and refuses it
on check-ins.

## Change Log
- New FORM_QUESTION_TYPES (the four types plus file); check-ins keep
  VALID_QUESTION_TYPES
- build_question / parse_questions_file / build_questions_interactively
  take allowed_types; form questions add and form create pass the form set
- A file question can't be the blocker (fails fast, as in the web editor)
- --type help, examples, the invalid_question_type message, README and
  API reference mention file (forms only)
- 13 tests: helper rules, form add/create with file, blocker refusal,
  help text, check-ins still refusing file

## Risks
- None for check-ins: their allowed set is unchanged
- The vendored dailybot skill pack still lists four types; it updates
  from its own repo

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AY6kxNxkCZG2pPJSh1Bxer
@xergioalex xergioalex added the Ready Trigger AI code review label Nov 24, 2026
@xergioalex
xergioalex merged commit ea0a059 into main Nov 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready Trigger AI code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants