Files
pipelines/app/notes/chat-send-usage-ring.md
T
alan 3951c65a7a Chat: a discreet usage ring around the composer's Send button
A thin ring around Send shows the harness account's 5-hour window used share
(the most used live window when there is no 5-hour one): barely visible
normally, tertiary from 80%, error from 95%. The button's tooltip (hover,
long-press on touch) adds every window with its reset time. No ring when the
quota is unknown or unsupported. Painted behind the unchanged button, so its
size, target, states and animations stay as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:55:42 +00:00

18 lines
1.0 KiB
Markdown

# Chat: usage ring around Send
A thin ring around the composer's send button shows the harness account's
5-hour window used share (fallback: the most used live window). Quiet
(onSurfaceVariant at 45%) below 80%, tertiary from 80%, error from 95%, on a
faint outlineVariant track. The button's tooltip (hover / long-press) becomes
"Send" plus every live window: "5-hour 42% · resets 17:20 · Weekly 61% ·
resets Thu 09:00". No ring for unknown or unsupported quota, or once every
window's reset has passed. The ring is a background CustomPaint around the
unchanged IconButton.filled, so size, hit target and states are unchanged.
Code: `lib/features/chat/domain/chat_usage_ring.dart`,
`lib/features/chat/conversation/chat_send_usage_ring.dart`.
Tests: `test/features/chat/domain/chat_usage_ring_test.dart`,
`test/features/chat/conversation/chat_send_usage_ring_test.dart`.
Captures: probe fixture `?chats=1&quota=claude|warn80|warn95`, `/chat/perf-chat-0`
at 1280x900 and 412x900 (Android UA), light and dark, plus a desktop hover.