Skip to content

integrate context:updated event and display decisions/notes in FocusedAgentPanel#539

Merged
JeremyDev87 merged 1 commit intomasterfrom
feat/tui-context-integration-515
Feb 18, 2026
Merged

integrate context:updated event and display decisions/notes in FocusedAgentPanel#539
JeremyDev87 merged 1 commit intomasterfrom
feat/tui-context-integration-515

Conversation

@JeremyDev87
Copy link
Owner

Summary

Closes #515

Integrates the update_context MCP tool response into the TUI dashboard by emitting a context:updated event and displaying accumulated decisions[] and notes[] in the FocusedAgentPanel.

Changes

Event Layer

  • Add context:updated to TUI_EVENTS constant and TuiEventMap interface
  • Add ContextUpdatedEvent payload type (decisions, notes, mode, status)
  • Extend extractFromUpdateContext() to emit context:updated alongside task:synced when decisions or notes are present

State Layer

  • Add contextDecisions, contextNotes, contextMode, contextStatus fields to DashboardState
  • Add CONTEXT_UPDATED reducer case in dashboardReducer
  • Subscribe to context:updated EventBus event in use-dashboard-state hook

UI Layer

  • Create context-section.pure.ts with formatContextDecisions, formatContextNotes, formatContextSection pure functions (numbered list / bullet prefix, max 5 items with overflow indicator)
  • Create ContextSection.tsx Ink component rendering decisions (cyan) and notes (dimColor)
  • Integrate ContextSection into FocusedAgentPanel below the Tools/IO section
  • Pass contextDecisions and contextNotes props down from dashboard-app.tsx

Test Plan

  • context-section.pure.spec.ts — pure rendering functions (empty, single, overflow, combined)
  • response-event-extractor.spec.tscontext:updated emitted with decisions/notes; not emitted when both empty; task:synced still emitted alongside
  • use-dashboard-state.spec.tsCONTEXT_UPDATED reducer updates state correctly
  • FocusedAgentPanel.spec.tsx — renders ContextSection with props; shows "No context" fallback
  • dashboard-types.spec.tscreateInitialDashboardState includes new fields
  • types.spec.tsCONTEXT_UPDATED constant and event map coverage

@vercel
Copy link

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Feb 18, 2026 9:33am

@JeremyDev87 JeremyDev87 self-assigned this Feb 18, 2026
@JeremyDev87 JeremyDev87 added feat tui TUI Agent Monitor labels Feb 18, 2026
@JeremyDev87 JeremyDev87 changed the title feat(tui): integrate context:updated event and display decisions/notes in FocusedAgentPanel integrate context:updated event and display decisions/notes in FocusedAgentPanel Feb 18, 2026
…s in FocusedAgentPanel (#515)

- Add context:updated event type and ContextUpdatedEvent payload to TuiEventMap
- Extend extractFromUpdateContext() to emit context:updated when decisions/notes present
- Add contextDecisions, contextNotes, contextMode, contextStatus to DashboardState
- Add CONTEXT_UPDATED reducer action in use-dashboard-state
- Create ContextSection pure rendering functions (context-section.pure.ts)
- Create ContextSection Ink component (ContextSection.tsx)
- Integrate ContextSection into FocusedAgentPanel below Tools/IO section
- Add tests for event extraction, reducer, and pure rendering functions
- Fix flaky integration test: add extra tick for coverage-instrumented CI environment
@JeremyDev87 JeremyDev87 force-pushed the feat/tui-context-integration-515 branch from c7dfc01 to 36664b9 Compare February 18, 2026 09:32
@JeremyDev87 JeremyDev87 merged commit 1fb3948 into master Feb 18, 2026
25 checks passed
@JeremyDev87 JeremyDev87 deleted the feat/tui-context-integration-515 branch February 18, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat tui TUI Agent Monitor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(tui): context integration — display decisions/notes in FocusedAgentPanel

1 participant