Skip to content

fix(composer): clear the compact command as it starts - #2667

Merged
vastsa merged 2 commits into
vastsa:mainfrom
Linuxdazhao:codex/fix-compact-composer
Dec 1, 2026
Merged

vastsa merged 2 commits into
vastsa:mainfrom
Linuxdazhao:codex/fix-compact-composer

Conversation

@Linuxdazhao

Copy link
Copy Markdown
Contributor

Summary

  • Clear the submitted /compact draft when dispatching manual compaction in the idle session that submitted it. The compaction RPC settles after the checkpoint finishes.
  • Recheck the active, idle session after command lookup. Keep later draft edits available while the RPC runs and when it settles.
  • Document the composer behavior and delayed-compaction scenario.

Closes #2666.

Before and after

During a pending compaction RPC Composer
Base The previous /compact text remains visible.
Candidate The command text is cleared. A next prompt typed while waiting survives completion.

Validation

  • Base 62532ce130a3 and candidate 85087104cf57. The new renderer integration test fails on the base and passes on the candidate. It exercises the real command resolver and store with a synthetic deferred IPC response.
  • 20 targeted tests passed across slash dispatch, draft restoration, compaction admission, and remote chat. Desktop TypeScript, scoped renderer lint, docs checks, and the PR base check passed.
  • Native Electron E2E and screenshots were not run or captured. The controlled IPC reproduction covers the renderer ordering change. Installed-app behavior remains unverified.

Linuxdazhao and others added 2 commits November 30, 2026 16:57
The compaction RPC resolves at completion. Consume the submitted draft when dispatching the command so the input is available during the checkpoint.
@vastsa
vastsa merged commit 8b89524 into vastsa:main Dec 1, 2026
6 checks passed
@vastsa

vastsa commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Merged as 8b895240a0 after all six GitHub checks and 22 focused tests on the current candidate passed. Confirmed the pending command clears immediately and a new draft survives completion. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] /compact stays in the composer while compaction runs

2 participants