base red: arch app_lines, #32159's Session Info capture and #32131's held-prompt checks move into CmuxNextAgentPane

Merged
LA
4d ago
+189-161

Summary

Fixes the tip red from #32159 (b4f4a13290b6) and #32131 (17e83a00fb01): arch-ratchet failed at feat-cmux-next tip 612c99d3c9d5 with [app_lines] CmuxNextApp Swift lines: +129 over the last green arch tip 85a8bb7467c2 (#32159 +115, #32131 +14).

This moves that new logic out of CmuxNextApp into CmuxNextAgentPane, its owning package. Behavior stays the same:

  • AgentPaneView+SessionInfoDebug.swift (DEBUG/bench only), from #32159: the native Session Info scene's readiness report (debugSessionInfoReadiness; the app passes its BenchFrames settle and the window width), the open-click sequence (debugOpenSessionInfo; the app passes the same real header click), the viewport widening (AgentPaneSessionInfoDebugState.widenCaptureWindow), and the session_info_action reply.
  • AgentPaneWakeState.swift, from #32131: keepReason (no wake state in time, or prompts held for a trust answer; the log text is the same) and AgentPaneView.releaseHeldPrompts(then:), which owns the release-then-close task. The app still measures agentPane.close.
  • AgentPaneView+DebugReads.swift (DEBUG/bench only): debug.agent_pane readiness and the ACP Inspector toggle move from DebugAgentPane. They are page reads that the capture path calls. This moves enough to cover both culprits' 129 lines without relying on other commits' removals.

CmuxNextApp: -141 lines. No arch exception file, and arch-ratchet.json is not changed.

Changelog

none

Observed / Not run

Observed:

  • On the base, python3 scripts/cmux-next/arch-ratchet.py --base 85a8bb7467c2 --head origin/feat-cmux-next: app_lines CmuxNextApp +110 (+129 from the culprits, -19 from #32244), push refused.
  • On the head, the same command: app_lines -31 (CmuxNextApp -31), no architecture count rises. The prepush gate reports app_lines -141, no new violations.
  • scripts/lint-ios-package-conventions.sh --namespace-fix: no unjustified convention violations.
  • Fleet compile: see the comment below.

Not run: the session-info-native capture scene and the hibernation/retire paths at run time (this is a move that keeps the same code paths; no new tests).


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


Summary by cubic

Moves the Session Info capture logic from #32159 and the held-prompt checks from #32131 out of CmuxNextApp into CmuxNextAgentPane, fixing the arch-ratchet failure at the feat-cmux-next tip.

  • CmuxNextApp drops 141 lines; arch-ratchet shows no rise. Behavior is unchanged.
  • AgentPaneView+DebugReads.swift (DEBUG only) picks up debug.agent_pane readiness and the ACP Inspector toggle.