feat(#524): compress affordance in context ring tooltip#1223
feat(#524): compress affordance in context ring tooltip#1223bergeouss wants to merge 2 commits intonesquena:masterfrom
Conversation
When context usage reaches 50% (yellow), a subtle hint button appears in the context ring tooltip suggesting /compress. At 75%+ (red), the hint intensifies with a warning style. Clicking the button pre-fills /compress into the composer and focuses it, so the user can add a focus topic or just hit send. No auto-fire — the user stays in control. - static/ui.js: conditional visibility + click handler in _syncCtxIndicator - static/index.html: ctxCompressBtn element inside ctxTooltip - static/style.css: muted button style, red variant for ctx-high - static/i18n.js: ctx_compress_hint / ctx_compress_action in all 7 locales Closes nesquena#524
|
Thanks for the PR, @bergeouss! The compress affordance is a solid discoverability improvement — surfacing The tiered styling (subtle hint → warning button) is clean. A few things to confirm before merge:
The implementation scope is tight (4 files, clear separation of concerns). Once the above are confirmed this should be merge-ready! |
Addresses reviewer feedback on nesquena#524 — the compress affordance was only reachable via hover (desktop). Mobile users can now tap the context ring button to toggle the tooltip and access the compress button. - CSS: add .ctx-tooltip-active class with opacity + pointer-events - JS: tap-to-toggle handler on ctxIndicator with outside-click dismiss - aria-hidden toggled correctly for accessibility Ref: nesquena#1223 review comment
Review Feedback AddressedThank you for the thorough review! Addressing all three points: 1. Mobile accessibility — Touch toggle support addedThe compress affordance was only reachable via hover (desktop-only). Added a tap-to-toggle mechanism for the context tooltip on touch devices:
2. Button state reset ✅ Already handledWhen context usage drops below 50% (e.g. after 3. i18n key parity ✅ All 7 locales coveredBoth
Files modified: 🤖 AI-assisted via Hermes Agent |
|
Thanks for the follow-up commit, @bergeouss — the three review points are all addressed:
The 2828-test pass confirms the changes integrate cleanly with the existing suite. One small observation: the This looks ready for merge. 🤖 Automated triage via nesquena-hermes |
|
Merged in v0.50.237 via #1243. Thank you @bergeouss! 🎉 |
Addresses reviewer feedback on nesquena#524 — the compress affordance was only reachable via hover (desktop). Mobile users can now tap the context ring button to toggle the tooltip and access the compress button. - CSS: add .ctx-tooltip-active class with opacity + pointer-events - JS: tap-to-toggle handler on ctxIndicator with outside-click dismiss - aria-hidden toggled correctly for accessibility Ref: nesquena#1223 review comment
Summary
Adds a discoverability layer for /compress directly in the context usage indicator, as discussed in the issue consensus.
Behaviour
Clicking the button pre-fills
/compressinto the composer and focuses it — the user can type a focus topic or just hit send. No auto-fire, user stays in control.Implementation
static/ui.js— Conditional visibility + click handler inside_syncCtxIndicator()static/index.html—ctxCompressBtnelement insidectxTooltipstatic/style.css— Muted button style, red variant forctx-highstatic/i18n.js—ctx_compress_hint/ctx_compress_actionin all 7 localesTest results
Closes #524