-
Notifications
You must be signed in to change notification settings - Fork 5
Add configurable splash screen with dismissal tracking and acceptance requirement #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…acking Co-authored-by: garland3 <1162675+garland3@users.noreply.github.com>
Co-authored-by: garland3 <1162675+garland3@users.noreply.github.com>
|
@copilot there should be a feature flag for enabling or disabling this feature in the config_manager.py. Also a small note in the admin guide documentation in the /docs is needed. |
Co-authored-by: garland3 <1162675+garland3@users.noreply.github.com>
Added feature flag |
| @@ -0,0 +1,252 @@ | |||
| import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' | |||
| import { render, screen, fireEvent, waitFor } from '@testing-library/react' | |||
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 days ago
To fix the problem, simply remove the unused waitFor from the import statement on line 2 in frontend/src/test/splash-screen.test.jsx. This involves editing only the import statement so that it only imports the functions that are actually used in the file. No further code changes or additional imports are needed elsewhere.
-
Copy modified line R2
| @@ -1,5 +1,5 @@ | ||
| import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' | ||
| import { render, screen, fireEvent, waitFor } from '@testing-library/react' | ||
| import { render, screen, fireEvent } from '@testing-library/react' | ||
| import SplashScreen from '../components/SplashScreen' | ||
|
|
||
| describe('SplashScreen', () => { |
🔒 Security Scan ResultsSecurity Scan SummaryScan ResultsPython SAST (Bandit)Recommendations
|
Adds a startup splash screen for displaying policies (cookie, acceptable use, etc.) with admin-configurable messages, localStorage-based dismissal tracking, and optional acceptance requirement.
Backend Changes
/api/splashendpoint to serve configuration fromconfig/[overrides|defaults]/splash-config.jsonsplash_config_filefield toAppSettingsfollowing existing config manager patternsFEATURE_SPLASH_SCREEN_ENABLEDfeature flag inconfig_manager.py(default:false)/api/configresponse underfeatures.splash_screen/api/splashendpoint checks feature flag and returns disabled config when flag isfalseFrontend Changes
SplashScreen.jsxcomponent with modal overlay displaying configurable messagesheadingandtextrequire_accept: true): Forces explicit acceptance, no dismissalrequire_accept: false): Optional dismissal with X buttonConfiguration
Enable the feature:
# In .env file FEATURE_SPLASH_SCREEN_ENABLED=trueConfiguration Schema:
{ "enabled": true, "title": "Important Policies", "messages": [ {"type": "heading", "content": "Cookie Policy"}, {"type": "text", "content": "This application uses cookies..."} ], "dismissible": true, "require_accept": true, "dismiss_duration_days": 30, "accept_button_text": "I Accept", "dismiss_button_text": "Close", "show_on_every_visit": false }Documentation
docs/02_admin_guide.mdexplaining splash screen configuration.env.examplewithFEATURE_SPLASH_SCREEN_ENABLEDflag andSPLASH_CONFIG_FILEvariableScreenshots
Accept Mode (require_accept: true)

Dismiss Mode (require_accept: false)

Testing
Original prompt
<issue_description>Add a splash screen on startup.
Comments on the Issue (you are @copilot in this section)
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.