Repository navigation
Description
Context
The three auto-assignment options are configurable through the API, the CLI and MCP, and the worker acts on them. They are not yet reachable from the Web UI, which is where most operators configure repositories.
They belong in RepositorySettingsBar's Automation section, beside AutoCiFollowupControl, CancelCiDuringFollowupControl and RepositoryAutoResolveConflictsControl - the same kind of per-repository, off-by-default automation opt-ins.
The page has an established pattern this must follow. useRepositoryManagement holds the repository list, auto-saves every change through updateRepoConfig with a save-status flow, and repositoryVisualPreview.ts holds the pure state helpers that apply a repository-wide change to every branch entry. A control that edited one entry would produce exactly the per-branch divergence the server-side preservation chain exists to prevent.
One UI detail needs care: the default assignee is a free-text login, and a typo produces a 400. Committing on blur with a local validity check, following CancelCiDuringFollowupControl's textarea handling, keeps a half-typed login from being saved on every keystroke.
Requirements
- Add
propr-ui/src/components/RepositoryAutoAssignControl.tsxrendering:- A toggle for "Assign the pull request when ProPR finishes".
- When on, a login input for the default assignee with an explicit empty state meaning "the issue author", committed on blur or Enter.
- When on, a toggle for "Also request a review from the assignee".
- Add pure state helpers in
propr-ui/src/hooks/repositoryVisualPreview.ts:toggleRepositoryAutoAssign,updateRepositoryAutoAssignTarget,toggleRepositoryAutoAssignReview, and a resolverresolveRepositoryAutoAssign- each applying to every branch entry of the repository. - Include the resolved values in
buildRepositoriesForDisplay, so the bar renders the repository-wide state rather than one entry's. - Wire handlers through
useRepositoryManagement, permission-gated oninstance.manage_settingslike every other repository edit, and auto-saved with the same status flow. - Add the three fields to
ManagedRepoand toMonitoredRepoinpropr-ui/src/api/proprTypes.ts. - Render the control in the Automation section, after the auto-resolve control.
- Hide the login input and the review toggle while assignment is off, so the panel does not show configuration that has no effect.
- Respect
isReadOnly(demo mode and non-admin users) by disabling every input. - Playwright coverage of the toggle, the login commit-on-blur, the validation error, the review toggle, the shared-across-branch-entries behaviour, read-only mode and no overflow at 320px.
Implementation Specification
Files added
propr-ui/src/components/RepositoryAutoAssignControl.tsx
Files modified
propr-ui/src/hooks/repositoryVisualPreview.ts- the pure helpers and the resolver.propr-ui/src/hooks/useRepositoryManagement.ts- the handlers and the result type.propr-ui/src/components/RepositorySettingsBar.tsx- render the control.propr-ui/src/api/proprTypes.ts- theMonitoredRepofields.propr-ui/src/pages/RepositoriesPage.tsx- pass the new handlers through.propr-ui/e2e/repositories-settings.pw.ts- extend the existing spec.
Step-by-step
- Add the fields to
MonitoredRepoandManagedRepo. - Write the pure helpers following
toggleRepositoryNotificationsandupdateRepositoryNonBlockingChecksexactly, including the repository-key matching. - Add the resolved values to
buildRepositoriesForDisplay. - Add the handlers to
useRepositoryManagement, each gated oncanManageRepositoriesand followed byperformAutoSave. - Write the control, mirroring
CancelCiDuringFollowupControl's structure: a labelled toggle, an indented detail block when on, local input state committed on blur. - Render it in the Automation section and thread the handlers through the page.
- Extend the Playwright spec.
Acceptance Criteria
npm run typecheckandnpm run lintpass forpropr-ui.- The Automation section shows the assignment toggle; it is off for a repository that has never configured it.
- Turning it on saves immediately and reveals the login input and the review toggle.
- Entering a login and blurring saves it; the input is not saved on every keystroke.
- Clearing the login saves null and the helper text states that the issue author is used.
- An invalid login shows an inline message, is not saved, and the panel reports no false success.
- The review toggle saves independently of the assignment toggle.
- Turning assignment off hides the login input and the review toggle but does not clear their stored values.
- A repository with several monitored branches shows one shared state, and a change applies to all of its entries in the saved payload.
- In read-only mode every input is disabled and no write is attempted.
- No horizontal overflow at 320px or 390px.
Created by ProPR AI Planner
Activity
propr-dev commentedon Oct 8, 2026
Suggested Implementation:
Implementation Approach
This follows an established pattern rather than inventing one.
RepositorySettingsBaralready holds three per-repository automation opt-ins, andCancelCiDuringFollowupControlis the closest match: a toggle that reveals an operator-supplied payload when enabled, with the payload committed on blur. Auto-assignment is the same shape with a login instead of a workflow list.Three decisions are worth stating.
Repository-wide state, not per entry. A repository can have several
RepoToMonitorentries, one per monitored base branch.repositoryVisualPreview.tsexists precisely to apply a repository-wide change to all of them, andbuildRepositoriesForDisplayexists to collapse them back into one consistent view. Editing a single entry would show an inconsistent toggle depending on which branch row was selected, and would produce the per-branch divergence the server'spreserveRepoAutoAssignis there to prevent. Using the existing helpers means the UI and the server agree about what repository-wide means.Commit on blur, not on change. The login is free text. Saving per keystroke would post
o,oc,oct… and each one is a repository write that the API would reject as an invalid login, producing a stream of error toasts while someone types a valid name.CancelCiDuringFollowupControlalready solved this for its workflow textarea; the same approach applies. Local state also means a re-render from the repository poll cannot wipe what is half-typed, which that control's comments call out explicitly.Hide, do not clear. When assignment is turned off, the login and review toggle are hidden but their stored values are untouched. The alternative - clearing them - means an operator who toggles the feature off to pause it loses the configuration and has to re-enter it. Hiding costs nothing and the server already treats the fields as independent.
The empty login state needs its own sentence in the helper text. An empty field could reasonably mean "nobody", and the actual behaviour is "the issue author", which is not inferable from a blank input.
File:
propr-ui/src/api/proprTypes.tsWhy this file:
MonitoredRepois the shape the repositories page reads from the API. Without these fields the control would have nothing typed to render from.File:
propr-ui/src/hooks/repositoryVisualPreview.tsWhy this file: this module holds the pure state helpers that keep every branch entry of a repository in step, and
buildRepositoriesForDisplayis what collapses them into the single view the settings bar renders. Adding the helpers here is what makes the UI agree with the server's repository-wide semantics instead of editing one entry.@@ in buildRepositoriesForDisplay's returned object notificationsEnabled: resolveRepositoryNotificationsEnabled(repos, getRepositoryConfigKey(repo.name)), autoResolveMergeConflicts: resolveRepositoryAutoResolveMergeConflicts(repos, getRepositoryConfigKey(repo.name)), + // Resolved here so the settings bar renders one consistent state no matter + // which branch entry happens to back the selected row. + autoAssignPullRequests: resolveRepositoryAutoAssign(repos, getRepositoryConfigKey(repo.name)).enabled, + autoAssignDefaultAssignee: resolveRepositoryAutoAssign(repos, getRepositoryConfigKey(repo.name)).defaultAssignee, + autoAssignRequestReview: resolveRepositoryAutoAssign(repos, getRepositoryConfigKey(repo.name)).requestReview, visualPreview: visualPreviewByRepository.get(getRepositoryConfigKey(repo.name)) || defaultVisualPreview()File:
propr-ui/src/hooks/useRepositoryManagement.tsWhy this file: every repository edit goes through this hook so it inherits one permission gate, one auto-save flow and one committed-write recovery path. A control that called
updateRepoConfigdirectly would bypass all three.Parse the three fields when loading the repository list, so an absent value becomes an explicit default once rather than at each render:
@@ in loadRepos, building each parsed repo const notificationsEnabled = repoObj.notificationsEnabled !== false; + // Absent reads as off / "use the issue author", resolved here so + // no component has to re-decide what a missing field means. + const autoAssignPullRequests = repoObj.autoAssignPullRequests === true; + const autoAssignDefaultAssignee = typeof repoObj.autoAssignDefaultAssignee === 'string' && repoObj.autoAssignDefaultAssignee.trim() + ? repoObj.autoAssignDefaultAssignee.trim() + : null; + const autoAssignRequestReview = repoObj.autoAssignRequestReview === true;@@ in the returned object handleUpdateAutoResolveMergeConflicts, handleUpdateVisualPreview, + handleToggleAutoAssign, handleUpdateAutoAssignTarget, handleToggleAutoAssignReview,File:
propr-ui/src/components/RepositoryAutoAssignControl.tsx(new file)Why this file: a self-contained control, matching how the other automation options are structured. It owns the local input state for the login, which is what keeps a repository poll from wiping a half-typed name - the problem
CancelCiDuringFollowupControldocuments for its own textarea.File:
propr-ui/src/components/RepositorySettingsBar.tsxWhy this file: the Automation section is where the comparable opt-ins live, so placing it elsewhere would separate it from the options an operator reviews together. It goes after the auto-resolve control, keeping the section ordered from most to least commonly changed.
File:
propr-ui/src/pages/RepositoriesPage.tsxWhy this file: the page is what connects the hook's handlers to the settings bar's props, so the three handlers have to be threaded through here to reach the control.
File:
propr-ui/e2e/repositories-settings.pw.tsWhy this file: the existing spec already mocks the repository API and records writes, which is exactly what the shared-across-branch-entries assertion needs - it has to inspect the saved payload, not just the rendered toggle. Extending it reuses that fixture instead of building a second one.
propr-dev commentedon Oct 9, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-52900/claude-opus-5-5-add-the-repository-settin-20261009-1328-nda2888-epic-task-assignment-1m4issue-2900-20261009-1328-claude-opus-5-5-nda🔍 Track Task Execution
feat(ai): I've fixed all eight items. Typecheck and lint pass with no…