Skip to content

feat(swift-ios): choose the reasoning level from the composer - #7344

Open
saphid wants to merge 9 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:feat/issue110-reasoning-selector
Open

feat(swift-ios): choose the reasoning level from the composer#7344
saphid wants to merge 9 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:feat/issue110-reasoning-selector

Conversation

@saphid

@saphid saphid commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Problem

The native SwiftUI composer exposed only Codex reasoning, while the Electron composer renders the selected model's full option-descriptor catalog. That left Service Tier unavailable and made the native behavior diverge as providers and models changed.

Change

  • Render generic descriptor-backed trait sections in descriptor order from the selected model; absent and unsupported sections stay hidden.
  • Match the Electron treatment for current and default choices, descriptions, and the compact trigger.
  • Route every choice through the existing provider/model selection and turn-dispatch path.
  • Preserve provider/model changes, inherited selections, default materialization, and prompt-injected hidden effective values when a neighboring trait changes.
  • Add focused coverage for reasoning, service tier, descriptor order, trigger text, default/current states, unsupported descriptors, hidden prompt-injected values, and persisted effective dispatch.

For the live Codex descriptor, the menu shows Reasoning followed by Service Tier, with Standard marked Default. The backend currently supplies Fast's description as 1.5x speed, increased usage without terminal punctuation; SwiftUI renders descriptor text verbatim. The focused fixture also covers the supplied punctuated form.

Verification

  • Exact base: b67837984e5650888b1eed0e1cd7fff83625f696
  • Exact head: 2524de5c55914a9364c56f1dcff7c5953b74ea98
  • Base is an ancestor; GitHub reports MERGEABLE / CLEAN with no conflicts.
  • Focused native tests: 32 passed, 0 failed, 0 skipped.
  • swiftc -parse passed.
  • git diff --check passed.
  • CI at exact head: all required checks passed; intentional preview/static-analysis jobs are skipped and Macroscope Approvability is neutral.
  • All four published review threads are resolved; the three current findings were addressed in 46b2288 and 2524de5.
  • Direct Claude Opus high review was attempted read-only on the frozen change. The process exited 1 with HTTP 429, zero tokens, and no model usage, so no Claude model participated and cross-provider review was skipped because capacity was exhausted.

Exact-head proof

Built and installed only on the leased canonical proof simulator from exact head. Installed executable SHA-256: c68c7d9d1ba53b96fa54347f29d84db26765b95e00e9bfb5dcaca3c3a1e5b2d9. Exact-base executable SHA-256: 0ea482ec8e37519c86fa5529ac541b605e9e01f286e336039ec0ebf3ef971cf2.

Dark mode — exact base → exact head

dark exact base dark exact head

dark before and after, full descriptor sections

Interaction

reasoning and service-tier interaction, complete menu and composer trigger

Light mode — exact base → exact head

light exact base light exact head

light before and after, full descriptor sections

Raw interaction capture: 76.758 seconds, SHA-256 1f14953d7c351a31498a776a9daef347a058258af7b3eed27dfb234a4a1fdbf4. Complete timeline validation passed all 5 declared actions. Every published attachment is anonymously readable; both MP4s return video/mp4, nonzero full bodies, and 206 byte ranges. The clean video rendered successfully in the shared browser.

Owning lane issue: saphid/t3code-personal#110.

Built with GPT-5.6 Sol via Codex in T3 Code.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0fda1ea5-6762-467b-a742-8559ba6ed64a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Warning

Your free Security trial is over. An organization admin can activate Security or dismiss this notice.


Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Aug 17, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The PR introduces a new descriptor-backed traits picker in the iOS composer and changes which model-option values can be selected and sent on existing message flows. Its scope is contained, but the new production workflow and cross-layer selection behavior warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotgg force-pushed the t3code/rebuild-mobile-app-swift branch from 1f39d72 to fce7740 Compare August 18, 2026 21:35
@saphid
saphid force-pushed the feat/issue110-reasoning-selector branch from 8415ea9 to d3c5630 Compare August 18, 2026 22:23
@t3dotgg

t3dotgg commented Aug 19, 2026

Copy link
Copy Markdown
Member

Need this updated and also screenshots/vids

@saphid
saphid force-pushed the feat/issue110-reasoning-selector branch from d3c5630 to 6cf8887 Compare August 19, 2026 21:15
@saphid

saphid commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@t3dotgg Updated: the branch is now on the current t3code/rebuild-mobile-app-swift base (961a3ae), with the final selector changes at 6cf8887; GitHub reports it 0 commits behind and mergeable. The requested media is still pending: the required canonical proof simulator lock (~/.t3/locks/swiftui-proof-sim.lock) is currently held, so I did not disturb its owner. We still need both light- and dark-mode captures plus a short selector video, and I’ll attach them in a follow-up when that simulator is available.

saphid added 4 commits August 21, 2026 11:38
The composer's reasoning level was read-only, so changing it meant opening
the model picker and reconfiguring the model. Make it an inline selector
instead.

The levels are read from the selected model's own option descriptor, so the
client never assumes which levels a provider exposes, and choosing one writes
the same selection shape the model picker's configuration screen writes
through the composer's existing selection binding. Descriptors that are not a
choice list, and values the model does not offer, keep the previous read-only
and hidden behavior.
On-device review of the selector asked for two changes. The two prompt-tier
"ultra" levels are not wanted in the composer, so the control excludes exactly
the `ultracode` and `ultrathink` choice ids and documents that as the single
product rule in an otherwise descriptor-driven control. A level excluded here
is still displayed while it is the effective one, so the composer keeps telling
the truth about a setting made elsewhere, but it is never offered or checked.

The composer sits at the bottom of the screen, where an adaptive menu flips
its contents and puts the highest level nearest the finger. Pin the menu to
the descriptor's declared order so the lowest level reads first.
@saphid
saphid force-pushed the feat/issue110-reasoning-selector branch from 6cf8887 to b849a88 Compare August 21, 2026 02:21
@saphid

saphid commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@t3dotgg Updated again: I rebased the branch onto the current t3code/rebuild-mobile-app-swift head (c2276320) and pushed exact head b849a8800. The PR body now contains exact-head light and dark screenshots plus a short interaction recording (Low → High, then reopen with High checked). Focused FeatureComposerPowerTests are 25/25 passing, and the exact-head SwiftUI simulator build succeeded. I also fixed the selector label to meet the 44-point minimum tap target in b849a8800. GitHub reports the PR mergeable; no inline human review threads currently exist.

Comment thread apps/swift-ios/Features/Chat/FeatureComposerReasoningControl.swift Outdated
@saphid

saphid commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

@t3dotgg Updated against the live SwiftUI target and refreshed the requested proof.

  • PR head: 696f9d428e5069da90e5d758a45017d1c9b0d409
  • live target: b67837984e5650888b1eed0e1cd7fff83625f696 (ancestor of the PR head)
  • exact-head dark-first and light before/after screenshots plus comparison GIFs are now in the PR body
  • exact-head interaction GIF plus clean and annotated 23-second MP4s are linked in the PR body
  • the installed simulator app reported the exact PR SHA and its executable matched the preserved build byte-for-byte
  • the three-action proof packet passed validation; current CI native tests and the main checks are green, with Cursor's head rerun still pending

The prior b849a880 media has been replaced rather than presented as current proof.

Comment thread apps/swift-ios/Features/Chat/FeatureComposerTraitsControl.swift
Comment thread apps/swift-ios/Features/Chat/FeatureComposerTraitsControl.swift

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 46b2288. Configure here.

Comment thread apps/swift-ios/Features/Chat/FeatureComposerTraitsControl.swift
@saphid

saphid commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

@t3dotgg Updated to the superseding acceptance target at exact head 2524de5c55914a9364c56f1dcff7c5953b74ea98.

The SwiftUI composer now renders every supported model-option descriptor section in descriptor order. The Codex proof shows Reasoning followed by Service Tier, Standard as Default, Fast with the live descriptor text, and retained/effective selections through the existing turn-dispatch path. Unsupported sections stay hidden; provider/model changes, inherited values, prompt-injected hidden values, and default materialization are covered by focused tests.

Focused verification: 32 tests passed, 0 failed; swiftc -parse and git diff --check passed. Exact base b67837984e5650888b1eed0e1cd7fff83625f696 remains an ancestor. GitHub reports no conflicts.

Dark mode — exact base → exact head

dark exact base dark exact head dark before and after

Interaction proof

reasoning and service-tier interaction

Clean playable video: https://github.com/user-attachments/assets/b17c2f48-294f-46da-ad87-9da57ba01e12

Annotated playable video: https://github.com/user-attachments/assets/22c313e1-94a5-400c-b124-4b6dedb07d49

Light mode — exact base → exact head

light exact base light exact head light before and after

The raw exact-head interaction capture is 76.758 seconds (SHA-256 1f14953d7c351a31498a776a9daef347a058258af7b3eed27dfb234a4a1fdbf4). Timeline validation passed all 5 declared actions. The live backend currently supplies 1.5x speed, increased usage without terminal punctuation; the UI renders the descriptor verbatim, while the focused fixture also covers the supplied punctuated form.

Direct Claude Opus high review was attempted read-only on the frozen change, but the process exited 1 with HTTP 429 and zero model usage; no Claude model participated and cross-provider review was skipped because capacity was exhausted.

@saphid

saphid commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

GIF crop correction

The three earlier GIFs were cropped too tightly and hid most of the descriptor menu. I replaced their live PR-body embeds without changing the PR head.

  • Exact PR head remains 2524de5c55914a9364c56f1dcff7c5953b74ea98.
  • The corrected GIFs are full-width 720×1158 crops. They keep the complete Reasoning section, the complete Service Tier section including Fast's description, the popover anchor, and the composer trigger in one frame.
  • Dark, light, and interaction GIFs use one explicit source-bound crop decision. All three anonymous downloads returned HTTP 200 as image/gif and matched the inspected local hashes byte-for-byte.
  • Media stays outside the product diff at saphid/t3code media commit 6dcfcf115e9cea4ac2aee0464bc89c23db520f6f.
  • The durable renderer fix is local commit db1596389 on t3code/review-project-skills: GIF rendering now requires a reasoned crop decision that binds exact source hashes, dimensions, required visible details, and a receipt. Its focused suite passes 37/37 tests.

Dark comparison

Dark exact-base to exact-head comparison with complete descriptor sections

Interaction

Reasoning and service-tier interaction with complete menu and composer trigger

Light mode comparison

Light exact-base to exact-head comparison with complete descriptor sections

Crop decision · dark receipt · light receipt · interaction receipt

@saphid

saphid commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

plz merge @t3dotgg

@saphid

saphid commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Upstream successor handoff — #110 / SwiftUI Test Build 86

This records the contribution state only. The coordinator-owned phone acceptance remains on saphid/t3code-personal#110: Alex’s recorded verdict was “Reasoning menu looks good.” I did not create or alter that acceptance.

  • Accepted candidate / current PR head: 2524de5c55914a9364c56f1dcff7c5953b74ea98.
  • Test Build 86 generation receipt: SHA-256 0b46a98cbc196efa58a1ddc17fb20309706082c7fc8e7208be14f0cbf294a4fb; its feat: copy button on user messages, hover on message for buttons #110 candidate entry names the same head and binds proof 6ffac5eb28335a3806525dec09021f38dea8b91747f0ec227f93a77bb1d1e4a5 plus inspection 56dc80709a602bd9b68b42d6dce2dcfbaa62f4b2f5e26b2a853bcf0b41cf7f28.
  • Installed-and-launched device receipt: SHA-256 2cea2febb651bf6675e09ca75889c41d77b014077c4d0dbd4b16d4a15023e654.
  • Live target: b67837984e5650888b1eed0e1cd7fff83625f696; fetched ancestry check passes (0 behind, 9 ahead).
  • Review: all four published review threads are resolved. Theo’s request to update the branch and provide screenshots/video is addressed by the live exact-head PR body and the full-menu GIF correction.
  • Evidence: exact-base/exact-head dark and light images, full-width dark/light/interaction GIFs, and clean/annotated MP4s are live. Anonymous range checks returned 206 with the expected PNG/GIF/MP4 content types for every current embed/link.
  • Verification: focused native tests recorded 32 passed, 0 failed, 0 skipped; Swift parsing and git diff --check passed. Current CI’s substantive jobs are green, including SwiftUI native tests, CI checks/server partitions, Rust, release smoke, vouch, size, Cursor Bugbot, and Macroscope correctness; non-applicable preview/static-analysis jobs are skipped and Approvability is neutral.
  • The earlier direct Claude Opus high review attempt on this frozen head exited with HTTP 429, zero tokens, and no model usage, so cross-provider review remains truthfully recorded as skipped.

GitHub currently reports MERGEABLE / CLEAN; the PR is open, trusted, and labeled size:XL. No upstream human approval is recorded (reviewDecision is unset), so the accurate handoff is: phone-accepted and proof-complete, ready for upstream maintainer review/decision, but not independently classified as merge-ready under the contribution gate yet.

No product commit, push, rebase, proof mutation, media upload, or PR-body change was made during this handoff; the accepted candidate was preserved exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). 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.

2 participants