Skip to content

feat(mobile): attach large pasted text to drafts - #846

Draft
rynfar wants to merge 8 commits into
pylonfrom
upstream/2026-09-24-mobile-large-paste
Draft

rynfar wants to merge 8 commits into
pylonfrom
upstream/2026-09-24-mobile-large-paste

Conversation

@rynfar

@rynfar rynfar commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Pasting a long passage in Pylon Mobile can exceed the composer input limit. This adds native large-text paste handling so a supported mobile binary and connected server can keep that passage as a text attachment in the draft. Explicit Paste as Text remains inline; an older installed binary or unsupported server keeps ordinary paste behavior and gives a clear error if the text cannot fit inline.

The attachment survives draft persistence, upload, and queued send. Native paste, clipboard reads, and file writes carry the original draft identity across navigation and reconnects; a discarded draft or replaced thread source epoch rejects a late completion. The receiving RPC session independently checks the capability before dispatch.

This PR includes #844 as a prerequisite merge parent and adapts upstream source 68c2277f500bbbb299396bcdcd0aec60dcb5db9d to Pylon's mobile draft and outbox ownership. It should be reviewed and landed after #844.

Validation: 166 focused mobile tests, mobile typecheck, changed-file format and lint checks, Swift syntax parse, and an unsigned full Pylon iOS simulator build passed. Two independent reviews covered JS ownership and native/provider compatibility. Android SDK and runtime devices were unavailable, so paste interactions still need device verification. Before/after UI images are pending explicit browser/device authorization.

GPT-6 Sol via Codex in Pylon.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

Deployment failed for project pylon-marketing with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/pylon-code?upgradeToPro=build-rate-limit

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 24, 2026
@rynfar

rynfar commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

Independent mobile JavaScript ownership review PASS on head b6799a2b50b4b56e3d7f718dc2981ea88a2e014b, mobile-only diff cfe71a60817d0b75886f8e30b1304a8fda7f3734d98e268b3dc8f75332ccd30e atop #844.

I checked existing-thread and new-task paste callbacks, captured draft/environment ownership, pending-task drafts, question attachments, outbox persistence, send/follow-up lease checks, and old-server fallback. The final revision checks the captured draft incarnation before and after async clipboard/image/file work; discard or source-epoch replacement cannot append to a recreated draft, while same-epoch navigation retains the paste in its original draft. The current question UI stages images only, so it has no marked pasted-text producer. #844's receiving-session RPC preflight is the final old-server boundary.

The author reports 166 focused tests plus mobile typecheck, format, and scoped lint passing. This review is source and test based; no simulator, physical device, or native UI interaction was performed. Native bridge/provider behavior has a separate independent reviewer.

@rynfar

rynfar commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

Independent read-only review: PASS on exact head b6799a2 (mobile-only diff SHA256 cfe71a60817d0b75886f8e30b1304a8fda7f3734d98e268b3dc8f75332ccd30e versus first-layer 2fc38ac).

Reviewed iOS/Android intercepted paste and explicit Paste as Text paths, old native-binary revision fallback, versioned context events, selection/read-only handling, durable draft ownership after navigation/discard/source-epoch changes, upload/outbox cleanup, and the first layer's receiving-RPC-session capability guard. The final patch fences all three file-write continuations and clipboard/image reads before writing to a draft. No blocking finding remains.

Validation reported by the author: 166 focused tests, mobile typecheck, changed-file formatting/lint, and unsigned iOS simulator compile. I did not launch a device or run live provider/server interactions; Android SDK/build and native paste behavior on a device remain unverified.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 14.0 KiB 14.0 KiB −21 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB +10 B (+0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.8 KiB 6.7 KiB −31 B (−0.4%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.0 KiB 58.0 KiB −44 B (−0.1%) 66.4 KiB ✅
Codex Live turn messages 10 9 −1 (−10.0%) 21 ✅
Claude Total thread wire 14.0 KiB 14.0 KiB −14 B (−0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB −14 B (−0.2%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.7 KiB 6.7 KiB 0 B (0.0%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 58.9 KiB 58.9 KiB −44 B (−0.1%) 66.4 KiB ✅
Claude Live turn messages 10 9 −1 (−10.0%) 21 ✅

Baseline: 7ed3f71 · PR result: 7a94826 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
pylon-marketing Ignored Ignored Preview Sep 24, 2026 2:33pm UTC

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

size:XXL 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.

1 participant