Skip to content

ui: port pl-10db defect fixes that never reached main, each with a repro (warren-4d4c) - #1358

Merged
jayminwest merged 11 commits into
mainfrom
ui/port-pl-10db-defects-4d4c
Oct 8, 2026
Merged

jayminwest merged 11 commits into
mainfrom
ui/port-pl-10db-defects-4d4c

Conversation

@jayminwest

Copy link
Copy Markdown
Owner

Ports the plan pl-10db track-1 defect fixes that were closed as "done on ui/polish-overhaul" but never reached main, because PR #1286 was closed unmerged. warren-e9cd was already ported in #1357. Each defect follows the repro-first convention in AGENTS.md ("UI bugs: reproduction first"). The repro is committed red, and the minimal fix is committed green without the polish branch's wider restyle.

The golden changes need human baseline review. Once #1356 (warren-4780) lands, they need the ui-baseline-approved label. This PR carries no-automerge so it waits for that review.

Per defect

Seed Repro Red Green Already fixed on main?
warren-40f1 scripts/ui-visual/repros/warren-40f1.pw.ts n/a, green on main (e1cbc71) n/a Yes. warren-99e1 (#1350) moved the guard to src/ui/public/theme-init.js
warren-dac1 scripts/ui-visual/repros/warren-dac1.pw.ts 3b6d0b9 fc27339 No
warren-3de0 scripts/ui-visual/repros/warren-3de0.pw.ts 3f03c45 50e5ec7 No
warren-c023 scripts/ui-visual/repros/warren-c023.pw.ts 00a50f4 7308f23 No
warren-6bca scripts/ui-visual/repros/warren-6bca.pw.ts f1357ec 55d9b27 No

Goldens: 634ce8c

warren-40f1: CSP blocked the inline FOUC theme script (already fixed)

The repro checks three things. The SPA document carries script-src 'self'. No securitypolicyviolation event fires. <html data-theme> already matches the stored theme when <body> is parsed, before React mounts. It is green on main because #1350 already shipped the fix. I confirmed it is a real regression guard by restoring the pre-#1350 inline-script index.html locally. It then fails:

Error: no CSP violations
+   "script-src-elem inline",

warren-dac1: hollow stretched cards

A card sized to its content keeps the same height when pinned to align-self: flex-start. The repro measures that difference.

Error: Services stretched below its content     Expected: <= 1  Received: 75.5
Error: Child walk stretched below its content   Expected: <= 1  Received: 280

Fix: md:items-start on the Operations services/lifecycle row and lg:items-start on the plan-run-detail body row. I ran a throwaway rendered audit of every desktop page. It found no other hollow card in run-detail, project-detail or dispatch. Telemetry > Delivery "Stage timings" stretches by 50px under an explicit flex-1. It is outside this seed and was left alone.

warren-3de0: phone layout

Runs at 393px and 360px.

project-detail (31-char git URL, served via page.route) @360:  Error: both actions on one row  Received: 43
project-detail (fixture URL) @393:  Error: the actions are right-aligned  Received: 174.8
dispatch:  Error: Model starts below Agent  Expected: >= 601  Received: 557
runs:      Error: left edges agree  Expected: <= 0.5  Received: 14

Fix: below sm, the project header gives the git URL its own truncating row, and Refresh clone and Delete share one right-aligned group. Dispatch stacks Agent, Model and Provider below sm. The mobile runs card and its footer drop their extra 14px inset. Desktop is unchanged.

warren-c023: implementation-note captions and bottom-nav numbering

dispatch.desktop.light: Error: implementation notes on screen
+ "PROJECT CONTEXT APPENDED", "ENFORCED FROM LIVE USAGE EVENTS", "WEAKEST:", "TIMEOUT API", "FREE TEXT"
operations.phone.light bottom nav: - "04", "05"  + "06", "··"
Where Before After
Operations, active workloads (md+) NEWEST-RUNS WINDOW · FALLBACK POLL FROM THE NEWEST RUNS
Operations, active workloads (<md) LIVE · REFRESHED 1S AGO UPDATED 1S AGO
Operations, events panel (no seq range) NEWEST FIRST · BOUNDED POLL NEWEST FIRST
Dispatch, prompt N CHARACTERS · PROJECT CONTEXT APPENDED AT DISPATCH N CHARACTERS
Dispatch, cost cap ENFORCED FROM LIVE USAGE EVENTS · WEAKEST: PROJECT DEFAULT THE RUN STOPS AT THIS SPEND
Dispatch and plan dispatch, provider/model (no default) OVERRIDE · FREE TEXT OPTIONAL
Dispatch and plan dispatch, Timeout disabled select + NO PER-RUN TIMEOUT API YET removed (no API on main)
Plan dispatch, cost cap per child ENFORCED FROM LIVE USAGE EVENTS EACH CHILD RUN STOPS AT THIS SPEND
Plan dispatch, prompt template {seed_id} IS SUBSTITUTED PER CHILD · PROJECT CONTEXT APPENDED AT DISPATCH {seed_id} IS SUBSTITUTED PER CHILD
Plan dispatch, children summary SERVER WALKS THE PLAN'S CHILD ORDER CHILDREN RUN IN PLAN ORDER
Project detail, Ready plans UNBLOCKED ONLY removed

The phone bottom nav now numbers its own tabs 01-05 (Telemetry 04, More 05). The desktop sidebar keeps its indices. The raw-form-element allowlist drops by one in each dispatch form, because the two Timeout selects are gone.

warren-6bca: telemetry deep links on phone

telemetry-behavior.phone.light: Error: the deep link survives
Expected: "#/telemetry/behavior"   Received: "#/telemetry"

The same failure shows on all four tabs. Desktop passes.

Fix: the viewport-width redirect and the stacked phone arm are gone. The tab strip now shows at every width and scrolls sideways on a phone. use-is-desktop.ts had no other caller and is deleted. src/ui-tests/telemetry-deep-links.test.ts is ported from the polish branch as a source guard.

Golden changes (need human review)

These were regenerated in CI with update_goldens=true on 55d9b27 (run 37812981630) and committed as-is:

  • operations desktop light/dark: Services card shorter (dac1), new caption (c023). Phone: UPDATED caption and bottom nav.
  • plan-run-detail desktop light/dark: Child walk ends at its rows (dac1).
  • dispatch and dispatch-plan, all three: captions and no Timeout field (c023). Phone: Agent and Model stack (3de0).
  • project-detail desktop: Ready plans caption removed (c023). Phone: header actions on one right-aligned row (3de0).
  • runs phone: the card sits on the page gutter (3de0).
  • telemetry-loop / -behavior / -judge / -economics phone: show the linked tab alone instead of four stacked tabs (6bca), so the pages are much shorter.
  • every other phone page (agents, events, instance, plan-runs, projects, run-detail, setup): bottom nav ordinals only (about 107 px).
  • run-detail desktop, events desktop dark, telemetry desktop: 25 px or fewer differ. This is render noise with no intended change.

Validation

  • Each repro was run with bun run check:ui-visual --build repros/<id>.pw.ts, red before its fix and green after.
  • A full local bun run check:ui-visual passed: 179 tests (smoke, a11y, every repro). Goldens are skipped locally.
  • bun run check:all passed through the pre-commit hook on every commit.
  • bun run check:ui-goldens passed.

… fixed on main (warren-40f1)

The inline theme guard in index.html was blocked by script-src 'self'.
warren-99e1 (#1350) already moved it to public/theme-init.js, so this
repro is green on main. It pins the fix: the SPA document carries the
strict script-src, no securitypolicyviolation fires, and <html
data-theme> matches the stored theme when <body> is parsed, before
React mounts.

Verified red against the pre-#1350 index.html (inline script restored):
  Error: no CSP violations
  + "script-src-elem inline"

Refs: warren-4d4c
…d walk cards (warren-dac1)

Red on main. A content-sized card keeps its height when pinned to
align-self: flex-start; both cards grow past their content to match a
taller row neighbour:

  Error: Services stretched below its content
  Expected: <= 1
  Received:    75.5

  Error: Child walk stretched below its content
  Expected: <= 1
  Received:    280

Refs: warren-4d4c
…dac1)

Both parents were flex rows with the default stretch alignment, so each
card grew to its taller neighbour and left a hollow band below its
rows. items-start on the Operations services/lifecycle row (md+) and on
the plan-run-detail body row (lg+) lets each card end at its content.
Phone layout is a single column and does not change.

Ported from ui/polish-overhaul 08a7321 and 31826df without their
restyle. A rendered audit of every desktop page found no other hollow
card in run-detail, project-detail, or dispatch.

repros/warren-dac1.pw.ts is now green.

Refs: warren-4d4c
…ns gutter defects (warren-3de0)

Red on main at 393px and 360px:

  project-detail, 31-char git URL @360:
    Error: both actions on one row
    Expected: <= 1
    Received:    43
  project-detail, fixture URL @393:
    Error: the actions are right-aligned
    Received:    174.828125
  dispatch:
    Error: Model starts below Agent
    Expected: >= 601
    Received:    557
  runs:
    Error: left edges agree
    Expected: <= 0.5
    Received:    14

The short git URL is served through page.route: the fixture's own URL
is long enough to push both actions to their own row, so it shows only
the alignment half of the bug.

Refs: warren-4d4c
…l, and runs gutter (warren-3de0)

- Project detail: below sm the git URL takes its own row and truncates,
  and Refresh clone + Delete sit in one right-aligned group, so they
  wrap together instead of orphaning Delete.
- Dispatch: Agent, Model, Provider stack in one column below sm, so the
  Model placeholder never clips; sm keeps the two-up row and md+ the
  flex row.
- Runs: the mobile runs card and its pagination footer drop their extra
  14px inset and sit on the page gutter with the filter strip.

Desktop layout is unchanged. Minimal port; the polish branch's versions
(ba17c2c, 792d05c, 9b02bd4) came inside page rewrites.

repros/warren-3de0.pw.ts is now green at 393px and 360px.

Refs: warren-4d4c
…s and bottom-nav ordinals (warren-c023)

Red on main. Operations, dispatch, dispatch-plan, and project-detail
render implementation notes as captions, and the phone bottom nav
reuses the sidebar's ordinals:

  dispatch.desktop.light:
    Error: implementation notes on screen
    + "PROJECT CONTEXT APPENDED",
    + "ENFORCED FROM LIVE USAGE EVENTS",
    + "WEAKEST:",
    + "TIMEOUT API",
    + "FREE TEXT",
  operations.phone.light (bottom nav):
    -   "04",
    -   "05",
    +   "06",
    +   "··",

Refs: warren-4d4c
…-c023)

Captions describe what the operator sees or can do, not how the code
fetches or resolves it:

  Operations, active workloads (md+)  NEWEST-RUNS WINDOW · FALLBACK POLL
                                      -> FROM THE NEWEST RUNS
  Operations, active workloads (<md)  LIVE · REFRESHED 1S AGO -> UPDATED 1S AGO
  Operations, events panel            NEWEST FIRST · BOUNDED POLL -> NEWEST FIRST
  Dispatch, prompt                    N CHARACTERS · PROJECT CONTEXT APPENDED
                                      AT DISPATCH -> N CHARACTERS
  Dispatch, cost cap                  ENFORCED FROM LIVE USAGE EVENTS ·
                                      WEAKEST: PROJECT DEFAULT
                                      -> THE RUN STOPS AT THIS SPEND
  Dispatch + plan, provider/model     OVERRIDE · FREE TEXT -> OPTIONAL
  Dispatch + plan, Timeout field      NO PER-RUN TIMEOUT API YET -> field removed
  Plan dispatch, cost cap             ENFORCED FROM LIVE USAGE EVENTS
                                      -> EACH CHILD RUN STOPS AT THIS SPEND
  Plan dispatch, prompt               ... · PROJECT CONTEXT APPENDED AT
                                      DISPATCH -> {seed_id} IS SUBSTITUTED PER CHILD
  Plan dispatch, children             SERVER WALKS THE PLAN'S CHILD ORDER
                                      -> CHILDREN RUN IN PLAN ORDER
  Project detail, Ready plans         UNBLOCKED ONLY -> removed

The phone bottom nav numbers its own tabs 01-05 (Telemetry 04, More
05); the desktop sidebar keeps its indices. The raw-form-element
allowlist drops by one in each dispatch form with the Timeout selects.

repros/warren-c023.pw.ts is now green.

Refs: warren-4d4c
… phone (warren-6bca)

Red on main at phone width for all four tabs; desktop passes:

  telemetry-behavior.phone.light:
    Error: the deep link survives
    Expected: "#/telemetry/behavior"
    Received: "#/telemetry"

Refs: warren-4d4c
Drop the viewport-width redirect. Below md the page used to rewrite
every /telemetry/<tab> URL to /telemetry and stack all four tabs on one
scroll. Now every width routes the same way: the tab strip shows at all
widths and scrolls sideways on a phone, the linked tab is the selected
one, and a tab click updates the hash. use-is-desktop.ts had no other
caller and goes.

src/ui-tests/telemetry-deep-links.test.ts pins the source (no viewport
read, no redirect to the bare path), ported from ui/polish-overhaul
0223d7d without that commit's restyle of the page header.

repros/warren-6bca.pw.ts is now green; the warren-e9cd repro still
passes and its comment no longer describes the double mount.

Refs: warren-4d4c
…fixes (warren-4d4c)

CI-generated by the ui-visual workflow (update_goldens=true) on
55d9b27, run 37812981630, artifact ui-goldens-55d9b27; committed
as-is. Needs human baseline review.

Intended changes:
- operations: Services card sizes to content (dac1); captions (c023)
- plan-run-detail desktop: Child walk sizes to content (dac1)
- dispatch, dispatch-plan: captions, Timeout field removed (c023);
  phone Agent/Model stack (3de0)
- project-detail: Ready plans caption removed (c023); phone header (3de0)
- runs phone: card on the page gutter (3de0)
- telemetry-* phone: the linked tab alone instead of four stacked (6bca)
- every phone page: bottom nav ordinals 01-05 (c023)

run-detail desktop, events desktop dark, and telemetry desktop differ by
at most 25 pixels: render noise, no intended change.
@jayminwest jayminwest added the no-automerge Human-gated PR: auto-merge workflow must never enable auto-merge label Oct 8, 2026
@warren-auto-merge
warren-auto-merge Bot enabled auto-merge (squash) October 8, 2026 17:06
@jayminwest
jayminwest disabled auto-merge October 8, 2026 17:09
@jayminwest
jayminwest enabled auto-merge (squash) October 8, 2026 19:58
@jayminwest
jayminwest merged commit c7dd925 into main Oct 8, 2026
10 of 11 checks passed
@jayminwest
jayminwest deleted the ui/port-pl-10db-defects-4d4c branch October 8, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-automerge Human-gated PR: auto-merge workflow must never enable auto-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant