Skip to content

fix: reset isCompacting state on new session#259

Merged
avoidwork merged 2 commits into
mainfrom
feat/fix-context-indicator-color-new-session
Jun 15, 2026
Merged

fix: reset isCompacting state on new session#259
avoidwork merged 2 commits into
mainfrom
feat/fix-context-indicator-color-new-session

Conversation

@avoidwork

@avoidwork avoidwork commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Description

The context size indicator in the status bar stays red (compacting color) after starting a new session. It should reset to the default gray color.

Root cause: handleNewSession() in src/tui/app.js resets messages, chatHistory, contextSize, and statusMessage — but does not reset isCompacting state.

Fix: Added setIsCompacting(false) to handleNewSession().

Type of Change

  • Bugfix (non-breaking change which fixes an issue)

Testing

  • All 1132 existing tests pass with no regressions
  • Manual verification: trigger context compaction, start new session, confirm indicator returns to gray

Coverage

  • 100% line coverage maintained

Checklist

  • npm run lint passes (0 warnings, 0 errors)
  • Tests pass with 100% line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Files Changed

  • src/tui/app.js — Added setIsCompacting(false) to handleNewSession()
  • OpenSpec change artifacts archived

Related

Fixes #255

@avoidwork avoidwork changed the title fix: context indicator color stays red after new session fix: reset isCompacting state on new session Jun 15, 2026
@avoidwork

Copy link
Copy Markdown
Owner Author

Audit Results: Fix Context Size Indicator Color on New Session

Implementation Audit (Step 8)

Goal Fulfillment

  • ✅ Goal 1 (Reset isCompacting State on New Session): Fully implemented — setIsCompacting(false) added to handleNewSession()

Spec Compliance

  • ✅ Implementation matches the design document exactly — single-line state reset
  • ✅ Tasks all completed as specified

Task Completion

  • ✅ 1.1: setIsCompacting(false) added to handleNewSession() in src/tui/app.js
  • ✅ 2.1: All 1132 tests pass
  • ✅ 2.2: Lint passes with 0 warnings, 0 errors

Quality Check

  • ✅ No obvious issues, missing edge cases, or inconsistencies
  • ✅ Fix is minimal, targeted, and follows existing code patterns

Result: No errors found. Implementation complete and verified.

@avoidwork avoidwork merged commit 8d84006 into main Jun 15, 2026
2 checks passed
@avoidwork avoidwork deleted the feat/fix-context-indicator-color-new-session branch June 15, 2026 03:38
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.

bug: context count color stays red after starting new session

1 participant