Skip to content

fix(ui): Tasks tab fills viewport height like the Chat tab (#1500)#1508

Merged
dolho merged 3 commits into
devfrom
feature/1500-tasks-fill-height
Jul 8, 2026
Merged

fix(ui): Tasks tab fills viewport height like the Chat tab (#1500)#1508
dolho merged 3 commits into
devfrom
feature/1500-tasks-fill-height

Conversation

@vybe

@vybe vybe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The Tasks tab joins FULLSCREEN_TABS (the Chat tab's h-screen flex-fill layout), so the task list absorbs the remaining viewport height instead of scrolling inside a fixed max-h-96 box on a mostly-empty page.
  • Strict no-regression floor: the old max-h-96 list cap is retained as the history card's min-h-96 floor — no viewport height ever shows fewer task rows than before. Live measurement drove this: fixed chrome (~780px on a populated agent) would otherwise leave a 222px list at a 1000px viewport, fewer rows than the old cap.
  • TasksPanel's root is both the fill column and the short-viewport fallback scroller (load-bearing: the page cannot scroll in fullscreen mode, so without it short viewports would hard-clip the composer). Padding moved onto the scroll root so the scrollbar sits at the card edge.
  • Repairs the pre-existing Agent Detail: Chat tab content width jumps when switching to/from any other tab #954 spec (agent-detail-chat-width.spec.js): Agent Detail tabs: overflow into a "More" dropdown instead of horizontal scroll #1114's aria-hidden measuring mirror made the bare nav.-mb-px locator a strict-mode violation; the suite only runs on ui-labeled PRs, so the breakage was invisible until now (learnings entry added).

Changes

  • src/frontend/src/views/AgentDetail.vueFULLSCREEN_TABS = ['chat', 'tasks'] + panel contract comment; Tasks wrapper flex-fills
  • src/frontend/src/components/TasksPanel.vue — fill-column restructure, min-h-96 floor, uncapped flex-1 list, vertically-centered loading/empty states, data-testid anchors
  • src/frontend/e2e/agent-detail-tasks-fill-height.spec.js — new: floor ≥ old cap, growth-with-viewport (cap-removal signal robust to per-agent chrome height), page-scroll containment, Agent Detail: Chat tab content width jumps when switching to/from any other tab #954-class width parity, short-viewport composer reachability
  • src/frontend/e2e/agent-detail-chat-width.spec.js.first() repair
  • docs/memory/feature-flows/{tasks-tab,session-tab}.md, feature-flows.md, learnings.md

Accepted tradeoffs (from plan review)

  • Sparse data now shows a tall card with empty space below the rows (standard list-app pattern; empty state centers).
  • Alternative "just remove the cap and let the page scroll" was rejected: it diverges from Chat and scrolls the composer/queue status away.
  • Extreme viewport heights (<~350px) clip the AgentHeader — pre-existing fullscreen-mode behavior, exact Chat parity.

Test Plan

  • e2e: npx playwright test e2e/agent-detail-tasks-fill-height.spec.js e2e/agent-detail-chat-width.spec.js — 5/5 passed against the live stack
  • Live verification: card grows 382→620px across a 1000→1400px viewport; no page scrollbar; composer reachable via panel scroll at 600px; dark + light modes; empty state centered; populated list scrolls internally
  • Existing behavior intact: ?execution= deep-link (scrollIntoView is container-agnostic), task expansion, ?tab=tasks deep-link

Fixes #1500

🤖 Generated with Claude Code

…ecomes min-h-96 floor (#1500)

The Tasks tab joins FULLSCREEN_TABS (the Chat tab's h-screen flex-fill
layout): TasksPanel becomes a fill column whose root is also the
short-viewport fallback scroller, and the task list absorbs remaining
viewport height instead of scrolling inside a fixed max-h-96 box. The
old cap is retained as the card's floor (min-h-96), so no viewport
height ever shows fewer task rows than before.

- AgentDetail.vue: FULLSCREEN_TABS = ['chat','tasks'] + panel contract
  comment; Tasks wrapper flex-fills (padding moved onto the panel's
  scroll root so content scrolls under it, scrollbar at the card edge)
- TasksPanel.vue: root p-6 flex-1 flex-col gap-6 overflow-y-auto;
  history card flex-1 min-h-96 with the list as the flex-1 scroll
  region; loading/empty states center vertically; data-testid anchors
- e2e: new agent-detail-tasks-fill-height.spec.js (floor >= old cap,
  growth-with-viewport, page-scroll containment, #954-class width
  parity, short-viewport composer reachability); repair the #954 spec's
  nav.-mb-px strict-mode breakage introduced by #1114's measuring
  mirror (.first())
- docs: tasks-tab.md layout section, session-tab.md stale fullscreen
  line, flow index row, learnings entry on ui-label-gated e2e rot

Verified live: 5/5 e2e green; card grows 382->620px across a
1000->1400px viewport; no page scrollbar; composer reachable at 600px;
dark+light modes; empty state centered.

Fixes #1500

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vybe vybe added the ui PR touches the frontend UI — triggers Playwright e2e tests label Jul 7, 2026
@dolho

dolho commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review: ✅ Approve on approach — ⚠️ rebase required before merge

The layout approach is sound: FULLSCREEN_TABS = ['chat', 'tasks'], panel root as the flex-fill column and the short-viewport fallback scroller (load-bearing since the page can't scroll in fullscreen mode), and retaining the old max-h-96 cap as the new min-h-96 floor so no viewport ever shows fewer rows than before. The .first() repair of the #954 spec (broken by #1114's aria-hidden measuring mirror) is a legit pre-existing-rot fix, and the learnings.md entry on ui-gated e2e specs rotting silently is valuable.

Blockers before merge:

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚠️ Nightly unit-suite check skipped — merge conflict against dev.

Resolve by running git merge dev locally and pushing the result. The next nightly run will re-test once the conflict is gone.

dolho and others added 2 commits July 8, 2026 11:40
…l-height

# Conflicts:
#	docs/memory/feature-flows.md
#	docs/memory/learnings.md
…'t flake (#1500)

The frontend-e2e run surfaced a second pre-existing infra flake (alongside
the #954 spec repair): dashboard-grid-view timed out clicking the dashboard
mode toggles because the first-run OnboardingWizard (trinity-enterprise#52)
auto-opens on the CI stack's fresh, zero-user-agent Dashboard and its
`fixed inset-0` backdrop intercepts pointer events. It's a race against
fleet-load, so it was flaky, not deterministic, and local dev never
reproduces it (a real stack has agents, so the wizard never auto-opens).

Seed the product's own remembered-dismissal key
(`trinity_onboarding_dismissed_v1`) in the shared auth.setup.js storageState
— same origin as the JWT `token`, so it's captured by the snapshot every
spec inherits. Fixes it fleet-wide with one line; specs that want the wizard
opt back in via `?onboarding=1` (which bypasses the key by design).

No app code changes. Adds a learnings entry for the fresh-install-only-modal
class of e2e flake.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dolho

dolho commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review (direct). Tasks tab joins FULLSCREEN_TABS and flex-fills the viewport; old max-h-96 cap becomes the min-h-96 floor (no fewer rows at any height), panel root is the short-viewport fallback scroller; e2e fill/parity spec added + the #954 .first() locator repair. Rebased on dev, MERGEABLE; CI green except the ui-gated e2e still running — that's the gate for this one, wait for it. Sound approach. ✅ once e2e passes.

@dolho
dolho merged commit e0f57e1 into dev Jul 8, 2026
18 checks passed
vybe pushed a commit that referenced this pull request Jul 9, 2026
…ui opt-in (#1526) (#1551)

The frontend-e2e Playwright suite ran ONLY on `ui`-labeled PRs, so most PRs never
triggered it and the suite rotted silently — specs broke against structural/UX
changes and sat red on `dev` for weeks (four documented instances: #1134, #1508,
#1378). The gate itself was the root cause.

Add automatic triggers so a red suite is always visible:
- Nightly `schedule` (07:00 UTC) on `dev` — the durable signal. A red nightly
  opens/updates a single tracking issue (new `report` job, label
  `frontend-e2e-nightly`), à la #1185; a green nightly closes it.
- Auto-run on any PR that touches `src/frontend/**` (dependency-free `changes`
  job via `gh pr diff`), so frontend authors see their own breakage.
- The `ui` label still works as a manual opt-in on non-frontend PRs and to force a
  run (preserved for the heavier @visual/@Interactive tiers, #596).
- `workflow_dispatch` for on-demand runs.

DECISION (AC): advisory, NOT a required merge gate. The recurring failure class is
modal/overlay flake on a fresh zero-user-agent stack, so a hard gate like #715's
unit gate needs a flake budget first (#596). Recorded in the workflow header.

Per-job least-privilege permissions; concurrency keyed per-PR (cancel) vs per-ref
(schedule, no cancel). Only @smoke runs in CI, unchanged.

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

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants