Skip to content

Commit ebf0bc5

Browse files
authored
Merge pull request #2232 from release/2026.06.2
Release 2026.06.2
2 parents c30d942 + 825cbe5 commit ebf0bc5

10 files changed

Lines changed: 143 additions & 18 deletions

File tree

.github/codeql/codeql-config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Custom CodeQL Config"
2+
3+
# Specify which queries to run
4+
queries:
5+
- uses: security-extended
6+
- uses: security-and-quality
7+
8+
# Paths to exclude from analysis
9+
paths-ignore:
10+
- node_modules
11+
- dist
12+
- build
13+
- coverage
14+
- '**/*.test.tsx'
15+
- '**/*.test.ts'
16+
17+
18+
# Paths to include in analysis
19+
paths:
20+
- src

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/" # Location of package manifests
5+
schedule:
6+
interval: "weekly"
7+
commit-message:
8+
prefix: "[GHA] Dependabot:"
9+
prefix-development: "[GHA-dev] Dependabot:"
10+
pull-request-branch-name:
11+
separator: "-"
312
- package-ecosystem: 'npm'
413
directory: '/'
514
schedule:

.github/workflows/codeql.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# .github/workflows/codeql.yml
2+
name: "CodeQL"
3+
4+
on:
5+
workflow_dispatch: {}
6+
push:
7+
branches: [ "main", "develop" ]
8+
pull_request:
9+
branches: [ "develop" ]
10+
types: [opened, synchronize, reopened]
11+
# schedule:
12+
# # Run at 2:30 AM UTC every day
13+
# - cron: '30 2 * * *'
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: [ 'javascript' ]
28+
# CodeQL supports: 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift'
29+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v4
37+
with:
38+
languages: ${{ matrix.language }}
39+
config-file: ./.github/codeql/codeql-config.yml
40+
# If you wish to specify custom queries, you can do so here or in a config file.
41+
# By default, queries listed here will override any specified in a config file.
42+
# Prefix the list here with "+" to use these queries and those in the config file.
43+
44+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
45+
# queries: security-extended,security-and-quality
46+
47+
- name: Perform CodeQL Analysis
48+
uses: github/codeql-action/analyze@v4
49+
with:
50+
category: "/language:${{matrix.language}}"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This repository is used for the A* `yarn eject`
44

5-
**Note: this is a one-way operation. Once you `eject`, you can't go back!**n Panel of the [Curious](https://mindlogger.org/) application stack.
5+
**Note: this is a one-way operation. Once you `eject`, you can't go back!**n Panel of the [Curious](https://gettingcurious.com/) application stack.
66

77
## Getting Started
88

src/modules/Auth/features/SignUp/SignUpForm/SignUpForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const SignUpForm = () => {
128128
label={
129129
<StyledLabel>
130130
{t('agreement')}
131-
<StyledLink href="https://mindlogger.org/terms" target="_blank">
131+
<StyledLink href="https://www.gettingcurious.com/terms" target="_blank">
132132
{t('termsOfService')}
133133
</StyledLink>
134134
</StyledLabel>

src/modules/Dashboard/components/ActivityAssignDrawer/ActivityAssignDrawer.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useTranslation } from 'react-i18next';
22
import { Box, Button, Drawer, Fade, IconButton } from '@mui/material';
33
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4+
import unionBy from 'lodash/unionBy';
45
import { Controller, SubmitHandler, useForm, useWatch } from 'react-hook-form';
56
import { yupResolver } from '@hookform/resolvers/yup';
67

@@ -32,7 +33,11 @@ import {
3233
} from 'api';
3334
import { hydrateActivityFlows } from 'modules/Dashboard/utils';
3435
import { Activity } from 'redux/modules';
35-
import { AssignmentCounts, useParticipantDropdown } from 'modules/Dashboard/components';
36+
import {
37+
AssignmentCounts,
38+
ParticipantDropdownOption,
39+
useParticipantDropdown,
40+
} from 'modules/Dashboard/components';
3641
import { Mixpanel, MixpanelEventType, MixpanelProps } from 'shared/utils';
3742
import { useGetAppletActivitiesQuery } from 'modules/Dashboard/api/apiSlice';
3843

@@ -95,6 +100,18 @@ export const ActivityAssignDrawer = React.memo(
95100
appletId,
96101
});
97102

103+
// Remember participants picked via search so they remain resolvable after selection
104+
const [selectedParticipants, setSelectedParticipants] = useState<ParticipantDropdownOption[]>(
105+
[],
106+
);
107+
const knownParticipants = useMemo(
108+
() => unionBy(allParticipants, selectedParticipants, 'id'),
109+
[allParticipants, selectedParticipants],
110+
);
111+
const handleParticipantSelect = useCallback((option: ParticipantDropdownOption | null) => {
112+
if (option) setSelectedParticipants((prev) => unionBy(prev, [option], 'id'));
113+
}, []);
114+
98115
const {
99116
data: activitiesData,
100117
isLoading: isLoadingActivities,
@@ -438,6 +455,8 @@ export const ActivityAssignDrawer = React.memo(
438455
}, 300);
439456
} else {
440457
removeAllBanners();
458+
// Drop remembered search selections so they don't linger into the next session
459+
setSelectedParticipants([]);
441460
}
442461
}, [open, allParticipants]); // eslint-disable-line react-hooks/exhaustive-deps
443462

@@ -603,6 +622,8 @@ export const ActivityAssignDrawer = React.memo(
603622
<AssignmentsTable
604623
{...dropdownProps}
605624
allParticipants={allParticipants}
625+
knownParticipants={knownParticipants}
626+
onParticipantSelect={handleParticipantSelect}
606627
assignments={value}
607628
onChange={onChange}
608629
onAdd={() =>
@@ -645,6 +666,7 @@ export const ActivityAssignDrawer = React.memo(
645666
<ActivityReview
646667
{...dropdownProps}
647668
allParticipants={allParticipants}
669+
knownParticipants={knownParticipants}
648670
key={flow.id}
649671
isSingleActivity={flowIds.length + activityIds.length === 1}
650672
index={index}
@@ -666,6 +688,7 @@ export const ActivityAssignDrawer = React.memo(
666688
<ActivityReview
667689
{...dropdownProps}
668690
allParticipants={allParticipants}
691+
knownParticipants={knownParticipants}
669692
key={activity.id}
670693
isSingleActivity={flowIds.length + activityIds.length === 1}
671694
index={index + flowIds.length}

src/modules/Dashboard/components/ActivityAssignDrawer/ActivityReview/ActivityReview.types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Activity } from 'redux/modules';
22
import { HydratedActivityFlow } from 'modules/Dashboard/types';
3-
import { useParticipantDropdown } from 'modules/Dashboard/components';
3+
import { ParticipantDropdownOption, useParticipantDropdown } from 'modules/Dashboard/components';
44

55
import { ValidActivityAssignment } from '../ActivityAssignDrawer.types';
66

@@ -19,6 +19,8 @@ export type ActivityReviewProps = {
1919
index: number;
2020
assignments: ValidActivityAssignment[];
2121
onDelete: (activityOrFlow: Activity | HydratedActivityFlow) => void;
22+
// Forwarded to the read-only table so search-selected participants resolve
23+
knownParticipants?: ParticipantDropdownOption[];
2224
'data-testid': string;
2325
} & (ActivityReviewWithActivity | ActivityReviewWithFlow) &
2426
Omit<ReturnType<typeof useParticipantDropdown>, 'isLoading'>;

src/modules/Dashboard/components/ActivityAssignDrawer/AssignmentsTable/AssignmentsTable.tsx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import { getHeadCells } from './AssignmentsTable.utils';
1919

2020
export const AssignmentsTable = ({
2121
allParticipants,
22+
knownParticipants,
23+
onParticipantSelect,
2224
participantsOnly,
2325
fullAccountParticipantsAndTeamMembers,
2426
teamMembersOnly,
@@ -34,20 +36,28 @@ export const AssignmentsTable = ({
3436
const {
3537
featureFlags: { enableParticipantMultiInformant },
3638
} = useFeatureFlags();
39+
// Resolve selected ids from the wider list when provided, falling back to the snapshot
40+
const resolveParticipants = knownParticipants ?? allParticipants;
3741
const lastAssignment = assignments[assignments.length - 1];
3842
const showAddButton =
3943
!isReadOnly && lastAssignment?.respondentSubjectId && lastAssignment?.targetSubjectId;
4044

4145
const handleChange = useCallback(
42-
({ respondentSubjectId, targetSubjectId }: ActivityAssignment, index: number) => {
46+
(
47+
{ respondentSubjectId, targetSubjectId }: ActivityAssignment,
48+
index: number,
49+
respondentOption?: ParticipantDropdownOption | null,
50+
) => {
4351
const updatedAssignments = [...assignments];
4452

4553
if (respondentSubjectId !== undefined || targetSubjectId !== undefined) {
4654
if (respondentSubjectId !== undefined) {
4755
// Set as self-assigned if newly selected respondent is a full account, and either:
4856
// - no target subject has been selected yet, or
4957
// - current assignment is a self-assignment (to preserve "Self" in the right column)
50-
const respondent = allParticipants.find(({ id }) => id === respondentSubjectId);
58+
// Prefer the just-picked option since it may not be in the resolve list yet
59+
const respondent =
60+
respondentOption ?? resolveParticipants.find(({ id }) => id === respondentSubjectId);
5161
if (respondent?.userId && !respondent.isTeamMember) {
5262
if (
5363
!assignments[index].targetSubjectId ||
@@ -65,7 +75,7 @@ export const AssignmentsTable = ({
6575
onChange?.(updatedAssignments);
6676
}
6777
},
68-
[allParticipants, assignments, onChange],
78+
[resolveParticipants, assignments, onChange],
6979
);
7080

7181
const handleAdd = useCallback(() => {
@@ -105,11 +115,13 @@ export const AssignmentsTable = ({
105115
const rows: DashboardTableProps['rows'] = useMemo(
106116
() =>
107117
assignments.map(({ respondentSubjectId, targetSubjectId }, index) => {
118+
// Resolve from the wider list so search-selected participants still render
108119
const respondent =
109-
(respondentSubjectId && allParticipants.find(({ id }) => id === respondentSubjectId)) ||
120+
(respondentSubjectId &&
121+
resolveParticipants.find(({ id }) => id === respondentSubjectId)) ||
110122
null;
111123
const subject =
112-
(targetSubjectId && allParticipants.find(({ id }) => id === targetSubjectId)) || null;
124+
(targetSubjectId && resolveParticipants.find(({ id }) => id === targetSubjectId)) || null;
113125

114126
const selfOption: ParticipantDropdownOption | null =
115127
respondent && !respondent.isTeamMember
@@ -143,9 +155,10 @@ export const AssignmentsTable = ({
143155
? fullAccountParticipantsAndTeamMembers
144156
: teamMembersOnly
145157
}
146-
onChange={(value) =>
147-
handleChange({ respondentSubjectId: value && value.id }, index)
148-
}
158+
onChange={(value) => {
159+
onParticipantSelect?.(value);
160+
handleChange({ respondentSubjectId: value && value.id }, index, value);
161+
}}
149162
handleSearch={handleRespondentSearch}
150163
showGroups
151164
emptyValueError={subjectValue && !subject?.userId ? t('addRespondent') : undefined}
@@ -163,7 +176,10 @@ export const AssignmentsTable = ({
163176
isReadOnly={isReadOnly}
164177
value={subjectValue}
165178
options={subjectOptions}
166-
onChange={(value) => handleChange({ targetSubjectId: value && value.id }, index)}
179+
onChange={(value) => {
180+
onParticipantSelect?.(value);
181+
handleChange({ targetSubjectId: value && value.id }, index);
182+
}}
167183
handleSearch={(query) => handleSubjectSearch(query, selfOption)}
168184
groupBy={(option) => (option.id === selfOption?.id ? 'self' : 'other')}
169185
renderGroup={(params) => (
@@ -186,7 +202,8 @@ export const AssignmentsTable = ({
186202
};
187203
}),
188204
[
189-
allParticipants,
205+
resolveParticipants,
206+
onParticipantSelect,
190207
assignments,
191208
dataTestId,
192209
enableParticipantMultiInformant,

src/modules/Dashboard/components/ActivityAssignDrawer/AssignmentsTable/AssignmentsTable.types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export type AssignmentsTableProps = Omit<ReturnType<typeof useParticipantDropdow
1515
errors?: {
1616
duplicateRows?: `${string}_${string}`[];
1717
};
18+
// Superset of allParticipants used to resolve selected ids (e.g. ones found via search)
19+
knownParticipants?: ParticipantDropdownOption[];
20+
// Reports each picked option so the parent can remember participants not in the snapshot
21+
onParticipantSelect?: (option: ParticipantDropdownOption | null) => void;
1822
'data-testid': string;
1923
};
2024

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const CMI_LINK = 'https://childmind.org';
2-
export const PRIVACY_LINK = 'https://mindlogger.org/privacy-policy';
3-
export const TERMS_LINK = 'https://mindlogger.org/terms';
4-
export const ABOUT_LINK = 'https://mindlogger.org';
2+
export const PRIVACY_LINK = 'https://www.gettingcurious.com/privacy-policy';
3+
export const TERMS_LINK = 'https://www.gettingcurious.com/terms';
4+
export const ABOUT_LINK = 'https://www.gettingcurious.com';
55
export const CREDITS_LINK = 'https://www.gettingcurious.com/open-source-credits';
6-
export const SUPPORT_LINK = 'https://help.mindlogger.org';
6+
export const SUPPORT_LINK = 'https://help.gettingcurious.com';

0 commit comments

Comments
 (0)