Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
a4e1cc0
Removing csp console error (#2963)
alexjanousekGSA Oct 1, 2025
6ae67ae
Bump isort from 6.0.1 to 6.1.0 (#2965)
dependabot[bot] Oct 2, 2025
a366a10
Bump cryptography from 46.0.1 to 46.0.2 (#2964)
dependabot[bot] Oct 2, 2025
6f5750f
Removed all govuk css (#2814)
alexjanousekGSA Oct 6, 2025
6dd2b94
Bump rollup from 4.52.3 to 4.52.4 (#2973)
dependabot[bot] Oct 6, 2025
a35f5b6
Bump newrelic from 11.0.0 to 11.0.1
dependabot[bot] Oct 6, 2025
dcc8860
Merge pull request #2977 from GSA/dependabot/pip/newrelic-11.0.1
ccostino Oct 7, 2025
06746fa
Bump certifi from 2025.8.3 to 2025.10.5
dependabot[bot] Oct 7, 2025
3dcb820
Merge pull request #2976 from GSA/dependabot/pip/certifi-2025.10.5
ccostino Oct 7, 2025
5e246eb
Bump hypothesis from 6.140.2 to 6.140.3 (#2982)
dependabot[bot] Oct 7, 2025
24e21f8
Bump moto from 5.1.13 to 5.1.14 (#2981)
dependabot[bot] Oct 7, 2025
149b6d8
Bump playwright from 1.55.1 to 1.56.0 (#2979)
dependabot[bot] Oct 7, 2025
28b0b76
Bump python-json-logger from 3.3.0 to 4.0.0 (#2980)
dependabot[bot] Oct 7, 2025
b0527c1
Bump @rollup/plugin-node-resolve from 16.0.1 to 16.0.2 (#2978)
dependabot[bot] Oct 7, 2025
f647b09
Updates for govuk pr followup
alexjanousekGSA Oct 7, 2025
9e3829d
Merge pull request #2983 from GSA/2974-follow-up-to-govuk-pr
ccostino Oct 7, 2025
705952c
Remove Socket.IO dependencies and Socket infrastructure
heyitsmebev Oct 7, 2025
fe5428e
Merge pull request #2984 from GSA/remove-socketio
ccostino Oct 7, 2025
fa0a82a
Remove secure Redis protocol workaround
ccostino Oct 7, 2025
c24e057
Fix test fixture
ccostino Oct 7, 2025
46b16d6
Merge pull request #2985 from GSA/remove-cf-redis-workaround
heyitsmebev Oct 7, 2025
b83416d
Fix "Data available for X days" text disappearing on job details page
heyitsmebev Oct 7, 2025
577a678
pytest fix
heyitsmebev Oct 7, 2025
6d84b38
css fix
heyitsmebev Oct 7, 2025
ebf1f96
Merge pull request #2987 from GSA/fix-retention-days-display
ccostino Oct 8, 2025
809c5b5
fix timeout-popup
heyitsmebev Oct 8, 2025
2dd73d1
reverse template usage
Oct 8, 2025
78878da
Merge pull request #2988 from GSA/fix-timeout-popup
ccostino Oct 8, 2025
a013f30
remove view_notifications unsed code
heyitsmebev Oct 8, 2025
e8d8773
fix so we only show up to current month
Oct 9, 2025
ebdb644
Bump virtualenv from 20.34.0 to 20.35.0 (#2990)
dependabot[bot] Oct 9, 2025
02053b9
Timeout popup disappeared (#2992)
alexjanousekGSA Oct 9, 2025
dab5187
timeoutPopup not needed in main bundle
heyitsmebev Oct 9, 2025
2024741
fix tests
Oct 9, 2025
7c59328
Merge pull request #2993 from GSA/remove-timeoutpop-from-bundle
heyitsmebev Oct 9, 2025
49d032a
Bump pytest-env from 1.1.5 to 1.2.0
dependabot[bot] Oct 9, 2025
6580fcc
Bump virtualenv from 20.35.0 to 20.35.1
dependabot[bot] Oct 9, 2025
9efc3b3
removing view_notifications from other templates
heyitsmebev Oct 10, 2025
349ae5d
Merge pull request #2995 from GSA/dependabot/pip/virtualenv-20.35.1
ccostino Oct 10, 2025
6fab5c9
Merge pull request #2994 from GSA/dependabot/pip/pytest-env-1.2.0
ccostino Oct 10, 2025
4bb36a7
Merge pull request #2989 from GSA/template_usage
ccostino Oct 10, 2025
0a1136e
fixing testing
heyitsmebev Oct 10, 2025
d9f8ab6
Bump virtualenv from 20.35.1 to 20.35.3 (#2997)
dependabot[bot] Oct 13, 2025
4df5ba0
Bump phonenumbers from 9.0.15 to 9.0.16 (#2996)
dependabot[bot] Oct 13, 2025
d211ef4
Bump cachetools from 6.2.0 to 6.2.1
dependabot[bot] Oct 13, 2025
d44d7e8
remove caseworker
heyitsmebev Oct 14, 2025
54fd592
Merge pull request #2991 from GSA/2986-remove-unused-notifications-ro…
ccostino Oct 14, 2025
3e1b77f
Merge pull request #2999 from GSA/dependabot/pip/cachetools-6.2.1
ccostino Oct 14, 2025
f5a7ade
Bump isort from 6.1.0 to 7.0.0
dependabot[bot] Oct 14, 2025
10751ea
Merge pull request #3000 from GSA/dependabot/pip/isort-7.0.0
ccostino Oct 14, 2025
4722576
Bump idna from 3.10 to 3.11 (#3002)
dependabot[bot] Oct 14, 2025
3b3191b
Bump @rollup/plugin-node-resolve from 16.0.2 to 16.0.3 (#3001)
dependabot[bot] Oct 14, 2025
3a39d91
Feat/webpack (#2998)
alexjanousekGSA Oct 14, 2025
f30c956
use lockfile
Oct 14, 2025
3c6ecfb
fix format failures
Oct 14, 2025
a88634b
Merge pull request #3003 from GSA/terraform_lockfile
heyitsmebev Oct 14, 2025
845132c
Bump charset-normalizer from 3.4.3 to 3.4.4
dependabot[bot] Oct 14, 2025
e342381
Bump @rollup/plugin-commonjs from 28.0.6 to 28.0.7
dependabot[bot] Oct 14, 2025
8ae9f03
Merge pull request #3007 from GSA/dependabot/npm_and_yarn/rollup/plug…
ccostino Oct 15, 2025
2479532
Merge pull request #3005 from GSA/dependabot/pip/charset-normalizer-3…
ccostino Oct 15, 2025
9bed82d
Bump hypothesis from 6.140.3 to 6.140.4
dependabot[bot] Oct 15, 2025
f716b7a
Merge pull request #3006 from GSA/dependabot/pip/hypothesis-6.140.4
ccostino Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .cfignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ target/
.vscode

# Frontend dependencies and compiled assets
app/assets/stylesheets/govuk_template/.sass-cache/
.sass-cache/
cache/
node_modules
Expand Down
8 changes: 4 additions & 4 deletions .ds.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"filename": "app/config.py",
"hashed_secret": "577a4c667e4af8682ca431857214b3a920883efc",
"is_verified": false,
"line_number": 120,
"line_number": 118,
"is_secret": false
}
],
Expand Down Expand Up @@ -507,7 +507,7 @@
"filename": "tests/app/main/views/test_accept_invite.py",
"hashed_secret": "07f0a6c13923fc3b5f0c57ffa2d29b715eb80d71",
"is_verified": false,
"line_number": 632,
"line_number": 641,
"is_secret": false
}
],
Expand Down Expand Up @@ -629,10 +629,10 @@
"filename": "tests/conftest.py",
"hashed_secret": "f8377c90fcfd699f0ddbdcb30c2c9183d2d933ea",
"is_verified": false,
"line_number": 3287,
"line_number": 3291,
"is_secret": false
}
]
},
"generated_at": "2025-10-01T14:58:39Z"
"generated_at": "2025-10-07T17:43:26Z"
}
2 changes: 0 additions & 2 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://notify-demo.app.cloud.gov/sign-in&response_type=code&scope=openid+email&state=STATE"
LOGIN_DOT_GOV_CERTS_URL: "https://secure.login.gov/api/openid_connect/certs"
API_PUBLIC_URL: ${{ secrets.API_PUBLIC_URL }}
API_PUBLIC_WS_URL: ${{ secrets.API_PUBLIC_WS_URL }}
with:
cf_username: ${{ secrets.CLOUDGOV_USERNAME }}
cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
Expand All @@ -90,7 +89,6 @@ jobs:
--var LOGIN_DOT_GOV_CERTS_URL="$LOGIN_DOT_GOV_CERTS_URL"
--var LOGIN_PEM="$LOGIN_PEM"
--var API_PUBLIC_URL="$API_PUBLIC_URL"
--var API_PUBLIC_WS_URL="$API_PUBLIC_WS_URL"
--strategy rolling

- name: Deploy egress proxy
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://beta.notify.gov/sign-in&response_type=code&scope=openid+email&state=STATE"
LOGIN_DOT_GOV_CERTS_URL: "https://secure.login.gov/api/openid_connect/certs"
API_PUBLIC_URL: ${{ secrets.API_PUBLIC_URL }}
API_PUBLIC_WS_URL: ${{ secrets.API_PUBLIC_WS_URL }}
with:
cf_username: ${{ secrets.CLOUDGOV_USERNAME }}
cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
Expand All @@ -90,7 +89,6 @@ jobs:
--var LOGIN_DOT_GOV_CERTS_URL="$LOGIN_DOT_GOV_CERTS_URL"
--var LOGIN_PEM="$LOGIN_PEM"
--var API_PUBLIC_URL="$API_PUBLIC_URL"
--var API_PUBLIC_WS_URL="$API_PUBLIC_WS_URL"
--strategy rolling

- name: Deploy egress proxy
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ jobs:
LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://notify-staging.app.cloud.gov/sign-in&response_type=code&scope=openid+email&state=STATE"
LOGIN_DOT_GOV_CERTS_URL: "https://secure.login.gov/api/openid_connect/certs"
API_PUBLIC_URL: ${{ secrets.API_PUBLIC_URL }}
API_PUBLIC_WS_URL: ${{ secrets.API_PUBLIC_WS_URL }}
with:
cf_username: ${{ secrets.CLOUDGOV_USERNAME }}
cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
Expand All @@ -96,7 +95,6 @@ jobs:
--var LOGIN_DOT_GOV_CERTS_URL="$LOGIN_DOT_GOV_CERTS_URL"
--var LOGIN_PEM="$LOGIN_PEM"
--var API_PUBLIC_URL="$API_PUBLIC_URL"
--var API_PUBLIC_WS_URL="$API_PUBLIC_WS_URL"
--strategy rolling


Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ htmlcov/
.coverage.*
.cache
.pytest_cache
.hypothesis/
coverage/
coverage.xml
test_results.xml
Expand Down Expand Up @@ -150,3 +151,6 @@ playwright/
backstop_data/bitmaps_test/
backstop_data/html_report/
backstop_data/engine_scripts/playwright/

# Pa11y
pa11y-results.txt
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ repos:
args: [--allow-missing-credentials]
- id: detect-private-key
- id: mixed-line-ending
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
Expand Down
32 changes: 7 additions & 25 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,16 @@
from app.notify_client.performance_dashboard_api_client import (
performance_dashboard_api_client,
)
from app.notify_client.platform_stats_api_client import (
platform_stats_api_client,
)
from app.notify_client.platform_stats_api_client import platform_stats_api_client
from app.notify_client.service_api_client import service_api_client
from app.notify_client.status_api_client import status_api_client
from app.notify_client.template_folder_api_client import (
template_folder_api_client,
)
from app.notify_client.template_statistics_api_client import (
template_statistics_client,
)
from app.notify_client.template_folder_api_client import template_folder_api_client
from app.notify_client.template_statistics_api_client import template_statistics_client
from app.notify_client.upload_api_client import upload_api_client
from app.notify_client.user_api_client import user_api_client
from app.url_converters import SimpleDateTypeConverter, TemplateTypeConverter
from app.utils.api_health import is_api_down
from app.utils.govuk_frontend_jinja.flask_ext import init_govuk_frontend
from app.utils.nunjucks_jinja.flask_ext import init_nunjucks_environment
from notifications_python_client.errors import HTTPError
from notifications_utils import logging, request_helper
from notifications_utils.formatters import (
Expand Down Expand Up @@ -149,7 +143,6 @@
def _csp(config):
asset_domain = config["ASSET_DOMAIN"]
api_public_url = config["API_PUBLIC_URL"]
api_public_ws_url = config["API_PUBLIC_WS_URL"]

return {
"default-src": ["'self'", asset_domain],
Expand All @@ -168,7 +161,6 @@ def _csp(config):
"https://www.googletagmanager.com",
"https://www.google-analytics.com",
"https://dap.digitalgov.gov",
"https://cdn.socket.io",
],
"connect-src": list(
dict.fromkeys(
Expand All @@ -177,7 +169,6 @@ def _csp(config):
"https://gov-bam.nr-data.net",
"https://www.google-analytics.com",
f"{api_public_url}",
f"{api_public_ws_url}",
]
)
),
Expand All @@ -198,17 +189,8 @@ def inject_is_api_down():

# @application.context_processor
# def inject_feature_flags():
# this is where feature flags can be easily added as a dictionary within context
# feature_socket_enabled = application.config.get("FEATURE_SOCKET_ENABLED", True)

# current_app.logger.info(
# f"FEATURE_SOCKET_ENABLED value in __init__.py coming \
# from config is {application.config.get('FEATURE_SOCKET_ENABLED')} and \
# the ending value is {feature_socket_enabled}"
# )
# return dict(
# FEATURE_SOCKET_ENABLED=feature_socket_enabled,
# )
# this is where feature flags can be easily added as a dictionary within context
# feature_enabled = application.config.get("FEATURE_ENABLED", True)

@application.context_processor
def inject_initial_signin_url():
Expand Down Expand Up @@ -246,7 +228,7 @@ def inject_initial_signin_url():
if "extensions" not in application.jinja_options:
application.jinja_options["extensions"] = []

init_govuk_frontend(application)
init_nunjucks_environment(application)
init_jinja(application)

for client in (
Expand Down
5 changes: 1 addition & 4 deletions app/assets/error_pages/5xx.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ <h2 class="usa-sr-only">Support links</h2>
d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145" />
</svg>
<span class="usa-footer__licence-description">
All content is available under the
<a class="usa-footer__link"
href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open
Government Licence v3.0</a>, except where otherwise stated
All content is available under <a href="https://open.gsa.gov/oss/">GSA's Open Source Policy</a>, except where otherwise stated
</span>
</div>
</div>
Expand Down
34 changes: 17 additions & 17 deletions app/assets/javascripts/activityChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@
}

const data = await response.json();
labels = [];
deliveredData = [];
failedData = [];
pendingData = [];
let labels = [];
let deliveredData = [];
let failedData = [];
let pendingData = [];
let totalMessages = 0;

for (var dateString in data) {
Expand Down Expand Up @@ -399,19 +399,19 @@
dropdown.addEventListener('change', handleDropdownChange);
});

// Resize chart on window resize
window.addEventListener('resize', function() {
if (labels.length > 0 && deliveredData.length > 0 && failedData.length > 0 && pendingData.length > 0) {
createChart('#weeklyChart', labels, deliveredData, failedData, pendingData);
createTable('weeklyTable', 'activityChart', labels, deliveredData, failedData, pendingData);
}
});
// Resize chart on window resize
window.addEventListener('resize', function() {
if (labels.length > 0 && deliveredData.length > 0 && failedData.length > 0 && pendingData.length > 0) {
createChart('#weeklyChart', labels, deliveredData, failedData, pendingData);
createTable('weeklyTable', 'activityChart', labels, deliveredData, failedData, pendingData);
}
});

// Export functions for testing
window.createChart = createChart;
window.createTable = createTable;
window.handleDropdownChange = handleDropdownChange;
window.fetchData = fetchData;
}
// Export functions for testing
window.createChart = createChart;
window.createTable = createTable;
window.handleDropdownChange = handleDropdownChange;
window.fetchData = fetchData;
}

})(window);
8 changes: 5 additions & 3 deletions app/assets/javascripts/collapsibleCheckboxes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function (global) {
(function (window) {
"use strict";

const GOVUK = global.GOVUK;
const USWDS = window.USWDS || {};

function Summary (module) {
this.module = module;
Expand Down Expand Up @@ -222,6 +222,8 @@
this.summary.bindEvents(this);
};

GOVUK.Modules.CollapsibleCheckboxes = CollapsibleCheckboxes;
NotifyModules['collapsible-checkboxes'] = function() {
return new CollapsibleCheckboxes();
};

}(window));
10 changes: 5 additions & 5 deletions app/assets/javascripts/copyToClipboard.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
(function(Modules) {
(function(window) {
"use strict";

if (!document.queryCommandSupported('copy')) return;

Modules.CopyToClipboard = function() {
window.NotifyModules['copy-to-clipboard'] = function() {

const states = {
'valueVisible': (options) => `
Expand Down Expand Up @@ -90,11 +90,11 @@
.find('.usa-button').focus()
);

if ('stickAtBottomWhenScrolling' in GOVUK) {
GOVUK.stickAtBottomWhenScrolling.recalculate();
if ('stickAtBottomWhenScrolling' in window.NotifyModules) {
window.NotifyModules.stickAtBottomWhenScrolling.recalculate();
}

};
};

})(window.GOVUK.Modules);
})(window);
15 changes: 6 additions & 9 deletions app/assets/javascripts/date.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
(function (window) {
"use strict";
export function initCurrentYear() {
const currentYearElement = document.getElementById("current-year");

// Show the current year
const currentYearElement = document.getElementById("current-year");

if (currentYearElement) {
currentYearElement.textContent = new Date().getFullYear();
}
})(window);
if (currentYearElement) {
currentYearElement.textContent = new Date().getFullYear();
}
}
15 changes: 8 additions & 7 deletions app/assets/javascripts/enhancedTextbox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function(Modules) {
(function(window) {
"use strict";

if (
Expand All @@ -7,18 +7,19 @@

const tagPattern = /\(\(([^\)\((\?)]+)(\?\?)?([^\)\(]*)\)\)/g;

Modules.EnhancedTextbox = function() {
window.NotifyModules['enhanced-textbox'] = function() {

this.start = function(textarea) {
this.start = function(element) {

let textarea = $(element);
let visibleTextbox;

this.highlightPlaceholders = (
typeof textarea.data('highlightPlaceholders') === 'undefined' ||
!!textarea.data('highlightPlaceholders')
);

this.$textbox = $(textarea)
this.$textbox = textarea
.wrap(`
<div class='textbox-highlight-wrapper' />
`)
Expand Down Expand Up @@ -58,8 +59,8 @@
)
);

if ('stickAtBottomWhenScrolling' in GOVUK) {
GOVUK.stickAtBottomWhenScrolling.recalculate();
if ('stickAtBottomWhenScrolling' in window.NotifyModules) {
window.NotifyModules.stickAtBottomWhenScrolling.recalculate();
}

};
Expand All @@ -84,4 +85,4 @@

};

})(window.GOVUK.Modules);
})(window);
21 changes: 6 additions & 15 deletions app/assets/javascripts/errorBanner.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
(function (window) {
"use strict";
export const ErrorBanner = {
hideBanner: () => $('.banner-dangerous').addClass('display-none'),
showBanner: () => $('.banner-dangerous').removeClass('display-none')
};

/*
This module is intended to be used to show and hide an error banner based on a javascript trigger. You should make
sure the banner has an appropriate aria-live attribute, and a tabindex of -1 so that screenreaders and keyboard users
are alerted to the change respectively.

This may behave in unexpected ways if you have more than one element with the `banner-dangerous` class on your page.
*/
window.GOVUK.ErrorBanner = {
hideBanner: () => $('.banner-dangerous').addClass('display-none'),
showBanner: () => $('.banner-dangerous')
.removeClass('display-none')
};
})(window);
window.NotifyModules = window.NotifyModules || {};
window.NotifyModules.ErrorBanner = ErrorBanner;
Loading
Loading