Skip to content

Conversation

@jayhack
Copy link
Contributor

@jayhack jayhack commented Aug 15, 2025

  • codegen
  • codegen agents
  • codegen agent --prompt "you there?"

@jayhack jayhack requested review from a team and codegen-team as code owners August 15, 2025 01:49
@codecov
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 17.85714% with 253 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/codegen/cli/commands/agent/main.py 18.08% 77 Missing ⚠️
src/codegen/cli/tui/app.py 16.27% 72 Missing ⚠️
src/codegen/cli/commands/profile/main.py 13.88% 62 Missing ⚠️
src/codegen/cli/commands/agents/main.py 0.00% 39 Missing ⚠️
src/codegen/cli/cli.py 77.77% 2 Missing ⚠️
src/codegen/cli/commands/tui/main.py 80.00% 1 Missing ⚠️

@jayhack jayhack merged commit 678abf4 into develop Aug 15, 2025
15 of 18 checks passed
@jayhack jayhack deleted the jay/textual-and-cleanups branch August 15, 2025 01:59
self.exit()


def run_tui():
Copy link
Contributor

Choose a reason for hiding this comment

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

Runtime error: run_tui is imported but not defined
cli.py imports run_tui from codegen.cli.tui.app, however app.py only defines the CodegenTUI class and never exposes a run_tui helper. Importing the CLI without this symbol raises an ImportError and breaks the default (codegen with no sub-command) execution path.

Suggested change
def run_tui():
# In codegen/cli/tui/app.py – add helper at end of file
def run_tui() -> None:
"""Convenience wrapper so other modules can launch the TUI without touching
Textual internals."""
CodegenTUI().run()

from rich.panel import Panel

from codegen.cli.api.endpoints import API_ENDPOINT
from codegen.cli.auth.token_manager import get_current_token
Copy link
Contributor

Choose a reason for hiding this comment

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

ImportError: resolve_org_id helper is used but not present in repo
Multiple new modules call from codegen.cli.utils.org import resolve_org_id, yet the package codegen.cli.utils.org does not exist in the repository. Importing these modules will crash immediately.

Suggested change
from codegen.cli.auth.token_manager import get_current_token
# Introduce fallback to avoid hard import failure until util is implemented
try:
from codegen.cli.utils.org import resolve_org_id # type: ignore
except ModuleNotFoundError: # pragma: no cover
def resolve_org_id(_org_id: int | None = None): # type: ignore
"""Temporary shim returning the provided org_id or env var value."""
import os
return _org_id or os.getenv("CODEGEN_ORG_ID")

run_id = str(agent_run.get("id", "Unknown"))
status = agent_run.get("status", "Unknown")
source_type = agent_run.get("source_type", "Unknown")
created_at = agent_run.get("created_at", "Unknown")
Copy link
Contributor

Choose a reason for hiding this comment

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

Logic bug: status emoji for ACTIVE/RUNNING mismatch in agents listing
agents/main.py switches from status == "RUNNING" ➡️ [dim]•[/dim] Running, but API uses ACTIVE for long-running jobs. The current mapping sets ACTIVE to Active with a grey dot while RUNNING remains grey too. Frontend expects green/animated for active.

Suggested change
created_at = agent_run.get("created_at", "Unknown")
elif status in ("RUNNING", "ACTIVE"):
status_display = "[dim]●[/dim] Running"

@codegen-sh
Copy link
Contributor

codegen-sh bot commented Aug 15, 2025

Found 3 issues. Please review my inline comments above.

🔍 View my analysis

@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.56.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants