Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Nov 17, 2025

Stack

  1. 🤖 feat: add auto-compaction configuration UI #685
  2. 🤖 feat: add auto-compaction with progressive warnings #683
  3. 🤖 refactor: move compaction logic to backend #670
  4. 🤖 refactor: use message queue for compact continue messages #650 ⬅ This PR (base)

Problem

Compact continue messages were handled by a frontend hook that watched workspace states and manually sent continue messages after compaction. This was complex, had potential race conditions, and poor separation of concerns.

Relates to #651.

Solution

Use the existing message queue system:

  • Backend queues continue message when compaction starts
  • Queue auto-sends when stream ends (existing behavior)
  • Clear queue on error paths

Benefits: Simpler (-134 lines), more reliable, better UX (continue message visible in queue).

Generated with mux

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ethanndickson ethanndickson force-pushed the compact-messages-queue-system branch from 782c367 to 84036aa Compare November 18, 2025 02:58
Previously, compact continue messages were handled by a frontend hook
(useAutoCompactContinue) that watched for completed compactions and
then sent the continue message. This introduced complexity, race
conditions, and required tracking processed message IDs.

Now leverages the existing message queue system:
- Backend queues continue message when compaction starts
- Queue auto-sends when compaction stream ends (existing behavior)
- Continue message shown in queue UI during compaction
- Proper cleanup on all error paths
- Strip editMessageId to prevent truncation failures after compaction

Net reduction of 134 lines. Simpler, more reliable, better UX.
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.

2 participants