Skip to content

Conversation

kaylendog
Copy link
Contributor

@kaylendog kaylendog commented Aug 28, 2025

Bypasses checkSessionLockFree and getSessionLock if we detect we are running in element-desktop (i.e. window.electron is defined).

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

@kaylendog kaylendog self-assigned this Aug 28, 2025
@CLAassistant
Copy link

CLAassistant commented Aug 28, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Looks sane, but it'd be cleaner if this was done via the Platform abstractions, i.e by only calling the lock check/get code from WebPlatform, then ElectronPlatform would not even be calling it

@kaylendog kaylendog requested a review from t3chguy August 29, 2025 10:30
@t3chguy
Copy link
Member

t3chguy commented Aug 29, 2025

Could you resolve your conflicts so CI can run

@kaylendog kaylendog marked this pull request as ready for review August 29, 2025 11:46
@kaylendog kaylendog requested a review from a team as a code owner August 29, 2025 11:46
@kaylendog kaylendog requested review from dbkr and florianduros August 29, 2025 11:46
@kaylendog
Copy link
Contributor Author

Seems to have broken a bunch of tests - will have to prod after im back from hols.

@kaylendog
Copy link
Contributor Author

@t3chguy wondering if you could help shed some light on the test failures? I'm trying to debug locally, but there's so much noise from other random failures, I'm finding it really difficult to actually work out what's going wrong.

@t3chguy
Copy link
Member

t3chguy commented Sep 23, 2025

You'd probably want to debug the jest tests locally, my guess is something is getting stubbed/mocked out and thus the lockout isn't working as expected

@kaylendog
Copy link
Contributor Author

Ah, I think it's because a PlatformPeg instance doesn't exist in the test environment. I'll write some workarounds.

@kaylendog kaylendog requested a review from a team as a code owner September 23, 2025 11:47
@kaylendog kaylendog force-pushed the kaylendog/session-lock branch from b2973b6 to b328ad0 Compare September 23, 2025 11:51
@kaylendog kaylendog force-pushed the kaylendog/session-lock branch from b328ad0 to 5e5a250 Compare September 23, 2025 11:51
@kaylendog
Copy link
Contributor Author

kaylendog commented Sep 23, 2025

Slightly broke the branch by merging in my encrypted state stuff, should be fixed now.

@t3chguy
Copy link
Member

t3chguy commented Sep 23, 2025

@kaylendog still looks like a couple of tests are unhappy

@kaylendog
Copy link
Contributor Author

@kaylendog still looks like a couple of tests are unhappy

Yep, working on locally..

@kaylendog
Copy link
Contributor Author

Should be good to go!

Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@t3chguy t3chguy added this pull request to the merge queue Sep 23, 2025
Merged via the queue into element-hq:develop with commit c8d9376 Sep 23, 2025
31 checks passed
@kaylendog kaylendog deleted the kaylendog/session-lock branch September 23, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants