Skip to content

feat: cleanup context behavior change#71

Draft
idebeijer wants to merge 3 commits into
mainfrom
feat/cleanup-behavior-change-warning
Draft

feat: cleanup context behavior change#71
idebeijer wants to merge 3 commits into
mainfrom
feat/cleanup-behavior-change-warning

Conversation

@idebeijer

Copy link
Copy Markdown
Owner

No description provided.

Signed-off-by: Igor de Beijer <71566757+idebeijer@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes the transitional in-place context switch warning (introduced for v0.8.0 behavior change) along with its persisted counter state and associated tests.

Changes:

  • Drops InPlaceSwitchWarnCount/RecordInPlaceSwitchWarn and the InPlaceSwitchWarnMax constant from the state package.
  • Removes the warning block emitted from switchContextInPlace in cmd/context.go and the unused fatih/color import there.
  • Deletes corresponding tests (warnings_test.go and TestContextOptions_Run_WarningSuppressedAfterMax).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/state/warnings.go Deleted file containing the warning counter accessors.
internal/state/warnings_test.go Deleted tests for the removed counter.
internal/state/state.go Drops the InPlaceSwitchWarnCount field from persisted State.
cmd/context.go Removes warning emission and now-unused color import.
cmd/context_test.go Removes the test exercising the warning suppression behavior.

Note: Removing the InPlaceSwitchWarnCount JSON field is backward-compatible for unmarshaling (existing state files with the field will simply ignore it), so no migration is required.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

idebeijer added 2 commits May 29, 2026 12:00
Signed-off-by: Igor de Beijer <71566757+idebeijer@users.noreply.github.com>
Signed-off-by: Igor de Beijer <71566757+idebeijer@users.noreply.github.com>
@idebeijer idebeijer requested a review from Copilot May 29, 2026 10:02
@idebeijer idebeijer marked this pull request as draft May 29, 2026 10:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

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.

2 participants