Feat/settings confirmation modal - #46
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces navigation protection for the De-identify “Review Results” step via a confirmation modal, but it also bundles substantial additional platform work (auth routing/session handling, dashboard/analyses pages, persistence, testing, and deployment).
Changes:
- Adds a “Go back to settings?” confirmation modal and wires it into the De-identify stepper when navigating backward from Review Results.
- Introduces/expands app infrastructure: Redux slices + redux-persist, auth thunks/routes, new landing/contact/not-found/inactivity pages, and dashboard/analyses UI.
- Adds Vitest configuration + multiple new tests, plus Docker/Heroku deployment configuration.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Adds Vitest configuration (jsdom, setup file, alias). |
| vite.config.ts | Adds SVGR plugin and keeps Vite alias/proxy setup. |
| tsconfig.app.json | Adds Vitest globals typings and TS deprecation ignore setting. |
| src/vite-env.d.ts | Declares *.svg?react module typing for SVGR imports. |
| src/utils/index.ts | Extends utility exports (entity color via theme, entity helpers, mappings). |
| src/test/setup.ts | Adds jest-dom matchers for RTL tests. |
| src/test/routes/ProtectedRouteInactivity.test.tsx | Tests redirect behavior for expired sessions in ProtectedRoute. |
| src/test/routes/ProtectedRoute.test.tsx | Smoke test for ProtectedRoute render. |
| src/test/routes/NotFound.test.tsx | Tests NotFound rendering for unknown routes. |
| src/test/renderWithProviders.tsx | Adds RTL helper to render with Redux + MUI theme. |
| src/test/integration/AuthVerifyFlow.test.tsx | Integration-ish test for verify-token flow + store update. |
| src/test/contact/ContactForm.test.tsx | Tests ContactForm submit success/error states with mocks. |
| src/test/auth/verifyMagicLink.test.ts | Tests verifyMagicLink thunk stores JWT and loads user. |
| src/test/auth/sessionRestore.test.tsx | Tests session restoration from localStorage token. |
| src/test/auth/logout.test.ts | Tests logout clears session and store user. |
| src/test/auth/initializeAuth.test.ts | Tests initializeAuth restores session and user. |
| src/test/api/ApiInterceptor.test.ts | Tests Axios interceptor redirect behavior on 401. |
| src/store/store.ts | Adds root reducer, redux-persist (sessionStorage) and typed useAppDispatch. |
| src/store/slices/jobsSlice.ts | Adds jobs slice incl. localOriginalTexts for preserving draft input. |
| src/store/slices/dashboardSlice.ts | Adds dashboard async thunk + reducer for stats. |
| src/store/auth/index.ts | Re-exports auth slice/thunks/selectors. |
| src/store/auth/auth.thunks.ts | Adds initialize/verify/logout thunks with storage handling. |
| src/store/auth/auth.slice.ts | Adds auth slice with user + initialized flag. |
| src/store/auth/auth.selectors.ts | Adds auth selectors (user/authenticated/initialized). |
| src/store/auth/auth.mappers.ts | Adds mapper from API user to app user model. |
| src/store/auth/auth.constants.ts | Centralizes auth thunk type strings. |
| src/services/user/user.types.ts | Adds user API types. |
| src/services/user/user.api.ts | Adds /users/me client. |
| src/services/syntheticDataService.ts | Adds synthetic data generate API client (multipart + JSON). |
| src/services/resultsService.ts | Adds results fetch + export helpers with file download. |
| src/services/jobsService.ts | Adds jobs CRUD + upload/run/toggle APIs. |
| src/services/emailService.ts | Adds contact email API client. |
| src/services/dashboard/types.ts | Adds dashboard data types. |
| src/services/dashboard/dashboardService.ts | Adds dashboard stats API client. |
| src/services/auth/auth.api.ts | Adds auth login + verify API clients. |
| src/services/api.ts | Updates Axios config/constants and 401 redirect logic. |
| src/routes/ProtectedRoute.tsx | Adds real auth guarding logic + PublicRoute handling. |
| src/routes/index.tsx | Expands routing (landing, token verify, protected areas, NotFound). |
| src/pages/TokenPage/index.tsx | Implements verify-token page that dispatches verifyMagicLink then navigates. |
| src/pages/SyntheticData/index.tsx | Adds SyntheticData page that scrolls to settings and passes job id. |
| src/pages/NotFound/styles.ts | Adds NotFound page styling constants/SX. |
| src/pages/NotFound/index.tsx | Adds NotFound page UI. |
| src/pages/NotFound/constants.ts | Adds NotFound UI constants. |
| src/pages/Landing/useLanding.ts | Adds landing hook to navigate to login. |
| src/pages/Landing/typography.tsx | Adds landing typography components + sx merging helper. |
| src/pages/Landing/sections/StatsSection.tsx | Adds landing stats section UI. |
| src/pages/Landing/sections/LandingFooter.tsx | Adds landing footer UI (logo + copy). |
| src/pages/Landing/sections/HeroSection.tsx | Adds landing hero section with CTA and trust badges. |
| src/pages/Landing/sections/CtaSection.tsx | Adds landing CTA panel section. |
| src/pages/Landing/index.tsx | Adds Landing page composition of sections. |
| src/pages/Inactivity/styles.ts | Adds inactivity/session-expired page styling. |
| src/pages/Inactivity/index.tsx | Adds inactivity/session-expired page that logs out on mount. |
| src/pages/Inactivity/constants.ts | Adds inactivity UI constants. |
| src/pages/DeIdentify/types.ts | Adds DeIdentify domain types (jobs, wizard state, results, etc.). |
| src/pages/DeIdentify/index.tsx | Adds DeIdentify page wrapper for the stepper. |
| src/pages/Dashboard/useDashboard.ts | Adds dashboard hook (currently hardwired to mocks). |
| src/pages/Dashboard/types.ts | Adds dashboard state union type. |
| src/pages/Dashboard/styled.ts | Adds dashboard styled components. |
| src/pages/Dashboard/mocks.ts | Adds mock dashboard dataset. |
| src/pages/Dashboard/components/RecentActivityTable/styled.ts | Adds recent activity table cell styling. |
| src/pages/Dashboard/components/RecentActivityTable/index.tsx | Adds recent activity table component. |
| src/pages/Dashboard/components/MetricCard/styled.ts | Adds metric card styling. |
| src/pages/Dashboard/components/MetricCard/index.tsx | Adds metric card component. |
| src/pages/Dashboard/components/EmptyStateCard/styled.ts | Adds empty-state card styling. |
| src/pages/Dashboard/components/EmptyStateCard/index.tsx | Adds empty-state card component. |
| src/pages/Dashboard/components/DistributionCharts/EntityTypesChart/styled.ts | Adds entity types chart styling helpers. |
| src/pages/Dashboard/components/DistributionCharts/DeIdentificationChart/styled.ts | Adds de-identification chart wrapper styles. |
| src/pages/Dashboard/components/DistributionCharts/DeIdentificationChart/index.tsx | Adds de-identification strategy bar chart. |
| src/pages/Dashboard/components/DistributionCharts/ComplianceChart/styled.ts | Adds compliance chart legend/styling. |
| src/pages/Dashboard/components/DashboardFilters/types.ts | Adds dashboard filter enum/types. |
| src/pages/Dashboard/components/DashboardFilters/styled.ts | Adds dashboard filters styling. |
| src/pages/Dashboard/components/DashboardFilters/index.tsx | Adds dashboard filters UI + navigation to new analysis. |
| src/pages/Dashboard/components/DashboardFilters/constants.ts | Adds dashboard framework filter options. |
| src/pages/Dashboard/components/ActivityChart/utils.ts | Adds activity chart date formatting util. |
| src/pages/Dashboard/components/ActivityChart/types.ts | Adds activity chart types/ranges. |
| src/pages/Dashboard/components/ActivityChart/styled.ts | Adds activity chart styled controls and chart styles. |
| src/pages/Dashboard/components/ActivityChart/constants.ts | Adds activity chart constants. |
| src/pages/Dashboard/components/ActivityChart/ChartControls.tsx | Adds activity chart control component. |
| src/pages/Contact/types.ts | Adds contact form types. |
| src/pages/Contact/index.tsx | Adds Contact page layout with ContactForm. |
| src/pages/Auth/useAuthForm.ts | Adds login request form hook + schema integration. |
| src/pages/Auth/schema.ts | Adds yup schema for auth form. |
| src/pages/Auth/constants.ts | Adds auth UI constants and validation message keys. |
| src/pages/Analyses/useAnalyses.ts | Adds analyses hook (currently mock-backed). |
| src/pages/Analyses/styled.ts | Adds analyses page styled components. |
| src/pages/Analyses/index.tsx | Adds analyses page with filters, pagination, CSV export. |
| src/pages/Analyses/components/ExportCsvButton/styled.ts | Adds export button styles. |
| src/pages/Analyses/components/ExportCsvButton/index.tsx | Adds export CSV button component. |
| src/pages/Analyses/components/DateRangeFilter/CalendarCaption/index.tsx | Adds custom calendar caption UI for date picker. |
| src/pages/Analyses/components/AnalysesPagination/styled.ts | Adds pagination styles. |
| src/pages/Analyses/components/AnalysesPagination/index.tsx | Adds pagination component. |
| src/pages/Analyses/components/AnalysesFilters/styled.ts | Adds analyses filters layout styles. |
| src/pages/Analyses/components/AnalysesFilters/index.tsx | Adds analyses filters UI (search/framework/date/status). |
| src/index.css | Adds full-height root styling + keeps scrollbar utility. |
| src/features/dashboard/utils/date.ts | Adds helper for generating empty chart date buckets. |
| src/features/analyses/utils/formatters.ts | Adds analyses formatters (framework/date/range labels). |
| src/features/analyses/utils/exportCsv.ts | Adds CSV export helper for analyses rows. |
| src/features/analyses/utils/datePresets.ts | Adds date-range preset helper. |
| src/features/analyses/utils/dateFilter.ts | Adds date filtering helper. |
| src/features/analyses/components/StatusBadge/index.tsx | Adds status badge component with colored dot + i18n label. |
| src/features/analyses/components/DocumentCell/index.tsx | Adds document cell with icon + filename wrapping. |
| src/features/analyses/components/AnalysesTable/styled.ts | Adds analyses table styles. |
| src/features/analyses/components/AnalysesTable/index.tsx | Adds analyses table component using DataTable. |
| src/constants/http-status.ts | Adds HTTP status constants. |
| src/constants/api-routes.ts | Adds API route constants. |
| src/constants/api-config.ts | Adds API timeout + poll interval constants. |
| src/components/UI/Tabs.tsx | Adds custom Tabs component wrapper over MUI Tabs. |
| src/components/popups/SyntheticRegeneratePopup.tsx | Adds regenerate confirmation popup. |
| src/components/popups/ReplaceTextPopup.tsx | Adds replace text confirmation popup (styled). |
| src/components/popups/LogoutPopup.tsx | Adds logout confirmation popup. |
| src/components/popups/GoBackSettingsPopup.tsx | Adds “Go back to settings?” confirmation popup. |
| src/components/popups/BasePopup.tsx | Adds modal portal + framer-motion animation wrapper. |
| src/components/layouts/useSessionExpiration.ts | Adds hook for session expiration countdown/visibility. |
| src/components/layouts/useMainLayout.ts | Adds layout responsiveness + drawer state hook. |
| src/components/layouts/Sidebar/useSidebar.ts | Adds sidebar navigation/logout handlers and active state logic. |
| src/components/layouts/MainLayout.tsx | Adds main app layout (sidebar/header/content) + session expiry polling. |
| src/components/layouts/LandingLayout.tsx | Adds landing layout (header/footer + outlet). |
| src/components/layouts/Header/useHeader.ts | Adds header metadata mapping per route. |
| src/components/LandingSectionDecoration.tsx | Adds decorative background helper for landing sections. |
| src/components/common/PageLoader.tsx | Adds shared page-loading component. |
| src/components/common/DataTable/types.ts | Adds generic column definition type. |
| src/components/common/DataTable/styled.ts | Adds base DataTable styles. |
| src/components/common/DataTable/index.tsx | Adds generic table renderer component. |
| src/components/business/syntheticData/useSyntheticDataForm.ts | Adds synthetic data form logic + preview loading from results. |
| src/components/business/deIdentity/StepContent.tsx | Adds step content switching for DeIdentify wizard. |
| src/components/business/deIdentity/reviewAndRunConstants.ts | Adds constants for review-and-run UI behavior. |
| src/components/business/deIdentity/ResetEntitiesPopup.tsx | Adds reset entities confirmation popup. |
| src/components/business/deIdentity/Configuration.tsx | Adds configuration step wrapper choosing HIPAA vs standard UI. |
| src/components/business/contact/SubmittedState.tsx | Adds contact form submitted success UI. |
| src/assets/images/not-found/index.ts | Adds NotFound image exports. |
| src/assets/images/inactivity/index.ts | Adds inactivity image exports. |
| src/assets/icons/table_chart_view.svg | Adds SVG asset. |
| src/assets/icons/preview.svg | Adds SVG asset. |
| src/assets/icons/identifiersIcon.svg | Adds SVG asset. |
| src/assets/icons/generatedDataIcon.svg | Adds SVG asset. |
| src/assets/icons/finance_mode.svg | Adds SVG asset. |
| src/assets/icons/dataInputIcon.svg | Adds SVG asset. |
| src/assets/icons/dashboard/MetricCard/verified.svg | Adds SVG asset for dashboard. |
| src/assets/icons/dashboard/MetricCard/manage_search.svg | Adds SVG asset for dashboard. |
| src/assets/icons/dashboard/MetricCard/description.svg | Adds SVG asset for dashboard. |
| src/assets/icons/dashboard/MetricCard/analytics.svg | Adds SVG asset for dashboard. |
| src/assets/icons/dashboard/info.svg | Adds SVG asset for dashboard. |
| src/assets/icons/dashboard/EmptyStateCard/entity.svg | Adds SVG asset for dashboard empty state. |
| src/assets/icons/dashboard/add.svg | Adds SVG asset for dashboard actions. |
| src/assets/icons/complienceIcon.svg | Adds SVG asset. |
| src/assets/icons/admin_panel_settings.svg | Adds SVG asset. |
| src/assets/icons/add_business.svg | Adds SVG asset. |
| src/App.tsx | Wraps app with PersistGate and dispatches auth init. |
| README.md | Updates env var naming and local/prod API notes. |
| package.json | Adds tests, new dependencies, and build plugins. |
| nginx.conf | Adds SPA-friendly Nginx config with caching rules. |
| index.html | Adds Google Fonts (Inter) link. |
| heroku.yml | Adds Heroku Docker build config. |
| Dockerfile | Adds multi-stage build + Nginx serve with dynamic PORT. |
| .github/workflows/deploy.yml | Adds GitHub Actions workflow to build/push/release Heroku container. |
| .github/pull_request_template.md | Replaces PR template with simplified checklist. |
| .dockerignore | Adds docker ignore rules for repo artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cebanoleksandr
approved these changes
May 26, 2026
Ihor4yk
approved these changes
May 26, 2026
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.
Implement navigation protection for the De-identify Review Results step.
When the user tries to go back from Review Results to the Configuration step, the app should show a confirmation modal to prevent accidental progress loss.
Scope:
implement “Go back to settings?” confirmation modal
trigger modal when user tries to return to Step 3 / Configuration from Review Results
implement confirm action
implement cancel action
preserve current Review Results state when user cancels
allow navigation back to settings only after confirmation
match Figma behavior and copy