Repository navigation
Conversation
viktorce
force-pushed
the
fix/compact-chip-after-clear
branch
5 times, most recently
from
November 19, 2026 00:08
42b8ce8 to
c9d7e0a
Compare
On a Claude thread left idle past its prompt cache, the composer shows a Compact chip and gives Send the accessible name "Compact and send". After /clear, the next message starts a fresh session, which never compacts, yet the chip and that name stayed. Mobile already hides its chip in this state, and web now does too. The offer hides until the next message is sent, and comes back if the user keeps the current session. At phone width, the collapsed composer's button now sends in this state instead of opening the composer to offer a compaction. The web fake environment advertises freshContext, as the real server does, so browser tests can use /clear.
viktorce
force-pushed
the
fix/compact-chip-after-clear
branch
from
November 19, 2026 13:44
c9d7e0a to
481c4b3
Compare
2 tasks done
Owner
Author
|
Opened upstream as pingdotgg#39133, from this same branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a Claude thread with at least 200k tokens of context, left idle past its prompt cache, the composer offers to compact before sending. It shows a Compact chip, and Send's tooltip offers to summarize the history first. After
/clear, the offer stays, though the next message starts a fresh session that never compacts.Steps: on a cold Claude thread that shows the chip, type
/clearand press Enter. The chip stays.Change
ChatView.tsxdropsresumeCompactionTokenswhile/clearis armed, as it already does while a handoff is pending. The chip and Send's compaction label and tooltip go away, and dismissing the notice brings them back. Mobile already hides its chip in this state.The fake test environment now advertises
freshContext, as the real server does, so browser tests can arm/clear.At phone width. Below 640px, an unfocused composer collapses to one row, and its round button expands the composer first when the next send would compact. That button reads
resumeCompactionTokenstoo, so with/cleararmed and a message typed, one tap now sends instead of offering a compaction that would never run. Its icon stays the same, and its accessible name changes from "Open composer to compact and send" to "Send message".The captures are browser-test renders of the app in dark mode on a fake 250k-token thread, made on
8cf97b5f0. The compaction offer and collapsed-button code they show is unchanged on475ae52ac. The clips are recordings at 390x844, cropped to the composer, with a marker where the tap lands.Scope
The chip half of pingdotgg/t3code#31092. pingdotgg/t3code#30325 fixed its compaction half. This covers the armed state, on web and desktop. The armed state lasts while the next message is written, which is when the chip misleads. A typed
/clearthat hasn't been sent still shows the chip on web and mobile until Enter. Enter there compacts nothing. Hiding it would mean reading the draft text in both composers.Verification
ChatView.handoffCompaction.browser.test.tsxgets a test that arms/clearon a cold Claude thread. It checks that the chip and Send's "Compact and send" name go away, that Send is "Submit message", and that dismissing the notice brings both back. WithChatView.tsxfrom475ae52ac, it fails at line 160, with the chip still in the document.ChatView.browsershortcut test that also fails on untouched475ae52acwhen the whole file runs on this Mac, and passes alone and in upstream CI on475ae52ac.vp run check:changedfails only on that test./clearwas armed and got it back once the notice was dismissed.Built with Claude Opus 5.5 in Claude Code, running inside T3 Code. Reviewed by Claude Opus 5.5 and GPT-6.1 Sol.