Skip to content

improve(ios): rebuild the chat transcript around the web reading model - #200592

Merged
vyctorbrzezowski merged 8 commits into
mainfrom
ios-chat-parity
Nov 20, 2026
Merged

vyctorbrzezowski merged 8 commits into
mainfrom
ios-chat-parity

Conversation

@obviyus

@obviyus obviyus commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

On long, tool-heavy sessions the iOS chat fell well short of the web Control UI:

  • Scrolling back stopped after the first history page. olderCursor was never decoded, so older pages were never requested.
  • Every tool call between messages was its own card. Completed turns had no "Worked for ".
  • Subagent spawns showed only the wrapper card: no "Launched " row and no way to open the child.
  • sessions_yield acknowledgments were hidden under "Tool details". Failed commands showed no exit code.
  • Raw paths and plain #123 appeared instead of file and PR chips.
  • The header had no session title. The composer read "Message main…" (the agent id) and cut the model name.
  • Assistant replies sat in cards capped at 560 pt, and iPad width depended on size classes.

Solution

One transcript model, with the web UI as the guide:

  • Layout: assistant replies span one reading column, and user messages keep a tinted bubble. One width rule uses the measured pane width w:

    • margin 16 pt, or 24 pt from 700 pt;
    • column min(768, w − 2·margin);
    • user bubble 82% of the column, or 68% above 600 pt.

    This deletes openClawAssistantBubblesInCleanChrome, openClawAssistantUsesReadingColumn, the assistant card style with its seam drawing, and readingColumnWidth / usesExpandedLayout / expandedHorizontalMargin.

  • Container: iOS keeps List (fix(ios): stops chat from going blank after sending a message or a reply arrives #192232).

    • Older pages load after an upward scroll within ~1200 pt of the top, and the reading position is restored after the prepend.
    • Rows are deduped by __openclaw.id, then seq.
    • "Show earlier" appears only after a failed load.
  • Tool activity:

    • A completed turn folds into one "Worked for " row (web chat-turn-presentation.ts).
    • Adjacent tool rows in unfolded turns become one "Ran commands, read files" disclosure.
    • Subagent launches always stay visible as "Launched " rows that open the child.
    • A confirmed sessions_yield shows its acknowledgment.
    • Commands read "Ran ", with "Exit code N" on failure.
    • Continuation rows keep a multi-run turn together.
  • Chips: file references and GitHub items in message bodies get chips, following the web markdown rules. PR merge state is not fetched; chips use the web's unknown-state look.

  • Chrome:

    • the session title shows in the navigation bar;
    • the composer placeholder uses the agent identity name from agent.identity.get;
    • the model label is readable.
  • Reply footer: relative time. Exact time, duration, tokens, cost, context and model sit behind a tap, like the web tooltip.

Newly decoded fields, all already sent by the Gateway, so there is no schema change: olderCursor, hasMore, __openclaw.seq, recordTimestampMs, customType, continuation, tool exitCode.

References and what we didn't adopt:

  • T3 Code mobile: per-turn fold.
  • opencode-mobile/opencode-mobile: prepend restore.
  • Ice Cubes: List with re-anchoring by id.
  • Not adopted: a UIKit collection-view host, a manual-only "Load earlier" button, lazy tool loading (needs a new Gateway API), and multiple timeline styles.

Evidence (draft: more to come)

  • Real session, iPad 13" simulator: 35 history pages, 4,414 messages, 2,199 tool calls.

    • Scrolling back reaches the first turn in about 30 swipes.
    • All 161 user messages render; the web DOM also has 161.
    • Every subagent launch is visible: 55 rows for 57 spawns.
    • The other row kinds are within a few rows of the web.
  • Replay: feeding all 35 pages through the view model keeps every one of the 4,414 messages.

  • Scroll workload (iPad simulator, behavior probe, 120 slow swipes each way):

    main (1 page) this PR (35 pages)
    Bubble body evaluations 10.1/s 1.6/s
    Long frame gaps per 1,000 frames 58.2 48.8
    Viewport jumps 0 1

    These numbers predate the scroll-owner change below; prepend behavior is now measured by prepend-no-jump.

  • OpenClawKit (macOS swift test): 2,700 of 2,705 pass. The 5 failures are timing tests under full-suite load: 2 audio-player tests that also fail on main, plus TLS cancellation and canonical-history tests that pass when run alone.

  • iOS unit tests (iPhone 17 simulator): 1,117 pass. The one failure, the audio case of managed assistant media starts its artifact load with the playback route, also fails on main: since fix: make incoming audio recordings playable inline #196787 audio loads only after Play is tapped, and the test still expects an automatic load.

  • macOS: the package and test targets build.

Still pending:

  • before/after screenshots from synthetic fixtures (iPhone and iPad);
  • the AdaptiveLayoutUITests matrix, including accessibility text sizes;
  • device Animation Hitches and before/after phone traces (ChatScrollPerformanceUITests, dedicated iPhone);
  • a macOS test run.

Scroll, gesture and redraw ownership

On a phone the transcript bounced on expand/collapse, could scroll while the sidebar opened, and redrew every row on unrelated state changes. Five writers set the scroll offset independently (reader run anchor, synchronous follow, paging restore, bottom-pin follow, scroll commands), and two gestures (the shell's SwiftUI drag and the transcript's pan) ran at once.

  • One scroll owner: ChatReadingPosition (pure policy ChatReadingPolicy + a UIKit adapter on the transcript's collection view) is the only code that writes the transcript offset on iOS. ChatReaderRunAnchor.swift, ChatSynchronousFollow.swift, the paging restore and the bottom-pin writer are deleted. Rules:
    • following: stay at the bottom as rows stream in;
    • reading: hold the top visible row, no write unless rows above it changed;
    • expand/collapse: the tapped header keeps its screen position;
    • older-page prepend: hold the distance from the end of the content, so List's own compensation is never counted twice;
    • the transcript scroller has a directional lock, so a sideways swipe never scrolls it.
  • One drawer gesture owner: SidebarDrawerPanRecognizer opens the sidebar only from a 44 pt leading-edge zone below the nav-bar row; the transcript's pan waits for it to fail. The shell's SwiftUI DragGesture is gone.
  • Rows redraw only on their own content: Gateway health, link previews, the agent name and the drawer flag no longer reach every row's inputs.

Accepted edge: when an older page lands mid-fling, the reader's scroll in the ~2 frames where List changes the content is not kept (8.4–8.8 pt measured). There List's compensation cannot be told apart from the reader's scroll (it can land before the content height changes); an attempt to observe the offset during that window adopted List's write and jumped ~1,500 pt, so it was reverted. prepend-no-jump stays a bad case for this.

Measurement tooling (DEBUG, only with --openclaw-behavior-probe): offset-writer attribution and signposts (ChatScrollInstrumentation), drawer-pan marks, and four pnpm ios:behavior cases with gates; plus ChatScrollPerformanceUITests (XCTHitchMetric) for device hitch runs.

Behavior cases (iPhone 17 simulator, 3 samples each, same seeded 40-turn chat):

Case main this PR
sidebar-open-still (edge swipe and button) passes passes 3/3
swipe-right-still (40 pt drift down and up) passes passes 3/3
disclosure-header-still header and drawn rows move up to 71 pt (bottom-pin writer) header 0 pt, rows 0.2 pt, no offset writes; now a guard
prepend-no-jump no restore owner one ReadingPosition.prepend write per landing; −8.4 to −8.8 pt on the first prepend, 0 on the second (gate ≤ 4 pt, stays bad)
stream-turn (8 samples) passes passes 8/8, 0 pt drawn movement

The simulator's synthetic drags never start the transcript's own pan, so the sidebar and swipe cases pass on main too: they guard the fix but don't reproduce the device bug. Device hitch numbers are pending on a dedicated iPhone.

Offset writers during the prepend case, all samples: user (reader), system:…UpdateCoalescingCollectionView… (List), and ReadingPosition.prepend. No other writer.

Streamed list items stopped re-fading. ChatStreamingAssistantTextBody swapped a plain render for a TimelineView whenever a word reveal started or caught up between chunks. That rebuilt the subtree, and every list item in the streaming reply (each holds its own reveal state) faded in again from zero. On this branch the finished bullets blinked in 2 of 8 stream-turn runs (read by the screen check as a 55 pt move); main has the same code but didn't trigger it in 5 runs. One TimelineView, paused while idle, keeps the identity; 8/8 runs clean after. stream-turn's early drawn window now spans three 40 pt strips, so the setup gate stops failing when the reply draws sooner.

Impact

macOS shares OpenClawChatUI:

  • the reply footer becomes a tap popover, matching the web;
  • the QuickChat user bubble uses the tinted surface;
  • the desktop column is 768.

- Page older history through olderCursor with reading-position restore.
- Fold completed turns into Worked for <duration>; group adjacent tool rows.
- Keep subagent launches visible; show sessions_yield acknowledgments and exit codes.
- Full-width assistant replies on one width rule; delete the bubble flags.
- File and GitHub chips, session title, agent-name placeholder, readable model label.
@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Rebuilds native chat presentation with older-history paging, grouped work, child-session links, inline references, and revised layout and metadata.

Example: Read a 4,414-message conversation initially showing only its latest history page.

  • Before: Scrolling upward cannot retrieve the earlier pages.
  • After: Upward scrolling requests older pages and attempts to preserve the message being read.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Useful maintainer-directed work, with actionable integration defects and incomplete behavior evidence.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 5 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Long native conversations cannot expose older history, and dense tool activity makes answers and child sessions difficult to navigate.
Reason: The paging gap is source-confirmed, and collaborator authorship supplies direction for the accompanying reading-model changes without requiring another product approval.

Merge readiness

⛔ Blocked before merge - 6 items remain

Keep this maintainer-authored draft open: it addresses a real history-paging gap and useful native-chat improvements, but five integration defects need repair.

Priority: P2
Reviewed head: 186a27e752c09539836bcc1ba54fdf78db4f6d3a

Before merge

  • Keep generated acknowledgments out of canonical transcript identity (P2) - A yielded receipt with ID yield-receipt creates an assistant message whose transcriptMessageID is yield-receipt:yield-acknowledgment:y1, although no such entry exists in Gateway history. The existing savedReactionMessageID check consequently enables reactions for that synthetic assistant row, and sessions.reactions.set rejects the fabricated ID as unknown message. Transcript IDs also feed durable branch-tip bookkeeping. Give the acknowledgment presentation identity without advertising a nonexistent canonical message to those consumers.
  • Keep every grouped child session reachable (P2) - Three adjacent successful launches named Auditor, Reviewer, and Docs become one ChatSessionLaunchGroupRow, but the title links only the first two and renders the third as noninteractive 1 more. If any launch is unnamed, the count-only title has no links at all. The group row has no expansion or fallback button, so these children lose the navigation supplied by individual launch rows. Retain individual launch buttons or expose every child through the grouped row.
  • Keep failed operations visible when grouping active tool rows (P2) - In an unanswered turn, an exec result with exitCode 2 followed by a successful read is coalesced into a closed activity disclosure. Its headline is Ran commands, read files: activityHeadline appends blocked and unknown outcomes but no failure indication. The previously visible failed row and exit status therefore disappear during an active or unanswered run. Keep failed operations outside the collapsed group or include their failure state in its visible heading.
  • Handle a reset history window before accepting its page (P2) - The Gateway returns messages: [] with windowReset: true when a cursor belongs to a replaced transcript generation. The new payload decoder discards windowReset, and this code treats the missing olderCursor as exhausted history while retaining the old transcript. That response requires a canonical reload, rather than silently ending pagination against stale rows. Decode the existing reset signal and route it through the current history-replacement owner.
  • Expose an accessible way to request the first older page (P2) - Before any failure, the boundary row contains no accessible control, and loading depends exclusively on a decreasing scroll offset. A VoiceOver or Switch Control user viewing a short rendered page cannot activate older-history loading when that page has no upward scroll range, even though olderCursor exists. This is reachable when a tool-heavy page leaves only a few visible messages. Provide an accessible load action whenever older history exists while retaining automatic loading.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P2] Keep generated acknowledgments out of canonical transcript identity — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatToolResultIngestion.swift:48-49
  • [P2] Keep every grouped child session reachable — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatToolActivityViews.swift:178-185
  • [P2] Keep failed operations visible when grouping active tool rows — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCompletedWork.swift:111-115

Tests

  • Low-value test apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatColumnLayoutTests.swift: Remove the formula-mirroring helper tests; the changed AdaptiveLayoutUITests independently check the rendered column, composer, and bubble geometry.
  • Missing end-to-end proof: Provide redacted current-head iPhone/iPad before-and-after captures with paging and recovery traces, shared macOS footer/link behavior, and regression results shown red on base and green on head.
Agent review details

How this fits together

The shared Apple chat model consumes Gateway history and live events, projects transcript rows, and supplies iOS and macOS chat views and message actions.

flowchart TD
  A[Gateway history and events] --> B[Native chat transport]
  B --> C[Shared chat view model]
  C --> D[Transcript projection]
  D --> E[iOS transcript List]
  D --> F[macOS chat]
  E --> G[Paging and reading anchors]
Loading

Technical review

Best possible solution:

Land paging through the existing chat owners first, then complete the presentation changes while preserving canonical identities, accessible loading, reachable children, and visible failures.

Do we have a high-confidence way to reproduce the issue?

Current main omits older-page cursors from its history payload despite existing transport support, establishing the central paging gap from source; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The existing List and shared view model are appropriate owners, pagination is a coherent first stage, and retaining individual launch buttons is smaller and more complete than the added grouped-launch renderer.

Full review comments:

  • [P2] Keep generated acknowledgments out of canonical transcript identity — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatToolResultIngestion.swift:48-49
    A yielded receipt with ID yield-receipt creates an assistant message whose transcriptMessageID is yield-receipt:yield-acknowledgment:y1, although no such entry exists in Gateway history. The existing savedReactionMessageID check consequently enables reactions for that synthetic assistant row, and sessions.reactions.set rejects the fabricated ID as unknown message. Transcript IDs also feed durable branch-tip bookkeeping. Give the acknowledgment presentation identity without advertising a nonexistent canonical message to those consumers.
    Confidence: 0.99
  • [P2] Keep every grouped child session reachable — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatToolActivityViews.swift:178-185
    Three adjacent successful launches named Auditor, Reviewer, and Docs become one ChatSessionLaunchGroupRow, but the title links only the first two and renders the third as noninteractive 1 more. If any launch is unnamed, the count-only title has no links at all. The group row has no expansion or fallback button, so these children lose the navigation supplied by individual launch rows. Retain individual launch buttons or expose every child through the grouped row.
    Confidence: 0.99
  • [P2] Keep failed operations visible when grouping active tool rows — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCompletedWork.swift:111-115
    In an unanswered turn, an exec result with exitCode 2 followed by a successful read is coalesced into a closed activity disclosure. Its headline is Ran commands, read files: activityHeadline appends blocked and unknown outcomes but no failure indication. The previously visible failed row and exit status therefore disappear during an active or unanswered run. Keep failed operations outside the collapsed group or include their failure state in its visible heading.
    Confidence: 0.98
  • [P2] Handle a reset history window before accepting its page — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+HistoryPaging.swift:58-60
    The Gateway returns messages: [] with windowReset: true when a cursor belongs to a replaced transcript generation. The new payload decoder discards windowReset, and this code treats the missing olderCursor as exhausted history while retaining the old transcript. That response requires a canonical reload, rather than silently ending pagination against stale rows. Decode the existing reset signal and route it through the current history-replacement owner.
    Confidence: 0.97
  • [P2] Expose an accessible way to request the first older page — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatOlderHistoryPaging.swift:263-270
    Before any failure, the boundary row contains no accessible control, and loading depends exclusively on a decreasing scroll offset. A VoiceOver or Switch Control user viewing a short rendered page cannot activate older-history loading when that page has no upward scroll range, even though olderCursor exists. This is reachable when a tool-heavy page leaves only a few visible messages. Provide an accessible load action whenever older history exists while retaining automatic loading.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8f223d9d5860.

Provenance checked

  • Completed-work folding changes intended behavior with a stated reason (fdeb8f7: Keep narration and media inline between contiguous work stretches; this PR explicitly chooses whole-turn folding to follow the web reading model.)
  • Operation and outcome summaries changes intended behavior with a stated reason (19327c5: Expose operation counts and recorded outcomes without expansion; this PR deliberately replaces completed headings with elapsed time and adds activity headlines.)
  • Reply metadata changes intended behavior with a stated reason (e5b57e2: Expose historical timestamps and the actual producing model; the new footer retains those facts in a tap popover.)
  • Native reading geometry changes intended behavior with a stated reason (12752ea: Recover narrow-screen reading width while retaining sender cues; the PR replaces assistant cards and tails with a shared measured reading column.)
  • History refresh ownership keeps the original intent (2065cee: Reduce redundant history downloads while keeping live cursor reconciliation under the shared view model.)
  • Agent identity resolution keeps the original intent (4636118: Resolve workspace identity images when roster data is incomplete; the PR extends that existing request path to resolve display names.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 97611bd adds apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatView.swift:774 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 97611bd5fb39; files: apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatView.swift)
  • Marvinthebored: Raw commit fdeb8f7 adds apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCompletedWork.swift:191 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fdeb8f7efdd7; files: apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCompletedWork.swift)
  • Peter Steinberger: Raw commit 61b87fa adds apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCompletedWork.swift:177 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 61b87fa8bd55; files: apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatCompletedWork.swift)
  • Brian McGuire: Raw commit 4636118 adds apps/ios/Sources/Model/NodeAppModel+AgentAvatars.swift:16 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4636118a9b82; files: apps/ios/Sources/Model/NodeAppModel+AgentAvatars.swift)

PR surface

Source +1829, Tests +927. Total +2756 across 52 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 29 2550 721 +1829
Tests 23 1164 237 +927
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 52 3714 958 +2756

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: History access and transcript usability have clear user value, with defects limited to native chat presentation and integration.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: History access and transcript usability have clear user value, with defects limited to native chat presentation and integration.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 17, 2026, 8:15 AM ET / 13:15 UTC.

…ay visible

- One disclosure style: fixed header, rotating chevron, eased content (opacity under Reduce Motion).
- Reply details become a context table: prompt budget bar, token rows, this reply's time and cost.
- Folds need tool activity in the turn; plain earlier replies stay visible.
- Header identity button keeps a 44 pt target.
@obviyus

obviyus commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

Before/after from the screenshot-mode demo chat (synthetic data). Left: main. Right: this PR (b45d09d).

  • iPhone 17: full-width replies, session title in the navigation bar, "Message Molty…" placeholder, readable model label.
  • iPad Pro 13": the reply column sits in the pane beside the persistent sidebar.
  • Expanded "Worked" section on iPhone: the header stays fixed while the content eases in below it.

iPhone: main vs this PR

iPad: main vs this PR

iPhone: expanded Worked section

… redraws

- ChatReadingPosition is the only iOS writer of the transcript offset; delete ChatReaderRunAnchor, ChatSynchronousFollow, the paging restore and the bottom-pin writer.
- Prepends hold the distance from the end so List's own compensation is never counted twice; accepted edge: ~8 pt of fling lost at a mid-fling landing.
- SidebarDrawerPanRecognizer owns the drawer: 44 pt leading-edge zone, the transcript pan waits for it; the shell's DragGesture is gone.
- Gateway state, link previews, agent name and the drawer flag leave row inputs, so rows redraw only on their own content.
- DEBUG behavior probe: offset-writer attribution, signposts, drawer marks; ios:behavior cases for sidebar, sideways swipe, disclosure and prepend; XCTHitchMetric UI test.
- ChatStreamingAssistantTextBody swapped a plain render for a TimelineView whenever a reveal started or caught up, rebuilding the subtree; every streaming list item then restarted its fade.
- Keep one TimelineView and pause it while no reveal is pending.
…n window

- The early window opened at 80 pt, one content strip when the gap above the reply was blank, so the setup gate failed whenever the reply drew sooner.
- Log per-window motion so a failure names the window and the second of the recording.
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Nov 17, 2026
@obviyus
obviyus requested review from Marvinthebored and removed request for Marvinthebored November 17, 2026 19:51
@vyctorbrzezowski vyctorbrzezowski self-assigned this Nov 19, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Independent iOS proof — mixed Markdown and images

iPhone 17 Simulator, iOS 27.2, native Debug builds from 96763b979fe (left, this PR's merge base) and 44594cf1224 (right, PR head). Both re-opened the same saved conversation on a real, isolated Gateway. The text and PNGs are synthetic; only inference was scripted.

ios-media-before-after.mp4
  • Both builds retained the user attachment and rendered the two assistant images. The provider received the user image, and the Gateway's stored reply contained text → image → text → image → text.
  • Inherited rendering gap: both native builds displayed the assistant images together at the bottom instead of next to their headings. The opening paragraph and the next long paragraph also show a one-line ellipsis on both builds; the original text is present in history.
  • The candidate shows the conversation title, a narrower and lighter user bubble, and a wider assistant reading area. This recording covers reopening and scrolling the saved conversation; it does not cover choosing an image in Photos.

iPhone 17 comparison: merge base on the left, PR on the right

@vyctorbrzezowski

Copy link
Copy Markdown
Member

Independent iOS proof — text streaming and tablet reading pane

Same real isolated Gateway and exact native builds: 96763b979fe on the left, 44594cf1224 on the right. On iPhone 17 Simulator, I sent a fresh text-only turn from the composer on each build. The scripted provider emitted 300 deltas with 40 ms spacing (headings, lists and Swift code; no images).

ios-text-stream-before-after.mp4
  • With the software keyboard hidden, both builds kept the prompt and the start of the reply in view as the reply grew offscreen. Both completed, and Gateway history contained the final marker in both sessions.
  • In the candidate, the reply uses more of the reading area and the completion row remains above the composer. This is one visual run per build, not a performance benchmark.
  • I could not score the automated keyboard-up case: its Paste selector did not resolve on this simulator. The video shows a manual send with the keyboard hidden. The scripted model label is masked.

On iPad Pro 13-inch Simulator, the same saved mixed-media conversation rendered on both builds. This is the reading-pane crop with the sidebar open during capture; the comparison does not cover rotation or accessibility text sizes.

iPad reading panes: merge base left and PR right

@vyctorbrzezowski

Copy link
Copy Markdown
Member

Independent iOS proof — long-history stress and the remaining scroll movement

Candidate 44594cf1224, native iPhone 17 Simulator, iOS 27.2, paired with a real isolated Gateway. The saved session had 40 scripted tool-heavy turns. The Gateway returned seven cursor pages (1,214 payload entries, including tool and split-message entries). The app test below exercised two older-page insertions.

Loading older history. Fifteen fast swipes loaded two older pages. The app's behavior probe measured 0 pt beyond the reader's scroll on the first insertion and 5.9 pt on the second. The latter exceeds the harness's 4 pt limit. The probe recorded 0 pt of resting displacement and no teleports in this run. The clip cuts between the two page loads; the offset is measured from the probe, not estimated from the video.

ios-history-two-page-loads.mp4

Expanding tools. On the same preloaded conversation, the disclosure header stayed in place as the tool rows opened. The harness measured no header drift or unexplained movement of the sampled rows in that window. The fixture includes a tool failure (the intentionally empty workspace has no package.json).

ios-history-tool-disclosure.mp4

The slow automated pagination gesture opened the message context menu on this simulator, so the paging result above comes from the separate fast-swipe run. This is one candidate run, not a physical-device or all-pages claim. The scripted model label is masked in both clips.

@vyctorbrzezowski

Copy link
Copy Markdown
Member

Integration retest — prepared locally

I reconciled the current-main navigation and nested-tool changes with the redesign, then addressed the independent review findings around loaded history, streaming position, tool order, and child-session links.

On iPhone 17 Simulator with a real isolated Gateway, I scrolled back in the 40-turn conversation and sent a new message with the keyboard closed. The new question returned to the viewport and the reply completed.

ios-send-from-history-integrated.mp4

The tested tree 1190d20966c4 passed 92 focused iOS tests and 58 shared Swift tests. The three performance workloads were skipped as expected when no fixture was configured. Swift lint, format and native localization verification also passed.

This records a local candidate (a9240bcefb4), not a CI result for the head currently published on GitHub.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 20, 2026 00:48
@vyctorbrzezowski
vyctorbrzezowski enabled auto-merge (squash) November 20, 2026 01:01
@vyctorbrzezowski
vyctorbrzezowski merged commit c9285dd into main Nov 20, 2026
170 of 173 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the ios-chat-parity branch November 20, 2026 01:55
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 20, 2026
openclaw#200592)

Use a wider reading column in native iOS chat while keeping the reader's position during streaming, tool disclosures, and older history loads.

Keep overlapping history, preserve tool and reply order, and retain access to every launched child session. Integrate with the current sidebar and nested tool handling. A send from an older scroll position returns the new question to view.

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>
vincentkoc added a commit that referenced this pull request Nov 21, 2026
ChatObscuredPresentation and OpenClawSessionColorDot lost their last
uses in c9285dd (#200592). The chat view now applies drawer and
scene visibility through ChatPresentationActivity, which reads
openClawChatIsObscured itself, and the sidebar no longer draws a
session color dot.

The shared OpenClawKit Periphery intersection reports both as dead
code, so every pull request whose scope triggers that scan fails
"Intersect shared OpenClawKit dead code".

The dot held the only "Session color" string, so the native string
inventory drops that entry.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
ChatObscuredPresentation and OpenClawSessionColorDot lost their last
uses in d8f4cfa (openclaw#200592). The chat view now applies drawer and
scene visibility through ChatPresentationActivity, which reads
openClawChatIsObscured itself, and the sidebar no longer draws a
session color dot.

The shared OpenClawKit Periphery intersection reports both as dead
code, so every pull request whose scope triggers that scan fails
"Intersect shared OpenClawKit dead code".

The dot held the only "Session color" string, so the native string
inventory drops that entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants