Skip to content

feat(tui2): separate task pane, move provider info to InfoPane - #160

Merged
buchenberg merged 1 commit into
mainfrom
feat/tui2-task-pane-separation
Aug 6, 2026
Merged

feat(tui2): separate task pane, move provider info to InfoPane#160
buchenberg merged 1 commit into
mainfrom
feat/tui2-task-pane-separation

Conversation

@buchenberg

Copy link
Copy Markdown
Owner

Summary

Implements the tui2-task-pane-separation plan:

  • Header: Banner is now full-width; provider/model/version moved out entirely
  • InfoPane: Now shows live Session section (provider/model/version), Context tokens, and MCP placeholder
  • TodoPane: Dedicated task pane now receives live todo items via \CtrlTodos\
  • Deleted: \internal/tui2/components/provider/\ — replaced by InfoPane session section
  • HandleContextInfo: Now updates context window and status bar in real-time, not just at Done events
  • Background: InfoPane background set to terminal default (was dark gray-blue)

Changed Files

File Change
\internal/tui2/tui2.go\ Full-width banner, remove provider component, add \�ersion\ field
\internal/tui2/control.go\ Split \CtrlTodos\ → \
enderTodoPane, session info in \
enderInfoPane\
\internal/tui2/events.go\ \HandleContextInfo\ now updates context window + status bar
\internal/tui2/components/infopane/infopane.go\ Background → terminal default
\internal/tui2/components/provider/provider.go\ Deleted
.agents/plans/\ Add plan, remove completed/stale plans

- Remove provider component from header; banner now full-width
- Move provider/model/version to InfoPane Session section with live data
- Split CtrlTodos → renderTodoPane, CtrlContextInfo → renderInfoPane
- HandleContextInfo now updates context window and status bar
- Delete provider component (replaced by InfoPane session section)
- InfoPane background: inherit terminal default
@buchenberg
buchenberg merged commit f28736b into main Aug 6, 2026
4 checks passed
@buchenberg
buchenberg deleted the feat/tui2-task-pane-separation branch August 6, 2026 04:05
Comment thread internal/tui2/tui2.go
t := &TUI2{
App: tview.NewApplication(),
thinkingInd: thinking.New("Reasoning..."),
version: "yaah",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: Version is hardcoded as "yaah" instead of using the build-time version from cmd/yaah.

The PR plan mentions "Agent version: from build-time version constant", but the implementation hardcodes version: "yaah" in New(). There is no SetVersion method or other mechanism to inject the actual build-time version, so the InfoPane will always display a stale version string.

Consider either exporting a setter or accepting the version as a parameter to New().


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread internal/tui2/events.go
}

func (t *TUI2) HandleContextInfo(tokens, _ int) {
func (t *TUI2) HandleContextInfo(tokens, window int) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: HandleContextInfo is dead code — defined but never called from anywhere in the codebase.

The method was already uncalled before this PR, but it was expanded during the refactor without being connected to any caller. Either remove it or wire it up if it is intended to be used.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address in follow-up

Overview

Severity Count
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
internal/tui2/tui2.go 109 Version is hardcoded as "yaah" instead of using the build-time version from cmd/yaah
internal/tui2/events.go 127 HandleContextInfo is dead code — defined but never called from anywhere in the codebase
Files Reviewed (4 files)
  • internal/tui2/tui2.go - 1 issue
  • internal/tui2/control.go
  • internal/tui2/events.go - 1 issue
  • internal/tui2/components/infopane/infopane.go

Fix these issues in Kilo Cloud


Reviewed by step-3.7-flash · Input: 189.9K · Output: 38.9K · Cached: 5.7M

buchenberg added a commit that referenced this pull request Aug 7, 2026
- Deleted 4 implemented ADRs (0001-0004: engine-view separation, middleware
  pipeline, functional options, event-driven architecture) — all Accepted
  and fully implemented; content covered by architecture.md
- Deleted 5 implemented plan docs from .agents/plans/ (tui-mcp-bridge #159,
  tui-quiet-mode #159, tui2-task-pane-separation #160, max-iterations-dialog,
  web-ui-commands #162) — all features shipped
- Updated docs/adr/README.md and CONTRIBUTING.md to remove dead ADR links
- Fixed stale references to cmd/yaah/subagent_runner.go in architecture.md,
  PROMPT-INJECTION.md, and code-organization.md (now internal/agent/runner)
buchenberg added a commit that referenced this pull request Aug 7, 2026
#174)

* Split wiring.go builders and eliminate ContextManager state sync dance

Task #11: Split newAgentSessionWithOptions into focused builders
- wiring_otel.go: initOtel + wrapProviderWithOtel (extracted inline provider wrapping)
- wiring_mcp.go: initMCP (moved to its own file)
- wiring_prompt.go: buildSystemPrompt + buildMainPrompt (extracted inline prompt layers,
  memory enrichment, guidelines, directive injection, and quick-ref assembly)
- wiring.go slimmed from 396 to ~210 lines; removed dead layers.Skills assignment
  (was set after prompts.Build, never read)

Task #12: Complete ContextManager extraction — eliminate state sync dance
- Added State *LoopState pointer to ContextManager; compaction methods now read/write
  mutable state (Messages, PreviousSummary, token counts, compaction tracking) directly
  through the pointer instead of copy-in/copy-out
- Removed 9 duplicate state fields from ContextManager (Messages, PreviousSummary,
  LastPromptTokens, LastCachedPromptTokens, IneffectiveCompactions, LastCompactionTokens,
  CompactionBudgetMultiplier, CompactionSavingsHistory, CompactionForcedByOverflow)
- Eliminated 19-line sync dance in Loop.compactContext and 3-line dance in Loop.trimContext
- Removed redundant CtxMgr.Messages assignments in loop.go, tools.go, turn.go
  (now no-ops since CtxMgr.State points to Loop.State)
- ctxMgr() lazily sets State = &l.State when nil (backward compatible with tests)

* Address PR #174 review: OTel env flag, memoryGuidelines scope, budget multiplier init

- wiring_otel.go: evaluate YAAH_OTEL_ENABLED before the early return so
  the env flag can enable OTel when config disables it (pre-existing bug)
- wiring_prompt.go: move memoryGuidelines from package-level const into
  buildSystemPrompt function scope (no globals per AGENTS.md)
- lifecycle_init.go: initialize CompactionBudgetMultiplier=1.0 in ctxMgr()
  lazy path so Loop.Compact has a nonzero preservation budget before
  applyDefaults() runs

* docs: remove completed plans and implemented ADRs

Delete plan files for fully-implemented features (max iterations
dialog, TUI-MCP bridge, quiet mode, task pane separation) and the four
ADRs (engine-view separation, middleware pipeline, functional options,
event-driven architecture) whose content is now covered by
docs/architecture.md.

Update doc references across CONTRIBUTING.md, architecture.md, and
code-organization.md to point at architecture.md in place of the
retired ADRs, and fix stale file paths to reflect the recent runner
refactor (cmd/yaah/subagent_runner.go -> internal/agent/runner/).

* Delete implemented ADRs and plan docs, fix stale references

- Deleted 4 implemented ADRs (0001-0004: engine-view separation, middleware
  pipeline, functional options, event-driven architecture) — all Accepted
  and fully implemented; content covered by architecture.md
- Deleted 5 implemented plan docs from .agents/plans/ (tui-mcp-bridge #159,
  tui-quiet-mode #159, tui2-task-pane-separation #160, max-iterations-dialog,
  web-ui-commands #162) — all features shipped
- Updated docs/adr/README.md and CONTRIBUTING.md to remove dead ADR links
- Fixed stale references to cmd/yaah/subagent_runner.go in architecture.md,
  PROMPT-INJECTION.md, and code-organization.md (now internal/agent/runner)
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