Repository navigation
[AI] #216: mobile layout and PWA install - #226
Merged
Merged
Conversation
Phone use of blanket is read-mostly: is my job done, how long has it been running, and what did it print. The desktop tables answer that, but not on a 390px screen. Per the approved decisions on #216: - One set of markup. Below 640px app.css restyles the existing task, worker, upcoming and task-type rows as cards (grid-template-areas on the <tr>, thead hidden); desktop renders exactly as before. A task card leads with state + duration, then type + short id, then one context line (worker if running; exit code + finish time if terminal). The whole card opens the detail page; Progress % is not shown. - Duration is computed server-side (taskDuration template func) and refreshed by the existing SSE/refresh paths, so nothing ticks in JS. - Every cancel and every delete now has hx-confirm naming the task type -- before, only cancelling a RUNNING task asked, and a mis-tap on a phone is easy. - Task and worker logs get a "Newest first" toggle (log-order.js): newest-first by default on narrow screens, oldest-first + pin-to-bottom on desktop as today. Live panes switch hx-swap to afterbegin so they keep tailing at the top. - Bottom tab bar (Tasks / Upcoming / Workers / More) on narrow screens. - Header shows the instance name: hostname by default, overridable with the new ui.instanceName config key. - Installable PWA: generated /ui/manifest.webmanifest (name carries the instance name), 192/512/maskable placeholder icons until #55, and iOS meta tags. No service worker: the data is live, so an offline cache would only serve stale states. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
turtlemonvh
commented
Oct 19, 2026
turtlemonvh
left a comment
Owner
Author
There was a problem hiding this comment.
Comments are mostly about mobile / desktop parity
The review asked for the phone and desktop views to match rather than diverge: - Duration was a phone-card-only cell. It is now a real Duration column in the desktop task tables (tasks page and a series' past runs) and a row in the task detail table. The context cell stays card-only: on desktop it would only repeat the Exit/Updated/Created/Scheduled columns. - The "Newest first" log toggle (log-order.js, matchMedia default, sessionStorage) is gone from the task and worker logs. Both read oldest first with the newest line at the bottom on every screen size; the pane is top-aligned so a short log sits at the top, and "Pin to bottom" keeps tailing once it overflows. - The cancel/delete hx-confirm attributes were already shared markup, so desktop got them too; the Playwright confirm journey now runs at a desktop viewport as well as the phone one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decision needed
Nothing blocks merging. Two small calls I made that you may want to flip:
Review follow-up (parity between mobile and desktop)
log-order.jsare gone. The task and worker logs read oldest first with the newest line at the bottom, on a phone and on a desktop. The pane is top-aligned, so a short log sits at the top. "Pin to bottom" keeps tailing once the log overflows.hx-confirmattributes were already in the shared row markup, and no CSS or JS limits them to phones, so desktop already showed the dialog. I checked every cancel and delete: task rows, the Upcoming one-time cancel, the series cancel and the stopped-worker delete. All of them confirm. The Playwright confirm journey (dismiss keeps the task, accept deletes, cancel asks) now runs at a 1280×800 viewport as well as the phone one.What changed
app.cssrestyles the existing task, worker, upcoming and task-type rows as cards. It usesdisplay:gridwith grid-template-areas on the<tr>and hides the thead. Above 640px the only change is the new Duration column.taskDurationtemplate func computes it on the server. It shows on the phone card, in the desktop Duration column and on the task detail page. A running task shows now − started, a finished one shows its last update − started, and a waiting one showsqueued Xm. It refreshes through the existing SSE/Refresh paths; no JavaScript timer.hx-confirmnaming the task type. That covers WAITING/SCHEDULED/CLAIMED cancel and terminal delete in the task rows, the Upcoming one-time cancel, and the stopped-worker delete. The existing journeys cancel test now accepts the dialog..log-paneclass. Its toolbar now matches the task log's.aria-current. The top bar keeps only the brand and the instance name.ui.instanceNamekey (viper default"", so it shows on the About page) overrides it.GET /ui/manifest.webmanifestis generated, withname= "Blanket · ", short_name, start_url/scope/ui/,display: standalone, and 192/512/maskable icons.apple-touch-icon,apple-mobile-web-app-capable,theme-colorand a favicon.docs/usage.md(phone layout, installing,ui.instanceName, the desktop Duration column, log order) anddocs/api.md(the manifest route).Judgment calls
task_outputexit-code spec.startedTs) shows no duration rather than a misleading one. SCHEDULED tasks and series templates show none either.Verification
make check-fmt: clean.make docker-test: all 18 packages ok. New tests inserver/ui_mobile_test.gocover:fmtDuration,taskDurationAt(each state),exitSummary, anduiInstanceName(hostname default, override, trim, error).make docker-test-smoke: smoke, restart, migrate, restart-machine and upgrade all OK.make docker-test-browser: 61 passed.tests/e2e/specs/mobile.spec.tshas two blocks:page.on('dialog')and checks that the message names the type.blanket-npm-cachedocker volume on this machine holds Playwright 1.63, which doesn't match the 1.64 image. I ran the suite with a fresh volume (blanket-npm-cache-pw164) and didn't runmake docker-clean, because other worktrees use the shared one.GOOS=windowsandGOOS=darwinbuilds are fine.Closes #216
🤖 Generated with Claude Code