feat(mobile): merge model and reasoning into one agent config control (port #3821) - #3998
Merged
Merged
Conversation
… (port #3821) Ports the desktop "new agent harness selector" (#3821) to apps/mobile. Replaces the separate model and reasoning pills with a single merged pill that opens a bottom sheet: a Faster→Smarter preset scale (model + effort together), a fast-mode toggle (flag-gated), a 200k/1M context-window control, and an Advanced section for picking harness/model/reasoning individually with reset. Sends context_window and fast_mode on cloud task creation and sandbox warming, persists the selection, and bumps the preferences store version once so stale installs land on valid defaults. Generated-By: PostHog Code Task-Id: 2af7b99c-c87f-415b-81ef-95a656535821
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Gilbert09
marked this pull request as ready for review
July 30, 2026 11:21
There was a problem hiding this comment.
Contained mobile UI feature porting an already-shipped desktop capability (fast mode / context window), with additive-only backend payload fields and a well-tested, reversible local-preferences migration; no auth, billing, migration-of-server-data, or CI/dependency risk, and the diff matches the description.
- Author wrote 1% of the modified lines and has 38 merged PRs in these paths (familiarity MODERATE).
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 786L, 14F substantive, 1174L/19F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (1174L, 19F, two-areas, feat) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ 67f0052 · reviewed head ed4b3d9 |
|
/trunk merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The mobile app still exposed agent configuration as separate Model and Reasoning pills, and had no way to set the two new agent settings desktop shipped in #3821 (fast mode and context window). This ports that desktop change ("new agent harness selector") to
apps/mobilefor behavioral parity, using mobile-idiomatic UI.Desktop PR: #3821.
Changes
Merged model + reasoning control. The two pills become one pill summarising the current model + effort (e.g. "Claude Opus 5 · Extra High"). It opens a bottom sheet with:
posthog-desktop-fast-modeflag as desktop (mobile reads it viaposthog-react-native'suseFeatureFlag), shown only for models that support it.Instead of the desktop drag-slider + dropdown-with-submenus, the sheet uses a preset list, segmented controls, and a collapsible Advanced section (no nested modals).
Payload.
context_windowandfast_modenow ride alongsidereasoning_efforton cloud task creation and on sandbox warming, matching the desktop body shape (only sent for models that support them).Persistence + migration. The selection persists (per-device defaults in
preferencesStore, per-task intaskStore) and restores on the composers. ThepreferencesStoreversion is bumped to1with a migration so existing installs drop a stale last-used model/effort and land on the new defaults.Shared policy.
getCapabilityLadder,supports1MContext, andsupportsFastModewere added to@posthog/shared(additive) so mobile reuses one policy rather than re-deriving lists.Deliberately not ported
set_config_option). Mobile persists the choice and applies it on the next run (create / resume / retry), which keeps the change contained; reasoning/model live-push is unchanged.@posthog/agent. Desktop's ladder lives in@posthog/agent, which mobile cannot import. To respect the "don't touch desktop/agent" scope,@posthog/sharedcarries a mirrored copy (documented with a keep-in-sync comment) rather than refactoring@posthog/agentonto shared. That unification is a reasonable follow-up.How did you test this?
pnpm --filter @posthog/mobile test— 563 passing. Added/updated unit tests for the preset mapping, harness-switch reset, persistence + migration, context-window gating, and the creation/warm payload fields (options.test.ts,AgentConfigControls.test.tsx,preferencesStore.test.ts,cloudTaskRunConfig.test.ts,useWarmTask.test.tsx).pnpm --filter @posthog/shared --filter @posthog/api-client typecheck— clean.tsc --noEmit— no new errors (one pre-existingSessionActivityStateerror unrelated to this change).Automatic notifications
Created with PostHog Code