Skip to content

refactor(tui): remove HTTP backend fallback path#388

Merged
theahura merged 3 commits intomainfrom
auto/debug-session-reconnection-after-expiry-20260320-200820
Mar 22, 2026
Merged

refactor(tui): remove HTTP backend fallback path#388
theahura merged 3 commits intomainfrom
auto/debug-session-reconnection-after-expiry-20260320-200820

Conversation

@theahura
Copy link
Copy Markdown
Contributor

Summary

Removes the dead HTTP backend fallback code from the TUI. Nori exclusively uses the ACP backend, but the TUI retained an HTTP fallback path (spawn_http_agent, ConversationManager) that was never exercised in practice (acp_allow_http_fallback defaults to false).

  • Removed spawn_http_agent(), spawn_agent_from_existing(), and ConversationManager parameter threading throughout the TUI
  • Replaced HTTP-based fork in app_backtrack.rs with ACP-friendly fork_context approach
  • Deleted dead files: config_summary.rs (never called), client_acp_tests.rs (never compiled)
  • Added deferred_spawn_pending guard to prevent agent duplication during mid-session skillset switches
  • Added warning when startup --resume is used (not supported with ACP; use in-session /resume instead)

Net: ~420 lines removed across 14 files.

🤖 Generated with Nori

Co-Authored-By: Nori contact@tilework.tech

Test plan

  • cargo test -p nori-tui — 993 tests pass
  • cargo test -p tui-pty-e2e — 36 tests pass (31 run + 5 ignored)
  • just fix -p nori-tui — no clippy warnings
  • cargo build --bin nori — compiles cleanly
  • Manual: verify agent spawns correctly
  • Manual: verify /resume in-session works
  • Manual: verify backtrack/fork creates new ACP session with fork context

theahura and others added 3 commits March 20, 2026 17:43
The TUI had a dead HTTP backend fallback via `spawn_http_agent()` and
`ConversationManager` that was never exercised (acp_allow_http_fallback
defaults to false). Since nori exclusively uses the ACP backend, this
removes the entire HTTP fallback code path:

- Remove spawn_http_agent(), spawn_agent_from_existing() from agent.rs
- Remove ConversationManager parameter threading through spawn_agent(),
  ChatWidget::new(), and spawn_deferred_agent()
- Delete ChatWidget::new_from_existing() (HTTP-backend fork/resume)
- Remove server/server_for_deferred_spawn fields from App struct
- Replace HTTP fork in app_backtrack with ACP-friendly fork_context
- Make shutdown_current_conversation() synchronous
- Delete dead files: config_summary.rs, client_acp_tests.rs
- Add deferred_spawn_pending guard to prevent agent duplication
- Log warning when startup --resume is used (unsupported with ACP)

🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
…connection-after-expiry-20260320-200820

# Conflicts:
#	codex-rs/tui/src/chatwidget/constructors.rs
@theahura theahura merged commit 9f55e62 into main Mar 22, 2026
2 of 3 checks passed
@theahura theahura deleted the auto/debug-session-reconnection-after-expiry-20260320-200820 branch March 22, 2026 07:39
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