Tasks rows: the status wraps, labels fit their buttons
The coordinator's review: the status is the row's most important text and was cut off on most Needs you rows, and "Another round" was cut off inside its button. - The status wraps (two lines at most for real copy) instead of truncating. The project column is narrower (the name truncates if it must) and Updated too; Status takes the space. - Every action is 156px: the longest label, Another round, measures 103px in the fallback sans, and the button leaves 116px for it. - The rows browser test fails if a status is cut off or a label overflows its button (scrollWidth > clientWidth).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+16
−11
.rastrillo/budgets.txt+1 −1internal/equipo/static/equipo.css+9 −7internal/equipo/templates/work_parts.html+1 −1internal/thintest/rows_browser_test.go+5 −2
CI passed — run details
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index d2639724..adb0bc54 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -62,5 +62,5 @@ perf GET /conversation/attachments/{id}/preview skip Composer attachments: an im |
| perf GET /api/v1/runners skip Mac runners person API: bearer-only JSON for devices; the browser shows runners in the Team section. |
| time cmd/equipo-runner 60s TestReleaseRunnerHasNoFakeWorker builds the release runner and the thin package under testbuild (about 12s locally). |
| size internal/headless - 9387 End-to-end scenarios through a real runner and instance, plus browser drives. Measured 9387 test lines. |
| -size internal/thintest - 16691 Thin v1 contract and page tests; one package keeps one instance harness. Measured 16691 test lines. |
| +size internal/thintest - 16694 Thin v1 contract and page tests; one package keeps one instance harness. Measured 16694 test lines. |
| perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}. |
diff --git a/internal/equipo/static/equipo.css b/internal/equipo/static/equipo.css| index 5a214d84..fe83692b 100644 |
| --- a/internal/equipo/static/equipo.css |
| +++ b/internal/equipo/static/equipo.css |
| @@ -510,7 +510,7 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex |
| place on every row. The list is its own container, so the project |
| page's narrower column restacks the same cells. */ |
| [equipo-tasklist] { container: tasklist / inline-size; } |
| -[equipo-row][equipo-trow], [equipo-tcols] { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr) minmax(0, 1.1fr) 8rem 3.75rem 10.625rem; column-gap: .75rem; } |
| +[equipo-row][equipo-trow], [equipo-tcols] { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1.2fr) 8rem 3.5rem 11.875rem; column-gap: .75rem; } |
| [equipo-tcols] { padding: 0 1.0625rem .375rem; color: var(--rst-text-muted); font-size: var(--rst-fs-xs); } |
| [equipo-tcols] > :nth-child(5) { text-align: end; } |
| [equipo-row][equipo-trow] { align-items: start; padding: .6875rem 1rem; } |
| @@ -527,7 +527,7 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex |
| [equipo-trow] [equipo-dup] a { position: relative; z-index: 1; } |
| /* Status: one phrase, coloured only when someone must act; below it the |
| stepper and the rest in plain words, one line that truncates. */ |
| -[equipo-trow] [equipo-stage-name] { margin: 0; font-size: .8125rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } |
| +[equipo-trow] [equipo-stage-name] { margin: 0; font-size: .8125rem; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; } |
| [equipo-trow] [equipo-stage-name]:is([data-tone="negative"], [data-tone="attention"]) { font-weight: 600; } |
| [equipo-trow-detail] { display: flex; align-items: center; gap: .5rem; min-inline-size: 0; margin: .1875rem 0 0; color: var(--rst-text-muted); font-size: var(--rst-fs-xs); } |
| [equipo-trow-note] { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } |
| @@ -551,12 +551,14 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex |
| [equipo-trow-from] [equipo-who] { display: flex; } |
| [equipo-trow-from] [equipo-who] > span:last-child { overflow: hidden; text-overflow: ellipsis; } |
| [equipo-trow-from] [data-long] { display: none; } |
| -[equipo-trow] > [equipo-ago] { padding-block-start: .0625rem; color: var(--rst-text-muted); font-size: var(--rst-fs-sm); text-align: end; white-space: nowrap; } |
| +[equipo-trow] > [equipo-ago] { padding-block-start: .0625rem; color: var(--rst-text-muted); font-size: var(--rst-fs-sm); text-align: end; } |
| /* The action slot: every action the same size, quiet at rest (a soft |
| - accent tint), solid on hover and keyboard focus. */ |
| + accent tint), solid on hover and keyboard focus. The width fits the |
| + longest label (Another round, about 103px in the fallback sans) with |
| + room to spare; a label never truncates. */ |
| [equipo-trow-act] { display: flex; justify-content: flex-end; gap: .375rem; } |
| [equipo-trow-act] form { margin: 0; display: contents; } |
| -[equipo-act] { box-sizing: border-box; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .375rem; inline-size: 8.5rem; block-size: 1.75rem; padding: 0 .375rem; border: 1px solid color-mix(in srgb, var(--rst-accent) 20%, var(--rst-accent-soft)); border-radius: var(--rst-radius); background: var(--rst-accent-soft); color: var(--rst-accent); font: 600 var(--rst-fs-sm)/1 var(--rst-font, inherit); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color .12s, border-color .12s, color .12s; } |
| +[equipo-act] { box-sizing: border-box; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .375rem; inline-size: 9.75rem; block-size: 1.75rem; padding: 0 .5rem; border: 1px solid color-mix(in srgb, var(--rst-accent) 20%, var(--rst-accent-soft)); border-radius: var(--rst-radius); background: var(--rst-accent-soft); color: var(--rst-accent); font: 600 var(--rst-fs-sm)/1 var(--rst-font, inherit); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color .12s, border-color .12s, color .12s; } |
| [equipo-act] .icon { flex: none; inline-size: 1rem; block-size: 1rem; margin: 0; } |
| [equipo-act] > span { overflow: hidden; text-overflow: ellipsis; } |
| [equipo-act]:hover, [equipo-act]:focus-visible { background: var(--rst-accent-fill); border-color: var(--rst-accent-fill); color: var(--rst-on-accent-fill, #fff); } |
| @@ -574,7 +576,7 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex |
| [equipo-trow-more]:hover, [equipo-trow-more]:focus-visible { color: var(--rst-text); background: var(--rst-tint-hover); } |
| [equipo-rows] > li:has(> [equipo-trow-more]) { border-end-start-radius: calc(2 * var(--rst-radius)); border-end-end-radius: calc(2 * var(--rst-radius)); } |
| /* A project's own page names the project: no project column. */ |
| -[equipo-tasklist][data-scope="project"] :is([equipo-row][equipo-trow], [equipo-tcols]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 8rem 3.75rem 10.625rem; } |
| +[equipo-tasklist][data-scope="project"] :is([equipo-row][equipo-trow], [equipo-tcols]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 8rem 3.5rem 11.875rem; } |
| [equipo-tasklist][data-scope="project"] :is([equipo-trow-proj], [equipo-tcols] > :first-child) { display: none; } |
| /* Narrower lists: the same cells in fixed slots, stacked: project and |
| age, the title, the status, who and where from, then the action. The |
| @@ -590,7 +592,7 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex |
| [equipo-tasklist][data-scope="project"] [equipo-trow-task] { grid-area: top; padding-inline-end: 6.5rem; } |
| [equipo-tasklist][data-scope="project"] [equipo-row][equipo-trow] { grid-template-areas: "top" "status" "foot"; } |
| [equipo-trow-status] { grid-area: status; } |
| - [equipo-trow-from] { grid-area: foot; justify-self: start; align-self: center; display: flex; align-items: center; gap: .5rem; max-inline-size: calc(100% - 11rem); } |
| + [equipo-trow-from] { grid-area: foot; justify-self: start; align-self: center; display: flex; align-items: center; gap: .5rem; max-inline-size: calc(100% - 12.5rem); } |
| [equipo-trow]:not(:has([equipo-act])) [equipo-trow-from] { max-inline-size: calc(100% - 2.5rem); } |
| [equipo-trow-from] [equipo-who] { flex: none; } |
| [equipo-trow-from] [data-long] { display: inline; } |
diff --git a/internal/equipo/templates/work_parts.html b/internal/equipo/templates/work_parts.html| index 63af2834..576682f3 100644 |
| --- a/internal/equipo/templates/work_parts.html |
| +++ b/internal/equipo/templates/work_parts.html |
| @@ -24,7 +24,7 @@ |
| {{define "task-row"}}{{$from := .From}}{{with .T}}<li equipo-row equipo-trow data-task="{{.ID}}" data-stage="{{.Stage}}" data-group="{{.Group}}"> |
| {{if .ProjectID}}<a equipo-trow-proj href="/projects/{{.ProjectID}}">{{template "mono-s" .Mono}}<span>{{.Project}}</span></a>{{else}}<span equipo-trow-proj>{{template "mono-s" .Mono}}<span>{{.Project}}</span></span>{{end}} |
| <div equipo-trow-task><p equipo-row-title><a equipo-row-link href="/tasks/{{.ID}}">{{.Title}}</a></p>{{with .Dup}}<p equipo-dup><span>{{copy "work.dup"}} <a href="/tasks/{{.ID}}">{{.Title}}</a>{{if not $.T.Mine}} {{printf (copy "work.dup_decides") $.T.Creator.Name}}{{end}}</span></p>{{end}}</div> |
| -<div equipo-trow-status><p equipo-stage-name{{if .Tone}} data-tone="{{.Tone}}"{{end}} data-stage-line title="{{.Say}}">{{.Say}}</p><div equipo-trow-detail>{{template "track" .}}<span equipo-trow-note title="{{.Note}}">{{template "chip" .}}{{if .Chip}}.{{end}}{{range .Badges}} <span equipo-badge2 data-kind="{{.Kind}}" data-tone="{{.Tone}}">{{if .Live}}{{template "mark" "s"}}{{end}}{{.Text}}.</span>{{end}}</span></div></div> |
| +<div equipo-trow-status><p equipo-stage-name{{if .Tone}} data-tone="{{.Tone}}"{{end}} data-stage-line>{{.Say}}</p><div equipo-trow-detail>{{template "track" .}}<span equipo-trow-note title="{{.Note}}">{{template "chip" .}}{{if .Chip}}.{{end}}{{range .Badges}} <span equipo-badge2 data-kind="{{.Kind}}" data-tone="{{.Tone}}">{{if .Live}}{{template "mark" "s"}}{{end}}{{.Text}}.</span>{{end}}</span></div></div> |
| <div equipo-trow-from>{{template "who" .Creator}}{{if .SourceHref}}<a equipo-source href="{{.SourceHref}}">{{else}}<span equipo-source>{{end}}<span data-long>{{.Source}}</span><span data-short>{{.SourceShort}}</span>{{if .SourceHref}}</a>{{else}}</span>{{end}}</div> |
| <span equipo-ago{{agoData .Changed ""}} title="{{.Changed.Format "2006-01-02 15:04"}}">{{.Ago}}</span> |
| <div equipo-trow-act>{{with .Act}}{{if .Href}}<a equipo-act href="{{.Href}}" data-act="{{.Kind}}">{{icon .Icon}}<span>{{.Label}}</span></a>{{else}}<form method="post" action="{{.Post}}"><input type="hidden" name="from" value="{{$from}}"><button equipo-act type="submit" data-act="{{.Kind}}" data-task-{{.Kind}}>{{icon .Icon}}<span>{{.Label}}</span></button></form>{{end}}{{end}}{{template "task-menu" (dict "ID" .ID "Menu" .Menu "From" $from "Ask" true)}}</div> |
diff --git a/internal/thintest/rows_browser_test.go b/internal/thintest/rows_browser_test.go| index 24476aed..6ca71fef 100644 |
| --- a/internal/thintest/rows_browser_test.go |
| +++ b/internal/thintest/rows_browser_test.go |
| @@ -55,7 +55,10 @@ func TestBrowserTaskRows(t *testing.T) { |
| title := row(f.long) + `.querySelector('[equipo-row-link]')` |
| p.check(`(()=>{const l=`+title+`;const lh=parseFloat(getComputedStyle(l).lineHeight);return `+box+`(l).height<=2*lh+1 && l.scrollHeight>l.clientHeight})()`, "the long title is not clamped to two lines") |
| p.check(`[...document.querySelectorAll('[equipo-trow-note]')].every(n=>`+box+`(n).height<=parseFloat(getComputedStyle(n).fontSize)*1.8 && (n.textContent.trim()==='' || n.title.length>0))`, "a detail line wraps or has no tooltip") |
| - p.check(`[...document.querySelectorAll('[equipo-trow] [equipo-stage-name]')].every(n=>`+box+`(n).height<=parseFloat(getComputedStyle(n).fontSize)*1.8)`, "a status wraps") |
| + // The status is never cut off: it wraps, to two lines at most here. |
| + p.check(`[...document.querySelectorAll('[equipo-trow] [equipo-stage-name]')].every(n=>n.scrollWidth<=n.clientWidth && n.scrollHeight<=n.clientHeight+1 && `+box+`(n).height<=parseFloat(getComputedStyle(n).lineHeight)*2+1)`, "a status is cut off or runs past two lines") |
| + // No action's label overflows its button. |
| + p.check(acts+`.every(a=>{const l=a.querySelector('span');return l.scrollWidth<=l.clientWidth})`, "an action's label overflows its button: "+eval[string](p, acts+`.map(a=>a.textContent.trim()+' '+a.querySelector('span').scrollWidth+'/'+a.querySelector('span').clientWidth).join(', ')`)) |
| if size.touch { |
| // 390: no column names; project and age share the top line, |
| @@ -67,7 +70,7 @@ func TestBrowserTaskRows(t *testing.T) { |
| } else { |
| // 1280: the column names line up with their cells. |
| p.check(`(()=>{const c=[...document.querySelectorAll('[equipo-tcols] > span')].map(e=>`+box+`(e).left),r=`+row(f.retry)+`;const cells=['[equipo-trow-proj]','[equipo-trow-task]','[equipo-trow-status]','[equipo-trow-from]'].map(s=>`+box+`(r.querySelector(s)).left);return cells.every((x,i)=>Math.abs(x-c[i])<1)})()`, "column names off their cells") |
| - p.check(`(()=>{const a=`+box+`(`+row(f.retry)+`.querySelector('[equipo-act]'));return a.width>=135 && a.width<=137 && a.height>=27 && a.height<=29})()`, "action is not 136 by 28") |
| + p.check(`(()=>{const a=`+box+`(`+row(f.retry)+`.querySelector('[equipo-act]'));return a.width>=155 && a.width<=157 && a.height>=27 && a.height<=29})()`, "action is not 156 by 28") |
| // Focus: the action shows its ring and its solid fill. |
| p.check(`(()=>{const s=`+row(f.explore)+`.querySelector('a[equipo-source]')||`+row(f.explore)+`.querySelector('[equipo-row-link]');s.focus();return document.activeElement===s})()`, "focus before the action") |
| for i := 0; i < 4 && !eval[bool](p, `document.activeElement===`+next); i++ { |