Skip to content

[3604 by Claude Opus 5.5] Automations: inline validation, readable schedule and trigger, consistent names, shorter hints - #3628

Merged
integry merged 3 commits into
3602-epic-0-9-o23from
3604/claude-opus-5-5-automations-inline-valida-20261117-0128-sz4
Nov 17, 2026
Merged

integry merged 3 commits into
3602-epic-0-9-o23from
3604/claude-opus-5-5-automations-inline-valida-20261117-0128-sz4

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3604

Branch: 3604/claude-opus-5-5-automations-inline-valida-20261117-0128-sz4
Commits: ✅ Changes committed (8ac27ce)


AI Processing Completed

Execution Details:

Summary:
I've implemented all 14 points in #3604, and the tests pass: the full UI unit suite (3,302 tests), lint and typecheck. In the browser, the new form test passes at 1440 and 390px, and so do the existing automations, New task, run history, native-chrome and goals specs I touched.

Form

  1. Validation: errors now appear under the field in words: "Enter a name.", "Enter a prompt.", "Enter a schedule with five parts, e.g. 0 9 * * 1-5.", "Run at most every 15 minutes.", and "The minute must be from 0 to 59." for a bad value. A failed submit scrolls to the first invalid field and focuses it. The red banner now only shows errors the form doesn't check itself, such as save failures.
  2. Coding agent select: it's now as wide as the other fields (new fullWidth option on AgentModelSelector).
  3. Capabilities: the raw-id chips are gone and the checkboxes sit on one vertical line. The repository and reason checkboxes are now single-column lists.
  4. Merge while Report only: "Merge pull requests" is disabled with "Not available with Report only: there is no action step to merge in." It is also dropped from what gets saved. The form keeps the tick, so switching to Preview or Auto brings it back.
  5. Templates: they show once — the empty state hides its copy while the New automation pane is open — as a single-column list of rows.
  6. Unsaved input: Escape, Close, Back to list, clicking another automation and applying a template over typed text now ask first, in the app's dialog. New task uses the same dialog instead of window.confirm. Moving between an automation's Settings and Runs tabs doesn't ask.
  7. Hints: shortened to the wording in the issue. The pause hint reads the threshold from automation_unproductive_run_threshold.
  8. Terms: "action step" and "Report only" are now used everywhere.
  9. Blocker reasons: the event trigger uses the Planner's labels from planQueueLabels.ts.

List, runs and elsewhere
10. Schedules in words: e.g. "Every 3 hours", "Weekdays 07:00 UTC", "Mon, Wed, Fri 09:00 UTC", with the cron in a tooltip. The run page says "Scheduled · every day 09:00 UTC".
11. Hover hint: removed; touching a row loads its preview.
12. "Automation" everywhere: the dashboard now labels these runs "Automation". The API's 404 now says "Automation not found" (REST and MCP).
13. Header button: reads "New task", "New plan", "New goal", "New automation". "New To-do" is unchanged.
14. Report task page:
- The duplicate "Preparing Analysis" came from the run's "extensions resolved" event. Live task history for one of your automation runs showed it is stored with the "processing" state. The timeline now hides it when no extensions were applied, and otherwise labels it "Extensions Applied".
- The task page no longer requests assignees for automation-run tasks, so the 409 is gone.
- The empty-log message is now specific to automation reports.

Things to know before merging

  • The threshold setting can only be read by people who manage settings. Everyone else sees the default (3), which is the value the server also falls back to.
  • Unsaved-input protection covers links and the pane's own controls. The header's create button and the browser's Back button still leave without asking. The app's router doesn't support blocking those without restructuring it.
  • Changing "Automation definition not found" alters a REST and MCP error string. It's a small step beyond the issue's "no API changes" note; nothing in the repo checks that text.

New tests:

  • Unit: agentFormValidation.test.ts (validation and the Report-only merge rule), agentSchedulePresentation.test.ts (schedule wording), AgentEditor.validation.test.tsx, AgentsPage.unsaved.test.tsx and useUnsavedEditorGuard.test.ts, plus new cases in the template, timeline, assignees and dashboard tests.
  • Browser: e2e/automations-form-validation.pw.ts, covering both widths with screenshots.

The preview screenshots and manifest are in place.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (38 files)
    • packages/api/mcp/toolsAutomations.ts (+1/−1)
    • packages/api/routes/automationDefinitionRoutes.ts (+5/−5)
    • propr-ui/src/components/Agents/AgentAutonomySection.tsx (+6/−5)
    • propr-ui/src/components/Agents/AgentCapabilitiesSection.tsx (+25/−15)
    • propr-ui/src/components/Agents/AgentEditor.tsx (+9/−2)
    • propr-ui/src/components/Agents/AgentEventTriggerSection.tsx (+27/−23)
    • propr-ui/src/components/Agents/AgentFormRow.tsx (+18/−2)
    • propr-ui/src/components/Agents/AgentList.tsx (+14/−8)
    • propr-ui/src/components/Agents/AgentPromptSection.tsx (+9/−2)
    • propr-ui/src/components/Agents/AgentRunApprovalPanel.tsx (+3/−3)
    • propr-ui/src/components/Agents/AgentRunDetail.tsx (+19/−12)
    • propr-ui/src/components/Agents/AgentRunHistory.tsx (+2/−1)
    • propr-ui/src/components/Agents/AgentRunNoChangeBadge.tsx (+1/−1)
    • propr-ui/src/components/Agents/AgentScheduleSection.tsx (+20/−14)
    • propr-ui/src/components/Agents/AgentSettingsForm.tsx (+43/−8)
    • propr-ui/src/components/Agents/AgentTemplates.tsx (+7/−5)
    • propr-ui/src/components/Agents/agentEditorForm.ts (+17/−1)
    • propr-ui/src/components/Agents/agentFormValidation.ts (added, +99/−0)
    • propr-ui/src/components/Agents/agentPresentation.ts (+107/−16)
    • propr-ui/src/components/Agents/agentRunPresentation.ts (+20/−2)
    • propr-ui/src/components/Agents/useAgentEditor.ts (+37/−6)
    • propr-ui/src/components/Agents/useUnproductiveRunThreshold.ts (added, +26/−0)
    • propr-ui/src/components/Agents/useUnsavedEditorGuard.tsx (added, +74/−0)
    • propr-ui/src/components/CreationDialog.tsx (+4/−0)
    • propr-ui/src/components/Dashboard/workTitle.ts (+2/−0)
    • propr-ui/src/components/Extensions/AdditionalExtensionsSelector.tsx (+1/−5)
    • propr-ui/src/components/TaskDetails/TaskStatusTable.tsx (+3/−3)
    • propr-ui/src/components/TaskDetails/index.tsx (+2/−10)
    • propr-ui/src/components/TaskDetails/taskKind.ts (+22/−0)
    • propr-ui/src/components/TaskDetails/useTaskAssignment.ts (+9/−0)
    • propr-ui/src/components/TaskPlanner/AgentModelSelector.tsx (+5/−1)
    • propr-ui/src/components/TaskPlanner/AgentModelSelectorParts.tsx (+12/−6)
    • propr-ui/src/components/creationActions.ts (+4/−4)
    • propr-ui/src/components/ui/DiscardChangesDialog.tsx (added, +24/−0)
    • propr-ui/src/components/ui/useDiscardConfirmation.tsx (added, +27/−0)
    • propr-ui/src/pages/AgentsPage.tsx (+19/−5)
    • propr-ui/src/pages/NewTaskPage.tsx (+15/−3)
    • propr-ui/src/pages/SettingsPage/AgentExtensionsGuide.tsx (+1/−1)
  • Low risk (29 files)
    • propr-ui/e2e/automation-runs-mobile.pw.ts (+2/−1)
    • propr-ui/e2e/automations-form-validation.pw.ts (added, +196/−0)
    • propr-ui/e2e/automations.pw.ts (+13/−13)
    • propr-ui/e2e/creation-confirm-native-chrome.pw.ts (+9/−6)
    • propr-ui/e2e/creation-keyboard-viewport.pw.ts (+1/−1)
    • propr-ui/e2e/dialog-keyboard-viewport.pw.ts (+1/−1)
    • propr-ui/e2e/goals-regressions.pw.ts (+1/−1)
    • propr-ui/e2e/new-task.pw.ts (+5/−5)
    • propr-ui/e2e/quick-add-todo.pw.ts (+1/−1)
    • propr-ui/src/components/Agents/AgentAutonomySection.test.tsx (+1/−1)
    • propr-ui/src/components/Agents/AgentEditor.eventTrigger.test.tsx (+2/−1)
    • propr-ui/src/components/Agents/AgentEditor.fields.test.tsx (+1/−1)
    • …and 17 more

Validation evidence

  • No repository validation commands ran.

Diff size: 67 files changed, +1,468/−268 lines

Detailed Logs:

  • Conversation: 145 messages
  • Session: 56924c9e-8197-448a-b4e6-8a125860fd46

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3604-2026-11-17T02-16-06-509Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3604-2026-11-17T02-16-06-509Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: I've implemented all 14 points in #3604, and the tests pass: the full UI unit suite (3,302 tests), lint and typecheck. In the browser, the new form test passes at 1440 and 390px, and so do the existin...


This PR was created automatically by ProPR after processing issue #3604.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

Capabilities without raw ids (1440px)

Capabilities without raw ids (1440px)

Aligned switches with no id chips; Merge pull requests is disabled with a one-line reason while the automation is Report only.

Full-size original

Capabilities (390px)

Capabilities (390px)

The capability rows on a phone.

Full-size original

Inline errors (1440px)

Inline errors (1440px)

Submitting an empty New automation form: 'Enter a name.' and 'Enter a prompt.' under the fields, Name focused, no banner.

Full-size original

Inline errors (390px)

Inline errors (390px)

The same on a phone: the form scrolls to the Name field, which is focused with its error below it.

Full-size original

Schedule error in words (1440px)

Schedule error in words (1440px)

A schedule more frequent than 15 minutes reads 'Run at most every 15 minutes.'; the pause option states the threshold (4 runs) from the instance setting.

Full-size original

Schedule error in words (390px)

Schedule error in words (390px)

The schedule row on a phone.

Full-size original

Templates once, single column (1440px)

Templates once, single column (1440px)

With an empty list and the New automation pane open, templates appear only in the pane, as one column of rows; the empty state has the short description.

Full-size original

Templates (390px)

Templates (390px)

The template list on a phone.

Full-size original

… UI unit suite (3,302 tests), lint and typecheck. In the browser, the new form test passes at 1440 and 390px, and so do the existing automations, New task, run history, native-chrome and goals specs I touched.

Form
1. Validation: errors now appear under the field in words: "Enter a name.", "Enter a prompt.", "Enter a schedule with five parts, e.g. 0 9 * * 1-5.", "Run at most every 15 minutes.", and "The minute must be from 0 to 59." for a bad value. A failed submit scrolls to the first invalid field and focuses it. The red banner now only shows errors the form doesn't check itself, such as save failures.
2. Coding agent select: it's now as wide as the other fields (new `fullWidth` option on `AgentModelSelector`).
3. Capabilities: the raw-id chips are gone and the checkboxes sit on one vertical line. The repository and reason checkboxes are now single-column lists.
4. Merge while Report only: "Merge pull requests" is disabled with "Not available with Report only: there is no action step to merge in." It is also dropped from what gets saved. The form keeps the tick, so switching to Preview or Auto brings it back.
5. Templates: they show once — the empty state hides its copy while the New automation pane is open — as a single-column list of rows.
6. Unsaved input: Escape, Close, Back to list, clicking another automation and applying a template over typed text now ask first, in the app's dialog. New task uses the same dialog instead of `window.confirm`. Moving between an automation's Settings and Runs tabs doesn't ask.
7. Hints: shortened to the wording in the issue. The pause hint reads the threshold from `automation_unproductive_run_threshold`.
8. Terms: "action step" and "Report only" are now used everywhere.
9. Blocker reasons: the event trigger uses the Planner's labels from `planQueueLabels.ts`.

List, runs and elsewhere
10. Schedules in words: e.g. "Every 3 hours", "Weekdays 07:00 UTC", "Mon, Wed, Fri 09:00 UTC", with the cron in a tooltip. The run page says "Scheduled · every day 09:00 UTC".
11. Hover hint: removed; touching a row loads its preview.
12. "Automation" everywhere: the dashboard now labels these runs "Automation". The API's 404 now says "Automation not found" (REST and MCP).
13. Header button: reads "New task", "New plan", "New goal", "New automation". "New To-do" is unchanged.
14. Report task page:
    - The duplicate "Preparing Analysis" came from the run's "extensions resolved" event. Live task history for one of your automation runs showed it is stored with the "processing" state. The timeline now hides it when no extensions were applied, and otherwise labels it "Extensions Applied".
    - The task page no longer requests assignees for automation-run tasks, so the 409 is gone.
    - The empty-log message is now specific to automation reports.

Things to know before merging
- The threshold setting can only be read by people who manage settings. Everyone else sees the default (3), which is the value the server also falls back to.
- Unsaved-input protection covers links and the pane's own controls. The header's create button and the browser's Back button still leave without asking. The app's router doesn't support blocking those without restructuring it.
- Changing "Automation definition not found" alters a REST and MCP error string. It's a small step beyond the issue's "no API changes" note; nothing in the repo checks that text.

New tests:
- Unit: `agentFormValidation.test.ts` (validation and the Report-only merge rule), `agentSchedulePresentation.test.ts` (schedule wording), `AgentEditor.validation.test.tsx`, `AgentsPage.unsaved.test.tsx` and `useUnsavedEditorGuard.test.ts`, plus new cases in the template, timeline, assignees and dashboard tests.
- Browser: `e2e/automations-form-validation.pw.ts`, covering both widths with screenshots.

The preview screenshots and manifest are in place.
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=6
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 17, 2026
@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 6)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-dev[bot]

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR improves automation form clarity and adds useful validation and discard-confirmation coverage. It needs changes before merge: template application can erase unsaved-input tracking, and two new descriptions can misrepresent actual behavior.

✅ Inline validation — Field errors share the existing schedule validator, and rejected submissions focus the first invalid control.

✅ Report-only capability handling — Merge is disabled visually and removed from the submitted capabilities, with tests covering restoration when autonomy changes.

✅ Consistent blocker labels — Event-trigger options reuse the Planner’s existing labels.

This is a static review of the supplied diff and context; no commands or tests were run. Current checks show nine passed, five pending, and no failures. The change size is broadly consistent with the stated UI work.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Templates clear tracking of retained input

  • Category: correctness

  • Required behavior: Closing a new automation must ask before discarding user-entered input, including fields preserved when applying a template.

  • Evidence: propr-ui/src/components/Agents/useAgentEditor.ts, applyTemplate and hasUnsavedInput.

    1. In a new automation, the user selects repositories or a coding agent.
    2. The user applies a template. formFromTemplate(next, form) preserves those selections.
    3. setBaseline(filled) makes the entire resulting form—including those user-entered selections—the clean baseline.
    4. Without further edits, closing the pane finds hasUnsavedInput false and discards the retained selections without confirmation.

    The template-overwrite check only examines fields the template replaces; it does not preserve dirty tracking for retained fields. The new tests cover replacing a typed name and prompt, but not closing after a template preserves other user input. Verification provenance: static trace.

  • Minimum fix: Preserve dirty tracking for user-edited fields that a template retains. Add a regression covering repository or agent selection, template application, and closing without further edits.

F2: 🔴 Non-administrators see an incorrect pause threshold

  • Category: correctness

  • Required behavior: The displayed pause threshold must describe the automation’s actual configured behavior.

  • Evidence: propr-ui/src/components/Agents/useUnproductiveRunThreshold.ts, useUnproductiveRunThreshold; propr-ui/src/components/Agents/AgentScheduleSection.tsx, pause checkbox label.

    1. An instance configures a valid nondefault threshold, such as four runs.
    2. A user without instance.manage_settings opens an automation’s schedule settings.
    3. The hook skips fetching settings and returns the default of three.
    4. The checkbox promises pausing after three runs, while the server’s loadUnproductiveRunThreshold reads the configured value of four.

    The server fallback applies when configuration is invalid or unreadable by the server, not when the viewing user lacks settings permission. Thus the permission check prevents the request but does not make the displayed default accurate. Verification provenance: static trace against the supplied server configuration consumer.

  • Minimum fix: Use nonnumeric wording when the effective threshold is unavailable, or obtain the effective value through an appropriately accessible response. Test a non-administrator on an instance with a nondefault threshold.

F3: 🔴 Cron steps are described as uniform intervals

  • Category: correctness

  • Required behavior: Human-readable schedule descriptions must preserve the timing semantics of accepted cron expressions.

  • Evidence: propr-ui/src/components/Agents/agentPresentation.ts, describeHours and describeMinutes.

    1. A user saves the valid schedule 0 */5 * * *.
    2. describeHours translates it to “Every 5 hours.”
    3. Cron runs at 00:00, 05:00, 10:00, 15:00 and 20:00, then resets at midnight: the final interval is four hours.
    4. The list and scheduled-run summary consequently describe a uniform interval that the scheduler does not follow.

    The sibling minute formatter has the same issue: */22 * * * * runs at minutes 0, 22 and 44, followed by a 16-minute gap. It satisfies the 15-minute minimum yet is described as “Every 22 minutes.” Shared validation checks admissibility, not equivalence to the generated wording; existing presentation tests use steps that divide the enclosing period. Verification provenance: static trace.

  • Minimum fix: Use “Every N” only when the step divides 24 hours or 60 minutes respectively. Otherwise list the actual times or retain the cron fallback. Cover both nondividing examples.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Cover remaining navigation exits

The implementation summary acknowledges that the header creation button and browser Back bypass discard confirmation. Tracking these as a follow-up would make draft protection more predictable. These existing navigation limitations are separate from the newly introduced false-clean state in F1 and do not independently block this review.

Score

The implementation has useful focused coverage, but three localized correctness defects remain. Pending checks are not failures, and the supplied test results do not cover these cases.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 8s
  • Tokens: 97,368 (95,895 in / 1,473 out)
  • Cost: $0.91

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 F2 F3 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 55e98e5

Addressed 1 AI review comment (IDs: 6935942501)

Addressed findings F1, F2, F3

Summary of Changes

I've fixed F1, F2 and F3, and each has new tests. Every new test fails when its fix is undone and passes with it.

F1: Templates no longer mark kept input as saved (useAgentEditor.ts)

  • Applying a template now applies it to the form as the user left it, and separately to the form as it started. The starting version is what "nothing typed yet" is measured against.
  • So a repository or coding agent picked before the template still counts as unsaved, and closing the pane asks first.
  • Fields the template replaces still don't count as typed input, so applying a second template still doesn't ask.
  • New tests in AgentEditor.templates.test.tsx: pick a repository (or the coding agent), apply a template, and closing still counts as unsaved. No dialog appears when the template is applied.

F2: No wrong number for people who can't read settings (useUnproductiveRunThreshold.ts, AgentScheduleSection.tsx)

  • The threshold is now unknown when the user can't manage settings, while it loads, or if reading it fails. The pause option then reads "Pause the schedule when runs in a row keep finding nothing new".
  • If the settings load but hold no usable value, it shows 3, the same default the server uses.
  • New useUnproductiveRunThreshold.test.tsx covers a non-admin on an instance set to 4 runs (no request, no number), an admin (4), a missing value (3), a failed read (no number), and both versions of the label.

F3: Uneven cron steps no longer read as even intervals (agentPresentation.ts)

  • "Every N hours" is now used only when N divides 24, and "Every N minutes" only when N divides 60.
  • Anything else, such as 0 */5 * * * or */22 * * * *, shows its cron expression, as other unusual schedules already did.
  • I searched the code for other cron expressions with steps: only the new tests use uneven ones.
  • New tests in agentSchedulePresentation.test.ts: 0 */5, */22, 30 */7 and */45 now show their cron expression, and steps that divide (*/20, */30, */8, */12) still read as intervals.

Checks run: typecheck, lint on components/Agents, and the Agents, AgentsPage and NewTaskPage unit tests (189 passed). The browser tests automations-form-validation.pw.ts and automations.pw.ts pass (23 tests). They log in as an admin, so the "4 runs" label they check is still correct.

I captured two previews at 1440px: the pause option as seen by a member, and a list where 0 */6 reads "Every 6 hours" while 0 */5 and */22 show their cron expression.

I found nothing outside these three findings to report.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (4 files)
    • propr-ui/src/components/Agents/AgentScheduleSection.tsx (+5/−3)
    • propr-ui/src/components/Agents/agentPresentation.ts (+4/−2)
    • propr-ui/src/components/Agents/useAgentEditor.ts (+8/−5)
    • propr-ui/src/components/Agents/useUnproductiveRunThreshold.ts (+10/−5)
  • Low risk (3 files)
    • propr-ui/src/components/Agents/AgentEditor.templates.test.tsx (+29/−2)
    • propr-ui/src/components/Agents/agentSchedulePresentation.test.ts (+22/−0)
    • propr-ui/src/components/Agents/useUnproductiveRunThreshold.test.tsx (added, +70/−0)

Validation evidence

  • No repository validation commands ran.

Diff size: 7 files changed, +148/−17 lines

Visual preview

Pause option for a member (1440px)

Pause option for a member (1440px)

A user who cannot read instance settings no longer sees a number in the pause option: it reads 'Pause the schedule when runs in a row keep finding nothing new'.

Full-size original

Schedules with uneven steps (1440px)

Schedules with uneven steps (1440px)

0 */6 still reads 'Every 6 hours'; 0 */5 and */22, whose steps do not divide the day or hour, are shown as their cron expression instead of an even interval.

Full-size original


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 12m 30s
  • Tokens: 3,042,605 (3,026,890 in / 15,715 out)
  • Cost: $1.34
  • Subscription usage: Weekly +1%, Fable +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

… test fails when its fix is undone and passes with it.

I've fixed F1, F2 and F3, and each has new tests. Every new test fails when its fix is undone and passes with it.

**F1: Templates no longer mark kept input as saved** (`useAgentEditor.ts`)
- Applying a template now applies it to the form as the user left it, and separately to the form as it started. The starting version is what "nothing typed yet" is measured against.
- So a repository or coding agent picked before the template still counts as unsaved, and closing the pane asks first.
- Fields the template replaces still don't count as typed input, so applying a second template still doesn't ask.
- New tests in `AgentEditor.templates.test.tsx`: pick a repository (or the coding agent), apply a template, and closing still counts as unsaved. No dialog appears when the template is applied.

**F2: No wrong number for people who can't read settings** (`useUnproductiveRunThreshold.ts`, `AgentScheduleSection.tsx`)
- The threshold is now unknown when the user can't manage settings, while it loads, or if reading it fails. The pause option then reads "Pause the schedule when runs in a row keep finding nothing new".
- If the settings load but hold no usable value, it shows 3, the same default the server uses.
- New `useUnproductiveRunThreshold.test.tsx` covers a non-admin on an instance set to 4 runs (no request, no number), an admin (4), a missing value (3), a failed read (no number), and both versions of the label.

**F3: Uneven cron steps no longer read as even intervals** (`agentPresentation.ts`)
- "Every N hours" is now used only when N divides 24, and "Every N minutes" only when N divides 60.
- Anything else, such as `0 */5 * * *` or `*/22 * * * *`, shows its cron expression, as other unusual schedules already did.
- I searched the code for other cron expressions with steps: only the new tests use uneven ones.
- New tests in `agentSchedulePresentation.test.ts`: `0 */5`, `*/22`, `30 */7` and `*/45` now show their cron expression, and steps that divide (`*/20`, `*/30`, `*/8`, `*/12`) still read as intervals.

**Checks run:** typecheck, lint on `components/Agents`, and the Agents, AgentsPage and NewTaskPage unit tests (189 passed). The browser tests `automations-form-validation.pw.ts` and `automations.pw.ts` pass (23 tests). They log in as an admin, so the "4 runs" label they check is still correct.

I captured two previews at 1440px: the pause option as seen by a member, and a list where `0 */6` reads "Every 6 hours" while `0 */5` and `*/22` show their cron expression.

I found nothing outside these three findings to report.

PR: #3628
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR substantially improves automation form validation, terminology, layout, and discard confirmation. It needs a localized correction before merge because the new timeline filtering can hide meaningful extension-resolution diagnostics.

✅ Inline validation — Field errors have accessible descriptions, and failed submissions focus the first invalid control.

✅ Report-only capabilities — Merge is disabled with an explanation and removed from the saved payload.

✅ Schedule descriptions — Interval wording correctly avoids claiming uniform spacing when cron steps do not divide the hour or day.

Review based on static inspection of the supplied code; no commands were run. Current checks show 13 passed, none failed, and one pending.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F4: 🔴 Preserve extension omission diagnostics

  • Category: correctness

  • Required behavior: Timeline cleanup must preserve meaningful extension-resolution events rather than hide explanations of why requested extensions were unavailable.

  • Evidence: propr-ui/src/components/TaskDetails/taskKind.ts, resolvedNoExtensions; propr-ui/src/components/TaskDetails/TaskStatusTable.tsx, coalescePipelineHistory

    1. A task records an extensions.resolved event with empty servers, skills, and skipped arrays, but a populated omitted array.
    2. The supplied producer, extensionResolutionEvent, persists omitted; extensionResolutionReason explicitly treats populated omissions as a reason to report that items were skipped.
    3. The new resolvedNoExtensions predicate checks only servers, skills, and skipped, so it returns true.
    4. coalescePipelineHistory removes that event, hiding the timeline explanation for the missing extensions.

    The filter applies to task timelines generally, so this also affects ordinary tasks. The added tests cover empty resolution and applied servers, but not omission-only events. Verification provenance: static trace through the supplied producer, persistence code, and changed filter.

  • Minimum fix: Include omitted when deciding whether a resolution event is empty, and preserve events carrying meaningful resolution notes such as labelOptOut or autoApplySkipped. Add regression coverage for resolution events containing diagnostics but no applied extensions.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Cover remaining navigation exits

The documented header-button and browser-Back exits still bypass discard confirmation. A follow-up could extend protection to those paths and test them alongside link navigation. This is optional here because the supplied objective specifically enumerates the pane controls and links covered by this implementation.

Score

The implementation has substantial focused coverage and no current check failures, but the diagnostic-loss regression requires correction before merge. The remaining check is pending.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 53s
  • Tokens: 100,660 (99,654 in / 1,006 out)
  • Cost: $0.94

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F4 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 41a868f

Addressed 1 AI review comment (IDs: 6936665029)

Addressed finding F4

Summary of Changes

I fixed F4. The timeline no longer hides an extensions.resolved event that explains why requested extensions are missing. The TaskDetails unit tests pass (455), and lint and typecheck pass. I didn't run the browser specs again.

The fix (propr-ui/src/components/TaskDetails/taskKind.ts)

  • resolvedNoExtensions now hides an event only if it applied no servers or skills, and also has empty skipped and omitted lists, no labelOptOut and no autoApplySkipped. That includes the omission-only case from the finding.
  • Same mistake in the label: the timeline doesn't show the event's reason text, so its label is the only explanation. The label assumed that any event still shown had applied something. An omission-only event would now appear and say "Extensions Applied" when nothing was applied. A new extensionsEventLabel shows "Extensions Applied" only when servers or skills were actually applied, and "Extensions Not Applied" otherwise. TaskStatusTable.tsx uses it.
  • I put the label logic in taskKind.ts because TaskStatusTable.tsx would otherwise go over the 400-line lint limit.

New tests

  • taskKind.test.ts: the event stays when it has omitted items, skipped items, an opt-out label or a skipped auto-apply. It is still hidden when it is completely empty. "Applied" means servers or skills were added.
  • TaskStatusTable.test.tsx: for both timeline layouts, each of those four kinds of event shows as "Extensions Not Applied", never "Extensions Applied". A completely empty event still doesn't show.
  • With the old filter put back, 5 of these new tests fail. With the fix they all pass.

I found no other code in this PR's changes making the same mistake. I didn't create a preview image. The only visible difference is that row's label, which shows up only in this edge case, so I judged it not worth one; this was my own call, not a blocked capture.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (2 files)
    • propr-ui/src/components/TaskDetails/TaskStatusTable.tsx (+2/−2)
    • propr-ui/src/components/TaskDetails/taskKind.ts (+26/−4)
  • Low risk (2 files)
    • propr-ui/src/components/TaskDetails/TaskStatusTable.test.tsx (+28/−0)
    • propr-ui/src/components/TaskDetails/taskKind.test.ts (+25/−1)

Validation evidence

  • No repository validation commands ran.

Diff size: 4 files changed, +81/−7 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 6m 23s
  • Tokens: 650,435 (643,727 in / 6,708 out)
  • Cost: $0.52

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…olved` event that explains why requested extensions are missing. The TaskDetails unit tests pass (455), and lint and typecheck pass. I didn't run the browser specs again.

I fixed F4. The timeline no longer hides an `extensions.resolved` event that explains why requested extensions are missing. The TaskDetails unit tests pass (455), and lint and typecheck pass. I didn't run the browser specs again.

**The fix** (`propr-ui/src/components/TaskDetails/taskKind.ts`)
- `resolvedNoExtensions` now hides an event only if it applied no servers or skills, and also has empty `skipped` and `omitted` lists, no `labelOptOut` and no `autoApplySkipped`. That includes the omission-only case from the finding.
- **Same mistake in the label:** the timeline doesn't show the event's reason text, so its label is the only explanation. The label assumed that any event still shown had applied something. An omission-only event would now appear and say "Extensions Applied" when nothing was applied. A new `extensionsEventLabel` shows "Extensions Applied" only when servers or skills were actually applied, and "Extensions Not Applied" otherwise. `TaskStatusTable.tsx` uses it.
- I put the label logic in `taskKind.ts` because `TaskStatusTable.tsx` would otherwise go over the 400-line lint limit.

**New tests**
- `taskKind.test.ts`: the event stays when it has omitted items, skipped items, an opt-out label or a skipped auto-apply. It is still hidden when it is completely empty. "Applied" means servers or skills were added.
- `TaskStatusTable.test.tsx`: for both timeline layouts, each of those four kinds of event shows as "Extensions Not Applied", never "Extensions Applied". A completely empty event still doesn't show.
- With the old filter put back, 5 of these new tests fail. With the fix they all pass.

I found no other code in this PR's changes making the same mistake. I didn't create a preview image. The only visible difference is that row's label, which shows up only in this edge case, so I judged it not worth one; this was my own call, not a blocked capture.

PR: #3628
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR substantially improves automation form validation, terminology, schedule presentation, and discard confirmation. No merge-blocking defect was verified in the supplied diff. It is merge-ready within scope, conditional on the pending validation check completing successfully.

✅ Consistent merge capability handling — Report only disables the merge control and removes merge from submitted capabilities, while preserving the selection when switching autonomy modes before saving.

✅ Useful inline validation — Required fields and schedules receive readable errors, accessible descriptions, and focus after a refused submission.

✅ Preserved extension diagnostics — Empty extension-resolution events are hidden, while skipped, omitted, and opt-out explanations remain visible.

This was a static review of the supplied code and context; no commands or tests were run. Current checks show 14 passed, one pending, and no failures.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Extend navigation protection

useUnsavedEditorGuard.tsx guards anchors and explicitly wrapped close actions. The header’s programmatic navigation and browser Back remain outside that protection, as the implementation summary acknowledges. Extending protection would reduce accidental draft loss; these existing navigation limitations are a follow-up rather than a verified regression introduced here.

S4: 🟢 Exercise saved-editor navigation

The new AgentsPage.unsaved.test.tsx manually supplies dirty state through a mocked editor, while the browser discard tests exercise new automations. An integration test editing a saved automation, visiting Runs, returning to Settings, and then switching automations would strengthen coverage of the real dirty-state reporting and editor lifecycle. This is optional additional coverage.

Score

The implementation is cohesive and has substantial targeted coverage, with no verified blocker. Final merge readiness remains conditional on the pending validation check.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 51s
  • Tokens: 101,009 (100,120 in / 889 out)
  • Cost: $0.92

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S3 S4

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 17, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3604 by Claude Opus 5.5] Automations: inline validation, readable schedule and trigger, consistent names, shorter hints ✅⑧ [3604 by Claude Opus 5.5] Automations: inline validation, readable schedule and trigger, consistent names, shorter hints Nov 17, 2026
@integry
integry merged commit 4d6df38 into 3602-epic-0-9-o23 Nov 17, 2026
42 checks passed
@propr-dev propr-dev Bot changed the title ✅⑧ [3604 by Claude Opus 5.5] Automations: inline validation, readable schedule and trigger, consistent names, shorter hints [3604 by Claude Opus 5.5] Automations: inline validation, readable schedule and trigger, consistent names, shorter hints Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant