Skip to content

refactor(core): own composer model policy#3637

Open
richardsolomou wants to merge 4 commits into
posthog-code/share-mobile-mcp-skill-transportfrom
posthog-code/share-composer-control-semantics
Open

refactor(core): own composer model policy#3637
richardsolomou wants to merge 4 commits into
posthog-code/share-mobile-mcp-skill-transportfrom
posthog-code/share-composer-control-semantics

Conversation

@richardsolomou

@richardsolomou richardsolomou commented Jul 21, 2026

Copy link
Copy Markdown
Member

Problem

Mobile's two composers duplicated desktop's model availability and reasoning compatibility decisions. The picker and button presentation is platform-specific, but those policy decisions are not.

Depends on #3635
Refs #2416

Changes

I moved restricted-model selection and reasoning compatibility into core and switched mobile to those policies. Mobile keeps its picker mapping, labels, and native controls.

How did you test this?

  • Ran 2,576 core tests, including composer model policy coverage.
  • Ran 413 mobile tests.
  • Ran core/UI, desktop, and web typechecks, Biome, and the host-boundary check.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

React Doctor found 10 issues in 2 files · 10 warnings.

10 warnings

src/app/task/index.tsx

src/features/tasks/composer/TaskChatComposer.tsx

Reviewed by React Doctor for commit 44c040d.

@richardsolomou
richardsolomou force-pushed the posthog-code/share-mobile-mcp-skill-transport branch from a5ab234 to d85caff Compare July 23, 2026 13:08
@richardsolomou
richardsolomou force-pushed the posthog-code/share-composer-control-semantics branch from 2f7181a to 431749d Compare July 23, 2026 13:11
@richardsolomou richardsolomou changed the title refactor(mobile): share composer control semantics refactor(mobile): align composer model policy Jul 23, 2026
@richardsolomou
richardsolomou force-pushed the posthog-code/share-mobile-mcp-skill-transport branch from d85caff to 872c4ca Compare July 23, 2026 13:37
@richardsolomou
richardsolomou force-pushed the posthog-code/share-composer-control-semantics branch from 431749d to b0dd0b1 Compare July 23, 2026 13:39
@richardsolomou richardsolomou changed the title refactor(mobile): align composer model policy refactor(core): own composer model policy Jul 23, 2026
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
apps/mobile/src/features/tasks/composer/options.ts:62-64
**Recording stop becomes task stop**

When a remote user message starts an agent turn while the local user is recording, `canStop` takes precedence over `isRecording`, so the unchanged stop control cancels the agent turn instead of stopping voice capture, leaving the recording active and potentially losing the user's speech.

### Issue 2 of 2
apps/mobile/src/features/tasks/composer/TaskChatComposer.tsx:500-508
**Unchanged reasoning triggers side effects**

Selecting a model that supports the current reasoning effort still invokes `onReasoningChange`, causing a redundant `set_config_option` cloud command and unnecessary persisted Zustand updates.

Reviews (1): Last reviewed commit: "Merge posthog-code/share-mobile-mcp-skil..." | Re-trigger Greptile

Comment thread apps/mobile/src/features/tasks/composer/options.ts Outdated
Comment thread apps/mobile/src/features/tasks/composer/TaskChatComposer.tsx Outdated
@richardsolomou
richardsolomou force-pushed the posthog-code/share-mobile-mcp-skill-transport branch from 66a119b to 6aa93d5 Compare July 23, 2026 16:34
@richardsolomou
richardsolomou force-pushed the posthog-code/share-composer-control-semantics branch from 188b515 to 68356b7 Compare July 23, 2026 16:34
@richardsolomou
richardsolomou force-pushed the posthog-code/share-mobile-mcp-skill-transport branch from 6aa93d5 to eb313ca Compare July 23, 2026 17:28
@richardsolomou
richardsolomou force-pushed the posthog-code/share-composer-control-semantics branch from 68356b7 to 6e7681e Compare July 23, 2026 17:28
richardsolomou and others added 3 commits July 23, 2026 21:50
Generated-By: PostHog Code
Task-Id: 40c57a59-b4e1-4760-8e56-ecd03e9c2f0f
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
Generated-By: PostHog Code
Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
@richardsolomou
richardsolomou force-pushed the posthog-code/share-mobile-mcp-skill-transport branch from eb313ca to 5bb5175 Compare July 23, 2026 18:55
@richardsolomou
richardsolomou force-pushed the posthog-code/share-composer-control-semantics branch from 6e7681e to 44c040d Compare July 23, 2026 18:55
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.

1 participant