Skip to content

Split web runtime session responsibilities - #17263

Merged
nwparker merged 64 commits into
mainfrom
ra/max-lines-bottom-28-web-runtime-session
Aug 30, 2026
Merged

nwparker merged 64 commits into
mainfrom
ra/max-lines-bottom-28-web-runtime-session

Conversation

@nwparker

@nwparker nwparker commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 0
Prod 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2024 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1786 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​238

Summary

  • split the 1,793-line web runtime session into a 30-line exact facade plus 15 focused terminal, browser, snapshot, persistence, and lifecycle modules
  • preserve browser and terminal Promise ordering, singleton state ownership, snapshot fences, RPC behavior, recovery behavior, and the exact 23-symbol public facade
  • reduce the max-lines baseline from 59 entries to 58; every new TypeScript module is at most 297 lines

Stacked on #17260.

Validation

  • pnpm tc
  • pnpm tc:web
  • direct session suite: 17 files, 118 tests passed
  • focused session and census suite: 18 files, 123 tests passed
  • broad consumer suite: 73 files, 660 tests passed
  • direct Oxlint with --deny-warnings
  • pnpm run check:code-quality:changed
  • pnpm run check:max-lines-ratchet — 58 grandfathered suppressions
  • pnpm run check:runtime-electron-ratchet
  • pnpm run check:reliability-gates
  • changed-file formatting and git diff --check
  • exact facade exports, 44 moved declarations, runtime literals, comments, external call sites, singleton ownership, and acyclic static split graph reconciliation
  • two independent final refactor audits: clean

Visual proof is N/A because this is an internal web runtime/session decomposition with no intended rendered UI change.

…ax-lines-bottom-10-automation-dispatch-events
…lines-bottom-20-cdp-bridge

# Conflicts:
#	src/main/browser/cdp-bridge.ts
…ax-lines-bottom-25-remote-terminal-multiplexer
…8-web-runtime-session

# Conflicts:
#	src/renderer/src/hooks/automation-dispatch-completion.ts
@nwparker
nwparker changed the base branch from ra/max-lines-bottom-27-codex-hook-service to main August 30, 2026 03:21
@nwparker
nwparker merged commit 07652e2 into main Aug 30, 2026
4 of 20 checks passed
@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c3fb166-0cff-4004-aa07-c815f6a015cf

📥 Commits

Reviewing files that changed from the base of the PR and between 1369821 and 866c37e.

📒 Files selected for processing (18)
  • config/max-lines-baseline.txt
  • src/renderer/src/runtime/host-session-mirror-settle-census.test.ts
  • src/renderer/src/runtime/web-runtime-browser-creation-context.ts
  • src/renderer/src/runtime/web-runtime-browser-creation-failure.ts
  • src/renderer/src/runtime/web-runtime-browser-creation.ts
  • src/renderer/src/runtime/web-runtime-session-environment.ts
  • src/renderer/src/runtime/web-runtime-session-snapshot.ts
  • src/renderer/src/runtime/web-runtime-session-tab-lifecycle.ts
  • src/renderer/src/runtime/web-runtime-session-tab-move.ts
  • src/renderer/src/runtime/web-runtime-session-types.ts
  • src/renderer/src/runtime/web-runtime-session-workspace-selection.ts
  • src/renderer/src/runtime/web-runtime-session.ts
  • src/renderer/src/runtime/web-runtime-terminal-actions.ts
  • src/renderer/src/runtime/web-runtime-terminal-create-operation.ts
  • src/renderer/src/runtime/web-runtime-terminal-creation.ts
  • src/renderer/src/runtime/web-runtime-terminal-identity.ts
  • src/renderer/src/runtime/web-runtime-terminal-placement-settlement.ts
  • src/renderer/src/runtime/web-runtime-worktree-activation.ts

📝 Walkthrough

Walkthrough

The monolithic web runtime session module is split into dedicated modules for environment handling, snapshots, workspace selection, browser creation, terminal creation, tab lifecycle, tab movement, and terminal actions. Browser and terminal flows now stage placement, track focus and intent state, reconcile host results, refresh snapshots, and handle cleanup. The barrel module re-exports the preserved public API. Census expectations now reference the snapshot module.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Split speech session lifecycle

* Split terminal output scheduler pipeline

* Split mobile browser pane modules

* Prune resolved max-lines suppressions

* Split pane tree equalization logic

* Extract mobile troubleshoot screen styles

* Split external automation manager

* Split main window service attachments

* Split hosted review creation checks

* Split automation dispatch event handling

* Split settings navigation metadata

* Split daemon initialization lifecycle

* Split GitLab item dialog

* Split relay dispatcher layers

* Split mobile host screen

* Retarget mobile view settings source test

* Split runtime file client layers

* Split ports panel layers

* Split runtime environments pane layers

* Split local PTY provider responsibilities

* Split CDP bridge responsibilities

* Split relay Git handler responsibilities

* Track moved relay Git fetch audit

* Split Linear item drawer responsibilities

* Split telemetry event schema responsibilities

* Split resource usage status responsibilities

* Split remote terminal multiplexer responsibilities

* Split Git worktree responsibilities

* Split Codex hook service responsibilities

* Keep mirrored hook trust type private

* Split web runtime session responsibilities

* Fix F3-speech for stablyai#17123

* Fix F1-cycle for stablyai#17131

* Fix F4-navtest for stablyai#17157

* Fix F2-allowlist for stablyai#17161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant