Repository navigation
fix(chatgpt): clear restored sent prompt draft after page reload - #117
Merged
Merged
Conversation
…isting stop button on send capture
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.
Summary
Cmd+R/ Refresh button, without clicking Panelize's New Chat button) after sending a prompt to ChatGPT causes ChatGPT to reload/and restore the already-sent prompt into its composer.content-scripts/text-injection-all-providers.js) from both Multi-Panel sends (clickSendButton) and in-panel manual sends (enabled send button click, form submit, or Enter), only after confirming the send (composer cleared, new streaming stop button appeared, or navigation into a conversation route) while ignoring pre-existing streaming stop buttons.matchSentOnly: true, focus: false) on/reload, panel refresh, Multi-Panel reopen, and SPA return to/so restored sent drafts are cleared automatically without erasing unsent drafts, stealing focus from#unified-input, or overriding unconditionalNEW_CHATdraft clearing.?temporary-chat=truedraft tracking tosessionStorageinstead oflocalStorage.tests/chatgpt-content-script.test.js) and a Playwright E2E regression test (tests/e2e/chatgpt-send-all.e2e.test.js).Verification
node --check content-scripts/text-injection-all-providers.js && git diff --checknpx vitest run --maxWorkers=2: 93/93 test files, 1291/1291 tests passednpx playwright test tests/e2e/chatgpt-send-all.e2e.test.js --workers=1: 2/2 passednpm run lint(web-ext lintfails on existing MV3 layout)