Repository navigation
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]>
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
1 task done
Contributor
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
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.
DRAFT: opening as DRAFT pending design approval for the linked feature request. Fixes #32926
Maintainer disclosure: I maintain oh-my-openagent, a community OpenCode plugin. This is a community contribution, not an OpenCode team change.
What and why
Compaction can make the TUI look frozen today, especially during
/compactor auto-compaction. This PR adds two honest indicators: an always-on context countdown from existing token and model-window data, and a compaction operation indicator while compaction is running. When the threshold is computable, the countdown rendersContext NN% · auto-compact ~MM%, mirroringoverflow.tsusable()with the default reserved buffer. The operation indicator is gated behindexperimentalEventSystem, so default UX is unchanged when the flag is off. It shows elapsed time and an indeterminate bar, not a fake operation percent or ETA.What's in this PR
feat(core): add compacting session status variantcompactingstatus variant instatus.ts.feat(opencode): emit compacting status across compaction lifecycleEffect.ensuring.experimentalEventSystem.feat(tui): add compaction progress and context countdown indicatorsContext NN% · auto-compact ~MM%when the threshold can be computed.test(opencode): cover compaction status lifecycle and TUI indicatorsHow I verified it
cd packages/opencode && bun typecheckcd packages/tui && bun typecheckcd packages/opencode && bun test test/session/compaction.test.tscd packages/opencode && bun test test/session/cd packages/tui && bun test test/component/compaction-indicators.test.tsxContext 80%, the markerContext 90% · auto-compact ~90%, clamp toContext 100%, and hidden output when the model window is unknown.cd packages/opencode && bun test5d0f866and sits outside this change.cd packages/tui && bun test5d0f866; for example,sync.test.tsxreports 0 pass and 2 fail on base from unrelated SolidJS context-provider issues. This branch never touched those files, so it introduces zero new failures.OPENCODE_EXPERIMENTAL_EVENT_SYSTEM=1 bun devsay hi, saw the model reply, token usage, spend, and theContext 5% · auto-compact ~97%countdown./compactand captured both indicators in the same real TUI frame: the operation indicator countingCompacting conversation... 3sthen4swith the indeterminate bar, alongside the countdown.Compaction, Claude Opus 4.8 (1M Max), 6.4sline appeared. The full sequence is in the recording under UI evidence.Note: the live run and recording used
bun dev, which CONTRIBUTING documents as the development equivalent of the CLI.UI evidence
Live screen recording of the real TUI during
/compact, captured with asciinema and agg from anOPENCODE_EXPERIMENTAL_EVENT_SYSTEM=1 bun devsession:The recording shows the operation indicator ticking
Compacting conversation... 3sthen4swith the indeterminate bar, the completedCompaction, Claude Opus 4.8 (1M Max), 6.4sline, and the always-onContext 5% · auto-compact ~97%countdown throughout.Branch and commit recap
compaction-progress, based ondev.dev.dev, notmaster.