Skip to content

fix(mobile): the persona form's model menu, Instructions capitalization and Save above the keyboard - #978

Merged
Jacksondr5 merged 4 commits into
j5/mainfrom
j5code/mobile-persona-form-polish
Nov 9, 2026
Merged

Jacksondr5 merged 4 commits into
j5/mainfrom
j5code/mobile-persona-form-polish

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Problem

At Checkpoint 3, Jackson found three things on his iPhone in the mobile persona form. Closes #961.

  1. Opening a provider's models in the model menu showed a jarring transition.
  2. Instructions never capitalized after a full stop or on a new line.
  3. With the keyboard up, Save sat high, with dead space below it.

What changed

  1. Model menu: each provider is now a section in one menu on iOS (displayInline), so there's no submenu and no transition. Android keeps its drill-in, which nobody flagged.
    • The transition was UIKit's standard submenu animation. Upstream's own two-level menus use it too, for example the pull-request list's More filters.
    • Alternative: upstream doesn't use a menu to pick a model. Its composer and its scheduled-task editor push a model picker screen (ThreadSettingsPickerScreen). Moving the persona form to that screen would need an adapter from persona routes to upstream's model options. The Captain will show Jackson both at Checkpoint 4.
    • Long catalogs: with every provider signed in, the one-level menu gets long, and the tester notes how long.
  2. Instructions: autoCapitalize is now sentences in both Create and Edit. The ID field stays unchanged.
  3. Keyboard: the form drops its KeyboardAvoidingView, whose padding stacked on the bottom inset. It now uses upstream's automaticallyAdjustKeyboardInsets on iOS, as GitCommitSheet does. While the keyboard is up, the form's bottom padding is dropped on iOS. On Android, where Save stayed hidden behind the keyboard on base and head alike, the form now uses keyboard-controller's KeyboardAwareScrollView, as the Inbox does, so it scrolls clear of the keyboard. This also covers the Playbook conversation page, which uses the same frame.

UI changes

iOS Simulator, iOS 26.5, same test home on each side: before on j5/main (067d732e1a), after on b3b12d01e4. Android captures are pending from the Android tester.

Before After
Primary model menu open Primary model menu with a provider submenu, iOS, before Primary model menu with providers as sections, iOS, after
Instructions after typing a full stop and Return Instructions staying lowercase after a full stop and Return, iOS, before Instructions capitalized after a full stop and Return, iOS, after
Create with the keyboard up, scrolled to the end Create persona button above the keyboard, iOS, before Create persona button above the keyboard, iOS, after

The keyboard captures above were taken before fdf588ba4d. On fdf588ba4d, with the same fixture:

Create persona button with less space above the keyboard, iOS, after the padding fix

Android 16, same test home: before on 091dfb9f3d (persona code identical to j5/main), after on 4fe087b02a.

Before After
Instructions typed with Gboard Instructions staying lowercase when typed with Gboard, Android, before Instructions capitalized when typed with Gboard, Android, after
Edit, scrolled to the end with Gboard open Save hidden behind Gboard at the end of the form, Android, before Save fully above Gboard at the end of the form, Android, after
Model menu Model menu drilling in by provider, Android, before Model menu drilling in by provider, unchanged, Android, after

After only:

Create persona button fully above Gboard, Android, after
Normal form layout after the keyboard closes, Android, after

Create's model menu on j5/main:

ios-model-menu-before.mp4

Create's model menu with this PR, scrolling to Codex and choosing Luna:

ios-model-menu-after.mp4

Edit's model menu on j5/main:

ios-edit-model-menu-before.mp4

Edit's model menu with this PR:

ios-edit-model-menu-after.mp4

Live testing

iOS: PASS at b3b12d01e4 (crew tester, report test-reports/pr-978/ios-b3b12d01e4.md).

  • Model menu: both forms show one scrolling menu with sections for 13 Claude and 8 Codex models. It's longer than one screen, but a swipe inside it reaches Codex. A choice from a provider that isn't listed first saved and reopened correctly.
  • Instructions: with real key taps, it capitalizes after a full stop and after Return in both forms.
  • Keyboard: both forms save with the keyboard up. A flick at the bottom left Save reachable.
  • Playbook page: it lays out correctly. It has no text field, so there's no keyboard case to check.

The gap under Save: the tester measured about 80–85pt between the button and the keyboard on base and on that head alike, so b3b12d01e4 didn't reduce it. From code, the cause is double counting. iOS's automatic content inset already covers the home-indicator area under the keyboard, and the form's bottom padding (that area plus 18) added it again. fdf588ba4d drops the padding while the keyboard is up on iOS and keeps 18 on Android. Re-measured on iOS at fdf588ba4d (report test-reports/pr-978/ios-fdf588ba4d.md): the gap went from about 87pt to 35pt. The 35pt left is the home-indicator inset UIKit adds; that last part is inferred.

Android: PASS at 4fe087b02a (crew tester, report test-reports/pr-978/4fe087b02a.md).

  • With Gboard open and the form scrolled to the end, Create and Edit show their button fully above the keyboard, 36dp clear, and saving with the keyboard open works. On base, Save stayed hidden behind the keyboard; the tester found that at fdf588ba4d, and 4fe087b02a fixes it.
  • When the keyboard closes, the form returns to its normal layout, with field spacing and side padding matching base exactly.
  • Sentence case works with real Gboard keys. The provider drill-in is unchanged, and a model choice saves.
  • The Playbook conversation page still renders. It has no text field.

Not exercised yet: dark mode, tablets and a physical iPhone.

Checklist

  • One concern: the description has no "also". All three are Mobile persona form: submenu animation, auto-capitalization, and Save's place with the keyboard up #961's form fixes.
  • Tests cover the changed behavior: no test. These are visual and input changes, so captures are the proof.
  • UI changes: before/after above, on iOS and Android, with videos of the menu
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: none. All four changed files are J5's.
  • Upstream product: no change
  • Surfaces: the persona Create and Edit pages, and the Playbook conversation page, which uses the same frame. Mobile only.
  • Docs: none

Built by Claude Opus 5.5 in Claude Code (J5 Code crew seat builder-composer).

🤖 Generated with Claude Code

Jacksondr5 and others added 2 commits November 8, 2026 23:02
…ove the keyboard without dead space

Instructions turned off auto-capitalization. The form stacked a
KeyboardAvoidingView's padding on top of its bottom inset; it now uses
upstream's automaticallyAdjustKeyboardInsets, as GitCommitSheet does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The submenu's native transition looked broken at Checkpoint 3. Inline
sections keep the provider grouping in one level on iOS; Android keeps
its drill-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 9, 2026 5:40am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 4 billable files and costs up to $1.00.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 28 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 31 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 067d732 and 4fe087b.

Files selected for processing: 4

  • apps/mobile/src/j5/agents/AgentCreateScreen.tsx
  • apps/mobile/src/j5/agents/AgentDefinitionFields.tsx
  • apps/mobile/src/j5/agents/AgentEditorScreen.tsx
  • apps/mobile/src/j5/agents/SettingsFormScreen.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 9, 2026

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combined panel review (reviewer-opus + reviewer-sol) at b3b12d0

Verdict: no findings, and the panel approves the source. Still pending: captures and device checks on Android and iOS, and J5 CI.

  • Model menu. displayInline: true maps to UIMenu's .displayInline, which the installed menu bridge supports, so iOS shows each provider as a section and the submenu transition goes away. Android's AndroidAnchoredMenu follows only subactions and ignores the field, so Android keeps its drill-in menu unchanged. An inline provider with no models has no items to choose.
  • Instructions. Create and Edit both now use autoCapitalize="sentences".
  • Keyboard.
    • On Android, the old KeyboardAvoidingView had behavior undefined, so it was a plain flex: 1 view. Removing it leaves the flex: 1 scroll view with the same insets and content sizing, so nothing changes on Android.
    • On iOS, the frame now matches upstream's GitCommitSheet.tsx:96–104: contentInsetAdjustmentBehavior="automatic" plus automaticallyAdjustKeyboardInsets and the same bottom padding. React Native works out the keyboard overlap once, then sets bottom to the larger of that overlap and the explicit contentInset.bottom (RCTScrollViewComponentView.mm, _keyboardWillChangeFrame). With no KeyboardAvoidingView padding left, nothing adds the keyboard twice.
    • Whatever gap remains below Save is the content's own bottom padding plus whatever bottom inset the safe area adds, the same as upstream's commit sheet. Whether that's small enough for #961's "dead space" is the device check.
  • Reach. SettingsFormScreen also frames the Playbook conversation page (#906), so it gets the keyboard change too.
  • PR body (minor). Four J5 files change, not three: the two Instructions fields, the model menu and the form frame.

Reviewer-run checks

  • reactCompilerCoverage.test.ts: 1081 passed (reviewer-opus); 4 targeted compiler checks (reviewer-sol)
  • mobile vp run typecheck: exit 0 for both reviewers, after refreshing a stale worktree install
  • lint: clean on the changed files; git diff --check: clean

For the device pass:

  • On iOS, the model menu shows providers as sections, including a long provider list.
  • On Android, the drill-in menu still works.
  • With the keyboard up, Save sits just above it without a large gap, on both persona forms and the Playbook page.
  • Instructions capitalizes after a full stop and on a new line.

Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.

@github-actions github-actions Bot added the size:S 10-29 effective changed lines (test files excluded in mixed PRs). label Nov 9, 2026
iOS's automatic content inset already covers the home indicator area under
the keyboard, so the form's own bottom padding doubled it, about 80pt in the
tester's captures. With the keyboard up, the padding is dropped on iOS and
kept small on Android.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Panel delta check (reviewer-opus + reviewer-sol) at fdf588b

Verdict: no findings, and the panel's source approval stands. The exact gap is for the iOS device run to confirm.

  • The inference holds. React Native puts the keyboard overlap, which includes the home-indicator area, into the scroll view's contentInset. With contentInsetAdjustmentBehavior="automatic", UIKit then adds the bottom safe area on top. The old content padding (Math.max(insets.bottom, 18) + 18, about 52 pt) stacked on both, so about 34 + 52 ≈ 86 pt matches the tester's 80–85 pt.
  • Expectation for the re-test. With the padding at 0 while the keyboard is up, the gap under Save should drop to about 34 pt (the safe area UIKit still adds), not to zero. That's reasonable breathing room, but it's what the tester should measure.
  • Android changes too. While the keyboard is open, the padding is now 18 instead of Math.max(insets.bottom, 18) + 18, so the tester should cover Android as well.
  • useKeyboardState (react-native-keyboard-controller, as upstream uses) updates on show and hide, and handles a keyboard that's already open when the page mounts. The closed-keyboard padding is unchanged, and the Playbook conversation page shares the frame.

Reviewer-run: reactCompilerCoverage.test.ts passes (1081), mobile vp run typecheck exits 0, and lint and git diff --check are clean.

Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.

…eyboard

The Android tester found Save hidden behind the keyboard at the end of the
form, on base and head alike: Android never avoided the keyboard there.
Android now uses keyboard-controller's KeyboardAwareScrollView, as the Inbox
does; iOS keeps upstream's scroll view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Panel delta check (reviewer-opus + reviewer-sol) at 4fe087b

Verdict: no findings, and the panel's source approval stands. Still pending: the device runs and captures.

  • iOS is unchanged. It keeps ScreenScrollView, which registers with the header, plus automaticallyAdjustKeyboardInsets and the same padding: 0 with the keyboard up, the usual padding with it down. Expect about 34 pt under Save as before.
  • Android now uses react-native-keyboard-controller's KeyboardAwareScrollView with bottomOffset={80}, the same pattern as InboxScreen.tsx:166–176. It keeps the 720-wide content cap and the usual bottom padding. It adds scrollable space for the keyboard, so Save can scroll clear of Gboard. bottomOffset is the clearance above the focused input, not a promised 80 pt gap under Save. The Android useKeyboardState padding branch is gone, so nothing pads twice.
  • Styling on Android. className and contentContainerClassName go through KeyboardAwareScrollView to the underlying scroll view, the same as on the Inbox screen. Since the earlier SafeAreaView class-dropping bug, it's worth confirming on device that the form's gap and padding render on Android.
  • When this rebases over #990, keep #990's removal of the Playbook conversation route.

For the device pass: on Android, with Gboard open on Create and Edit, Save is reachable and tappable at the end of the form, and the layout resets when the keyboard hides. On iOS, the gap under Save is about 34 pt.

Reviewer-run: reactCompilerCoverage.test.ts passes (1081), mobile vp run typecheck exits 0, and lint and git diff --check are clean.

Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.

@github-actions github-actions Bot added size:M 30-99 effective changed lines (test files excluded in mixed PRs). and removed size:S 10-29 effective changed lines (test files excluded in mixed PRs). labels Nov 9, 2026
@Jacksondr5
Jacksondr5 merged commit 42b98b2 into j5/main Nov 9, 2026
46 of 50 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/mobile-persona-form-polish branch November 9, 2026 06:25

This branch was successfully deployed

1 active deployment
Preview — 4fe087b0 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile persona form: submenu animation, auto-capitalization, and Save's place with the keyboard up

1 participant