Conversation
…out endpoints 1. derive header auth state from auth session checks/events 2. call end_session and NSS well-known logout on logout 3. add/update header tests for session-driven state transitions
…s test authSession.info is now a derived getter (from webId/isActive), so it can no longer be assigned. The test's outcome is driven by mocking currentUser to return null, so the info assignment was dead setup and is removed.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates authentication/session handling across the UI components and logout flow, and adjusts related unit tests, alongside significant dependency/lockfile changes.
Changes:
- Header v2: derive auth UI state from
solid-logicsession (authn.checkUser/currentUser), react to session events, and perform a more thorough logout (clear persisted state + optional server-side logout). - Login: on logout, attempt an additional NSS-compatible
/.well-known/solid/logoutrequest (best-effort). - Tests: update/extend header and login unit tests to reflect the new auth/session model and event-driven updates.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/login/login.test.ts | Updates test setup to avoid assigning to a derived read-only auth session property. |
| src/v2/components/layout/header/Header.ts | Adds session-derived auth resolution, session event listeners, and enhanced logout cleanup/redirect behavior. |
| src/v2/components/layout/header/header.test.ts | Adds mocks and new tests to validate session-derived auth state and event-driven refresh. |
| src/v2/components/layout/footer/Footer.ts | Adjusts session listener teardown logic in disconnectedCallback(). |
| src/login/login.ts | Extends logout handler to call an additional well-known logout endpoint (best-effort). |
| package.json | Alters dependency specs (adds i/npm, switches some deps to file:../...). |
| package-lock.json | Reflects the new dependency specs, including file:../... links and large npm subtree. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+158
to
+166
| @@ -159,15 +159,17 @@ | |||
| "@noble/curves": "^2.2.0", | |||
| "@noble/hashes": "^2.2.0", | |||
| "escape-html": "^1.0.3", | |||
| "i": "^0.3.7", | |||
| "lit": "^3.3.3", | |||
| "mime-types": "^3.0.2", | |||
| "pane-registry": "^3.1.1", | |||
| "npm": "^11.19.0", | |||
| "pane-registry": "file:../pane-registry", | |||
Comment on lines
+165
to
173
| "npm": "^11.19.0", | ||
| "pane-registry": "file:../pane-registry", | ||
| "solid-namespace": "^0.5.4", | ||
| "uuid": "^14.0.0" | ||
| }, | ||
| "peerDependencies": { | ||
| "rdflib": "^2.3.8", | ||
| "solid-logic": "^4.0.7" | ||
| "rdflib": "^2.4.0", | ||
| "solid-logic": "file:../solid-logic" | ||
| }, |
Comment on lines
106
to
111
| disconnectedCallback () { | ||
| if (typeof authSession.events.off === 'function') { | ||
| authSession.events.off('login', this._updateFooter) | ||
| authSession.events.off('logout', this._updateFooter) | ||
| } else if (typeof authSession.events.removeListener === 'function') { | ||
| authSession.events.removeListener('login', this._updateFooter) | ||
| authSession.events.removeListener('logout', this._updateFooter) | ||
| } | ||
| super.disconnectedCallback() |
Replace local file: workspace links with registry versions now that solid-logic 5.x is published.
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.
No description provided.