Skip to content

fix(tui): show background shell completion#36534

Open
kitlangton wants to merge 1 commit into
v2from
shell-completion-notice
Open

fix(tui): show background shell completion#36534
kitlangton wants to merge 1 commit into
v2from
shell-completion-notice

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Background shell completion now appears at the point where it wakes the parent session, using the same concise transcript language as background subagents.

Before

│ ◌ $ bun run test
│ Background

The agent resumes with no visible completion boundary.

After

│ ◌ $ bun run test
│ Background

↳ Shell finished · bun run test

Long and multiline commands are normalized to one line and truncated by OpenTUI instead of wrapping.

How

  • packages/core/src/tool/shell.ts adds the existing synthetic description field and shell completion metadata to the durable notification already used to wake the parent.
  • packages/tui/src/routes/session/index.tsx recognizes shell completion metadata, renders Shell finished/failed/cancelled, and constrains the notice to one truncated line.
  • packages/core/test/tool-shell.test.ts verifies the description and metadata survive durable synthetic-input admission.

Scope

This does not change Job semantics, public schemas, Protocol or Server APIs, generated clients, database schemas, or shell execution behavior. Job.completed continues to mean the background Effect produced its result, not that the command exited successfully.

Testing

  • cd packages/core && bun run test test/tool-shell.test.ts
  • cd packages/core && bun typecheck
  • cd packages/tui && bun run test test/cli/tui/session-rows.test.ts test/cli/tui/inline-tool-wrap-snapshot.test.tsx
  • cd packages/tui && bun typecheck
  • pre-push full monorepo typecheck: 31/31 tasks passed
  • Prettier and git diff --check

Flow

sequenceDiagram
  participant Shell as Background shell
  participant Core as Core session
  participant Inbox as Durable parent inbox
  participant TUI as V2 TUI
  Shell->>Core: job reaches terminal state
  Core->>Inbox: admit synthetic completion
  Inbox-->>TUI: show single-line completion notice
  Core->>Core: wake parent at safe boundary
  Core->>Core: include full output in model history
Loading

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant