Skip to content

feat(schema): add default field to question tool for pre-filled text inputs - #232

Merged
jeonghun-jj-lee merged 1 commit into
local/amicodefrom
question-text-default
Aug 22, 2026
Merged

jeonghun-jj-lee merged 1 commit into
local/amicodefrom
question-text-default

Conversation

@jeonghun-jj-lee

@jeonghun-jj-lee jeonghun-jj-lee commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Adds an optional default string field to the question schema (both V1 and V2). When set on a kind: "text" question, the UI pre-fills the text input with the value so the user can edit before submitting.

Changes

  • Schema (packages/schema/src/question.ts + v1/question.ts): added default?: string to the question base struct
  • Tool description (packages/core/src/tool/question.ts): documents the new field for the LLM
  • App UI (session-question-dock.tsx): seeds store.custom from question defaults on mount
  • TUI (question.tsx): same seeding pattern
  • SDK (types.gen.ts): regenerated with default?: string on QuestionInfo

Verification

  • Core question tests pass (6/6)
  • Full monorepo typecheck passes (30/30 packages)

Motivation

The onboarding interview needs to present an auto-generated user description for confirmation/edit — the user should see it pre-filled and be able to modify before submitting.

Summary by CodeRabbit

  • New Features

    • Text-based questions can now provide an optional pre-filled, editable answer.
    • Default values are preserved and displayed across session interfaces.
  • Bug Fixes

    • Custom-answer fields now initialize with the question’s configured default instead of appearing empty.
  • Documentation

    • Updated question guidance to explain how to configure pre-filled text responses.

…inputs

Adds an optional `default` string field to the question schema (both V1
and V2). When set on a kind:"text" question, the UI pre-fills the text
input with the value so the user can edit before submitting.

Wired through: schema → tool description → App (session-question-dock) →
TUI (question.tsx) → regenerated SDK types.
@jeonghun-jj-lee
jeonghun-jj-lee merged commit dff0376 into local/amicode Aug 22, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b2c5ced2-e5c7-47da-8f50-e1e17cedf6da

📥 Commits

Reviewing files that changed from the base of the PR and between 24b009c and e8b4ac7.

⛔ Files ignored due to path filters (1)
  • packages/sdk/js/src/v2/gen/types.gen.ts is excluded by !**/gen/**
📒 Files selected for processing (6)
  • packages/app/src/pages/session/composer/session-question-dock.tsx
  • packages/core/src/tool/question.ts
  • packages/core/test/tool-question.test.ts
  • packages/schema/src/question.ts
  • packages/schema/src/v1/question.ts
  • packages/tui/src/routes/session/question.tsx

📝 Walkthrough

Walkthrough

Question schemas now support optional editable defaults. The question tool preserves these values, and app and TUI session inputs use them when initializing custom answers.

Changes

Question default values

Layer / File(s) Summary
Question schema and tool propagation
packages/schema/src/question.ts, packages/schema/src/v1/question.ts, packages/core/src/tool/question.ts, packages/core/test/tool-question.test.ts
The shared question schemas add an optional default string. The question tool documents and tests forwarding this value for text questions.
Session input initialization
packages/app/src/pages/session/composer/session-question-dock.tsx, packages/tui/src/routes/session/question.tsx
Custom-answer state initializes from each question’s default value and falls back to an empty string.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: kitlangton, brendonovich, hona

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch question-text-default

Comment @coderabbitai help to get the list of available commands.

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