Fix: Token count UI doesn't re-render if it's open.#4822
Merged
Conversation
zanesq
approved these changes
Sep 25, 2025
DOsinga
approved these changes
Sep 25, 2025
| }, | ||
| compactIcon: <ScrollText size={12} />, | ||
| autoCompactThreshold: autoCompactThreshold, | ||
| key: `context-${numTokens}-${tokenLimit}`, // Force re-render on token count change |
Collaborator
There was a problem hiding this comment.
this doesn't strike me as the correct solution, at most a work around? why are we not rerendering this when the numTokens changes? it is in the alert properties. do we do a shallow compare somewhere?
| !prevAlert || | ||
| prevAlert.type !== alert.type || | ||
| prevAlert.message !== alert.message || | ||
| prevAlert.key !== alert.key |
Collaborator
There was a problem hiding this comment.
ah, I see, the problem is that we don't detect changes in the right way. this should just do a deep compare I think
* 'main' of github.com:block/goose: Docs: Add link to Plug & Play video for Reddit MCP (#4852) remove only-pr-labels (#4842) Update video link in README.md to lowercase goose (#4846) chore: fix all warnings in test compilation (#4827) fix: linux builds: use gcc 10 in Linux builds (#4841) fix: keep one goosed client per BrowswerWindow (#4805) add automation for marking and closing stale PRs (#4826) chore: turn clippy on for test code (#4817) fix: pricing integration test (#4837) blog post on subagents vs subrecipes (#4829) fix chat button alignment and spacing for attachments (#4794) fix: remove nested double quotes in windows automation_script tool description (#4824) fix: a few things with the mcp snapshot test (#4818) Revert "fix(compaction): try to catch more context limit exceeded erors and compact" (#4820)
katzdave
added a commit
that referenced
this pull request
Sep 29, 2025
Closed
HikaruEgashira
pushed a commit
to HikaruEgashira/goose
that referenced
this pull request
Oct 3, 2025
Signed-off-by: HikaruEgashira <[email protected]>
This was referenced Oct 8, 2025
Closed
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.
Tracking the key forces re-renders every time the key changes (based on numTokens/limit).
This now works even if you constantly mouse over the UI.