Skip to content

Feature/support batched questions - #59

Closed
lkangd wants to merge 2 commits into
wxtsky:mainfrom
lkangd:feature/support-batched-questions
Closed

lkangd wants to merge 2 commits into
wxtsky:mainfrom
lkangd:feature/support-batched-questions

Conversation

@lkangd

@lkangd lkangd commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 支持 batched AskUserQuestion 交互流程:在 UI 侧支持多题目选项选择 +
    显式确认后统一回传,补齐问题队列状态流转,并增强 Hook 生命周期日志,便于排障与审计。

    • 新增/更新相关回归测试,覆盖问题流的关键路径与状态转换。
    • 新增 hot-restart 开发工作流:提供 scripts/dev-hot-restart.sh,监听源码变更并合并触发构建,仅
      在构建成功后重启应用,提升本地迭代效率。
    • 补充工程协作配置(.gitignore、CLAUDE.md)以减少本地噪音文件进入版本库。

    Key Changes

    • Sources/CodeIsland/AppState.swift
      • 实现 AskUserQuestion 批量题目解析与答案聚合
      • 新增确认提交入口与队列控制逻辑
      • 增强 permission/question 相关日志打点
    • Sources/CodeIsland/HookServer.swift
      • 对接新的问题交互路径与数据流
    • Sources/CodeIsland/NotchPanelView.swift / Sources/CodeIsland/Models.swift /
      Sources/CodeIsland/L10n.swift
      • 更新 UI 与模型以支持批量问题展示、选择与确认
    • Sources/CodeIsland/Log.swift
      • 新增结构化日志能力
    • Tests/CodeIslandTests/AppStateQuestionFlowTests.swift
      • 新增问题流回归测试
    • scripts/dev-hot-restart.sh
      • 新增热重启开发脚本(来自前一提交)
    • README.md / README.zh-CN.md
      • 增加开发脚本说明

    Why

    • 解决单题交互在多问题场景下的能力不足,降低误答/漏答风险。
    • 提升问题与权限流的可观测性,便于快速定位线上/本地问题。
    • 缩短本地改动验证闭环,提高开发效率。

    Test Plan

    • swift build
    • swift test
    • 手动验证 AskUserQuestion 多题场景:选择后确认,检查回传答案结构正确
    • 手动验证 skip/deny 分支及状态回落是否正确
    • 运行 scripts/dev-hot-restart.sh,确认:
      • 文件变更可触发构建
      • 构建失败不重启
      • 构建成功才重启应用

    Notes

    • 本 PR 合并了两次提交:
      • feat: support batched AskUserQuestion flow and hook logging
      • feat: add hot-restart dev watcher workflow

    Preview

CleanShot 2026-04-10 at 19 18 53

lkangd added 2 commits April 10, 2026 16:02
Introduce scripts/dev-hot-restart.sh to watch source changes, coalesce build triggers, and only restart the app on successful builds so iteration is faster without disrupting running sessions.
Implement multi-question selection/confirmation handling in AppState with richer hook lifecycle logging, update SwiftUI question UI/state models, add regression tests, and include local Claude/project ignore/config docs updates.
nguyenvanduocit pushed a commit to nguyenvanduocit/CodeIsland that referenced this pull request Apr 11, 2026
Add T-018 (batched AskUserQuestion — watch wxtsky PR wxtsky#59) and T-019
(permission requests auto-rejected in burst — wxtsky issue wxtsky#57).
Update CLAUDE.md sync log with April 11 scout summary.

https://claude.ai/code/session_01UHzvr8zBRwTdp49ysFc5AZ
@wxtsky

wxtsky commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Your backend approach (AskUserQuestionState, answerKey dedup, drainQuestions deny, tests) was merged into a combined implementation that also includes the wizard UI from #60 and the completion queue fix from #61.

Closing in favor of the merged implementation.

@wxtsky wxtsky closed this Apr 11, 2026
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]>
@lkangd
lkangd deleted the feature/support-batched-questions branch April 14, 2026 02:00
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