Skip to content

fix(ui): constrain cron job entries within list boundary#51201

Merged
BunsDev merged 6 commits intoopenclaw:mainfrom
Mule-ME:fix/cron-job-boundary-overflow
Apr 4, 2026
Merged

fix(ui): constrain cron job entries within list boundary#51201
BunsDev merged 6 commits intoopenclaw:mainfrom
Mule-ME:fix/cron-job-boundary-overflow

Conversation

@Mule-ME
Copy link
Copy Markdown
Contributor

@Mule-ME Mule-ME commented Mar 20, 2026

Summary

Fixes #49228. Cron job rows in the Control UI can spill past the left list boundary and overlap the right-side "New Job" panel.

Why

.cron-workspace-main cannot shrink below its content width without min-width: 0. Long title, detail, or state text can therefore push the left column under the right panel.

What

  • Added min-width: 0 to .cron-workspace-main
  • Wrapped long .cron-job .list-title text
  • Wrapped long .cron-job-detail-value text
  • Truncated .cron-job-state-value with ellipsis

Test plan

No new unit test because this is a CSS-only layout fix and the existing cron view test plus Control UI build already cover the touched surface.

  • Ran pnpm --dir ui test src/ui/views/cron.test.ts
  • Ran pnpm --dir ui build
  • Manually verify the Cron page with long title/detail/state values
  • Capture before/after screenshots

AI-assisted: Codex

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 20, 2026

Greptile Summary

This PR applies four CSS-only fixes to prevent cron job rows from overflowing the left list column and overlapping the "New Job" panel. The changes are narrow in scope and well-targeted — no logic, data, or API surface is touched.

Key changes:

  • min-width: 0 on .cron-workspace-main: the essential grid-item shrink fix, correctly mirrors the minmax(0, ...) already set on the column but needed at the item level too.
  • overflow-wrap: anywhere on .cron-job .list-title and .cron-job-detail-value: allows long strings to wrap without overflow.
  • overflow: hidden; text-overflow: ellipsis on .cron-job-state-value: intended to truncate long nowrap state values with an ellipsis.

Two issues worth addressing:

  1. .cron-job-state-value is a flex child inside a justify-content: space-between row. Without min-width: 0, flex items default to min-width: auto and won't shrink, so overflow: hidden won't clip and the ellipsis won't appear. The same pattern that motivated min-width: 0 on the grid item applies here.
  2. word-break: break-word is a non-standard legacy value that is fully subsumed by overflow-wrap: anywhere and can be removed from both new blocks.

Confidence Score: 4/5

  • Safe to merge after verifying the flex-item ellipsis behavior with and without min-width: 0 on .cron-job-state-value.
  • The approach and scope are correct. The grid min-width: 0 fix is sound. The main open question is whether text-overflow: ellipsis on .cron-job-state-value activates correctly without min-width: 0 on that flex item — if it doesn't, long state values will still overflow rather than truncating. This is the same class of bug the PR is fixing, just one level deeper. The word-break: break-word redundancy is minor but worth cleaning up.
  • ui/src/styles/components.css — specifically .cron-job-state-value around line 1580.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: ui/src/styles/components.css
Line: 1583-1584

Comment:
**`min-width: 0` may be needed for ellipsis to activate on the flex item**

`.cron-job-state-value` lives inside `.cron-job-state-row`, which is a `display: flex` / `justify-content: space-between` container. Flex items default to `min-width: auto`, meaning the item will grow to fit its content rather than shrink. When the item doesn't shrink, `overflow: hidden` has nothing to clip and `text-overflow: ellipsis` never fires.

Adding `min-width: 0` lets the flex item be constrained by the available row width, which is what triggers the ellipsis:

```suggestion
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
```

This is the same class of fix that `min-width: 0` on `.cron-workspace-main` addresses at the grid level — just applied one level deeper to the inner flex item.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: ui/src/styles/components.css
Line: 1502-1556

Comment:
**`word-break: break-word` is redundant alongside `overflow-wrap: anywhere`**

`word-break: break-word` is a non-standard legacy value (not in the W3C spec for `word-break`). It was a WebKit alias for `overflow-wrap: break-word`, which is itself a subset of `overflow-wrap: anywhere`. Since `overflow-wrap: anywhere` is already set and is strictly more permissive, `word-break: break-word` adds no additional behavior in compliant browsers.

This applies to both new blocks:

- `.cron-job .list-title` (lines 1502–1503)
- `.cron-job-detail-value` (lines 1555–1556)

Removing it keeps the intent clear without relying on a non-standard value:

```suggestion
  overflow-wrap: anywhere;
```

(apply this to both occurrences)

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: "fix(ui): constrain c..."

Comment thread ui/src/styles/components.css
Comment thread ui/src/styles/components.css Outdated
@Mule-ME
Copy link
Copy Markdown
Contributor Author

Mule-ME commented Mar 20, 2026

@greptile-apps feedback addressed in 0396820.

@Mule-ME
Copy link
Copy Markdown
Contributor Author

Mule-ME commented Mar 20, 2026

Before: cron job entry overflows into the New Job panel.
Screenshot 2026-03-20 at 23 04 41
After: cron job entry stays constrained within the jobs list column.
Screenshot 2026-03-20 at 23 06 40

@BunsDev BunsDev self-assigned this Mar 27, 2026
@BunsDev BunsDev merged commit de918c2 into openclaw:main Apr 4, 2026
9 checks passed
@BunsDev
Copy link
Copy Markdown
Member

BunsDev commented Apr 4, 2026

Thanks for your contribution @Mule-ME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Web UI: Cron job entry spills outside list boundary and overlaps right-side "New Job" panel

2 participants