Skip to content

refactor(tui): remove client-side derived state, use daemon-computed fields#395

Open
proboscis wants to merge 1 commit intomainfrom
issue/orch-392/run-20260201-104351
Open

refactor(tui): remove client-side derived state, use daemon-computed fields#395
proboscis wants to merge 1 commit intomainfrom
issue/orch-392/run-20260201-104351

Conversation

@proboscis
Copy link
Copy Markdown
Owner

Summary

  • Add alive, alive_known, is_active, and pr_status fields to Run proto message
  • Daemon now computes these values server-side instead of TUI deriving them locally
  • Remove derive_pr_status() function and is_active() method from Python TUI
  • Simplify elapsed_time() to use daemon-provided elapsed_display

Changes

Proto Schema (api/orch.proto)

  • Added 4 new fields to Run message: alive, alive_known, is_active, pr_status

Go Daemon (internal/daemon/proto_handler.go)

  • Added protoIsActiveStatus() to compute active state from status
  • Added computePRStatus() to derive PR status from run state
  • Added computeAliveStatus() to check agent liveness via multiplexer
  • Updated enrichment functions to populate new fields

Python TUI

  • models.py: Added fields, removed is_active() method, simplified elapsed_time()
  • proto_client.hy: Map new proto fields to model
  • widgets.py: Removed derive_pr_status(), use run.pr_status directly
  • tests/test_widgets.py: Updated tests for field-based approach

Testing

  • Go tests pass (2 pre-existing integration test failures unrelated to changes)
  • Python TUI tests pass (83 passed, 9 failed due to pre-existing hy module issue)

Closes orch-392

…fields

Add alive, alive_known, is_active, and pr_status fields to Run proto.
Daemon now computes these values instead of TUI deriving them locally.
Remove derive_pr_status() and is_active() method from Python TUI.
Simplify elapsed_time() to use daemon-provided elapsed_display.

Closes orch-392
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