Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a8fa284
Ratings history graph fixes
jmgasper May 13, 2026
3d40e28
UI issue when Opportunity Name is too long
May 13, 2026
7fdadfa
UI issue when Opportunity Name is too long
May 13, 2026
7521ea0
Copilot App: Updated Text editor for Project Overview
May 13, 2026
6934650
Copilot App: Updated Text editor for Project Overview
May 13, 2026
4268b42
UI issue when Opportunity Name is too long
Harshitchudasama May 14, 2026
d4c4b88
Merge pull request #1838 from topcoder-platform/PM-4816
Harshitchudasama May 14, 2026
8ee9d30
PM-5065 - Add a new Budget Approvals tab in Work Manager
vas3a May 14, 2026
778169b
PM-5055 - Budget Approve/Reject button should not be displayed for TM…
vas3a May 14, 2026
2b95d0a
PM-5070 - Do not display get approval message for Approvers
vas3a May 14, 2026
a8f39d2
Copilot App : Updated Text editor for Project Overview
May 14, 2026
f70d5a5
PM-5062 - Budget Approve/Reject button should not be displayed for Co…
vas3a May 14, 2026
42c6bd4
Copilot App : Updated Text editor for Project Overview
May 14, 2026
69c9453
Merge pull request #1839 from topcoder-platform/PM-4818
Harshitchudasama May 14, 2026
29d8f91
Merge pull request #1840 from topcoder-platform/PM-5065_challenges-ap…
vas3a May 14, 2026
0032330
PM-5015 - re-enable ai-only review mode
vas3a May 14, 2026
5074b99
Merge pull request #1841 from topcoder-platform/PM-5015_re-enable-ai-…
vas3a May 14, 2026
38616b3
PM-5071 Enhance SFDC views
himaniraghav3 May 14, 2026
2364d89
PM-5065 - Paginate the list for budget approvals
vas3a May 14, 2026
a2af777
Review app css
himaniraghav3 May 14, 2026
eb0d1ce
Merge pull request #1843 from topcoder-platform/PM-5065_paginate-appr…
vas3a May 14, 2026
c842f5c
Updated Text Editor for Copilot Opportunity Overview
May 14, 2026
f0ed991
PM-5065 - fix budget approval list filtering by project
vas3a May 14, 2026
45c8399
lint
vas3a May 14, 2026
1be5d67
Merge pull request #1845 from topcoder-platform/PM-5065_paginate-appr…
vas3a May 14, 2026
7e808d7
Merge pull request #1844 from topcoder-platform/PM-4818
Harshitchudasama May 15, 2026
6292aa2
remove filter
vas3a May 15, 2026
d6dc6f3
Merge pull request #1846 from topcoder-platform/PM-5065_paginate-appr…
vas3a May 15, 2026
86011f6
Do not approval challenges filter by memberid
vas3a May 15, 2026
d2f1c2b
Merge pull request #1847 from topcoder-platform/PM-5065_paginate-appr…
vas3a May 15, 2026
afeb522
Add categories filter
himaniraghav3 May 15, 2026
2e4d31c
PM-5043: Use consumed challenge member subtotals
jmgasper May 18, 2026
565581c
PM-5060: Add Topgear submission reprocess action
jmgasper May 18, 2026
ad9522e
Updated Copilot Text Editor
May 18, 2026
e8b0ff4
fix linting
himaniraghav3 May 18, 2026
e409cf4
PM-5059: Highlight Topgear active review issues
jmgasper May 18, 2026
c19a446
Merge pull request #1850 from topcoder-platform/PM-4818
Harshitchudasama May 18, 2026
be2fa92
Merge pull request #1842 from topcoder-platform/PM-5071
himaniraghav3 May 18, 2026
03b9b92
Change tab name to SFDC
himaniraghav3 May 18, 2026
d89f2ce
Merge pull request #1852 from topcoder-platform/PM-5071
himaniraghav3 May 18, 2026
6f1281b
PM-5065 - restrict access for TM/PM
vas3a May 18, 2026
9a89312
Merge pull request #1853 from topcoder-platform/PM-5065_paginate-appr…
vas3a May 18, 2026
9a6d904
Updated Copilot Text Editor
May 18, 2026
28b6a81
Revert "Add categories filter"
himaniraghav3 May 18, 2026
0bcc830
Add reports code
himaniraghav3 May 18, 2026
f3766d1
Merge pull request #1855 from topcoder-platform/revert-wallet-admin-c…
himaniraghav3 May 18, 2026
58675d4
Merge pull request #1851 from topcoder-platform/PM-5059
jmgasper May 19, 2026
9e181d4
Merge pull request #1849 from topcoder-platform/PM-5060
jmgasper May 19, 2026
7a30f85
Merge pull request #1848 from topcoder-platform/PM-5043-1
jmgasper May 19, 2026
7c65b30
Merge pull request #1854 from topcoder-platform/PM-4818
himaniraghav3 May 19, 2026
b8eb623
Updated Copilot Text Editor
May 19, 2026
0dc9903
Update Copilot Editor
May 19, 2026
f453e6f
Merge pull request #1856 from topcoder-platform/PM-4818
Harshitchudasama May 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface Props<T> {
readonly columns: ReadonlyArray<MobileTableColumn<T>[]>
readonly data: ReadonlyArray<T>
className?: string
readonly rowClassName?: (data: T) => string | undefined
}

function getKey(key: (string | number)[]): string {
Expand All @@ -33,10 +34,13 @@ export const TableMobile: <T extends { [propertyName: string]: any }>(
{props.columns.map((itemColumns, indexColumns) => (
<tr
key={getKey([indexData, indexColumns])}
className={classNames({
[styles.isEvenRow]: indexData % 2 === 1,
[styles.isOddRow]: indexData % 2 === 0,
})}
className={classNames(
props.rowClassName?.(itemData),
{
[styles.isEvenRow]: indexData % 2 === 1,
[styles.isOddRow]: indexData % 2 === 0,
},
)}
>
{itemColumns.map(
(itemItemColumns, indexItemColumns) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
margin-top: $sp-2;
padding: $sp-6 0;
color: $teal-100;
text-align: left;
word-break: break-word;
line-height: 1.2;

}

@media (max-width: 767px) {
.header {
line-height: 48px;
font-size: 32px;
line-height: 38px;

}
}

Expand Down Expand Up @@ -89,4 +95,5 @@

.textCaps {
text-transform: capitalize;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const OpportunityDetails: FC<{
</div>
<h2 className={styles.subHeading}> Description </h2>
{props.opportunity?.overview && (
<div dangerouslySetInnerHTML={{
__html: props.opportunity.overview.replace(/\n/g, '<br />'),
}}
<div
className={styles.overviewContent}
dangerouslySetInnerHTML={{ __html: props.opportunity.overview }}
/>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,68 @@
border-radius: 10px;
white-space: nowrap;
font-size: 14px;
}

.overviewContent {
font-size: 14px;
line-height: 22px;
font-family: 'Roboto', Arial, Helvetica, sans-serif;

p {
margin: 0 0 8px 0;
}

strong, b {
font-weight: 700;
}

em, i {
font-style: italic;
}

u {
text-decoration: underline;
}

s {
text-decoration: line-through;
}

a {
color: #0d61bf;
text-decoration: underline;

&:hover {
text-decoration: none;
}
}

ul, ol {
margin: 0 0 8px 0;
padding-left: 24px;
}

ul {
list-style-type: disc;
}

ol {
list-style-type: decimal;
}

table {
border-collapse: collapse;
width: 100%;
margin: 0 0 8px 0;

td, th {
border: 1px solid #d4d4d4;
padding: 8px 12px;
}

th {
background-color: #f5f5f5;
font-weight: 700;
}
}
}
58 changes: 47 additions & 11 deletions src/apps/copilots/src/pages/copilot-request-form/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { FC, useContext, useEffect, useMemo, useState } from 'react'
import { FC, useContext, useEffect, useMemo, useRef, useState } from 'react'
import { bind, debounce, isEmpty, pick } from 'lodash'
import { mutate } from 'swr'
import { toast } from 'react-toastify'
import { Params, useNavigate, useParams, useSearchParams } from 'react-router-dom'
import classNames from 'classnames'

import { EnvironmentConfig } from '~/config'
import { profileContext, ProfileContextData } from '~/libs/core'
import { Button, IconSolid, InputDatePicker, InputMultiselectOption,
InputRadio, InputSelect, InputSelectReact, InputText, InputTextarea } from '~/libs/ui'
import { extractSkillsFromText, InputSkillSelector } from '~/libs/shared'
InputRadio, InputSelect, InputSelectReact, InputText } from '~/libs/ui'
import { extractSkillsFromText, FieldHtmlEditor, InputSkillSelector } from '~/libs/shared'

import { getProject, getProjects, ProjectsResponse, useProjects } from '../../services/projects'
import { ProjectTypes, ProjectTypeValues } from '../../constants'
Expand Down Expand Up @@ -35,12 +37,13 @@ const editableFields = [
'tzRestrictions',
'numHoursPerWeek',
]

// eslint-disable-next-line
const CopilotRequestForm: FC<{}> = () => {
const { profile }: ProfileContextData = useContext(profileContext)
const navigate = useNavigate()
const routeParams: Params<string> = useParams()
const requestUrl = routeParams.requestId
? `${EnvironmentConfig.API.V6}/projects/copilots/requests/${routeParams.requestId}` : undefined
const [params] = useSearchParams()

const [formValues, setFormValues] = useState<any>({})
Expand Down Expand Up @@ -194,6 +197,18 @@ const CopilotRequestForm: FC<{}> = () => {
setIsFormChanged(true)
}

const overviewInitialized = useRef<boolean>(false)
function handleOverviewChange(content: string): void {
overviewInitialized.current = true
setFormValues((prev: any) => ({ ...prev, overview: content }))
setFormErrors((prev: any) => {
const updated = { ...prev }
delete updated.overview
return updated
})
setIsFormChanged(true)
}

function handleSkillsChange(ev: any): void {
const options = (ev.target.value as unknown) as InputMultiselectOption[]
const updatedSkills = options.map(v => ({
Expand Down Expand Up @@ -265,8 +280,15 @@ const CopilotRequestForm: FC<{}> = () => {
}

// Check if overview has enough content for AI processing
function stripHtml(html: string): string {
const doc = new DOMParser()
.parseFromString(html, 'text/html')
return doc.body.textContent || ''
}

const canGenerateSkills = useMemo(() => {
const overview = formValues.overview?.trim() || ''
const overview = stripHtml(formValues.overview || '')
.trim()
return overview.length >= MIN_OVERVIEW_LENGTH && !isGeneratingSkills
}, [formValues.overview, isGeneratingSkills])

Expand All @@ -289,7 +311,8 @@ const CopilotRequestForm: FC<{}> = () => {
{ condition: !formValues.paymentType, key: 'paymentType', message: 'Selection is required' },
{ condition: !formValues.projectType, key: 'projectType', message: 'Selecting project type is required' },
{
condition: !formValues.overview || formValues.overview.trim().length < 10,
condition: stripHtml(formValues.overview || '')
.trim().length < 10,
key: 'overview',
message: 'Project overview must be at least 10 characters',
},
Expand Down Expand Up @@ -365,6 +388,10 @@ const CopilotRequestForm: FC<{}> = () => {
copilotRequestData ? 'Copilot request updated successfully'
: 'Copilot request sent successfully',
)
if (requestUrl) {
mutate(requestUrl)
}

setFormValues({
complexity: '',
numHoursPerWeek: '',
Expand All @@ -381,6 +408,7 @@ const CopilotRequestForm: FC<{}> = () => {
setIsFormChanged(false)
setFormErrors({})
setPaymentType('')
overviewInitialized.current = false
// Added a small timeout for the toast to be visible properly to the users
setTimeout(() => {
navigate(`${rootRoute}/requests`)
Expand All @@ -404,7 +432,13 @@ const CopilotRequestForm: FC<{}> = () => {
handleProjectSearch(inputValue)
.then(callback)
}, 300), [])

const editorKey = useMemo(
() => (copilotRequestData?.id ?? 'new'),
[copilotRequestData?.id],
)
useEffect(() => {
overviewInitialized.current = false
}, [copilotRequestData])
return (
<div className={classNames('d-flex flex-column justify-content-center align-items-center', styles.container)}>
<div className={styles.form}>
Expand Down Expand Up @@ -529,13 +563,14 @@ const CopilotRequestForm: FC<{}> = () => {
<p className={styles.formRow}>
Please provide an overview of the project the copilot will undertake
</p>
<InputTextarea
<FieldHtmlEditor
key={editorKey}
label='Project overview'
name='overview'
placeholder='A minimum of three sentences explaining the
type of work and project which is to be undertaken.'
value={formValues.overview}
onChange={bind(handleFormValueChange, this, 'overview')}
value={overviewInitialized.current ? undefined : formValues.overview}
onChange={handleOverviewChange}
error={formErrors.overview}
dirty
/>
Expand All @@ -555,7 +590,8 @@ const CopilotRequestForm: FC<{}> = () => {
</div>
{!canGenerateSkills
&& formValues.overview
&& formValues.overview.trim().length < MIN_OVERVIEW_LENGTH
&& stripHtml(formValues.overview)
.trim().length < MIN_OVERVIEW_LENGTH
&& (
<p className={styles.helperText}>
Add at least
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,20 @@ $gradient: linear-gradient(
color: black;
}
}
.richTextWrapper {
border: 1px solid #aaaaaa;
border-radius: 0.375rem;
overflow: hidden;
margin-bottom: 0.5rem;

&:focus-within {
border-color: #137D60;
}
}

.richTextError {
border: 2px solid $red-100;
border-radius: 0.375rem;
overflow: hidden;
margin-bottom: 0.5rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ const CopilotRequestModal: FC<CopilotRequestModalProps> = props => {
</div>
<div className={styles.detailsLine}>
<div>Overview</div>
<div>{props.request.overview}</div>
<div
className={styles.overviewContent}
dangerouslySetInnerHTML={{ __html: props.request.overview ?? '' }}
/>
</div>
<div className={styles.detailsLine}>
<div>Skills</div>
Expand Down
Loading
Loading