Astra: regression catalogue, runner robustness, idempotent Agent Studio contract, key-screen design (2182ef729b22)
152e0c1 verified |
Download docs/design/UI-REVIEW-1.md from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 16.8 kB
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/docs/design/UI-REVIEW-1.md
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/docs/design/UI-REVIEW-1.md
-
curl -L -o UI-REVIEW-1.md https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/docs/design/UI-REVIEW-1.md
16.8 kB
| > **Historical record.** This page describes the product as it was when it was written, under an earlier name, and is not kept up to date. For the current system (Astra) read [DESIGN_SYSTEM.md](../DESIGN_SYSTEM.md) for the UI, and [ARCHITECTURE.md](../ARCHITECTURE.md), [DEPLOYMENT.md](../DEPLOYMENT.md), [RUNBOOK.md](../RUNBOOK.md), [REMOTE_RUNNER.md](../REMOTE_RUNNER.md) and [SECURITY.md](../SECURITY.md). | |
| # UI review 1: steps 1 and 2 of UI-REDESIGN.md | |
| Reviewed: commits `c155a92` (step 1, tokens and shell) and `d1035cc` (step 2, run workspace and side panel), against | |
| `docs/design/UI-REDESIGN.md`. Basis: the developer's screenshots (`shots/step1/*`, `shots/step2/*` at 1440x900, 1100x800 and 390x844, | |
| light and dark) and the code in `web/src/components/shell/*`, `pages/RunWorkspace.tsx`, `pages/RunStage.tsx`, `pages/AssistantPage.tsx` | |
| and `styles.css`. I did not edit product code. | |
| Overall: the structure matches the spec. Shell, runs-as-conversations sidebar, env switcher, stage card with `run-guide`, team strip, | |
| composer with Team note, the five-tab panel, detail views and the "All details" menu are all in place. The desktop light theme reads | |
| calm and clear. What remains is mostly **dark-mode primary buttons**, **top-bar height on phone and laptop**, and **what the panel shows | |
| for quick simulations**. | |
| Priorities: **must-fix** blocks sign-off of step 2. **Should-fix** goes in before step 3 starts. **Nice** can go in any later step. | |
| --- | |
| ## Must-fix | |
| ### M1. Primary (filled ink) buttons are dark on dark in the dark theme | |
| - **Where:** every Mantine `Button variant="filled"` in dark mode. Examples: | |
| - `readiness-laptop-dark`: top-bar "New test run", "Open your review". | |
| - `ws-judge-desktop-dark`: "Submit my decision". | |
| - `ws-result-phone-dark`: "Open the report and sign off". | |
| - `ws-result-desktop-dark`: "Open the report and sign off". | |
| The custom sidebar "New test run" is correct (light pill). The bug was already in the old app, but step 1 owns the tokens. | |
| - **Wrong vs spec:** section 4.1 says `--fpt-ink` is `#eef2f0` with `--fpt-ink-text` `#111111` in dark, so primary buttons are light pills. | |
| The overrides in `styles.css` (`[data-mantine-color-scheme='dark'] { --mantine-color-ink-filled: #eef2f0; ... }`) lose to the | |
| variables MantineProvider injects under `:root[data-mantine-color-scheme="dark"]`, which has higher specificity. | |
| - **Fix:** | |
| - Change the selector of the dark block that sets the `--mantine-color-ink-*` and `--mantine-color-body` overrides to | |
| `:root[data-mantine-color-scheme='dark']`. Keep the other `--fpt-*` tokens where they are, or move them too. | |
| - Apply the same selector change to the `.mantine-Button-root[data-variant='filled'] … --button-color: #111111` rule and to the | |
| Checkbox/Radio icon rules. | |
| - Check with the 5 screenshots above that every filled button is a light pill with dark text in dark mode, and that the result is | |
| >= 4.5:1. | |
| ### M2. Phone run top bar is about 160px high and the sub-line collides | |
| - **Where:** `ws-approve-phone-light`, `ws-result-phone-dark`, `ws-judge-phone-*`. | |
| - **What happens:** five lines stack before the conversation starts: | |
| 1. title; | |
| 2. environment pill; | |
| 3. "Mock app, not Oracle Fusion" + "Quick simulation (no browser)" on a wrapped line; | |
| 4. `ref` on its own line; | |
| 5. an actions row, then the state chip on yet another row. | |
| In the dark result screenshot a horizontal rule is drawn through "Quick simulation (no browser)" (the sub-line overflows its box). | |
| The conversation gets less than half of the 844px height. | |
| - **Wrong vs spec:** section 2.2/2.5 asks for a 48px phone top bar: title plus one sub-line. The developer's stated deviation ("phone run | |
| top bar taller than 48px") is accepted only up to **2 rows, max 76px**. See the verdicts. | |
| - **Fix (phone, < 768px, run routes):** | |
| - **Row 1 (32px):** the title (one line, ellipsis), then the 36px "Panel" icon button, then a 36px "More" icon button | |
| (`IconDots`, aria-label "More actions for this test run"). The More button opens a `Menu` with: | |
| - the full "All details" item list; | |
| - "Copy reference id"; | |
| - "Cancel test run" / "Resume" (with the same `run.control` checks); | |
| - "What do these words mean?". | |
| - **Row 2 (28px, `overflow-x: auto`, no wrap):** | |
| - the **state chip**; | |
| - a single merged honesty pill "Practice environment · Mock app, not Oracle Fusion" (Fusion runs: "Oracle Fusion pod · <name>"); | |
| - the `ref` pill (`data-testid="run-id"`, kept in the DOM). | |
| Drop the separate "Quick simulation (no browser)" text on phone. The panel and the Live tab already say it. | |
| - **Remove the "Ask" button from the phone top bar.** The bottom bar owns Ask. This corrects my own spec, which said "tablet/phone": | |
| it should say **tablet only**. | |
| - The glossary icon goes into the More menu on phone. | |
| - `data-testid="all-details"` stays on the desktop/tablet button. The phone More menu uses `data-testid="all-details-phone"`. e2e runs | |
| on desktop. | |
| ### M3. For quick simulations the panel opens on an empty Live tab, also on finished runs | |
| - **Where:** every quick-simulation screenshot: `ws-approve-*`, `ws-judge-*`, `ws-result-desktop-light` (Report has a red dot but Live is | |
| shown), `*-sheet-phone-*`. | |
| - **Wrong vs spec:** the auto-switch rules in section 2.6 only fire on a transition, so a run opened after it finished keeps the persisted | |
| tab (Live). That gap is in my spec. The result is that 440px of every quick-simulation screen says "nothing to watch". | |
| - **Fix (add to `RunWorkspace` / `SidePanel`): an initial tab rule on opening a run.** When the run id changes, and only if the URL does | |
| not name a tab (`/live`, `/proof`, `/script`) and the person has not chosen a tab in this run before, pick the tab by state: | |
| - `completed` → **Report**. | |
| - `waiting_review` → **Screens** filtered to failed for browser runs, otherwise **Steps** with the first pending failure's `case_id` | |
| as `?scenario`. | |
| - `waiting_approval` → **Steps** with the first AI-written pending scenario, otherwise the first changed one. If neither exists, | |
| **Excel**. | |
| - `queued` / `running` → **Live** for browser runs with live view, otherwise **Excel**. | |
| - stopped → **Report** (it shows its "appears when finished" empty state) for quick simulations, **Screens** for browser runs. | |
| Remember "chose a tab in this run" in memory only (per run id, for the session). Do not persist it. The saved `panel.tab` stays | |
| the fallback for routes that are not runs. | |
| ### M4. "See the failed screen" is offered for quick simulations, which have no screen | |
| - **Where:** `ws-judge-desktop-dark`, `ws-judge-phone-*`. A quick-simulation failure shows the "See the failed screen" link under We | |
| expected / What happened. | |
| - **Wrong vs spec:** section 3.1.2 point 5 and 3.4. For quick simulations the screen column shows the empty state "Quick simulations don't | |
| open a browser, so there is no screen". It must never be a link to nothing. | |
| - **Fix:** render the link only when `r.playwright_mode !== 'stub'`. For stub runs show nothing in that spot. The Steps link is still | |
| useful: replace it with "Show the steps" (sets `?scenario`, opens Steps). | |
| --- | |
| ## Should-fix | |
| ### S1. Desktop and laptop run top bar has 3 rows (about 90px, laptop about 115px) | |
| - **Where:** `ws-*-desktop-*` (title / sub-line / chip+actions), `ws-approve-laptop-light` (`ref` wraps onto a 4th line). | |
| - **Spec:** 52px, three zones on one row. | |
| - **Fix, accepting two rows:** max **64px** desktop, **68px** laptop. | |
| - **Row 1:** the title, then the **state chip and decision badges inline right after the title** (same baseline). The actions | |
| (glossary, All details, Cancel/Resume, panel toggle) are right-aligned on this row. | |
| - **Row 2:** the sub-line (env pill · run type · `ref`) with `flex-wrap: nowrap`. The run-type text gets | |
| `min-width: 0; overflow: hidden; text-overflow: ellipsis`, so `ref` never wraps. | |
| - Update UI-REDESIGN 2.5 to say "52px for single-line pages, up to 64px for run pages". | |
| ### S2. The detail-view sub-header uses two rows and repeats the view name | |
| - **Where:** `ws-detail-activity-*`. Row 1 has "← Conversation Activity log"; row 2 has the switcher with "More: Activity log". | |
| - **Spec:** section 3.1.3 asks for one 40px row with `[<- Conversation]` and the view switcher. | |
| - **Fix:** one row with `[<- Conversation]` on the left and the pill switcher on the right. Remove the separate "Activity log" title: the | |
| active pill ("More: Activity log") already names it. Below 768px the switcher scrolls horizontally on the same row. | |
| ### S3. The Mantine focus ring is near-black, not `--fpt-focus` | |
| - **Where:** `ws-approve-desktop-light`, `ws-approve-laptop-light`. The programmatically focused "Approve all 79" button shows a thick | |
| black double ring on page load. | |
| - **Cause:** Mantine's `.mantine-focus-auto:focus-visible` uses `--mantine-primary-color-filled` (ink). It wins over our `:focus-visible`. | |
| - **Fix:** | |
| ```css | |
| .mantine-focus-auto:focus-visible, .mantine-focus-always:focus { outline: 2px solid var(--fpt-focus); outline-offset: 2px; } | |
| ``` | |
| Keep the stage-change focus behaviour. It matches the spec: focus moves on a stage change when focus was on `body`/thread. | |
| Also do not move focus on the **first render of an already-waiting run**. Only move it on a real stage *change* seen while the page | |
| is open. Opening a run should leave focus at the top (skip link / title), so screen-reader users start from the title. | |
| ### S4. Phone composer: the Command / Team note toggle squeezes the input to about 170px | |
| - **Where:** `ws-*-phone-*`. The placeholder is cut to "Tell the co-worker wh". | |
| - **Fix:** below 768px replace the segmented control with a 36px icon button to the left of the input: | |
| - `IconTerminal2` means Command, `IconNote` means Team note; | |
| - aria-label "Switch to team note" / "Switch to command"; | |
| - it shows a tooltip and changes the placeholder to "Note for the team (saved to the audit log)". | |
| The input then gets the full width. | |
| ### S5. `/runs/new` opens the panel on "Nothing to watch yet" | |
| - **Where:** `ws-new-desktop-*`. | |
| - **Fix:** on `/runs/new` render the panel collapsed to its 44px strip **without saving that state**. If the person opens it, show the | |
| Steps tab empty state with text that explains the panel: "Your test run's evidence appears here: the live browser, each scenario's | |
| screens, the report and the Excel files." The person's saved preference applies again on `/runs/:id`. | |
| ### S6. Phone bottom sheet uses Mantine's default dark surface (#242424), not our tokens | |
| - **Where:** `*-sheet-phone-dark`. | |
| - **Fix:** set `--fpt-surface` as the Drawer content background, `--fpt-text` as its colour and `--fpt-border` as the tab rule. Either | |
| use the Drawer `classNames` with `.fpt-sheet { background: var(--fpt-surface); color: var(--fpt-text); }`, or theme `Drawer.styles`. | |
| Same check for the tablet drawer and the sidebar drawer. | |
| ### S7. Brand name breaks at the hyphen: "Patch Testing Co- / worker" | |
| - **Where:** every desktop screenshot. | |
| - **Fix:** render the product name with a non-breaking hyphen (replace `-` with U+2011 in the display string only), so it wraps as | |
| "Patch Testing / Co-worker". Or allow one line with ellipsis and the full name in `title`. | |
| ### S8. The Activity detail view's "Agent team" list uses engineering names | |
| - **Where:** `ws-detail-activity-*`, right column. It lists "Test generator", "Approval gate", "Data executor", "Executor", "Triage", | |
| "Human review", "Ticket", while the team strip and the board use "Test designer", "Approval", "Data", "Test runner", "Failure | |
| analysis", "Your review", "Tickets". Feed timestamps read "10/17/2026, 12:02:05 PM" while everything else reads "17 Oct 12:02". | |
| - **Fix:** | |
| - name agents with `STEP_WORDS[node][0]` in `GraphView` compact mode and in `FeedCard`; | |
| - show `shortWhen()` plus seconds ("17 Oct 12:02:05") in the feed; | |
| - keep the technical node id in each item's `title` tooltip for engineers. | |
| ### S9. Run type uses two wordings | |
| - **Where:** the top bar says "Quick simulation (no browser)" / "Full browser run", while the user bubble says "quick simulation". | |
| - **Fix:** use "Quick simulation" / "Full browser run" everywhere. Add "(no browser)" only where a missing screen would be expected | |
| (panel Live and Screens tabs, Judge screen column). | |
| --- | |
| ## Nice | |
| - **N1.** `ws-result-desktop-dark`: "See the screens" appears twice, in the Result card and in the What next chips. Keep the one in the | |
| Result card. The chips become "Test another business area" and "Open the team board". | |
| - **N2.** Sidebar Recent rows all read "Procure-to-Pay", and the sub-line truncates to "26C · 17 Oct 13:11 · Pra…". Shorten the env word | |
| in the sub-line to a 14px icon (amber shield for practice, blue cloud for Fusion) with an `aria-label`. The time then stays readable. | |
| - **N3.** The team strip folds finished agents to "4 done". Make that chip a button that expands "Show every step" (the same action as | |
| the link below it), so the summary is clickable. | |
| - **N4.** The `<380px` panel "Results so far" disclosure (deviation 9). Do it with step 3 or later. | |
| - **N5.** Readiness phone (`readiness-phone-light`): the two selects take a full row. Put "Test environment" and "Patch" side by side at | |
| 50% each, and remove the duplicate "Ask" button (bottom bar), the same as M2. | |
| - **N6.** `runs-phone-dark`: "Getting started" fills the first screen. On phone collapse it to one line, "Getting started · 3 of 4 | |
| done", with a chevron. | |
| --- | |
| ## Verdicts on the stated deviations | |
| | # | Deviation | Verdict | Note | | |
| |---|---|---|---| | |
| | 1 | "Scheduled runs" link admin-only | **Accept for now** | The schedules API and page are admin-only today. Revisit in step 7: show the link to everyone with a read-only list if `GET /api/schedules` is opened to non-admins. Otherwise keep it admin-only. | | |
| | 2 | In rail mode the mock text moves to the top bar on every page | **Accept** | Better than my spec (run pages only): the honesty cue is never lost. On phone merge it with the env pill into one pill (M2). | | |
| | 3 | Sidebar status aria-labels reworded (old ones broke an e2e `getByLabel`) | **Accept** | Correct call. Add the new label pattern to UI-REDESIGN section 10, so later steps do not collide with labels the e2e uses ("Password", "Reason", "API key", "scenario review"). The `side-run-<id>` test ids are fine. | | |
| | 4 | Intake asks "Where should I test?" before "How should I run it?" | **Accept** | Environment before run type is the natural order (the run type depends on whether a browser can run there). | | |
| | 5 | Team strip folds finished agents into "N done" when more than 3 | **Accept** | Make the folded chip clickable (N3). | | |
| | 6 | Panel PDF / Excel buttons use `panel-pdf-link` / `panel-results-excel` | **Accept** | Keeps `pdf-link` and `excel-script` unique for e2e. Add both ids to section 10. | | |
| | 7 | Opening the panel closes the Ask dock when the dock squeezed the panel | **Accept, with a condition** | Only when the center would drop under its minimum (560px desktop / 520px laptop). When the panel is closed again, reopen the dock automatically if the app closed it, so the person's chat is never lost by surprise. A one-line toast "The question panel is hidden while the run details are open" (with an "Ask" action) is enough. | | |
| | 8 | Phone run top bar taller than 48px | **Change** | Max 2 rows and 76px. Exact layout in M2. | | |
| | 9 | `<380px` "Results so far" disclosure not done | **Accept (deferred)** | Nice item N4. | | |
| --- | |
| ## Checks that passed (no action) | |
| - `run-guide` + `data-stage` is unique in the thread and follows `guideStage`. The stage kicker and 4-segment progress read correctly | |
| (judge shows an amber current segment). | |
| - The sidebar groups Needs you / Running / Recent with amber "Review" / "Decide" badges and red/grey dots. The rail shows dots and | |
| the count badge. The env switcher keeps "Mock app, not Oracle Fusion" visible. | |
| - The panel has five tabs, the Screens count badge, the Report decision dot, a resize handle and a collapse strip. | |
| `?scenario` and "Show steps" on proof cards work. The Screens filter (All / Failed / Passed) and the honesty line are present. | |
| - Detail views keep `next-step`. "All details" is in the top bar. | |
| - The composer has suggestions, Team note mode and the Ask hint. | |
| - Light-theme contrast of dim text on the sidebar tint looks right. The `--fpt-dim` change is applied. | |
| - `/assistant` and `/assistant/:id` redirect. The intake offers "Use the full form". | |