Commit Graph

6 Commits

Author SHA1 Message Date
Teknium 03f3b09222 fix(tui-gateway): subagent lifecycle survives display.tool_progress=off
`_on_tool_progress` bailed on the tool-progress gate before dispatching
`subagent.*`, so a Desktop/TUI user who hid tool-call chrome also lost the
subagent rows in the status stack and spawn tree. Subagent lifecycle is
application state (like `todo.updated`, clarify and MCP consent cards,
which already bypass the gate); the gate now applies only to the optional
progress chrome (reasoning previews, MoA rows, tool.generating).
2026-09-07 11:25:20 -07:00
Teknium e83816a4d1 review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
2026-09-03 09:44:26 -07:00
Teknium 03c191076d refactor(tui): second pass on tool_progress/ws/session_history/transport (group -25.4% LOC)
- ws: _reply raises _SendFailed to end the read loop (one exit path instead of
  five 'if not await _reply(...): break' ladders); heartbeat/orphan-sweep starts
  loop-driven; inline streaming-frame check; frame bytes/log strings unchanged.
- tool_progress: _verbose_text unifies args/result rendering; summary via
  _SUMMARY_COUNTERS table; walrus for optional payload fields.
- session_history: _coerce_message_text list parts reuse _history_dict_text;
  dict.update() for inflight turn mutations; compact docstrings (all WHY kept).
- transport: _raise_unless_peer_gone (void) classifier; docstrings compacted.
Old-vs-new fuzz (2928 cases) identical; WIRE OK vs base2; _methods set identical.
2026-09-02 22:47:09 -07:00
Teknium d41d546d0e refactor(tui): compact tool_progress/ws/session_history/transport (-13% LOC, wire-neutral)
- tool_progress: table-driven subagent.* payload fields (wire order kept), summary counters
  dict, contextlib.suppress, single-expression cap label; drop unused _registry.
- session_history: collapse None/str/number branches in content coercers, drop
  _TEXT_ONLY_BUSY_PART_KINDS alias, _HISTORY_ROLES frozenset; drop unused _registry.
- transport: one _peer_gone() classifier replaces the duplicated write/flush
  except ladders (same raise/return semantics), compact docstrings.
- ws: frame-building code untouched; compact comments/docstrings, joined
  one-arg-per-line calls.
Wire sweep vs base: WIRE OK; 2928-case old-vs-new helper fuzz identical.
2026-09-02 22:17:48 -07:00
Teknium 99433742dc refactor(tui): extract the prompt turn into prompt_turn.py; compact methods_*/session_*/agent_callbacks; split _start_agent_build into scope/wiring helpers
- server.py 7663 -> 5319: _run_prompt_submit and its goal/loop/voice/scope
  phases move to tui_gateway/prompt_turn.py (bound via method_ctx.bind_module);
  _start_agent_build split into _bind/_release_build_profile_scopes,
  _deferred_build_agent_kwargs, _wire_session_agent, _start_session_services;
  _load_enabled_toolsets split (_enabled_mcp_server_names, _resolve_explicit_toolsets).
- methods_slash: _LIVE_SLASH_OUTPUT dispatch table; methods_tools: _SLASH_BUILTINS,
  _guarded; tool_progress: _PROGRESS_HANDLERS; methods_config_set:
  _REASONING_DISPLAY_WORDS; methods_voice: _VOICE_TOGGLE_ACTIONS.
- Unified: _denied_source (methods_session) replaces _WORKER_SOURCES in
  methods_profiles; _compress_live_with_feedback / _compute_host_slash shared by
  the slash mirror and /compress; _end_voice_chat shared by stop-phrase paths;
  _watcher_mtime_ns; _reaper_session_is_detached_idle; _notif_* helpers.
- Dead: _profile_dir_or_err, _resume_info, _slash_builtin_table (refs.py: 0 hits).
- acp_adapter/server.py: docstring compaction only (AST-identical).
- Every file semantically reviewed hunk-by-hunk for wire/log/lock/order parity.
2026-09-02 14:09:13 -07:00
Teknium 0095f908cd refactor(tui): split change watcher and tool-progress callbacks out of server.py; bind_module rebinds nested dispatch tables 2026-09-02 14:09:11 -07:00