Skip to content

Extract StatusState from AppLayout to constructor injection#247

Merged
shellicar merged 1 commit intomainfrom
feature/extract-status-state
Apr 12, 2026
Merged

Extract StatusState from AppLayout to constructor injection#247
shellicar merged 1 commit intomainfrom
feature/extract-status-state

Conversation

@shellicar
Copy link
Copy Markdown
Owner

Summary

  • StatusState was the only state class updated from outside AppLayout, routed through setModel and updateUsage on the layout
  • Moved construction to main.ts; passed directly to AppLayout and AgentMessageHandler
  • Removed AppLayout.setModel and AppLayout.updateUsage; callers now write to the state object directly
  • Test updated to assert on StatusState fields rather than mocking layout methods

@shellicar shellicar added this to the 1.0 milestone Apr 11, 2026
@shellicar shellicar added enhancement New feature or request pkg: claude-sdk-cli The new SDK-based CLI labels Apr 11, 2026
@shellicar shellicar self-assigned this Apr 11, 2026
@shellicar shellicar added enhancement New feature or request pkg: claude-sdk-cli The new SDK-based CLI labels Apr 11, 2026
@shellicar shellicar requested a review from bananabot9000 April 11, 2026 23:51
@shellicar shellicar enabled auto-merge (squash) April 11, 2026 23:51
@shellicar shellicar force-pushed the feature/extract-status-state branch from d9cc566 to 23459d2 Compare April 11, 2026 23:56
Copy link
Copy Markdown
Collaborator

@bananabot9000 bananabot9000 left a comment

Choose a reason for hiding this comment

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

Phase 2 clean. StatusState extracted to constructor injection, proxy methods deleted, callers talk to state directly. Test verifies actual state instead of mock call counts. Testament is signal-only -- verification results + biome side-effect + staging instruction. No suspicious files. 🍌

@shellicar shellicar merged commit 118d5d5 into main Apr 12, 2026
4 checks passed
@shellicar shellicar deleted the feature/extract-status-state branch April 12, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pkg: claude-sdk-cli The new SDK-based CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants