Skip to content

AI conversation: iPhone and iPad, edit replies, attribute check, changes and usage notice - #91

Open
everettjf wants to merge 7 commits into
mainfrom
ai-conversation-ios
Open

everettjf wants to merge 7 commits into
mainfrom
ai-conversation-ios

Conversation

@everettjf

Copy link
Copy Markdown
Owner

What a user gets

  • iPhone and iPad: Generate with AI is the same multi-turn conversation as on the Mac and Android. iPhone: preview on top, turns below, message field above the keyboard. iPad: turns on the left, preview and the three sizes on the right. The single request with a Refine field is removed.
  • Small changes stay small: a turn that changes existing code may answer with SEARCH/REPLACE blocks instead of the whole file.
  • Made-up attributes are caught: <date style="weekday"> runs without an error and shows the time. A tag, attribute or closed-list value that does not exist is now sent back to the model.
  • What changed: every version shows +3 −2 against the one it was made from; a click shows the lines.
  • A heavy conversation says so and offers a new one that starts from the current version.
  • Multi-turn quality run, opt-in: Scripts/ai-conversation-quality.sh.

All of it on Mac, iPhone, iPad and Android; Swift and Kotlin read and apply the same replies the same way.

Security and compatibility

  • Model output stays untrusted. An edit block is applied only when its searched text is in the code exactly once; otherwise the whole reply is refused and the model is asked for the full code. What comes out runs through the same runtime, limits and permissions as any candidate.
  • The attribute check grants and blocks nothing at run time; the runtime switch stays the authority. It runs after the widget ran, is skipped on the last attempt, ignores capitalised tags (the script's own components) and computed values. Every template, example and Gallery widget in the repository passes it (tested in Swift and Kotlin).
  • The tag and attribute lists are generated by npm run docs from scriptWidgetAPI.js and the web renderer's coverage.js; an editor test fails when they are stale.
  • No change to the conversation file format, the package format or the runtime. Keys are untouched.
  • The iPhone conversation runs candidates with a Package 2.0 manifest and only the declared hosts, as the Mac does; the old screen ran them as a legacy package.

What ran

  • ./Scripts/release-readiness.sh in the worktree: everything up to and including the Mac test suite, the Mac app build and the iOS app build passed. Its last step asks for a simulator named "iPhone 17", which this machine does not have, so that step was run by hand on an iPhone 17 simulator: 873 tests, 35 skipped, 0 failures.
  • AIConversationTests also on an iPad Air 11-inch simulator: 52 tests, 3 skipped, 0 failures.
  • Android: 519 JVM tests; play and foss debug builds; on a Pixel 6 (Android 17) the app suite passed, 66 tests, with the live-model, push-wait and picked-folder tests skipped. AiConversationUiTest drives the real screen through an edit reply and the changed lines.
  • Pictures of the Mac window, the iPhone and the iPad screen were written by the tests and looked at.

Not verified

  • No live model. Edit replies, the attribute check and the multi-turn cases ran against scripted replies only. How often a real model uses edit blocks, and how many extra repairs the check costs, is not known until Scripts/ai-conversation-quality.sh is run with a key.
  • No taps on iPhone or iPad. The screens were rendered by tests, not operated: keyboard, rotation and the save flow were not exercised by hand. No physical iPhone or iPad.
  • Android core device suite and the emulators were not run.
  • The Copilot tab of the iPhone and iPad editor is still a single request; the conversation's texts are English only.

🤖 Generated with Claude Code

everettjf and others added 7 commits November 19, 2026 10:19
…th edit blocks

The single request with a Refine field is replaced by the conversation the
Mac and Android already have, on the shared session, store and turn views.
On an iPhone the preview is on top and the message field above the keyboard;
on an iPad the conversation and the preview are side by side.

A turn that changes existing code may answer with SEARCH/REPLACE blocks
instead of the whole file. Each searched text has to be in the code exactly
once; otherwise the reply is refused and the model is asked for the full
code. Swift and Kotlin read and apply the blocks the same way.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… model

The runtime ignores an unknown attribute, and a value outside a closed list,
without an error, so the repair loop never heard of <date style="weekday">.
A loose check now names such tags, attributes and values after the widget
ran, and the model is asked again; on the last attempt a widget that runs is
kept. The lists are generated by npm run docs from Studio's API metadata and
the web renderer's coverage table, for Swift and Kotlin. Every bundled
template and example passes the check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…as grown heavy

Each version shows how many lines it added and removed against the one it
was made from; a click shows those lines with a little context. A
conversation that sends large requests, has used many tokens, is dropping
old versions or old turns says so above the message field and offers a new
conversation that starts from the current version.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tion has grown heavy

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Four small conversations, every later turn a small change, with what each
turn changed, missed and cost. Scripts/ai-conversation-quality.sh runs them
and writes a report; a scripted run of the same harness is part of the
normal suite and needs no key.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e check, changes and the heavy-conversation notice

Also the Android UI test for an edit reply and the changed lines, and what
ran on the Pixel 6.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…texts for the conversation

The Copilot tab was the last place with a single request and a proposal
to accept. It is now the panel the Mac editor has: the AI works on a copy
with the widget's own permissions, Apply writes the version on screen
into the document through the editor's conflict check, and a host the
widget may not contact yet is asked about first.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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