Repository navigation
Replies: 13 comments 1 reply
|
Following the closure of #15486 as a duplicate, sharing a working Android prototype here. Proposed scope:
The local Android prototype is working, with focused tests and scoped typechecks passing. It requires no server or wire-contract changes. iOS runtime verification remains outstanding. Android prototype: expanded composer Android prototype: collapsed composer Android prototype: context details Before submitting a PR, I’d like maintainer approval of the direction and scope, particularly the token-count label and whether manual compaction should be included. |
|
Adding my support for context usage visibility on native mobile. When switching between desktop and my phone, I miss being able to see how much context the thread is using before sending the next message. The token count and details sheet shown in the Android prototype would be useful. A manual I also noticed a related parity gap: desktop/web offers compact-before-send for eligible stale Claude threads, while native mobile does not. I have opened a separate Ideas discussion, #22238, for bringing that choice to mobile. The server-side idle compaction in #21682 helps before the cache expires, but it is opt-in and does not cover resuming an already-stale thread when proactive compaction did not happen. I support shipping context visibility on its own first. The separate discussion lets us track the compact-before-send request without expanding or delaying this proposal. |
|
+1 for this in the native iPhone app! I really like @Hazihell’s approach in the screenshots above: a compact token count beside the composer, with a tap to see the context details. That’s exactly what I was looking for. Is anyone actively working on bringing this to iOS? If not, I’d love to contribute, put my tokens toward it, and help get it shipped! |
|
+1 on this. I use the iOS app a lot when I'm away from my desk, and checking context usage is something I do constantly. Right now my only option on mobile is running /context, which comes back as a big stack of markdown tables that's hard to read on a phone. A ring on the send button like the one proposed here would let me tell at a glance whether I should compact or start a new thread before sending. Would love to see this land. |
|
+1. I use the mobile app when I am away from my PC. On desktop I can see context usage at a glance in the Thread details card, with the Context window row turned on. On mobile I have to send #33131 removed the composer meter on desktop because Thread details already shows context usage. Mobile could follow the same pattern and show the Context window value outside the composer, for example in a small sheet that opens from the thread header, like the one #35163 asks for. That would keep the mobile composer clean and match what desktop shows. |
|
I want the composer ring back for all platforms. The option to force enable it is gone 😢, and having it in the details is not enough imo, especially when i have the right sidebar open all the time and the details pane gets collapsed when it's open. |
|
I built a working version of this on mobile to try it out, using the text-chip alternative rather than the send-button ring. It's a gauge chip beside the model picker showing used % (emphasised at ≥80%). Tapping it opens a dialog with exact used/max tokens and the auto-compact threshold. It reuses the same derivation as web ( On a phone the chip read fine next to the model picker and didn't crowd the toolbar. Wrapping the send button keeps it smaller, though. Happy to share the diff if the team wants either shape. |
|
+1 for every platform, not just mobile. The thread-details Context row needs opening per thread, and it only covers the open thread. Claude Code's status line shows |
|
+1 for composer for all platforms. It’s more useful than I thought. Realized that only I lost it. As an option the ability to set a custom status bar. It will work even better, allowing users to draw whenever they want in there |
|
+1, needed badly for long running threads (on that note, maybe include a compaction counter?) |
|
+1 to the Thread details approach from @BrandonDry above. Since #8096 and #41572 were declined as composer chrome, a read-only Context window row in a mobile thread details sheet (as #34142 proposes) seems like the version that fits. It is the same |
|
+1 really need this |
|
+1. Basic context window visibility is still missing in the iOS app (v2.5.0). A small context usage indicator in the composer, showing used tokens, the context window limit, and usage percentage, would be very helpful, especially for long-running sessions when deciding whether to compact the context or start a new thread. |



Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/mobile
Problem or use case
On long agent sessions it is easy to run out of the model's context window mid-task, but the mobile client gives no indication of how much context a thread has used or has left. A prompt can be sent when the window is nearly full, so the model has to compact or silently drop context on the final message of a session. The web client already solves this with a compact context-window meter next to the composer; the mobile client has no equivalent.
Proposed solution
Show the thread's context-window usage as a thin coloured ring around the send button in the composer. The ring fills (or depletes) with the used percentage and shifts colour as usage climbs (e.g. neutral → amber → red near the limit), so it is obvious at a glance whether there is room left before hitting send. Tapping it could open a small sheet with details — tokens used/max, total processed, and whether the provider auto-compacts — mirroring the web meter's tooltip.
This is effectively a port of the existing web feature:
apps/web/src/components/chat/ContextWindowMeter.tsxrenders the SVG donut ring + tooltip.apps/web/src/lib/contextWindow.tsprovidesderiveLatestContextWindowSnapshot(activities)andformatContextWindowTokens, which derive the snapshot fromcontext-window.updatedthread activities and handle the "provider reports no max" case.The two send buttons to wrap in
apps/mobile/src/features/threads/ThreadComposer.tsx:ControlPillwithicon="arrow.up"/variant="primary"(~line 835)ComposerToolbarButtonwithicon="arrow.up"/variant="primary"(~line 895)The data is already present on mobile:
apps/mobile/src/lib/threadActivity.tscurrently discards the events (if (activity.kind === "context-window.updated") continue;~line 326), and the full thread detail with its activities is loaded inThreadRouteScreen.tsx. The snapshot can be derived the same way as the web app and passed intoThreadComposeras a new prop alongsideselectedThread.Why this matters
Mobile users are often away from the desk mid-task. A visible ring means they can see, before sending, whether a thread is near the limit — and either compact, start a fresh thread, or just know what to expect — instead of discovering after the fact that context was lost.
Smallest useful scope
A first pass only needs the collapsed composer's send-button ring, driven by the same
deriveLatestContextWindowSnapshotlogic as web, updating live ascontext-window.updatedevents arrive during a run. The tappable detail sheet and the expanded-composer variant can follow later.Alternatives considered
maxTokens - usedTokens); the ring can show either, but used % with red overload past ~90% keeps parity with the web client.Risks or tradeoffs
maxTokensnull) — in that case the ring should be hidden or degrade to a plain button, as the web meter already handles.Examples or references
Contribution
All reactions