Skip to content

Enable Sign out during initial FullPage capture#667

Merged
wikirby merged 1 commit into
masterfrom
user/wikirby/signout-enable-during-capture
Jul 6, 2026
Merged

Enable Sign out during initial FullPage capture#667
wikirby merged 1 commit into
masterfrom
user/wikirby/signout-enable-during-capture

Conversation

@wikirby

@wikirby wikirby commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

On opening the clipper, Sign out was disabled while the initial full-page capture ran, and only re-enabled once that capture completed. Since mode buttons stay interactive during capture (added in "Allow mode switching during initial FullPage capture"), a user could switch to Article/Selection/Bookmark/Region before the capture finished — and in those modes Sign out was never re-enabled, leaving it stuck disabled.

Root cause

disableSignout() fired on dialog open and in switchToFullPage(). Sign out was only re-enabled by capture completion (finalize), PDF mode, or the no-capture invoke path — none of which run when the user pivots to another mode mid-capture.

Fix

  • Remove the capture-time disableSignout() calls. Sign out now locks only during the save round-trip, via lockSidebar() / unlockSidebar().
  • Remove the now-redundant standalone enableSignout() calls (PDF mode, no-capture ready state, finalize, sign-out reset), so Sign out state is driven entirely by lock/unlock.
  • Abort any in-flight capture when the user signs out, so the worker's capture loop doesn't outlive the session.

Net invariant: Sign out state == save-lock state, always.

Testing

  • npm run build clean (compile + lint)
  • Open clipper, switch modes mid-capture -> Sign out stays available
  • Save round-trip -> Sign out disabled during save, re-enabled after
  • Sign out mid-capture -> capture aborts cleanly, returns to sign-in panel

Sign out was disabled on dialog open and only re-enabled when the full-page capture finished, so switching to another mode mid-capture left it stuck disabled. Lock Sign out only during the save round-trip (via lock/unlockSidebar) instead, and abort any in-flight capture when the user signs out.
@aanchalbhansali aanchalbhansali self-requested a review July 6, 2026 17:57

@aanchalbhansali aanchalbhansali left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved

@wikirby wikirby merged commit 9f2597a into master Jul 6, 2026
3 checks passed
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