Skip to content

fix: tapping active mode segment incorrectly switches to opposite mode#641

Open
RaajeevChandran wants to merge 2 commits intoosaurus-ai:mainfrom
RaajeevChandran:bugfix/mode-toggle-no-op-on-active-segment
Open

fix: tapping active mode segment incorrectly switches to opposite mode#641
RaajeevChandran wants to merge 2 commits intoosaurus-ai:mainfrom
RaajeevChandran:bugfix/mode-toggle-no-op-on-active-segment

Conversation

@RaajeevChandran
Copy link
Contributor

Summary

The Chat/Work mode toggle was firing a single toggle action on any tap, which always switched to the opposite mode regardless of which segment was tapped. Each segment now reports its own Mode back through the action closure and the caller guards against switching when the tapped mode is already active

Changes

  • Behavior change
  • UI change (screenshots below)
  • Refactor / chore
  • Tests
  • Docs

Test Plan

  1. Tap the Chat segment (already selected) - confirm nothing happens and the mode stays as Chat
  2. Tap the Work segment - confirm the mode switches to Work
  3. Tap the Work segment again (already selected) - confirm nothing happens and the mode stays as Work
  4. Tap the Chat segment - confirm the mode switches back to Chat

Screenshots

Before

Before.mov

After

After.mov

Checklist

  • I have read CONTRIBUTING.md
  • I added/updated tests where reasonable
  • I updated docs/README as needed
  • I verified build on macOS with Xcode 16.4+

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