-
Notifications
You must be signed in to change notification settings - Fork 32
🤖 Rename 'Compact Here' to 'Start Here' and add to Assistant messages #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Extract Start Here functionality into reusable utilities: - src/utils/startHere.ts: Core logic for replacing chat history - src/hooks/useStartHere.ts: React hook for Start Here button state - Update ProposePlanToolCall to use shared hook (DRY) - Add Start Here button to final Assistant messages - Update MessageWindow ButtonConfig to support disabled state - Update documentation to reflect new 'Start Here' naming and availability This allows users to restart conversations from either plans or final assistant responses, providing more flexibility in context management. _Generated with `cmux`_
- Create src/constants/ui.ts with COMPACTED_EMOJI constant (📦) - Update all uses of compacted emoji to use shared constant: - AssistantMessage compacted badge - Start Here button label - Add isCompacted parameter to useStartHere hook - Disable Start Here button if message is already compacted - Pass isCompacted flag from AssistantMessage to hook This prevents confusion from trying to 'Start Here' on a message that's already the result of a Start Here operation, and ensures the emoji is consistent across all compacted-related UI elements. _Generated with `cmux`_
a6f5242 to
857b95c
Compare
The button was showing as disabled on compacted messages, but it should be completely hidden. Updated the conditional to check !isCompacted before adding the button to the buttons array. _Generated with `cmux`_
**UX Improvements:** - Emoji (📦) now shows only on hover to reduce visual clutter - Added tooltip explaining what Start Here does - Added countdown modal with 3s delay before execution - ESC or Cancel button aborts the operation - Confirm Now button skips countdown **Implementation:** - Created StartHereModal component with countdown timer - Updated useStartHere hook to return modal state management - Extended ButtonConfig to support emoji and tooltip - Created ButtonWithHoverEmoji component for hover effect - Integrated TooltipWrapper for helpful tooltips **Safety:** - Users have 3 seconds to cancel - Clear warning about irreversibility - ESC key cancels operation at any time _Generated with `cmux`_
c572729 to
a0d737b
Compare
- Removed Cancel and Confirm Now buttons - Simple centered layout with "Compacting in" + large countdown number - ESC still cancels (built into Modal component) - Much cleaner, less overwhelming UX _Generated with `cmux`_
- Removed countdown timer entirely - Simple confirmation dialog with centered OK and Cancel buttons - Much more straightforward UX - Still shows warning that action cannot be undone - ESC still cancels (built into Modal component) _Generated with `cmux`_
The subtitle already explains what the action does, so the additional warning text was redundant. Modal is now cleaner and more concise. _Generated with `cmux`_
- useStartHere hook now returns a pre-configured 'modal' component
- Both AssistantMessage and ProposePlanToolCall just render {modal}
- Removed duplicate StartHereModal imports and configuration
- Single source of truth for modal behavior
**Before:**
- Both components imported StartHereModal
- Both manually wired up isModalOpen, onClose, onConfirm
**After:**
- Hook returns ready-to-render modal
- Components just use {modal}
- Less boilerplate, better encapsulation
_Generated with `cmux`_
Since startHereWithMessage is only called by useStartHere, it makes more sense to colocate them. This reduces indirection and makes the code easier to follow. Changes: - Moved startHereWithMessage from src/utils/startHere.ts into src/hooks/useStartHere.ts - Made it a private function (not exported) - Deleted src/utils/startHere.ts _Generated with `cmux`_
ammario
approved these changes
Oct 10, 2025
_Generated with `cmux`_
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Renames 'Compact Here' to 'Start Here' and makes it available on both Plans and final Assistant messages.
Changes
Shared utilities (DRY):
src/utils/startHere.ts: Core logic for replacing chat historysrc/hooks/useStartHere.ts: React hook for Start Here button statesrc/constants/ui.ts: SharedCOMPACTED_EMOJIconstant (📦)Component updates:
disabledproperty toButtonConfigBehavior:
Documentation:
docs/context-management.mdto reflect new naming and availabilityTesting
make build # ✓ PassesGenerated with
cmux