Skip to content

[codex] Stabilize local workspace comments#344

Open
mussonking wants to merge 1 commit into
OpenCoworkAI:mainfrom
mussonking:codex/comment-mode-local-workspace-test
Open

[codex] Stabilize local workspace comments#344
mussonking wants to merge 1 commit into
OpenCoworkAI:mainfrom
mussonking:codex/comment-mode-local-workspace-test

Conversation

@mussonking
Copy link
Copy Markdown
Contributor

Summary

This PR stabilizes comment mode for local workspace previews and fixes a few related local-workspace edge cases found during manual testing.

What changed

  • Saves comments independently from sending them to the agent.
  • Adds an explicit “send to chat” queue so saved-only comments stay in the Comments panel until the user sends them.
  • Reuses the existing pending comment for the same selection instead of creating duplicates.
  • Reopens saved comments with their text prefilled from both the main preview and Files / App.jsx preview.
  • Re-pins/highlights the target element when a saved comment is opened from the Comments panel.
  • Closes stale comment bubbles when the underlying comment is deleted or when leaving the workspace view.
  • Keeps stop/cancel from being undone by late generation stream events.
  • Treats missing/renamed workspace watcher paths as recoverable so they do not surface as renderer errors.

Why

Local workspace comment mode had a few state mismatches between the preview iframe, saved comment rows, and the renderer store. These could leave the UI in stale states: saved comments not appearing in the bubble, duplicated comments on the same selection, deleted comments leaving an orphaned bubble, and saved comments opening without the target element highlighted.

Validation

  • Full pre-push checks passed: workspace typecheck, lint, and full test suite.
  • Targeted desktop tests passed around comments, preview panes, file previews, store behavior, cancellation, and file watcher recovery.
  • Runtime overlay tests cover the saved-comment highlight path, including body-relative XPath selectors.
  • Manual testing covered save, reopen, delete, add-to-chat, apply, stop, and leaving the workspace.

@github-actions github-actions Bot added the area:desktop apps/desktop (Electron shell, renderer) label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:desktop apps/desktop (Electron shell, renderer)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant