Skip to content

feat(web): web, desktop and composer fixes (upstream G5) - #1000

Merged
rynfar merged 16 commits into
pylonfrom
upstream/2026-10-03-g5-web-desktop
Oct 3, 2026
Merged

rynfar merged 16 commits into
pylonfrom
upstream/2026-10-03-g5-web-desktop

Conversation

@rynfar

@rynfar rynfar commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Ports upstream group G5 (web, desktop and composer) from T3 Code into Pylon.

Sources

Upstream SHA Outcome How
798e945aa7 agent browser clicks no longer steal composer focus (#15008) Adapted Clean cherry-pick. The new unit test used @vitest-environment jsdom, but Pylon's web suite has no jsdom, so the test now uses a fake document through vi.stubGlobal, as contextMenuFallback.test.ts does. I checked that 6 of the 8 cases fail when the restore is disabled.
7ff2eabf56 desktop markdown no longer loads invisible in new dark-mode browser tabs (#14727) Adopted with conflict resolution Follow-up to 3e60fecf39 (already in Pylon via #983). Added prepareWebview while keeping Pylon's navigate/goBack/goForward/refresh(…, origin) signatures and the persist:pylon-code-preview-* partition mocks.
6c8fed35dd markdown keeps Windows paths intact in link/image destinations (#12615) Adopted Clean cherry-pick.
f391794a35 classify workspace previews by literal filenames (#10311) Adopted docs/user/composer.md conflict: placed the upstream sentence inside Pylon's section, which already says "your Pylon session" and has the collapse-composer section.
ce96e4c3de mobile project picker cards match settings card color (#14756) Adapted (manual port) Does not depend on Expo 58 / DEF-22: it only switches bg-card to bg-grouped-card, a token Pylon already has and uses on settings surfaces. Pylon's mobile screens differ (no Android MaterialListRow variants in these pickers, no ThreadSettingsRows.shared.tsx, no CursorEnableLimits card), so the swap was applied to the matching Pylon surfaces: ArchivedThreads, ConnectOnboarding, ConnectionsNew, AddProject, NewTaskContextPicker, NewTaskRoute (including the Scratch "No project" card), ThreadSettingsSheet, UsageLimitsPooled and the UsageRoute chart. Not applied: the Android-only className="bg-grouped-card" row props and the CursorEnableLimits card.
d1034d62b2 diff panel opens on all branch changes (#15005) Adopted with adaptation Server now reports branchChanges totals (optional contract field, so older servers still work), the default diff view is "Changes" (merge-base to the working tree), and "Working tree" is renamed "Uncommitted". Mobile ReviewSheet conflict: Pylon's iOS native header toolbar and Android menu got the new order and labels (Changes, Uncommitted, Latest turn). The settings description keeps Pylon's "Manual panel choices take priority." Pylon docs docs/user/source-control.md updated.
c5a929e1ac Woke dismiss syncs, preview mute back, subscription retries back off (#15034) Adopted Pylon has every piece this touches: Woke/threadWokeAt, previewRuntimeTabId, visited tracking, retryExpectedFailureAfter and sidebarProjectSortOrder. Conflicts resolved to keep Pylon's useThreadActions/threadUndo imports in Sidebar.tsx, the getBackgroundTextGenerationProviders/capabilityContext code in modelSelection.ts, the DEFAULT_BROWSER_PROFILE_ID import in the RPC client, and sidebarCompactThreadRows plus triggerVariant="outline" in settings. This also removes the plan-agent selection heal (planAgentSelectionHeal.tsx), as upstream did, and adds the Project order settings row.
5c0429b157 mod+alt+enter on an existing thread sends and opens a new thread (#15050) Adopted Adds composer.sendAndNewThread (contracts and shared defaults). ChatView conflict: Pylon's failed-follow-up recovery block is kept, and the new else if branch follows it.
263097a8da mod+enter starts a new thread in background again (#15060) Adopted with adaptation Server keybindings.ts conflict: upstream's LATE_DEFAULT_KEYBINDINGS and keybindings-migrations record now sit next to Pylon's legacy numbered-defaults migration (.desktop-numbered-defaults-v1 marker). The config is written when defaults are appended or the legacy block was migrated, and both markers are recorded.

Keybinding conflict review

  • New/changed defaults: mod+enter → composer.sendBackground (composerFocus && draftThreadRoute), mod+alt+enter → composer.sendAndNewThread (composerFocus && !draftThreadRoute). These don't collide with Pylon's mod+alt+n (chat.newWithoutProject, Scratch feat: start threads without a project (Scratch) (upstream) #994) or with mod+enter → composer.sendAlternate (turnRunning). The when contexts differ.
  • In a Scratch thread, sending with mod+alt+enter opens the fresh composer through handleNewThreadInActiveProject, which reuses the Scratch project, the same way the draft background path does.
  • docs/user/keybindings.md: took upstream's wording and added a Pylon note. If the send shortcut requires mod+Enter, pressing mod+Enter in a new thread starts it in the background, so clicking Send is how you start it in the foreground.

Other Pylon adaptations

  • GitVcsDriverCore.test.ts "preserves renames, unusual paths, modes…": Changes now diffs the merge-base against the working tree, so a mode change staged only with update-index --chmod=+x doesn't show where Git trusts file modes. This fails on unmodified upstream code too; the test now also sets the executable bit on disk (except on win32).
  • Mixed-version fix (review follow-up): if git status has no branchChanges (an older server, or totals that could not be read), a generic web diff-panel opening resolves to Uncommitted instead of Changes. That keeps the view in step with the thread panel's counts, which fall back to the uncommitted totals. The default is now resolved live: generic opens clear the explicit selection with selectDefaultGitScope, and any custom base is kept. Mobile review prefers the Uncommitted section on such servers, waits for git status before saving a default, and labels a working-tree Changes range "Since , including uncommitted files". Covered in diffPanelStore.test.ts and reviewModel.test.ts.
  • New server regression test: one startup applies the late mod+enter default and the legacy numbered migration together.

Verification

  • vp run -F t3 typecheck, @t3tools/web, @t3tools/desktop, @t3tools/mobile, @t3tools/contracts, @t3tools/client-runtime, @t3tools/shared: all exit 0 with 0 error TS (each confirmed to run).
  • vp test run on all 16 touched test files (server keybindings/AssetAccess/GitVcsDriverCore/VcsStatusBroadcaster, shared filePreview, client-runtime rpc client, web previewClickFocus/ChatMarkdown/composer-logic/diffPanelStore/keybindings/modelSelection, mobile reviewModel/nativeMarkdownText, desktop Manager/DesktopWindow): 16 files, 804 tests passed. After the mixed-version fix: diffPanelStore.test.ts + reviewModel.test.ts 29 passed; web and mobile typechecks 0 errors; lint/fmt clean.
  • vp lint on changed TS files: exit 0 (existing warnings only). vp fmt --check on changed files: clean.

Unverified

  • No browser, desktop or simulator run (out of scope for this batch). Not checked by hand: the desktop dark-mode markdown first paint, the agent-click focus restore in Electron, the Changes default and totals in a real repo, the mobile card colors on iOS/Android, and the composer shortcuts in a live app.
  • Woke acknowledgement sync across devices relies on thread.visit on servers with visited tracking. Only typechecked, not exercised end to end.

Part of upstream cycle #996.

🤖 Generated with Claude Code

t3dotgg and others added 15 commits October 3, 2026 13:30
…s (#15008)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 798e945aa77939937464ff45deaa8947be8d402f)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…wser tabs (#14727)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 7ff2eabf56d30af15a8ac86b0eb46013a9e910ee)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ns (#12615)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 6c8fed35dded9ff71c5b46807125457acbb76be6)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: yashranaway <yashranaway@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
(cherry picked from commit f391794a35c604d57e166a3ab48d56fc6e4e469a)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Manual port of upstream ce96e4c3de1973c7e0088ef8806043841f902080 (#14756):
Pylon's mobile surfaces diverge (no Android MaterialListRow variants,
merged ThreadSettingsRows, no CursorEnableLimits card), so the bg-card ->
bg-grouped-card swap was applied to the equivalent Pylon surfaces.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d (#15005)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit d1034d62b28e19c19240085566a39a92c5f9b466)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…retries back off (#15034)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit c5a929e1ac05dec15945a36905ab8bb2f1982e59)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…thread (#15050)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
(cherry picked from commit 5c0429b1578cff3307c35c51a305e2749a6dcb6e)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 263097a8da038a143f2b7b7817250f0ad390ea32)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Changes now diffs the merge-base against the working tree, so a mode-only
change staged with update-index alone is invisible where Git trusts file modes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pylon's web unit suite has no DOM environment, so model the focus behavior
with a fake document as other web unit tests do.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…igration

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 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 4.9 KiB 4.9 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.7 KiB 3.7 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.4 KiB 20.4 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 4.9 KiB 4.9 KiB −41 B (−0.8%) 6.8 KiB ✅
Claude Thread snapshot wire 3.7 KiB 3.7 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB −41 B (−3.4%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 20.8 KiB 20.7 KiB −41 B (−0.2%) 29.3 KiB ✅
Claude Live turn messages 2 1 −1 (−50.0%) 8 ✅

Baseline: 30ec43a · PR result: dfe6d21 · 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: 106.1 KiB
  • Claude decoded thread snapshot: 106.4 KiB

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

…nges totals

Older servers report no `branchChanges` and diff the branch range only up to
HEAD, while the thread panel counts uncommitted edits. Generic diff panel
openings now drop the explicit selection and resolve the default live from git
status: Changes when the server reports Changes totals, Uncommitted otherwise.
Mobile review prefers the Uncommitted section on such servers, waits for status
before persisting a default, and describes a working-tree Changes range as
"Since <base>, including uncommitted files".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

6 participants