Skip to content

[iris] Make dashboard jobs view mobile-friendly#5170

Merged
ravwojdyla merged 2 commits intomainfrom
worktree-rav-iris-dashboard-mobile-friendly
Apr 25, 2026
Merged

[iris] Make dashboard jobs view mobile-friendly#5170
ravwojdyla merged 2 commits intomainfrom
worktree-rav-iris-dashboard-mobile-friendly

Conversation

@ravwojdyla-agent
Copy link
Copy Markdown
Contributor

Summary

Make the iris controller dashboard jobs view usable on phones — eliminate page-level horizontal scrolling and adapt the layout to narrow viewports.

Pattern: a simple "switch" between mobile and desktop. Below the sm breakpoint (640px) the jobs list and job detail render a stacked card grid (one job/task per card). At sm+ the existing tables render. Pagination is shared between both views.

Cards solve three problems that the table couldn't on phones:

  • No more horizontal scroll caused by the State badge + progress bar + name column not fitting
  • The star button is always visible (the table version used opacity-0 group-hover/row:opacity-100, which never lit up on touch devices)
  • All fields stack readably per job: name, state, duration, failure/preemption counts, pending reason, progress

Surrounding shell fixes (also necessary for the page itself to not scroll):

  • AppHeader: title gets truncate min-w-0, buttons get shrink-0. Long titles like "Iris Controller Dashboard" no longer push the buttons off the right edge.
  • TabNav: tab strip scrolls horizontally inside its own container (flex-1 min-w-0 overflow-x-auto). The page itself never scrolls horizontally — only the tab strip does, like an iOS tab bar. Refresh button stays pinned via shrink-0.
  • PageShell: long job IDs in the page title (text-xl font-mono) had no break behavior; now uses text-lg sm:text-xl break-anywhere min-w-0 so they wrap.
  • LogViewer: filter bar (used inside the JobDetail logs section) wraps via flex-wrap; filter input is full-width on xs, fixed w-64 from sm.
  • App.vue: overflow-x-clip safety net on the outer container — guards against any rogue overflow without breaking sticky/fixed children (the dashboard legend modal still works).

Desktop is unchanged at sm+: same tables, same column structure, same paddings, same column widths.

Test plan

  • DevTools at iPhone SE (320px), iPhone 12 (390px), iPad mini (768px), and desktop. No horizontal scroll on the page itself at any of these widths.
  • JobsTab landing page renders cards on phone widths; tabular layout at sm+. Pagination visible in both modes.
  • Star button on a top-level job is visible and tappable on a touch device.
  • JobDetail page: long job IDs in the title wrap instead of overflowing.
  • JobDetail Tasks card on phone shows Task#, state badge, worker, started, duration, exit code; profile buttons render for running tasks.
  • JobDetail Child Jobs card view renders correctly when there are nested jobs.
  • LogViewer toolbar (filter input + selects + Auto button) wraps on phone.
  • TabNav: tab strip scrolls horizontally on phone but the page doesn't; Refresh button stays pinned right.
  • Other tabs (Workers, Endpoints, Autoscaler, Account, Status, Scheduler, Cluster) render unchanged on desktop. (Mobile may still have horizontal scroll on those — they're explicitly out of scope; the App.vue overflow-x-clip clips any overflow at the page level so the user never sees a horizontal page scrollbar, but content may be cut off on those tabs at narrow widths.)

🤖 Generated with Claude Code

Switch the jobs list and job detail page to a card layout below the sm
breakpoint, keeping the existing table for desktop. The card layout
guarantees no page-level horizontal scroll on phones, makes the star
button always visible (no hover dependency), and surfaces all relevant
fields stacked per job.

Also fix the surrounding shell so phone viewports don't push the page
wide:
- AppHeader: title truncates, buttons keep with shrink-0
- TabNav: tab strip scrolls inside its own container, not the page
- PageShell: long job-id titles wrap via break-anywhere
- LogViewer: filter bar wraps, filter input full-width on xs
- App: overflow-x-clip safety net on the outer container
@ravwojdyla-agent ravwojdyla-agent added the agent-generated Created by automation/agent label Apr 25, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1dba035d8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

<div class="flex items-center gap-2 mb-6">
<h2 class="text-xl font-semibold text-text font-mono">{{ title }}</h2>
<div class="flex items-center gap-2 mb-6 min-w-0">
<h2 class="text-lg sm:text-xl font-semibold text-text font-mono break-anywhere min-w-0">{{ title }}</h2>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace invalid Tailwind wrap class

break-anywhere is not a Tailwind utility (Tailwind v4 uses wrap-anywhere/wrap-break-word), so this class compiles to no CSS and the long-title wrapping fix does not actually apply. On narrow viewports, long job IDs can still overflow or get clipped, which defeats the mobile-layout goal of this change and affects other new uses of break-anywhere in this commit as well.

Useful? React with 👍 / 👎.

@ravwojdyla
Copy link
Copy Markdown
Contributor

ravwojdyla commented Apr 25, 2026

Before this PR, on the mobile the dashboard is not very usable, after:

Iris Dashboard

Notes:

  • in this PR I focus on the job view ONLY
  • yes - I do check iris page on the tram - I'm not sure what that says about me
    • yes - in the past I did say I just want claude and no dashboards :D two things can be true at the same time 🤷‍♂️
  • I would totally respect if we decide not to merge this PR

@ravwojdyla ravwojdyla requested a review from rjpower April 25, 2026 00:45
@rjpower
Copy link
Copy Markdown
Collaborator

rjpower commented Apr 25, 2026

in this PR I focus on the job view ONLY
yes - I do check iris page on the tram - I'm not sure what that says about me
yes - in the past I did say I just want claude and no dashboards :D two things can be true at the same time 🤷‍♂️

ha this answered all of my questions

I would totally respect if we decide not to merge this PR

i'm fine with it if you can handle the cognitive dissonance.

Copy link
Copy Markdown
Collaborator

@rjpower rjpower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suspect if we want mobile for everything, we'd want to have some shared e.g. table paradigm. (or maybe not? as long as the agents are happy editing it this way, I don't need to poke the bear)

The CSS `sm:hidden` / `hidden sm:block` approach kept both variants in the
DOM, which made the e2e smoke tests fail: Playwright's
`page.locator("text=smoke-simple").first` was matching the hidden mobile
card link, then `to_be_visible()` failed because that link is `display:
none` at desktop widths.

Render only one variant at a time, picked via a reactive viewport-width
ref. Adds a minimal `useMediaQuery` composable. CI runs at desktop width
and now sees only the desktop table.
@ravwojdyla ravwojdyla merged commit 6336847 into main Apr 25, 2026
39 checks passed
@ravwojdyla ravwojdyla deleted the worktree-rav-iris-dashboard-mobile-friendly branch April 25, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-generated Created by automation/agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants