Skip to content

Commit 09d322d

Browse files
authored
Merge pull request #17 from kubit-ui/fix/message-safe-zone
fix(messages): ensure productivity and event messages respect safe zone
2 parents 59a6a36 + 4d99021 commit 09d322d

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [2.5.1] - 2025-11-21
10+
11+
### 🐛 Bug Fixes
12+
13+
- **Message Safe Zone Validation** - Fixed issue where productivity messages (reminders and metrics) and event-triggered messages were displaying outside of Kubito's safe zone, causing text overflow at container edges
14+
- Added safe zone validation to `showEventMessage()` to prevent productivity messages from appearing at edges
15+
- Refactored `showMessage()` to include safe zone check for consistent behavior across all message types
16+
- Removed redundant safe zone validation from `setupRandomMessages()` timer
17+
- Centralized safe zone logic in message display methods for better maintainability
18+
- All messages now respect the safe zone (center 70% of container with 15% margin on each side)
19+
20+
### 📚 Documentation
21+
22+
- **README.md Updates** - Enhanced documentation with demo GIF as visual demonstration of extension functionality
23+
924
## [2.5.0] - 2025-11-19
1025

1126
### ✨ Added

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
> **Meet Kubito, your coding companion that brings joy to your development
77
> workspace!**
88
9+
<p align="left">
10+
<img src="media/demo-extension.gif" alt="Kubito Demo" width="600">
11+
</p>
12+
913
## ✨ What Kubito Does
1014

1115
- 🤖 **Walks Around**: Kubito walks back and forth in your Explorer
@@ -84,26 +88,17 @@ Enhance your coding workflow with intelligent reminders and metrics:
8488

8589
Kubito speaks your language! All messages, reminders, and productivity features
8690
are fully localized in:
87-
88-
### Western Languages
89-
9091
- 🇪🇸 **Spanish** (Español) - Native support
9192
- 🇺🇸 **English** - Native support
9293
- 🇫🇷 **French** (Français) - Native support
9394
- 🇩🇪 **German** (Deutsch) - Native support
9495
- 🇵🇹 **Portuguese** (Português) - Native support
9596
- 🇮🇹 **Italian** (Italiano) - Native support
9697
- 🇳🇱 **Dutch** (Nederlands) - Native support
97-
98-
### Eastern Languages
99-
10098
- 🇯🇵 **Japanese** (日本語) - Full localization
10199
- 🇰🇷 **Korean** (한국어) - Full localization
102100
- 🇨🇳 **Chinese Simplified** (中文简体) - Full localization
103101
- 🇷🇺 **Russian** (Русский) - Full localization
104-
105-
### Additional Languages
106-
107102
- 🇵🇱 **Polish** (Polski) - Full localization
108103
- 🇸🇦 **Arabic** (العربية) - Full localization (RTL supported)
109104
- 🇹🇷 **Turkish** (Türkçe) - Full localization

media/demo-extension.gif

1.73 MB
Loading

src/webview/kubito.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,14 +1010,14 @@ class KubitoController implements IKubitoAnimator, IAnimationState {
10101010
const timeSinceLastLanding = Date.now() - this.lastLandingTime;
10111011
const isInLandingCooldown = timeSinceLastLanding < KUBITO_CONFIG.POST_JUMP_COOLDOWN;
10121012

1013-
// Show messages when not jumping, not in jump cooldown, not in landing cooldown, and in safe zone
1013+
// Show messages when not jumping, not in jump cooldown, not in landing cooldown
10141014
// Messages only appear during PAUSED state
1015+
// Safe zone validation is done in showMessage() method
10151016
if (
10161017
!this.isJumping &&
10171018
!isInJumpCooldown &&
10181019
!isInLandingCooldown &&
1019-
this.kubitoState === KubitoState.PAUSED &&
1020-
this.isInSafeZone()
1020+
this.kubitoState === KubitoState.PAUSED
10211021
) {
10221022
this.showRandomMessage();
10231023
}
@@ -1148,6 +1148,11 @@ class KubitoController implements IKubitoAnimator, IAnimationState {
11481148
return;
11491149
}
11501150

1151+
// Don't show messages if Kubito is not in safe zone
1152+
if (!this.isInSafeZone()) {
1153+
return;
1154+
}
1155+
11511156
// Cancel any active random message timer
11521157
if (this.messageInterval) {
11531158
clearTimeout(this.messageInterval);
@@ -1172,6 +1177,11 @@ class KubitoController implements IKubitoAnimator, IAnimationState {
11721177
return;
11731178
}
11741179

1180+
// Don't show messages if Kubito is not in safe zone
1181+
if (!this.isInSafeZone()) {
1182+
return;
1183+
}
1184+
11751185
this.forceShowMessage(message);
11761186
}
11771187

0 commit comments

Comments
 (0)