From d046bccaf649402fb70798643e8d9fe8212b1a7e Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Fri, 2 Oct 2026 20:57:42 -0400 Subject: [PATCH] refactor(schedules): improve mobile table layout and extract tabbar padding utility --- .../src/components/schedules/PromptsTab.tsx | 6 +-- .../schedules/ScheduleJobsTable.tsx | 39 +++++++++++-------- .../schedules/ScheduleRunsTable.tsx | 25 ++++++------ frontend/src/index.css | 4 ++ frontend/src/pages/GlobalSchedules.tsx | 6 +-- frontend/src/pages/Schedules.tsx | 2 +- 6 files changed, 47 insertions(+), 35 deletions(-) diff --git a/frontend/src/components/schedules/PromptsTab.tsx b/frontend/src/components/schedules/PromptsTab.tsx index 5819562c..8d78f101 100644 --- a/frontend/src/components/schedules/PromptsTab.tsx +++ b/frontend/src/components/schedules/PromptsTab.tsx @@ -148,7 +148,7 @@ export function PromptsTab({ promptDialog, templateId, onNew, onEdit, onDelete, onClick={() => onEdit(template.id)} className="cursor-pointer transition-colors hover:bg-accent/40" > - +
{template.description && ( - {template.description} + {template.description} )} {template.category} · {template.cadenceHint} diff --git a/frontend/src/components/schedules/ScheduleJobsTable.tsx b/frontend/src/components/schedules/ScheduleJobsTable.tsx index 52bde885..b430c9a7 100644 --- a/frontend/src/components/schedules/ScheduleJobsTable.tsx +++ b/frontend/src/components/schedules/ScheduleJobsTable.tsx @@ -101,7 +101,7 @@ export function ScheduleJobsTable({ - + {showRepo && } @@ -161,27 +161,32 @@ export function ScheduleJobsTable({ isSelected && 'bg-accent/30', )} > - -
StatusStatus JobRepoSchedule + - {statusLabel} + {statusLabel} +
- - {job.description && {job.description}} - {mobileDetail} + + + + + + + {job.description && {job.description}} + {mobileDetail} diff --git a/frontend/src/components/schedules/ScheduleRunsTable.tsx b/frontend/src/components/schedules/ScheduleRunsTable.tsx index 9495c38f..dfab3d48 100644 --- a/frontend/src/components/schedules/ScheduleRunsTable.tsx +++ b/frontend/src/components/schedules/ScheduleRunsTable.tsx @@ -51,11 +51,11 @@ export function ScheduleRunsTable({ - + {showRepo && } - + @@ -66,6 +66,9 @@ export function ScheduleRunsTable({ const isUnread = run.viewedAt === null && (run.status === 'completed' || run.status === 'failed') const isSelected = selectedRunId === run.id const repoName = getRunRepoName(run) + const startedLabel = run.status === 'running' ? 'Running' : formatDistanceToNow(run.startedAt, { addSuffix: true }) + const startedTitle = new Date(run.startedAt).toLocaleString() + const mobileDetail = repoName ? `${startedLabel} · ${repoName}` : startedLabel return ( onSelectRun(run.id)} className={cn('cursor-pointer transition-colors hover:bg-accent/40', isSelected && 'bg-accent/30')} > - - {showRepo && ( @@ -110,10 +115,8 @@ export function ScheduleRunsTable({ )} - diff --git a/frontend/src/index.css b/frontend/src/index.css index c72a6a4f..5d1c5494 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -353,6 +353,10 @@ body { padding-bottom: env(safe-area-inset-bottom); } +@utility pb-mobile-tabbar { + padding-bottom: calc(env(safe-area-inset-bottom) + 5rem); +} + /* Prevent iOS zoom on all input elements */ @media (max-width: 768px) { input[type="text"], diff --git a/frontend/src/pages/GlobalSchedules.tsx b/frontend/src/pages/GlobalSchedules.tsx index 1d778dd0..26ce632a 100644 --- a/frontend/src/pages/GlobalSchedules.tsx +++ b/frontend/src/pages/GlobalSchedules.tsx @@ -541,7 +541,7 @@ export function GlobalSchedules() { -
+
{!hasJobs ? (
@@ -715,7 +715,7 @@ export function GlobalSchedules() {
-
+
-
+
+
StatusStatus RunRepoTriggerStartedStarted Duration Branch Actions
+ {getRunStatusIcon(run.status)} - {getRunStatusLabel(run.status)} + {getRunStatusLabel(run.status)} +
+ {getRunStatusIcon(run.status)} @@ -98,10 +102,11 @@ export function ScheduleRunsTable({ )} {run.errorText && ( - + {run.errorText} )} + {mobileDetail}
{run.triggerSource} - - {run.status === 'running' ? 'Running' : formatDistanceToNow(run.startedAt, { addSuffix: true })} - + + {startedLabel} {formatRunDuration(run)} {formatRunBranch(run) ?? '—'}