Skip to content

Commit 444c3ba

Browse files
committed
🤖 refactor: make countdown warning smaller and less intrusive
- Countdown warning (60-69%): Small grey text, right-aligned - Urgent warning (70%+): Keep prominent blue box styling - Makes countdown unobtrusive while keeping urgent warning visible _Generated with `mux`_
1 parent 8b68d16 commit 444c3ba

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/browser/components/CompactionWarning.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,20 @@ export const CompactionWarning: React.FC<{
2121
// At threshold or above, next message will trigger compaction
2222
const willCompactNext = props.usagePercentage >= props.thresholdPercentage;
2323

24-
// Calculate remaining percentage until threshold
25-
const remaining = props.thresholdPercentage - props.usagePercentage;
26-
27-
const message = willCompactNext
28-
? "⚠️ Context limit reached. Next message will trigger auto-compaction."
29-
: `Context left until Auto-Compact: ${Math.round(remaining)}%`;
24+
// Urgent warning at/above threshold - prominent blue box
25+
if (willCompactNext) {
26+
return (
27+
<div className="text-plan-mode bg-plan-mode/10 mx-4 my-4 rounded-sm px-4 py-3 text-center text-xs font-medium">
28+
⚠️ Context limit reached. Next message will trigger auto-compaction.
29+
</div>
30+
);
31+
}
3032

33+
// Countdown warning below threshold - subtle grey text, right-aligned
34+
const remaining = props.thresholdPercentage - props.usagePercentage;
3135
return (
32-
<div className="text-plan-mode bg-plan-mode/10 mx-4 my-4 rounded-sm px-4 py-3 text-center text-xs font-medium">
33-
{message}
36+
<div className="text-muted mx-4 mt-2 mb-1 text-right text-[10px]">
37+
Context left until Auto-Compact: {Math.round(remaining)}%
3438
</div>
3539
);
3640
};

0 commit comments

Comments
 (0)