Repository navigation
🐞 Restore web and local PDF tabs after extension reloads - #202
Merged
Merged
Conversation
Preserve the original web or local PDF URL, page position, and tab placement across unpacked extension reloads. Reopen missing viewer tabs, refresh surviving tabs, respect local file access permissions, and cover recovery with regression tests. Co-authored-by: Codex Web <noreply@openai.com>
Expose completion of the extension-update recovery passes to regression tests and await that completion instead of relying on a 35 ms scheduling delay. Keep the real Chrome listener behavior unchanged. Co-authored-by: ChatGPT 6 <noreply@openai.com>
Compare the full extension scheme and host instead of relying on URL.origin, which is opaque for chrome-extension URLs in the Node test environment. Include saved registry diagnostics on recovery test failures. Co-authored-by: ChatGPT 6 <noreply@openai.com>
Main replaced the old hardcoded npm test list with a feature-owned test runner, while this PR added recovery tests to that obsolete command. Preserve main's full test, suite, and syntax commands; add a standalone test:recovery command for the six new regression tests. The new test must also be registered in scripts/test-suites.mjs under an appropriate suite for the full CI ownership check. That runner path is outside the selected PR's permitted resolution-file scope, so do not weaken or bypass the inventory check.
…tabs Main added text-fragment page-number precedence while the PR added the PDF-open background registration message at the same location. Retain text-fragment precedence for requestedPage and send that effective physical page and original PDF source to the recovery worker. The PR's separate page-change message remains integrated, preserving session-page resume and all newer viewer navigation controls.
main added the paragraph-double-click test shortcut after this PR branched; the PR separately adds test:recovery in the same scripts object. Retain both shortcuts and the feature-owned test runner. Register the newly added recovery test under navigation in scripts/test-suites.mjs so the existing CI suite inventory no longer rejects it. No behavior or other test ownership is removed.
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
Preserve open PDF tabs across unpacked-extension reloads, including local
file://PDFs and web PDFs.Verification
main.tests/pdf-tab-recovery.test.mjstonpm test. Automated Node tests have not been executed in this environment.Limitations