Repository navigation
fix(mobile-web): restore remote rollback drafts and message actions - #3453
Merged
Merged
Conversation
… safe workspace gate
…idate base64 image data urls
…pt and normalize whitespace data urls
…aths in browser test fixtures
# Conflicts: # src/crates/assembly/core/src/service_agent_runtime.rs
…ded host fix Move remote image data-URL validation and transcript projection into a pure service module and cover it with canonical base64 and rollback-draft tests. Drop the CI NODE_OPTIONS entry: the web-ui test script sets the flag it needs, so unrelated frontend steps keep their memory settings. Main already registers the scheduler revert port on the remote session host, so this PR now carries only the mobile controller behavior.
Project userMessage.metadata.images from streamed turn records so the transcript, plain rollback, and edit-resend see the same attachments the host published. Guard rollback against an in-flight send and only replace the composer when the rollback restored text or images, clearing stale attachments instead of leaving them on a restored prompt. Run web-ui Vitest with --no-experimental-webstorage appended to NODE_OPTIONS so the CI heap setting survives, and let the account browser test force-exit after completion without masking failing assertions.
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.
Summary
Supersedes #3245. That branch lives in a fork that does not grant maintainer edit access, so its conflict with
maincould not be resolved in place. This PR carries the same mobile-controller work, merged with currentmainand updated with the review fixes.What changed
userMessage.metadata.imagesfrom session turn records intoChatMessage.images. Without this, the timeline, plain rollback, and edit-resend never saw the pixels the host already publishes; image-only rollback restored only the fallback text.turn_id+turn_index; keep it as the fallback for legacy messages, and do not offer rollback/edit on remote SSH workspaces where the host reports rollback as unavailable.src/mobile-web/src/services/chatImageAttachments.tswith unit coverage.process.exit(0)(which masked failing assertions), let Node force-exit only after the runner finished, fix Vite/@fs/paths and screenshot paths for Windows, discover Edge on Windows, and close lingering Vite connections.--no-experimental-webstoragetoNODE_OPTIONSthroughsrc/web-ui/scripts/run-vitest.mjsso Node's globalsessionStorageno longer shadows jsdom's while the CI heap setting and any caller flags stay intact. The full web-ui suite fails without the flag on Node 26.The duplicate
session_revertregistration from #3245 is intentionally dropped: currentmainalready attaches the scheduled revert port toCoreRemoteSessionRuntimeHostviaagent_runtime_with_lifecycle_delivery(978f58a), and the conflicting file is resolved tomain's version.Verification
pnpm --dir src/mobile-web run type-checkpnpm --dir src/mobile-web run test:images(7 tests)pnpm --dir src/mobile-web run test:ui-components(15 tests)pnpm --dir src/mobile-web run test:workspace-identity(21 tests)pnpm --dir src/mobile-web run test:host-stream(23 tests, including the streamed attachment projection)pnpm --dir src/mobile-web run test:host-queue(17 tests)pnpm --dir src/mobile-web run test:account-browser(17 tests)pnpm --dir src/mobile-web run test:account-login(17 tests)pnpm --dir src/web-ui run test:run(1035 files, 11586 tests)pnpm run check:repo-hygiene,pnpm run i18n:audit,pnpm run check:github-configpnpm --dir src/mobile-web run buildNotes
NotAvailablefor those; the client gate only avoids presenting a mutation that must fail.