Skip to content

fix(schedules): let a long schedule prompt wrap and show on hover - #7920

Merged
kovtcharov-amd merged 6 commits into
amd:mainfrom
tylerbea:fix/hunt-SCH1-schedule-card-full-text
Nov 13, 2026
Merged

kovtcharov-amd merged 6 commits into
amd:mainfrom
tylerbea:fix/hunt-SCH1-schedule-card-full-text

Conversation

@tylerbea

@tylerbea tylerbea commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

A scheduled-task card cut a long prompt to one line with "..." and gave no way to read the rest short of editing it. The card now wraps the prompt to up to three lines, and hovering the name or prompt shows the full text. Only the card changes, so it should not conflict with the Edit view in #7527.

Closes #7921

Before After

Test plan

  • npm test -- src/components/__tests__/ScheduleManager (new ScheduleManager.longText.test.tsx)
  • npm run build
  • Browser preview: created a schedule with a long prompt; before one cut line, after three lines
  • Hover a card and check the tooltip; try an Arabic prompt and a prompt longer than three lines
🔍 Technical details
  • .schedule-card-prompt in ScheduleManager.css used white-space: nowrap with an ellipsis; it now uses a three-line clamp with overflow-wrap: anywhere.
  • Added title to the name and prompt on ScheduleManager.tsx.
  • The Arabic i18n test's attribute check now skips the user's own name and prompt, as its text check already did.

…over

A long scheduled-task prompt was cut to one line with an ellipsis and no way to read the rest. The card now shows up to three lines and the full name and prompt on hover.
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

Long schedule prompts now wrap to three lines on the card instead of being cut to one, and hovering the name or prompt shows the full text. The change itself is right. It will, though, turn the Arabic screenshot check in CI red, because that check fails on any English hover text in the schedules dialog.

  • The Arabic visual test will fail. The browser check for the schedules dialog in Arabic flags any title with English words and no Arabic. Its sample schedules have English names and prompts ("Morning brief", "Summarize my unread email…"), and those are now hover titles. You already exempted the user's own name and prompt in the unit test. Make the same exemption in the browser check, then run npm run test:rtl and check the Arabic schedules screenshots. Your test plan leaves that item unticked.

Real-world evidence

N/A: no evidence bundle was produced for this run. The PR embeds before and after screenshots of the card in English, which covers the wrapping. The hover tooltip and the Arabic layout are still unchecked, both in the PR and here. This verdict comes from reading the code. I did not run the Playwright suite. The "Test Agent UI Components" CI job was still pending when I wrote this.

🔍 Technical details

🟡 Arabic check in rtl.visual.ts will flag the new titles (src/gaia/apps/webui/visual/rtl.visual.ts:2474)

untranslatedAttributes collects every [title] inside .schedule-modal that matches /[A-Za-z]{3}/ and has no Arabic. The ar test "list with a failed run and its history open" asserts that list is empty. SCHEDULE_ROWS uses English name and prompt values, so the new title={schedule.name} and title={schedule.prompt} (ScheduleManager.tsx:243,246) put 6 English strings in the list. test_electron.yml:118 runs npm run test:rtl, so this fails in CI. The fix matches what the PR already did in ScheduleManager.i18n.test.tsx: exclude the user's own text, which is the elements marked dir="auto".

        [root.closest('[role="dialog"]')!, ...root.querySelectorAll('[title]:not([dir="auto"]), [aria-label], [placeholder]')].flatMap((el) =>

Before you rely on that selector, confirm that no translated chrome element carries both dir="auto" and a title. The .schedule-card-meta description span has a title but no dir, so it stays checked.

Strengths

  • overflow-wrap: anywhere together with the three-line clamp also handles a long prompt with no spaces, such as a URL. The existing [dir="auto"] text-align rules in index.css already include .schedule-card-prompt, so RTL alignment carries over.
  • The new test checks the hover text for both the name and the prompt, and the i18n test's attribute filter now treats user content the same way its text check already did.

@kovtcharov-amd kovtcharov-amd added the bug Something isn't working label Nov 13, 2026
@kovtcharov-amd kovtcharov-amd added agent-ui Agent UI changes multilingual Language support: translations, right-to-left layout, Arabic and other non-English languages labels Nov 13, 2026
@tylerbea
tylerbea marked this pull request as draft November 13, 2026 05:55
@tylerbea
tylerbea marked this pull request as ready for review November 13, 2026 05:55
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

A schedule card now wraps a long prompt to three lines instead of cutting it to one, and hovering the name or prompt shows the full text. The code change is small and correct, and the before/after screenshots show it working in English.

The one thing missing is the check that would catch this bug coming back. The project rule for UI fixes is that a bug a person found becomes a rule in the visual suite in the same change. Right now none of the visual suite's sample schedules has a long prompt, so the three-line clamp is never rendered or screenshotted in either language. The open test-plan item (Arabic prompt, prompt longer than three lines) would be covered by the same addition.

  • To fix: add a schedule with a long prompt (and ideally an Arabic one) to the visual suite's sample rows. Then check that the prompt stops at three lines without spilling out of the card, in both English and Arabic.

Real-world evidence

N/A: no evidence bundle was produced for this run. The PR description embeds before/after browser-preview screenshots of the English card. Hover tooltips and the Arabic/right-to-left layout haven't been exercised; the author left that test-plan item unchecked. The verdict rests on those screenshots plus static review.

🔍 Technical details

Issues

🟡 No visual rule for the long-prompt state (visual/rtl.visual.ts:2460): SCHEDULE_ROWS has only short prompts ("Summarize my unread email and calendar for today"). Nothing in the visual suite renders the new -webkit-line-clamp: 3 path, so a later change to .schedule-card-prompt could bring back the one-line cut, or let text overflow the card, and the suite would stay green. CLAUDE.md, "A UI change isn't done until someone has looked at it", asks for exactly this: the long-content state, in English and Arabic, with a rule added in the same change. A minimal version adds a row to SCHEDULE_ROWS:

{
    ...SCHEDULE_ROW, id: 's4', name: 'weekly-research-digest-for-the-product-and-design-teams', last_error: null, error_count: 0, session_id: null,
    prompt: 'ابحث في الويب عن أخبار منافسينا الثلاثة الرئيسيين ولخص أي تغيير في الأسعار أو الميزات أو التوظيف، ثم قارنه بملخص الأسبوع الماضي. '.repeat(2),
},

Then add an assertion that the clamp holds, e.g. that .schedule-card-prompt's scrollHeight > clientHeight and its clientHeight is at most ~3 × line-height. audit() already flags overflow out of the card. This row also reaches untranslated(page, …, '[dir="auto"]'), which skips user text, so it won't trip the Arabic leftover-English check.

ScheduleManager.longText.test.tsx only asserts the title attributes. That's useful, but jsdom can't see the clamp, so it doesn't cover the layout this PR fixes.

Checked, no issue

  • [title]:not([dir="auto"]) in untranslatedAttributes only exempts the two user-content elements (name and prompt). Every translated title (buttons, the meta span) has no dir="auto" and is still checked. The jsdom i18n test's matching value-based exemption is consistent with it.
  • display: -webkit-box + -webkit-line-clamp + overflow-wrap: anywhere is the same pattern Chromium/Electron supports, and overflow-wrap: anywhere keeps a long unbroken token from widening the card (.schedule-card-error already uses it).
  • No docs describe the card's truncation, so there's nothing to drift. No sibling path renders schedule cards.

Strengths

@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

🟡 The earlier finding is still open: the visual suite never shows a schedule card with a long prompt. The three-line wrap this PR adds is never screenshotted in English or Arabic, so if the one-line cut comes back, or text spills out of the card, CI stays green. This push only merged main and didn't change the PR's files.

  • To fix: add a schedule with a long prompt to the visual suite's sample rows. Arabic text is best, since that also covers the unchecked test-plan item. Then check that the prompt stops at three lines without spilling out of the card, in both languages.
🔍 Technical details

SCHEDULE_ROWS in visual/rtl.visual.ts (~line 2460) still has only short prompts. The only change to that file is the [title]:not([dir="auto"]) selector. The row and the clamp assertion suggested in the previous review still apply: .schedule-card-prompt should have scrollHeight > clientHeight, and clientHeight should be at most ~3 × line-height. ScheduleManager.longText.test.tsx runs in jsdom, so it can't see the clamp.

@tylerbea
tylerbea marked this pull request as draft November 13, 2026 06:55
@tylerbea
tylerbea marked this pull request as ready for review November 13, 2026 06:55
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve

A long prompt on a scheduled-task card now shows up to three lines instead of one cut line, and hovering the name or the prompt shows the full text. The change only touches how the card looks. Tests cover the tooltip, and the visual suite gains an Arabic long-prompt card that checks the prompt stops at three lines and stays inside its card. I found nothing that needs fixing before merge.

Real-world evidence

N/A here: no evidence bundle ran for this PR. The description embeds before and after screenshots from the browser preview showing one cut line before and three lines after. The one unchecked test-plan item is hovering a card to see the tooltip and trying an Arabic prompt in the real app. The new Arabic visual test covers the Arabic layout, but nobody has looked at the hover tooltip yet. Apart from those screenshots, this verdict rests on reading the code.

🔍 Technical details

Issues found: none blocking.

Checked and fine

  • Arabic and right-to-left layout: both index.css rules for .schedule-card-prompt[dir="auto"] set only text-align, so they still apply under display: -webkit-box, and Arabic text stays on its own edge.
  • The visual suite's attribute check now uses [title]:not([dir="auto"]). In the schedules dialog, dir="auto" appears only on the name and prompt, which hold the user's own text. The check still catches any interface title left in English. This matches how the Jest i18n test already skips .schedule-card-name and .schedule-card-prompt in its text check.
  • The new fourth card (s4) doesn't break the other schedule tests. The "list" test clicks .first(), and none of them counts cards.
  • Known bug classes: none apply. The change adds no waits, shared state, startup paths or model-output parsing.
  • Documentation drift: no doc describes how the card truncates its prompt.

Strengths

  • The new visual test asserts the real behaviour: the text overflows, the visible height is at most three lines, and the prompt stays inside the card. It uses an Arabic prompt in both locales, so the right-to-left wrap is exercised too, not only the tooltip.
  • overflow-wrap: anywhere stops a long URL or a word with no spaces from widening the card. .schedule-card-error already uses the same pattern.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 13, 2026
Merged via the queue into amd:main with commit 9f15dc9 Nov 13, 2026
116 of 127 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-ui Agent UI changes bug Something isn't working electron Electron app changes multilingual Language support: translations, right-to-left layout, Arabic and other non-English languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduled task card cuts the prompt to one line with no way to read it

2 participants