chore: add select state to radio buttons and only show inputs on enter - #2190
Conversation
|
Claude Security Review: no high-confidence findings. (run) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## refactor #2190 +/- ##
=========================================
Coverage 97.15% 97.16%
=========================================
Files 542 542
Lines 37728 37754 +26
=========================================
+ Hits 36653 36682 +29
+ Misses 1075 1072 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Changes requested
The memory-record scope screen tests aren't updated for the new "enter to edit" flow
The refactor in src/handlers/memory/record/list/screen.tsx gates the FormTextInput (and key.return submission) behind an editing state that must be toggled on with enter before any text is accepted. The existing tests in src/handlers/memory/record/record.screen.test.tsx still assume the old flow (type, then press enter to submit), so they should now fail:
unwinds the record table…(lines 74–96):screen.write("/customers/acme")runs whileediting=false, so the characters are dropped (theuseInputhandler for the non-editing branch only reacts toescape/up/down/return, and noFormTextInputis mounted to capture them). The subsequentpress("return")just flipsediting=truewith an empty scope, so navigation to the record table never occurs and thewaitForText("Customer prefers email notifications.")will time out.uses namespace scope again after moving the selector up(lines 98–118): same problem —writebefore entering editing mode is a no-op, and the followingreturnonly enters editing.submits a namespace prefix and calls listMemoryRecords with exact options(lines 120–154): same problem —listMemoryRecordsis never invoked.maps namespace-path scope to namespacePath(lines 175–201): same problem.requires a non-empty namespace value(lines 316–323): the singlepress("return")only enters editing mode;submittedstaysfalse, soA namespace value is required.never renders.
Fix options:
- Update each affected test to
press("return")(to enter editing) beforewrite(...), and add a secondpress("return")for the empty-namespace test. - Rework the screen so typing on the radio step implicitly enters editing (i.e., forward text keys into the field), which would keep the existing tests valid.
Please pick one and get the suite green before merging. Everything else in the diff (the FormRadioGroup focused/selected split, the HarnessWizard field gating, and the project-create call-site renames) looks consistent with the rest of the codebase.
|
Claude Security Review: no high-confidence findings. (run) |
Description
This PR adds polishing changes to the formRadioButton component and two of its call paths:
harness->create->modelmemory->record->listThe two changes are as follows:
1. Input fields:
2. Select state:
PR also updates the tests for both surface areas to exercise this new behavior. Additionally, removed duplicate import which was causing typecheck to fail (fix unrelated to commits in this PR)
Screen.Recording.2026-09-03.at.3.09.46.PM.mov
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.