Skip to content

fix(tasks): keep conversation modal closable#2693

Open
janburzinski wants to merge 3 commits into
mainfrom
jan/eng-1668-create-conversation-modal-can-become-impossible-to-exit
Open

fix(tasks): keep conversation modal closable#2693
janburzinski wants to merge 3 commits into
mainfrom
jan/eng-1668-create-conversation-modal-can-become-impossible-to-exit

Conversation

@janburzinski

Copy link
Copy Markdown
Collaborator

Description

  • fixes modal getting stuck during "creating...", where you couldnt close it anymore after it got stuck

Screenshot/Recording (if applicable)

https://streamable.com/cvct8r (i removed that cancel button from the video lol)

Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I updated docs when behavior or setup changed
  • I added or updated tests when behavior changed, or explained why not
  • I only added comments where the logic is not obvious
  • I used Conventional Commits for commit
    messages and, when possible, the PR title

@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the create conversation modal so it can be closed while creation is pending.

  • Removes the modal close guard during submission.
  • Skips stale success and error updates when the active modal has changed.
  • Marks the create button as a plain button.

Confidence Score: 4/5

This is close, but the pending create flow should be fixed before merging.

  • Closing the modal now skips stale UI callbacks.
  • The create request can still finish and persist a conversation after the modal was dismissed.
  • The remaining issue is limited to the create conversation modal flow.

apps/emdash-desktop/src/renderer/features/tasks/conversations/create-conversation-modal.tsx

Important Files Changed

Filename Overview
apps/emdash-desktop/src/renderer/features/tasks/conversations/create-conversation-modal.tsx Updates modal close behavior and stale callback handling, but the create request can still complete after dismissal.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/emdash-desktop/src/renderer/features/tasks/conversations/create-conversation-modal.tsx:85
**Create still completes** This guard only runs after `createConversation` has already returned a new conversation id. When the user closes the modal while the request is still pending, the stale `onSuccess` call is skipped, but the RPC has already created the conversation before this line runs. That means a dismissed create flow can still leave a new conversation in stored data or later refreshed lists. The close path needs either cancellation or a cleanup/ignore mechanism at the create result boundary, not only a skipped success callback.

Reviews (2): Last reviewed commit: "fix(tasks): ignore dismissed conversatio..." | Re-trigger Greptile

@janburzinski

Copy link
Copy Markdown
Collaborator Author

@greptileai

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.

1 participant