Skip to content

Split pane_group orchestration code into submodules#12039

Merged
cephalonaut merged 2 commits into
masterfrom
matthew/orch-restore-phase1-pane-group-split
Jun 4, 2026
Merged

Split pane_group orchestration code into submodules#12039
cephalonaut merged 2 commits into
masterfrom
matthew/orch-restore-phase1-pane-group-split

Conversation

@cephalonaut
Copy link
Copy Markdown
Contributor

Description

Follow-up to PR #11722 (orch-restore Phase 1) addressing Roland's review nit that pane_group/mod.rs is too long (~9k lines).

Mechanical move only — no behavioral changes. Moves orchestration-specific code into three new submodules under app/src/pane_group/:

  • ambient_pane_restoration.rs (new) — top-level ambient pane pending-restoration: AmbientRestoreKind, register_pending_ambient_restorations, process_pending_ambient_restorations, replace_pane_with_new_cloud_conversation, fetch_and_load_transcript.
  • child_agent/hydration.rs (new) — remote-child cloud-transcript hydration: RemoteChildHydrationAction, decide_remote_child_hydration_action, hydrate_task_backed_hidden_child_pane, attempt_remote_child_hydration, apply_existing_ambient_task_to_pane, hydrate_remote_child_transcript_in_place, attach_ambient_session_and_maybe_tombstone, process_pending_remote_child_hydrations.
  • child_agent/restoration.rs (new) — hidden child pane materialization: create_hidden_child_agent_pane, restore_missing_child_agent_panes_for_parent, restore_missing_child_agent_panes_for_terminal_pane_if_needed, ensure_hidden_child_agent_pane_for_conversation, ensure_shared_session_viewer_child_pane.

mod.rs retains the shared subscription wiring (ensure_pending_ambient_restoration_subscription, handle_pending_ambient_restoration_event) and all PaneGroup struct fields. Line count drops from 8946 → 7996.

pane_group/child_agent.rs was converted to a directory (child_agent/mod.rs) in commit 1 (pure rename); commit 2 adds the new submodules and removes the moved code from mod.rs.

Testing

  • cargo fmt --all -- --check
  • cargo clippy -p warp --all-targets --features local_fs -- -D warnings
  • cargo nextest run -p warp --features local_fs 'pane_group::' — 106/106 tests pass

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation: https://staging.warp.dev/conversation/d3b66223-bbbf-4a8f-9e12-7b31b9d5202e
Run: https://oz.staging.warp.dev/runs/019e85b3-6634-74c5-a0e2-1bc9797cb37a

This PR was generated with Oz.

@cla-bot cla-bot Bot added the cla-signed label Jun 2, 2026
@cephalonaut cephalonaut marked this pull request as ready for review June 2, 2026 17:34
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 2, 2026

@cephalonaut

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR splits the pane_group orchestration restoration code into ambient pane restoration, remote child hydration, and child restoration submodules while keeping the existing PaneGroup orchestration behavior intact.

Concerns

  • No blocking concerns found in the annotated diff.
  • The spec context attachment reports that no approved or repository spec context was found, so there was no material implementation-vs-spec drift to evaluate.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@cephalonaut cephalonaut requested a review from seemeroland June 2, 2026 18:56
Base automatically changed from matthew/orch-restore-phase1 to master June 2, 2026 18:57
@seemeroland
Copy link
Copy Markdown
Contributor

Will review once your other PR is merged and this is rebased, since this is containing that PR's changes currently

cephalonaut and others added 2 commits June 2, 2026 23:33
Pure rename to make room for new submodules. No content changes.

Co-Authored-By: Oz <oz-agent@warp.dev>
Move orchestration-specific code out of pane_group/mod.rs into three
new submodules to reduce the size of mod.rs (~9k → ~8k lines).

No behavioral changes — purely a mechanical move.

New file structure under app/src/pane_group/:
  - ambient_pane_restoration.rs (new)
    * AmbientRestoreKind enum
    * register_pending_ambient_restorations
    * process_pending_ambient_restorations
    * replace_pane_with_new_cloud_conversation
    * fetch_and_load_transcript
  - child_agent/hydration.rs (new)
    * RemoteChildHydrationAction enum
    * decide_remote_child_hydration_action fn
    * hydrate_task_backed_hidden_child_pane
    * attempt_remote_child_hydration
    * apply_existing_ambient_task_to_pane
    * hydrate_remote_child_transcript_in_place
    * attach_ambient_session_and_maybe_tombstone
    * process_pending_remote_child_hydrations
  - child_agent/restoration.rs (new)
    * create_hidden_child_agent_pane
    * restore_missing_child_agent_panes_for_parent
    * restore_missing_child_agent_panes_for_terminal_pane_if_needed
    * ensure_hidden_child_agent_pane_for_conversation
    * ensure_shared_session_viewer_child_pane

mod.rs still owns the shared subscription wiring
(ensure_pending_ambient_restoration_subscription and
handle_pending_ambient_restoration_event) plus all PaneGroup struct
fields.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cephalonaut cephalonaut force-pushed the matthew/orch-restore-phase1-pane-group-split branch from d1941ec to b2f1ea2 Compare June 3, 2026 03:40
@cephalonaut
Copy link
Copy Markdown
Contributor Author

Sorry for the noise - should be rebased now

Copy link
Copy Markdown
Contributor

@seemeroland seemeroland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

@cephalonaut cephalonaut merged commit 6c4125c into master Jun 4, 2026
26 checks passed
@cephalonaut cephalonaut deleted the matthew/orch-restore-phase1-pane-group-split branch June 4, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants