Skip to content

[3696 by Claude Opus 5.5] Automation run list: a preview that tells runs apart, and aligned rows - #3711

Merged
integry merged 1 commit into
3693-epic-0-9-4gafrom
3696/claude-opus-5-5-automation-run-list-a-pre-20261118-1407-y2p
Nov 18, 2026
Merged

integry merged 1 commit into
3693-epic-0-9-4gafrom
3696/claude-opus-5-5-automation-run-list-a-pre-20261118-1407-y2p

Conversation

@propr-dev

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

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3696

Branch: 3696/claude-opus-5-5-automation-run-list-a-pre-20261118-1407-y2p
Commits: ✅ Changes committed (c456174)


AI Processing Completed

Execution Details:

Summary:
Both parts of #3696 are done: each run's preview now comes from the report body, and all rows of the run list share the same columns. All the tests I ran pass.

Preview (packages/shared/src/automationReportPreview.ts): the API still builds reportPreview with the same field name, using this rule:

  • It skips headings, both the title every run repeats and any section headings.
  • It returns the first sentence of the first paragraph, joining a paragraph that wraps over several lines.
  • If the body starts with a list or quote, it returns the first item.
  • If the report is only headings, it falls back to the title. It returns nothing for an empty report.
  • A full stop inside a word, as in v0.9.2 or example.com, doesn't end the sentence. An abbreviation like "e.g." followed by a space does, so the preview stops there.
  • Markdown stripping, the 160-character cut and the existing protections against malformed input are unchanged.

I updated the text that describes the field to match: the API route comment, the MCP list_automation_runs description, the UI and CLI type comments, and docs/docs/features/agents.md.

Row alignment (propr-ui/src/components/Agents/AgentRunHistory.tsx): the column layout is now defined once for the whole list. The header, the list and each row reuse it (CSS subgrid) instead of each row sizing its own columns. So the Started column is as wide as the widest date in the list, and every column lines up whether a row says "Sep 28, 2026" or "5h ago". Because each row's side padding now counts toward the first column, I raised that column's minimum width from 5.5rem to 6.5rem; the space for the date itself is unchanged. The stacked two-line layout on phones still works.

Tests:

  • Preview unit tests: added cases for heading only, heading plus paragraph (including a wrapped paragraph and section headings), list first, and empty. The existing expectations that took the title now expect body text. 10/10 pass.
  • API route test: updated to expect the body's first list item; it passes.
  • New Playwright test in propr-ui/e2e/automation-runs-mobile.pw.ts: mixes "5h ago", "Sep 28, 2026" and "3m ago" rows and checks that every column starts at the same position in each row and in the header. It fails on the absolute-date row with the old component and passes with the new one. I also changed one existing report in that file to have a body paragraph, so its tests still check a long preview. All 6 tests in the file pass.
  • Run-list component tests (6/6) and propr-ui lint and typecheck are clean. ESLint has no config for packages/shared, so the preview code there wasn't linted.

I captured preview screenshots of the desktop list with mixed date formats, the regular desktop list and the 390px phone layout.

Review digest

Risk-tiered paths

  • High risk (1 file)
    • docs/docs/features/agents.md (+1/−1): agent configuration
  • Normal risk (6 files)
    • packages/api/mcp/toolsAutomations.ts (+1/−1)
    • packages/api/routes/automationDefinitionRoutes.ts (+2/−2)
    • packages/cli/src/api/automations.ts (+1/−1)
    • packages/shared/src/automationReportPreview.ts (+39/−4)
    • propr-ui/src/api/automationDefinitionsApi.ts (+1/−1)
    • propr-ui/src/components/Agents/AgentRunHistory.tsx (+18/−8)
  • Low risk (3 files)
    • packages/api/test/agentDefinitionRoutes.test.ts (+2/−2)
    • packages/shared/test/automationReportPreview.test.ts (+32/−4)
    • propr-ui/e2e/automation-runs-mobile.pw.ts (+35/−1)

Diff size: 10 files changed, +132/−25 lines

View task for the run's logs and conversation.


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


💡 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

Run list at desktop width

Run list at desktop width

The five-column run list after the switch to one grid with subgrid rows.

Full-size original

Run list on a phone (390px)

Run list on a phone (390px)

The stacked two-line layout is unchanged; the preview is now the first sentence of the report body.

Full-size original

Run list with mixed date formats

Run list with mixed date formats

Desktop run list: the "Sep 28, 2026" row and the "5h ago"/"3m ago" rows share one set of column tracks, and each run previews its own body sentence instead of the shared title.

Full-size original

…eport body, and all rows of the run list share the same columns. All the tests I ran pass.

Preview (`packages/shared/src/automationReportPreview.ts`): the API still builds `reportPreview` with the same field name, using this rule:
- It skips headings, both the title every run repeats and any section headings.
- It returns the first sentence of the first paragraph, joining a paragraph that wraps over several lines.
- If the body starts with a list or quote, it returns the first item.
- If the report is only headings, it falls back to the title. It returns nothing for an empty report.
- A full stop inside a word, as in `v0.9.2` or `example.com`, doesn't end the sentence. An abbreviation like "e.g." followed by a space does, so the preview stops there.
- Markdown stripping, the 160-character cut and the existing protections against malformed input are unchanged.

I updated the text that describes the field to match: the API route comment, the MCP `list_automation_runs` description, the UI and CLI type comments, and `docs/docs/features/agents.md`.

Row alignment (`propr-ui/src/components/Agents/AgentRunHistory.tsx`): the column layout is now defined once for the whole list. The header, the list and each row reuse it (CSS subgrid) instead of each row sizing its own columns. So the Started column is as wide as the widest date in the list, and every column lines up whether a row says "Sep 28, 2026" or "5h ago". Because each row's side padding now counts toward the first column, I raised that column's minimum width from 5.5rem to 6.5rem; the space for the date itself is unchanged. The stacked two-line layout on phones still works.

Tests:
- Preview unit tests: added cases for heading only, heading plus paragraph (including a wrapped paragraph and section headings), list first, and empty. The existing expectations that took the title now expect body text. 10/10 pass.
- API route test: updated to expect the body's first list item; it passes.
- New Playwright test in `propr-ui/e2e/automation-runs-mobile.pw.ts`: mixes "5h ago", "Sep 28, 2026" and "3m ago" rows and checks that every column starts at the same position in each row and in the header. It fails on the absolute-date row with the old component and passes with the new one. I also changed one existing report in that file to have a body paragraph, so its tests still check a long preview. All 6 tests in the file pass.
- Run-list component tests (6/6) and propr-ui lint and typecheck are clean. ESLint has no config for `packages/shared`, so the preview code there wasn't linted.

I captured preview screenshots of the desktop list with mixed date formats, the regular desktop list and the 390px phone layout.
@propr-dev

propr-dev Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

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

@propr-dev

propr-dev Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

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

First action: /review

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

@propr-dev

propr-dev Bot commented Nov 18, 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 18, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR delivers body-based previews and shared run-list columns with a focused implementation. It is merge-ready within the reviewed scope, conditional on the three pending checks completing successfully. Review was based on the supplied code; no commands were run.

✅ Consistent preview contract — Preview extraction remains shared, and API, MCP, CLI, UI comments and documentation describe the updated behavior.

✅ Targeted regression coverage — Tests cover heading fallback, wrapped paragraphs, list-first reports, and alignment between headers and rows with mixed date formats.

✅ Focused layout change — Shared grid tracks directly address inconsistent column sizing without changing run navigation or fetching behavior.

Merge blockers

No merge blockers.

Suggestions

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

S1: 🟢 Mixed dates on mobile

Consider extending the mixed-date fixture to a narrow viewport and checking for horizontal overflow. The new shared tracks also affect the mobile layout, while the added mixed-date alignment test runs at 1440px. Existing mobile coverage makes this additional combination optional.

Score

The changes are focused and supported by relevant regression tests, with no verified merge blockers. The supplied current-head status reports 31 passed checks, no failures, and three pending checks.

Score: 9/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 27s
  • Tokens: 47,161 (46,561 in / 600 out)
  • Cost: $0.39

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 S1

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 18, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3696 by Claude Opus 5.5] Automation run list: a preview that tells runs apart, and aligned rows ✅❾ [3696 by Claude Opus 5.5] Automation run list: a preview that tells runs apart, and aligned rows Nov 18, 2026
@integry
integry merged commit ddbe90e into 3693-epic-0-9-4ga Nov 18, 2026
75 checks passed
@propr-dev propr-dev Bot changed the title ✅❾ [3696 by Claude Opus 5.5] Automation run list: a preview that tells runs apart, and aligned rows [3696 by Claude Opus 5.5] Automation run list: a preview that tells runs apart, and aligned rows Nov 18, 2026
propr-dev Bot pushed a commit that referenced this pull request Nov 18, 2026
… call, and skip any label the PR already has. But I couldn't find a second labelling call in ProPR's code for the normal case, so this may not stop the duplicates you're seeing.

What the PR timelines show. I checked the last 80 PRs and 23 have `AI` added twice, in two patterns:
- Older PRs (#3579–#3711): `AI` and `llm-*` appear twice, 0–1 s apart. ProPR's retry waits at least 2 s, so a retry can't explain this.
- Newer PRs (#3712, #3717): `AI`, `ultrafix` and `llm-*` all appear again 2 s after `ultrafix` is added. No ProPR code adds those three together, and `ultrafix` was already on the PR.

Normal creation makes a single label call. The labels were already in place when the second set appeared. That suggests GitHub may record labels again on a PR it is still setting up, which ProPR can't prevent. I couldn't test that without making real PRs.

Code paths that could label twice, now fixed:
- Final validation: if a step after creation failed, the run lost track of the PR it had opened. Final validation then found that PR and labelled it again. Validation now records the labels the PR already has (`packages/core/src/utils/prValidation.ts`), so that second call sends nothing.
- Creation itself: in `src/jobs/issueJobHelpers.ts`, only the create request is now inside the `try`. Labelling happens once afterwards, so an error after labelling can no longer fall into the "find existing PR" path and label again.
- The other paths (existing PR found after a duplicate error, and the API retry in `src/jobs/issueJobPRRetry.ts`) use the same shared helper and skip labels GitHub already lists on the PR.
- The shared helper in `src/jobs/pullRequestProcessingLabels.ts` now sends only the missing labels, and makes no call at all when nothing is missing.

Tests
- A new file, `test/pullRequestCreationLabels.test.ts`, checks that each creation path makes exactly one label call. It also checks that labels already on the PR aren't re-sent, and that a failed label call isn't repeated through the existing-PR fallback.
- I added cases to `test/recoveredPullRequestLabels.test.ts` covering final validation and the API retry when the PR already has some or all of its labels.
- Against the original `issueJobHelpers.ts`, 2 of the 5 new creation-path tests fail. The single-call tests also pass on the old code, because it already made one call per path.
- The suites that touch these files ran 508 tests with 507 passing and 0 failing. Typecheck is clean for the root and core packages, and lint is clean on the changed source files.

If the duplicates continue after this ships, the next step is to compare ProPR's worker log for one affected PR with its timeline. Two "Added processing labels" log lines would mean ProPR sent two calls; one would mean the duplicate comes from GitHub.

The change isn't visible on screen, so there are no previews.
integry pushed a commit that referenced this pull request Nov 18, 2026
…hen a PR is created (#3721)

What the PR timelines show. I checked the last 80 PRs and 23 have `AI` added twice, in two patterns:
- Older PRs (#3579–#3711): `AI` and `llm-*` appear twice, 0–1 s apart. ProPR's retry waits at least 2 s, so a retry can't explain this.
- Newer PRs (#3712, #3717): `AI`, `ultrafix` and `llm-*` all appear again 2 s after `ultrafix` is added. No ProPR code adds those three together, and `ultrafix` was already on the PR.

Normal creation makes a single label call. The labels were already in place when the second set appeared. That suggests GitHub may record labels again on a PR it is still setting up, which ProPR can't prevent. I couldn't test that without making real PRs.

Code paths that could label twice, now fixed:
- Final validation: if a step after creation failed, the run lost track of the PR it had opened. Final validation then found that PR and labelled it again. Validation now records the labels the PR already has (`packages/core/src/utils/prValidation.ts`), so that second call sends nothing.
- Creation itself: in `src/jobs/issueJobHelpers.ts`, only the create request is now inside the `try`. Labelling happens once afterwards, so an error after labelling can no longer fall into the "find existing PR" path and label again.
- The other paths (existing PR found after a duplicate error, and the API retry in `src/jobs/issueJobPRRetry.ts`) use the same shared helper and skip labels GitHub already lists on the PR.
- The shared helper in `src/jobs/pullRequestProcessingLabels.ts` now sends only the missing labels, and makes no call at all when nothing is missing.

Tests
- A new file, `test/pullRequestCreationLabels.test.ts`, checks that each creation path makes exactly one label call. It also checks that labels already on the PR aren't re-sent, and that a failed label call isn't repeated through the existing-PR fallback.
- I added cases to `test/recoveredPullRequestLabels.test.ts` covering final validation and the API retry when the PR already has some or all of its labels.
- Against the original `issueJobHelpers.ts`, 2 of the 5 new creation-path tests fail. The single-call tests also pass on the old code, because it already made one call per path.
- The suites that touch these files ran 508 tests with 507 passing and 0 failing. Typecheck is clean for the root and core packages, and lint is clean on the changed source files.

If the duplicates continue after this ships, the next step is to compare ProPR's worker log for one affected PR with its timeline. Two "Added processing labels" log lines would mean ProPR sent two calls; one would mean the duplicate comes from GitHub.

The change isn't visible on screen, so there are no previews.

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
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