Repository navigation
fix: root-fix browser link opens, context menus, typing lag, and tab-switch presentation - #725
Merged
Merged
Conversation
…switch presentation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
[Medium impact] The changes affect browser tab creation, editing, menus, and presentation across Electron and Chromium. Fix the stuck remote-editing update before merging. FindingsSummaryThis PR fixes link opening and context menus across Electron and Chromium. It also reduces typing overhead and improves native tab presentation.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Native presentation or frame subscription changes] --> B[Compute whether remote editing is needed]
B --> C[setRemoteEditing]
C --> D{Saved update promise exists?}
D -->|No| E[Update focus and caret tracking]
E --> F[Promise finishes but stays saved]
F --> D
D -->|Yes| G[Later update is skipped]
Reviews (1) · Last reviewed commit: "fix: root-fix browser link opens, contex..." · Reviewed by Greptile |
timjang3
added a commit
that referenced
this pull request
Nov 23, 2026
…-smokes One conflict, apps/host/src/server.ts: main moved the person's tab commands into TabService.executeCommand; this branch added tab.group.close beside tab.group.delete in the server's switch. Kept main's shape: tab.group.close is one more case forwarded to executeCommand, which now handles it with closeGroup. Aligned without a textual conflict, apps/host/src/tabs/tab-service.ts: main's tab mutations finish through tabMutationMeta and #applyCatalogMutation (a replay ends no viewers and answers with the current layout); closeGroup now does the same, as #close does. Auto-merged and checked: browser-service.ts keeps E1 (the page ends only on the tab's own not_found) and E2 (the witness is the row the bind wrote) beside main's #723 and #725; tab-store.ts keeps closeGroup and bindPage's row; tab-group.tsx keeps the selected title and the single tab.group.close; tab-closer.tsx is main's; app-shell.tsx keeps the wait for the complete tab list. The passwords package and the journey's policy fixture are unchanged by the merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timjang3
added a commit
that referenced
this pull request
Nov 23, 2026
…b-restore-2 Resolved by behaviour; both sides' rules hold. Conflicted files: - packages/browser-runtime-core/src/browser/page-ownership.ts: main forgets a session in every adopted context's session set when the session ends; this branch abandons that session's page creations through abandon() (which also releases what they hold). Kept both. - apps/browser-runtime/src/browser/playwright-launcher.ts: main (#725) attributes a page that Chromium opened from a link (OpenURLFromTab, no popup event) to the one recent modifier or middle-click, marks a background tab, and announces a page only after the runtime's own in-flight newPage() calls settle, so its own page is told apart by identity. This branch hands pages off from arrive(): ordinary pages through handOutOrdinary(), and the runtime's own pages and woken tabs through publish(), a sleeping tab's page never handed out (M1, K3, Q1, Q3). Kept: one announce() for both paths, with main's attribution; publish() never infers (the runtime's own pages and woken tabs are explicit); openFreshPage() is main's in-flight creation and marks its page explicit. The wait for in-flight opens applies only to a page with no opener while a link gesture is pending: then the runtime's own page is known before a gesture is taken (main's test 3), and otherwise a page is handed off at once, never waiting on an unrelated open (this branch's Q3 test). Fields and the context's close: both sides' fields; markClosed() and main's clearing of pending link gestures. Page handle: both sides' fields. - apps/browser-runtime/src/browser/playwright-launcher.test.ts: both sides added tests at the same place; kept all of them. Main's "resolves explicit createPage by identity" waits until Playwright is asked for the page: here an open is admitted by the sleeper first (TS13), a few turns later than on main. Main's structural tab flushes without the 100 ms debounce (#725) met no conflict; the browser unit suites (Home browser, runtime, runtime core, client, web, phone, harness: 619 files, 7,066 tests) pass on Linux on the merged tree. No migration on this branch, so none is renumbered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timjang3
added a commit
that referenced
this pull request
Nov 24, 2026
Conflict resolutions (by behaviour, preserving both sides):
- apps/host/src/browser/browser-service.ts: pool-home-next (X6) guarded HostedBrowserBroker readiness on !#stopping && !#detaching and confirmed onState("ready") before marking #runtimeReady; main-into-overhaul (f4b9b03 + #725) flushed #sessionStateTimer/#sessionStateHold around the initial #sendSessionState(), skipped the redundant refreshSessionState() when becameReady, and passed structural to #onTabsChanged. Kept both: only set becameReady, mark #runtimeReady, and flush the session-state hold around #sendSessionState() when readyConfirmed && !#stopping && !#detaching, while keeping #725's structural #onTabsChanged flush.
- packages/database/src/browser-pool-migration.ts (auto-merged, renumbered): main-into-overhaul placed 0046_run_provider_retry before overhaul 0100..0107; renumbered browserPoolSessionsMigrationName from 0052_browser_pool_sessions to 0116_browser_pool_sessions so it sorts after 0107.
- packages/database/src/migrations.test.ts: pool-home-next appended 0052_browser_pool_sessions; main-into-overhaul renumbered overhaul migrations to 0100..0107. Kept 0100..0107 plus 0116_browser_pool_sessions in sorted order.
- packages/database/src/personal-state-upgrade.integration.test.ts: pool-home-next appended browserPoolSessionsMigrationName after 0051; main-into-overhaul moved to 0046 + 0100..0107. Kept 0107_needs_you_counts_requests followed by browserPoolSessionsMigrationName.
- tests/personal-state-upgrade.integration.test.ts: pool-home-next appended browserPoolSessionsMigrationName after 0051; main-into-overhaul moved to 0046 + 0100..0107. Kept 0107_needs_you_counts_requests followed by browserPoolSessionsMigrationName.
- apps/host/src/runtime/team-era-home.integration.test.ts: pool-home-next dropped browser_pool_sessions/browser_pool_retired_targets and deleted migrations >= 0051 so migrateToLatest replays both; main-into-overhaul updated the migration name to 0107_needs_you_counts_requests. Kept dropping the pool session tables and deleting migrations >= '0107_needs_you_counts_requests'.
timjang3
added a commit
that referenced
this pull request
Nov 24, 2026
Resolved conflicts by keeping both sides' behavior:
- packages/browser-runtime-core/src/browser/editing-observer.ts:
- start() / remote sync: phone-typing-next published the initial page context
at start so page-level commands carry a contextId (CY7); main (#725) added
setRemoteEditing() and #scheduleRemoteSync() to disable focus emulation and
caret mirror reflows when a native Electron page has no remote viewer. Kept
both: publish initial context at start and reconcile remote editing toggles.
- beginInput() / finishInput(): phone-typing-next added live focus, fieldKey,
and collapsed-selection verification in beginInput(request) (P3/S7) plus
closeGuard clearing in finishInput() (CY3); main (#725) added an immediate
flag to finishInput(immediate = true) so keystrokes coalesce publish() into
requestAnimationFrame via schedule(). Kept both: live focus/collapsed check
in beginInput(request), closeGuard clearing in finishInput, and immediate vs
rAF-coalesced publish/schedule.
- publish(): phone-typing-next cleared blurTimer at the top of publish() to
avoid transient null-field publications on field-to-field focus switches
(W4); main (#725) returned early before syncSelection() when !remote. Kept
both: clear blurTimer first, then return early when !remote before running
syncSelection().
- packages/browser-runtime-core/src/browser/editing-observer-dom.test.ts:
- phone-typing-next added the field-to-field focus switch test (W4); main
added the untrusted contextmenu / SVG xlink:href test and two remote-editing
suppression/reconciliation tests (#725). Kept all four tests.
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
Root-level architectural fixes across Opensteer's native Electron and Playwright/Chromium browser stacks for link-open gestures, context menus, typing responsiveness, tab-switch blank screens, and new-tab creation latency.
1. Link-Open Gestures & Right-Click → "Open Link in New Tab"
electron-browser-launcher.ts,browser-presentation.ts):ElectronBrowserContext.#openChildPage()andElectronBrowserPage.openInNewTab().hostTransport.openBrowserSurfacewithopenerId: null, silently creating ghost tabs in agent sessions) to open opener-attributed background tabs directly forhttp:/https:URLs without leaking a cross-origin/suppressed referrer, and passedframetoMenu.popup().OpenURLFromTab(!options.webContents) to load non-blank URLs + Blink-supplieddetails.referrerfor all dispositions (background-tab,foreground-tab,new-window), while leaving Electron 44.10.2's pre-createdwebContentspath untouched.Control+Clickcontext-menu arming inbefore-mouse-eventtodarwinonly.playwright-launcher.ts,page-ownership.ts,surface-ledger.ts):chromiumLinkOpenDisposition()matching Chromium'sui::DispositionFromClick/HTMLAnchorElementrules soOpenURLFromTabtabs (Cmd/Ctrl+Click, Middle-Click, Shift+Click, Primary+Enter — which emit nopopupevent oropenerId) are attributed to their opener with accurateopenedInBackgrounddisposition.createPage()targets by exactPageobject identity (inFlightCreations+explicitPages), retained only the latest gesture per opener, and isolated multi-session contexts viahandOff(..., inferred)+PageOwnership.attachSession/singleSessionIn(even while another session's tabs are asleep).openedInBackgroundtabs from stealingactiveIdinSurfaceLedger.registerOnce().controller.ts,editing-observer.ts,streamed-context-menu.tsx,browser.ts):menuConsumersacross same-viewer pointermovejitter,cursor.query,cursor.reset, andviewport.follow, consuming authorization on delivery.contextmenucollection withevent.isTrusted, fixed emptyhref=""resolution, added<area href>and namespaced SVG<a xlink:href>, and restricted"Open Link in New Tab"tohttp(s):.EditingModifiersSchema(primary) and Mac→Linux/Winmeta→controlpointer/wheel translation.2. Typing Lag, Blank Tab Switch & Slow Cmd+Click Overhaul
editing-observer.ts,controller.ts,runtime.ts):setRemoteEditing(enabled)reconciliation (and stream rollback resync) so native Electron views with no remote frame viewer skipEmulation.setFocusEmulationEnabled, caret-mirror reflows, andPage.getLayoutMetricskeystroke round-trips while keeping password fill/save active.getComputedStylemirror copy with 27 cached text-layout CSS properties, added pre-measurement caret caching, deduplicated unchangedpublishPersonboxes, and scheduled plain keystrokefinishInput()viarAF.native-autofill.ts,surface-ledger.ts,electron-browser-launcher.ts,browser-presentation.ts):useNativeAutofillto subscribe only toautofill(preventingBrowserViewre-renders on caret updates).SurfaceLedger.touch()policyChanged()scans (1,000 ms, while keepingusedAtexact and notifying immediately on first touch or!personUsed -> personUsed).ElectronBrowserPage.navigationState()(canGoBack/canGoForward) to skipPage.getNavigationHistoryCDP round-trips, and cachedsetIgnoreMenuShortcuts()on state transitions.electron-browser-launcher.ts,browser-presentation.ts,browser-service.ts):webContents.invalidate()on mounted paint subscriptions and added ±1px display-scale rounding tolerance.paintTimedOutfallback promotion (both on timeout when placed and on late placement after timeout) when!owner.current?.page, so live tabs are never stranded blank behindappView.added/removed/structural) immediately (0 ms) inBrowserServicewhile keeping metadata-only updates debounced at 100 ms.Verification
vitest.browser.config.ts):chromium-popup-follow.test.ts(4/4) andediting.test.ts(6/6) passed.pnpm typecheck,pnpm lint, Prettier, andgit diff --checkpassed.gpt-6.2-solreview passes with all findings resolved.