Repository navigation
fix(pi): support questionnaire prompt cards - #2003
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
| Layer / File(s) | Summary |
|---|---|
Verify pending questionnaire calls server/pi-questionnaire.ts, server/pi-questionnaire.test.ts |
Adds lookup for unresolved questionnaire calls on the indexed Pi branch. Tests cover branch ancestry, tool results, transcript rewrites, and invalid ancestry. |
Parse questionnaire screens and register readers server/dialogs/shared.ts, server/dialogs/pi-questionnaire.ts, server/dialogs/pi-ask-tabs.ts, server/dialogs/index.ts, server/dialogs/live.ts, server/dialogs/registry.ts, server/dialogs/registry.test.ts, server/fixtures/pi-questionnaire.json, server/dialogs/pi-questionnaire.test.ts |
Adds questionnaire validation and screen parsing for questions, custom input, and review. Registers the readers and tests parsing across input, navigation, review, and narrow layouts. |
Bind prompts to verified calls and route answers server/prompt.ts, server/dialogs/pi-questionnaire-route.test.ts, scripts/pi-questionnaire-browser-regression.ts, scripts/ci-browser.sh, tsconfig.tools.json, changelog.d/pi-questionnaire.md |
Matches Pi screens to pending calls before exposing prompts and adds questionnaire answer handling. Adds route and browser regression coverage, includes the browser test in CI and TypeScript tooling, and records the feature in the changelog. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Bug fix
Possibly related PRs
- devswha/ovis#1714: Adds Pi questionnaire support for the
rpivwidget, including custom answers, multi-question navigation, and review. This PR covers the installedquestionnaire.tswidget and usespiActiveTab.
Suggested reviewers: 767251930, devswha
Merge Risk: 
Minimal · previous review 6197c
-
No merge-blocking issue was established; an unverified questionnaire state falls back to Terminal rather than sending an answer.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description includes the required Change and Validation sections. It explains the compatibility gap, resulting behavior, fail-closed conditions, test coverage, limitations, and unrun integration lanes.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 14 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Thanks @philipprass-prog. The maintainer approved this feature for merging once it passes the merge-pass gate. The gate passed typecheck, 123 focused tests, the conventions checks, and the new browser regression at 390px and 1440px. It reproduced two problems that need fixing first:
(No changelog credit is needed in the fragment; a maintainer adds it at release.) |
|
[babysit-pr] Addressed both findings from #2003 (comment) in 009e48c.
Validation on the final unchanged source:
Only the parser and its two existing test files changed. No live sessions, installed extensions or services were modified. CI for this new commit is separate from the previous head's successful CI run. |
|
Merge pass review report. Overall: PASSED. This outside contribution from @philipprass-prog shows Pi questionnaire prompts as prompt cards, and their answers go through First gate round (REJECT): typecheck, 123 focused tests, the conventions checks and the new browser regression at 390px and 1440px all passed. Two blockers were reproduced:
Fix 009e48c, re-reviewed on that range only (APPROVE):
A maintainer adds the changelog credit when the release folds the fragments (changelog.d/README.md). |
## Release 0.4.19 The release PR, made by the steps in [docs/development.md#releasing](docs/development.md#releasing), on main 9d76cca (#2078): - **Version:** `version` is 0.4.19 in `package.json` and `herdr-plugin.toml`. - **Changelog:** `bun scripts/changelog-fold.ts 0.4.19` moved the `changelog.d` fragments of 54 PRs into CHANGELOG.md, with PR links, and deleted them. - Outside contributors are credited: #1955 @YuuuXie, #1957 @Noobear, #1984 @bonecool999, #2003 @philipprass-prog, #2016 @kyop21, #2024 @YuuuXie, #2025 @YuuuXie, #2027 @jpcarranza94, #2030 @phlips5437, #2031 @yaaayaaa, #2034 @jpcarranza94, #2035 @nahwan-kim, #2041 @odfalik, #2045 @mattmarcin, #2052 @jpcarranza94, #2057 @kyop21, #2061 @YuuuXie. - **Release summaries:** `release-summaries.json` has the 0.4.19 entry in en, ko, ja and zh, with the same lists in each: 5 new, 5 improved, 5 fixed. Every English line is at most 70 characters. - **Remote bundle:** `REMOTE_BUNDLE_VERSION` goes from 37 to 38 in `shared/machines.ts`, because the remote bundle's inputs changed since `remote-v37`. Once this merges, `remote-v38` is pushed on the merge commit, and the Remote PC bundles workflow has to finish before the Release run. `bun scripts/release-guards.ts` reports: "Release 0.4.19: remote bundle, telemetry Worker and release metadata are in order." No telemetry Worker deploy is needed. `bun run check fast` passes locally. **Not checked on a real Windows PC:** #1989 (Git for Windows' OpenSSH for remote PCs) and #2016 (Antigravity chat on Windows through the Restart Manager) ship without their real-device Windows checks, because the maintainer's Windows test PC is off. The owner accepted releasing without them. Both will be checked on the real PC when it is back. The owner approved this release.
Change
Fix a gap in Pi prompt-card compatibility: Pi's custom
questionnaireextension renders its ownctx.ui.customwidget, distinct from Pi's native dialogs and rpiv'sask_user_question. Previously it was only usable through the terminal, particularly awkward on a phone.questionnairedrawing through the existing prompt card: options and descriptions, custom answers,allowOther: false, question chips/back navigation, and a semantic multi-question review before submission.questionnairetool call and the observed widget state. Read again before committing input and during navigation; do not infer progress from numeric labels or guess a current tab.This is compatibility support for an existing Pi tool, not a replacement extension. The installed tool and running sessions are not modified. The screen fixtures follow the installed widget's renderer; no extension implementation is copied into the bridge.
Validation
bun run check fast— passed: generated type/theme checks, workflow syntax, both typechecks, build and unit suite (7,234 passed, 24 skipped). Source fingerprint checked against the final implementation.bun scripts/pi-questionnaire-browser-regression.ts— passed at 390px and 1440px with synthetic/demo fixtures; mobile custom-answer and review screenshots inspected.git diff --check— passed.allowOther: false, answer edits and final submission. RPC transport was synthetic, not a real PTY.Limitations: this deliberately requires verified pending-tool-call evidence and an unambiguous drawing; otherwise Terminal remains available. Multiline/control-character custom answers and existing terminal-owned drafts are refused. Browser coverage is Chromium emulation, not a physical iOS/Android device. Pi does not persist leaf-only
/treenavigation until another entry is appended; the reader follows the existing last-written-branch convention plus current-widget matching. No production sessions were used, and the complete integration/browser lanes have not been run locally.