Skip to content

PM-5866 - allow user to manually create review context - #2133

Merged
vas3a merged 1 commit into
devfrom
PM-5866_manual-creation-review-context
Aug 12, 2026
Merged

PM-5866 - allow user to manually create review context#2133
vas3a merged 1 commit into
devfrom
PM-5866_manual-creation-review-context

Conversation

@vas3a

@vas3a vas3a commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-5866

What's in this PR?

Manual Review Context Form - no AI

@vas3a
vas3a requested a lite review from Copilot and removed request for jmgasper and kkartunov August 12, 2026 07:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a manual (non-AI) path to create a challenge review context from the Challenge Editor, enabling users to start editing requirements even when no generated context exists.

Changes:

  • Introduces a “Manage Review Context” action that creates an empty review context (requirements: []) with HUMAN_APPROVED status and refetches.
  • Updates the empty-state UI to show both “Generate…” and “Manage…” actions side-by-side.
  • Adds basic test coverage for the new button and styles for the new action layout.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ReviewersField/ReviewContextTab/ReviewContextTab.tsx Adds manual context creation handler and new “Manage Review Context” button in the empty state UI.
src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ReviewersField/ReviewContextTab/ReviewContextTab.spec.tsx Adds a test related to the new Manage button (currently only asserts render).
src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ReviewersField/ReviewContextTab/ReviewContextTab.module.scss Adds layout styles for the two empty-state action buttons.
Suppressed comments (1)

src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ReviewersField/ReviewContextTab/ReviewContextTab.tsx:219

  • The error UI is shared between Generate and Manage actions, but the Retry button always calls handleGenerateClick. If the Manage flow fails, clicking Retry will trigger AI generation instead of retrying manual creation.
                            {saveError && (
                                <div className={styles.errorText}>
                                    <p>{saveError}</p>
                                    <Button
                                        label='Retry'
                                        onClick={handleGenerateClick}
                                        secondary
                                        size='sm'
                                    />

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +203 to +209
<Button
disabled={isSaving || blockGenerate}
label='Manage Review Context'
onClick={handleManageClick}
secondary
size='lg'
/>
Comment on lines +197 to +202
<Button
disabled={isSaving || blockGenerate}
label={isSaving ? 'Generating context...' : 'Generate Challenge Review Context'}
onClick={handleGenerateClick}
size='lg'
/>
Comment on lines +152 to +171
it('renders the manual manage button when no context exists', () => {
mockUseFetchChallengeReviewContext.mockReturnValue({
context: undefined,
error: undefined,
isError: false,
isLoading: false,
mutate: jest.fn(),
})

render(
<ReviewContextTab
challengeId='challenge-1'
challengeDescription={'A'.repeat(120)}
challengeStatus={undefined}
/>,
)

expect(screen.getByRole('button', { name: 'Manage Review Context' }))
.toBeInTheDocument()
})
@vas3a
vas3a merged commit b9721e5 into dev Aug 12, 2026
7 of 8 checks passed
@vas3a
vas3a deleted the PM-5866_manual-creation-review-context branch August 12, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants