Skip to content

feat: AskUserQuestion multi-question, multi-select & Other option - #60

Closed
CodePirate7 wants to merge 1 commit into
wxtsky:mainfrom
CodePirate7:feat/ask-user-question-multi
Closed

CodePirate7 wants to merge 1 commit into
wxtsky:mainfrom
CodePirate7:feat/ask-user-question-multi

Conversation

@CodePirate7

@CodePirate7 CodePirate7 commented Apr 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Multi-question wizard: AskUserQuestion supports up to 4 questions per invocation. Previously only the first question was rendered — now all questions are presented sequentially with back/forward navigation.
  • Multi-select support: Questions with multiSelect: true render checkbox-style rows (MultiSelectRow) instead of single-select radio buttons, with a CONFIRM button to submit.
  • "Other" free-text option: Every AskUserQuestion now includes an implicit "Other" option at the bottom, allowing users to type a custom answer instead of picking from the predefined options.
  • Backward compatible: Legacy Notification-based questions (non-AskUserQuestion) render exactly as before via legacyQuestionContent.

Changes

File What changed
Sources/CodeIslandCore/Models.swift New AskUserQuestionItem struct
Sources/CodeIsland/Models.swift QuestionRequest.allQuestions field
Sources/CodeIsland/AppState.swift Parse all questions (not just first), answerQuestionMulti()
Sources/CodeIsland/NotchPanelView.swift QuestionBar refactored into multi/legacy paths, new MultiSelectRow, OptionRow supports "Other" (index ≤ 0)
Sources/CodeIsland/L10n.swift Added back / confirm keys (EN + ZH)

Test plan

  • Trigger AskUserQuestion with 1 question, single-select — should work as before
  • Trigger AskUserQuestion with 2+ questions — should show wizard with back button and progress indicator
  • Trigger AskUserQuestion with multiSelect: true — should show checkboxes and CONFIRM button
  • Click "Other" on any question — should show text input, submitting works
  • Legacy Notification-based questions still render correctly
  • Skip button works at any point in the wizard
2026-04-11.13.00.37.mov

… option

Claude Code's AskUserQuestion tool supports up to 4 questions per invocation,
multi-select options, and an implicit "Other" free-text option. Previously,
CodeIsland only rendered the first question with single-select options.

This commit adds:
- AskUserQuestionItem model to represent each question's full metadata
- Multi-question wizard flow with back/forward navigation
- Multi-select checkbox UI (MultiSelectRow component)
- "Other" option with inline text input for custom answers
- Proper answers dict construction for multi-question responses
- Legacy Notification-based question rendering preserved as fallback

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@CodePirate7
CodePirate7 force-pushed the feat/ask-user-question-multi branch from ff66103 to 4be2ff9 Compare April 11, 2026 04:58
@wxtsky

wxtsky commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Your wizard-style UI (multiSelect, "Other" free-text, Back navigation, MultiSelectRow) was merged into a combined implementation that also includes the robust backend from #59 and the completion queue fix from #61.

Closing in favor of the merged implementation.

@CodePirate7

CodePirate7 commented Apr 11, 2026 •

Copy link
Copy Markdown
Contributor Author

@wxtsky Thanks for merging the multi-question/multi-select implementation! If possible, would you mind adding a Co-authored-by trailer to the merged commit?

Co-authored-by: CodePirate7 <[email protected]>

wxtsky added a commit that referenced this pull request Apr 11, 2026
…+ completion queue fix

Multi-question (merged #59 + #60):
- Wizard-style one-question-at-a-time UI with Back navigation
- MultiSelect checkbox support and "Other" free-text input
- AskUserQuestionState with answer key dedup (header-based, collision-safe)
- answerQuestionMulti with positional matching
- drainQuestions sends deny for AskUserQuestion-derived requests
- 7 unit tests covering multi-question, dedup, skip, disconnect

Completion queue fix (merged #61):
- Queue completion notifications when approval/question card is active
- Drain queued completions in showNextPending

Remote SSH monitoring (merged #42):
- SSH tunnel forwarding for remote Claude Code / Codex sessions
- Remote hook installer and Python bridge script
- Settings UI for remote host management
- Remote session guards (skip PID monitor, model read, persistence, terminal activation)

Co-Authored-By: CodePirate7 <[email protected]>
Co-Authored-By: lkangd <[email protected]>
Co-Authored-By: Hatiaa <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
nguyenvanduocit pushed a commit to nguyenvanduocit/CodeIsland that referenced this pull request Apr 12, 2026
PR wxtsky#59/wxtsky#60 merged (abfc3b7): multi-question AskUserQuestion wizard UI —
promote T-018 from "watch" to "implement now".

New tasks added to Todo:
- T-020: terminal activation overhaul (Warp/Alacritty/Hyper/tmux/IDE)
- T-021: configurable island width 50–150% slider
- T-022: cmux precise terminal jump (PR wxtsky#50 merged)
- T-023: hook config migration ~/.claude/hooks/ → ~/.codeisland/

PR wxtsky#61 (completion queue fix) already in our codebase — no task needed.
Remote SSH monitoring, third-party CLI, and Turkish l10n skipped.

https://claude.ai/code/session_01Gcwzjp7VguhnX64hM6tEC1
heiboy0070 pushed a commit to heiboy0070/CodeIsland that referenced this pull request Apr 13, 2026
…+ completion queue fix

Multi-question (merged wxtsky#59 + wxtsky#60):
- Wizard-style one-question-at-a-time UI with Back navigation
- MultiSelect checkbox support and "Other" free-text input
- AskUserQuestionState with answer key dedup (header-based, collision-safe)
- answerQuestionMulti with positional matching
- drainQuestions sends deny for AskUserQuestion-derived requests
- 7 unit tests covering multi-question, dedup, skip, disconnect

Completion queue fix (merged wxtsky#61):
- Queue completion notifications when approval/question card is active
- Drain queued completions in showNextPending

Remote SSH monitoring (merged wxtsky#42):
- SSH tunnel forwarding for remote Claude Code / Codex sessions
- Remote hook installer and Python bridge script
- Settings UI for remote host management
- Remote session guards (skip PID monitor, model read, persistence, terminal activation)

Co-Authored-By: CodePirate7 <[email protected]>
Co-Authored-By: lkangd <[email protected]>
Co-Authored-By: Hatiaa <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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.

2 participants