Skip to content

hoff-2010 fixing session-timeout#600

Open
PaolaDMadd-Pro wants to merge 1 commit intomasterfrom
hoff-2010
Open

hoff-2010 fixing session-timeout#600
PaolaDMadd-Pro wants to merge 1 commit intomasterfrom
hoff-2010

Conversation

@PaolaDMadd-Pro
Copy link
Copy Markdown
Contributor

@PaolaDMadd-Pro PaolaDMadd-Pro commented Mar 20, 2026

What?

Session not extending when “Stay on this page” clicked (regression in v22.10.1 – GA_TAG dependency)

Why?

as per jira ticket HOFF-2010

How?

  • update session-timeout-dialog.js : reinforced code of refreshing session, more robust on failure.
  • update index.js to make connectSrc default to same-origin, then append GA endpoints only when GA is enabled.

Testing?

tested on sandbox and Lamp (locally)

Here’s a short PR-ready summary you can paste:

Added tests:

Added frontend Jest coverage for refreshSession in sessionDialog.test.js
New success-path test verifies $.get('') success updates timeSessionRefreshed and calls controller()
New failure-path test verifies $.get('') failure logs console.error
Added/updated CSP integration coverage in server.spec.js to confirm behaviour when gaTagId is unset:
connect-src includes 'self'.
Google analytics domains are not added to img-src/script-src (and can also be asserted absent from connect-src).
Kept existing positive CSP test for gaTagId set to assert Google directives are included.

Screenshots (optional)

Anything Else? (optional)

Check list

  • I have reviewed my own pull request for linting issues (e.g. adding new lines)
  • I have written tests (if relevant)
  • I have created a JIRA number for my branch
  • I have created a JIRA number for my commit
  • I have followed the chris beams method for my commit https://cbea.ms/git-commit/
    here is an example commit
  • Ensure workflow jobs are passing especially tests
  • I will squash the commits before merging

Copy link
Copy Markdown
Contributor

@Rhodine-orleans-lindsay Rhodine-orleans-lindsay left a comment

Choose a reason for hiding this comment

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

@PaolaDMadd-Pro I've left some comments and there all also seems to be some failing tests due to syntax issues.

@PaolaDMadd-Pro PaolaDMadd-Pro force-pushed the hoff-2010 branch 2 times, most recently from d48e075 to ec31040 Compare March 24, 2026 16:40
Copy link
Copy Markdown
Contributor

@Rhodine-orleans-lindsay Rhodine-orleans-lindsay left a comment

Choose a reason for hiding this comment

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

just a few minor changes suggested

Copy link
Copy Markdown
Contributor

@Rhodine-orleans-lindsay Rhodine-orleans-lindsay left a comment

Choose a reason for hiding this comment

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

good work @PaolaDMadd-Pro - fyi, there is a small typo in the changelog, that I have highlighted in a comment.

- update session-timeout-dialog.js : reinforced code of refreshing session, more robust on failure.
- update index.js to make connectSrc default to same-origin, then append GA endpoints only when GA is enabled.
- update sessionDialog.test.js and server.spec.js to cover new changes
- update changelog and readme
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