Adapt OAuth2 implementation to Matrix Spec v1.18 - #34026
Merged
Merged
Conversation
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…o t3chguy/oauth # Conflicts: # apps/web/src/contexts/SDKContext.ts # apps/web/test/unit-tests/components/structures/MatrixChat-test.tsx # apps/web/test/unit-tests/components/views/settings/tabs/user/SessionManagerTab-test.tsx # apps/web/test/unit-tests/contexts/SdkContext-test.ts
florianduros
approved these changes
Jul 3, 2026
|
|
||
| const cli = useMatrixClientContext(); | ||
| const sdkContext = useContext(SDKContext); | ||
| const cli = sdkContext.client!; |
Member
There was a problem hiding this comment.
A reason to not use anymore the matrix client hook? To avoid circular import?
Member
Author
There was a problem hiding this comment.
Just no point using two contexts when one provides both values, MatrixClientContext is such that it claims you always have a client but it can actually return null so this is no less safe.
…o t3chguy/oauth # Conflicts: # apps/web/src/Lifecycle.ts # apps/web/src/MatrixClientPeg.ts # apps/web/test/unit-tests/Lifecycle-test.ts # apps/web/test/unit-tests/MatrixClientPeg-test.ts # apps/web/test/unit-tests/components/structures/MatrixChat-test.tsx
…o t3chguy/oauth # Conflicts: # apps/web/src/IConfigOptions.ts # apps/web/src/Lifecycle.test.ts # apps/web/src/Lifecycle.ts # apps/web/src/components/views/spaces/SpacePanel.tsx # apps/web/src/contexts/SDKContextClass.ts # apps/web/src/vector/app.test.ts # apps/web/src/viewmodels/menus/UserMenuViewModel.ts # apps/web/test/unit-tests/components/structures/MatrixChat-test.tsx # apps/web/test/unit-tests/components/views/settings/tabs/user/AccountUserSettingsTab-test.tsx # apps/web/test/unit-tests/components/views/settings/tabs/user/SessionManagerTab-test.tsx # apps/web/test/viewmodels/menus/UserMenuViewModel-test.ts
hayaksi1
added a commit
to hayaksi1/element-web
that referenced
this pull request
Jul 14, 2026
Brings the fork up to date with element-hq/element-web develop (e74b9f5, 174 commits). 26 conflicted paths resolved; all 42 memorybank-documented fork features preserved and verified present in the production bundle. Dependencies: - matrix-js-sdk: drop the 41.8.0 pin for upstream's github:#develop float. The pin can no longer hold: upstream 2bc9656 (element-hq#34026) rewrote utils/oidc/ -> utils/oauth/ and imports OAuth2/OAuth2Error/ValidatedAuthMetadata from the SDK; neither 41.8.0 nor 41.9.0 ships src/oauth/. Note the merge does NOT do this by itself: base and upstream both carry the float and only the fork ever changed the line, so it auto-merges to the fork's pin with no conflict marker. - apps/desktop: drop @stylistic/eslint-plugin (upstream removed eslint in the oxlint switch) and @types/auto-launch (fork uses native setLoginItemSettings). - pnpm-lock.yaml regenerated from upstream's; pins js-sdk 4ee7a80a86. Desktop: - config.ts: keep upstream's skeleton/type consolidation, re-implant the fork's machine-wide config + deep-merge (MDM) helpers retyped onto JsonDocument. JsonObject now comes from shared-types, not ./utils.js. - electron-main.ts: keep the fork's media-permissions/background-colour/ window-close wiring and darwin second-instance app.show(), plus upstream's renderer-recovery wiring. - ipc.ts / webcontents-handler.ts: keep the fork's consume-once displayMediaCallback and resolveUserDownloadAction at the conflicting hunks, while retaining upstream's out-of-hunk changes. - Take upstream's now-merged renderer-recovery and save-image (element-hq#33988, element-hq#33997). Web: - SDKContext split (element-hq#34053): SdkContextClass -> SDKContextClass moved to contexts/SDKContextClass.ts. Repathed jumpToDate and thread roomViewStore into DateSeparatorViewModel per upstream's MessagePanel pattern. Silent break: only tsc catches it, jest mocks the module and passes regardless. - Settings.tsx: keep tokenizerMode, drop showCallButtonsInComposer (upstream's new lint:unused-settings job rejects it). - _components.pcss: import only the two live stylesheets; dropped entries whose files no longer exist would fail the build without lint:style noticing. - RoomSublist.tsx: accept upstream's deletion; getScrollBehavior's last live call site is SessionManagerTab. - Rescue tests relocated by the vitest migration: Searching.test.ts and SeshatIndexManager.test.ts (the latter was at a path no runner collected). - RoomSearchHeader.tsx: merge the duplicate shared-components import the auto-merge produced (oxlint no-duplicates). - RoomSummaryCardView.tsx: hoist the searchSenders default to a stable reference for upstream's new oxlint rule. - LoggedInView/RoomSearchHeader tests: dispatch the nudge keydown on document.body, and provide SDKContext where the header mounts jump-to-date. Verified: apps/web tsc clean of source errors (3 pre-existing vendored js-sdk errors remain, re-baselined from 4); all 5 desktop tsconfigs; oxfmt, oxlint, stylelint, workflows, knip, unused-settings (174/174); jest 573 suites / 5644 tests; vitest rescued files collected; production webpack build.
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.
Requires matrix-org/matrix-js-sdk#5390
Fixes Fixes #32617