oficina / equipo Public

Merge branch 'sidebar-three-lines' into main

Give working specialist rows separate title and activity lines

The task title gets the full row width, the activity sits below it in
smaller muted text, and both end at the timer's edge with the chevron
in its own column. Idle rows stay one line.
claude agent, operated by paul@keymail.dev 0d7f2041dc59532026233c34548f8da7fd2f8872 parent ff430afparent 479b9b3
5 files changed, +119 −13
  • .rastrillo/budgets.txt +1 −1
  • internal/equipo/static/equipo.css +5 −9
  • internal/thintest/specialist_rows_browser_test.go +81 −0
  • internal/thintest/team_panel_browser_test.go +4 −3
  • scripts/runner-reference-allowlist.json +28 −0

CI passed — run details

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 6a2ef244..0e95da93 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -71,7 +71,7 @@ perf GET /tasks/{id}/files/{file} skip Research kept images: the bytes of one 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 - 10352 End-to-end scenarios through a real runner and instance, browser drives and the Assistant's included. Measured 10352 test lines.
-size internal/thintest - 24565 Contract and browser tests share one instance harness. Adds activity subject privacy, plain tool labels, long titles and accessible text checks. Measured 24565 test lines.
+size internal/thintest - 24648 Contract and browser tests share one instance harness. Includes specialist row geometry at desktop and phone widths, live updates, and full accessible names. Measured 24648 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}.
perf GET /api/v1/usage skip Thin v1 person API: bearer-only JSON for devices; the browser reads usage through /usage.
perf GET /api/v1/advice skip Thin v1 person API: bearer-only JSON for devices; the browser reads advice through /usage and /conversation.
diff --git a/internal/equipo/static/equipo.css b/internal/equipo/static/equipo.css
index 2e2f0135..b578affd 100644
--- a/internal/equipo/static/equipo.css
+++ b/internal/equipo/static/equipo.css
@@ -804,8 +804,8 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex
[equipo-cap] { margin-block-start: var(--rst-sp-2) !important; font-size: var(--rst-fs-xs); color: var(--rst-text-muted); }
/* The sidebar's specialists (the team panel, 2026-11-11): each a compact
row that links to its drawer. Line one is the specialist, its living
- mark and clock; line two, while it works, the task's title and what
- it is doing in plain words. Idle is one muted word. */
+ mark and clock; while it works, the title and activity each get
+ their own line, ending before the chevron. Idle is one muted word. */
[rst-shell-sidebar] [rst-shell-nav] > a[equipo-spec] { display: grid; grid-template-columns: 1em minmax(0, 1fr) auto .75em; align-items: center; column-gap: var(--rst-sp-2); row-gap: 1px; padding-block: .4rem; color: var(--rst-text-muted); }
[equipo-spec] > .icon { inline-size: 1em; block-size: 1em; margin: 0; }
[equipo-spec] > .icon:last-of-type { inline-size: .75em; block-size: .75em; color: var(--rst-text-faint); transition: transform .2s var(--equipo-ease, ease), color .2s ease; }
@@ -816,12 +816,9 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex
[equipo-spec-attempt] { color: var(--rst-text-muted); }
[equipo-spec-state] [data-spec-star] { display: inline-flex; font-size: .9em; }
[equipo-spec-state] [equipo-sparkle] { margin: 0; inline-size: 1em; block-size: 1em; }
-[equipo-spec-now] { grid-column: 2 / -1; grid-row: 2; display: flex; align-items: baseline; gap: .4em; min-inline-size: 0; font-size: var(--rst-fs-xs); line-height: 1.4; color: var(--rst-text-muted); }
-/* The title gives way first, down to a few words: what it is doing is
- the live part. The row's title attribute carries both in full. */
-[equipo-spec-now] > [equipo-nav-task] { flex: 1 1 0; min-inline-size: 5.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rst-text); opacity: .82; }
-[equipo-spec-doing] { flex: 0 1 auto; max-inline-size: 72%; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
-[equipo-spec-doing]::before { content: "\00B7"; margin-inline-end: .4em; color: var(--rst-text-faint); }
+[equipo-spec-now] { grid-column: 2 / 4; grid-row: 2; display: grid; min-inline-size: 0; font-size: var(--rst-fs-sm); line-height: 1.4; }
+[equipo-spec-now] > [equipo-nav-task] { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rst-text); }
+[equipo-spec-doing] { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--rst-fs-xs); color: var(--rst-text-muted); }
[equipo-spec-doing][data-new] { animation: equipo-rise .3s ease-out both; }
[equipo-count][data-attention] { color: var(--rst-tone-warning-fg); font-weight: 600; }
/* Phone width: stack by container, so the desk and the phone agree. */
@@ -862,7 +859,6 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex
[rst-shell-sidebar~="index"] [rst-shell-nav] > a[equipo-spec]::after { content: none; }
[rst-shell-sidebar~="index"] [equipo-spec] > .icon:first-child { color: var(--rst-accent); }
[rst-shell-sidebar~="index"] [equipo-spec] > .icon:last-of-type { inline-size: .625rem; block-size: .625rem; justify-self: center; }
- [rst-shell-sidebar~="index"] [equipo-spec-now] { font-size: var(--rst-fs-sm); }
}
/* The message a task was noted from, opened from the task: a soft tint
that fades. */
diff --git a/internal/thintest/specialist_rows_browser_test.go b/internal/thintest/specialist_rows_browser_test.go
new file mode 100644
index 00000000..c00cb610
--- /dev/null
+++ b/internal/thintest/specialist_rows_browser_test.go
@@ -0,0 +1,81 @@
+//go:build browser
+
+package thintest
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "strings"
+ "testing"
+
+ "github.com/chromedp/cdproto/accessibility"
+ "github.com/chromedp/cdproto/cdp"
+ "github.com/chromedp/chromedp"
+)
+
+func TestBrowserSpecialistRows(t *testing.T) {
+ g := newTeamGallery(t)
+ for _, width := range []int64{1280, 390} {
+ t.Run(fmt.Sprint(width), func(t *testing.T) {
+ p := openInner(t, g.a.inst.URL, g.a.inst.Cookie(), width, 844, width == 390, "light", "reduce")
+ defer p.stop()
+ path := "/tasks"
+ if width == 390 {
+ path = "/work"
+ }
+ p.open(path)
+ p.wait(`document.querySelector('#nav-review [equipo-clock]').textContent.length>0`, "Review's clock")
+ p.view(fmt.Sprintf("specialist-rows-%d", width))
+ checkSpecialistRows(p, "Looking over the changes")
+ })
+ }
+}
+
+func checkSpecialistRows(p *innerPage, activity string) {
+ p.t.Helper()
+ checks := eval[map[string]bool](p, `(()=>{
+ const row=document.querySelector('#nav-review'), idle=document.querySelector('#nav-engineering');
+ const name=row.querySelector('[equipo-spec-name]'), title=row.querySelector('[equipo-nav-task]'), activity=row.querySelector('[equipo-spec-doing]');
+ const box=e=>e.getBoundingClientRect(), near=(a,b)=>Math.abs(a-b)<=1;
+ const n=box(name), t=box(title), a=box(activity), c=box(row.querySelector('[equipo-clock]')), chevron=box(row.querySelector('.icon:last-of-type'));
+ const ts=getComputedStyle(title), as=getComputedStyle(activity), is=getComputedStyle(idle), i=box(idle), ins=box(idle.querySelector('[equipo-spec-name]')), state=box(idle.querySelector('[equipo-spec-state]'));
+ return {
+ 'three separate lines': t.top>=n.bottom-1 && a.top>=t.bottom-1 && t.height<=parseFloat(ts.lineHeight)+1 && a.height<=parseFloat(as.lineHeight)+1,
+ 'right edges within 1px': near(c.right,t.right) && near(c.right,a.right),
+ 'full width below the name': near(n.left,t.left) && near(t.left,a.left),
+ 'chevron in its own column': chevron.left>Math.max(c.right,t.right,a.right) && near((chevron.top+chevron.bottom)/2,(n.top+n.bottom)/2),
+ 'title ellipsis only at the end': title.scrollWidth>title.clientWidth && ts.textOverflow==='ellipsis' && ts.whiteSpace==='nowrap' && ts.overflowX==='hidden',
+ 'activity smaller and muted': parseFloat(as.fontSize)<parseFloat(ts.fontSize) && as.color===getComputedStyle(row.querySelector('[equipo-spec-state]')).color && as.color!==ts.color,
+ 'idle stays one line': !idle.querySelector('[equipo-spec-now]') && near((ins.top+ins.bottom)/2,(state.top+state.bottom)/2) && i.height<=Math.max(parseFloat(is.minHeight)||0,ins.height+parseFloat(is.paddingTop)+parseFloat(is.paddingBottom)+parseFloat(is.borderTopWidth)+parseFloat(is.borderBottomWidth))+1 && box(row).height>i.height,
+ 'full tooltip': row.querySelector('[equipo-spec-now]').title===title.textContent+' · '+activity.textContent,
+ 'no horizontal overflow': document.documentElement.scrollWidth<=innerWidth+1
+ };
+ })()`)
+ for name, ok := range checks {
+ if !ok {
+ p.t.Errorf("specialist rows: %s", name)
+ }
+ }
+ want := []string{"Swipe from the edge to go back on the Account pane", activity}
+ found := false
+ p.do(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error {
+ tree, err := cdp.Call(ctx, target, accessibility.GetFullAXTree, accessibility.GetFullAXTreeParams{})
+ if err != nil {
+ return err
+ }
+ for _, node := range tree.Nodes {
+ if node.Ignored || node.Role == nil || node.Name == nil {
+ continue
+ }
+ var role, name string
+ if json.Unmarshal(node.Role.Value, &role) == nil && json.Unmarshal(node.Name.Value, &name) == nil && role == "link" && strings.HasPrefix(name, "Review ") && strings.Contains(name, want[0]) && strings.Contains(name, want[1]) {
+ found = true
+ }
+ }
+ return nil
+ }))
+ if !found {
+ p.t.Error("specialist rows: accessible name lacks full title or activity")
+ }
+}
diff --git a/internal/thintest/team_panel_browser_test.go b/internal/thintest/team_panel_browser_test.go
index 858854a9..f104d558 100644
--- a/internal/thintest/team_panel_browser_test.go
+++ b/internal/thintest/team_panel_browser_test.go
@@ -45,7 +45,7 @@ func (p *innerPage) press(expression string) {
}
// TestBrowserTeamPanel: the sidebar's specialists at 1280 with a mouse
-// and at 390 with touch. Review at work is one row of two lines with the
+// and at 390 with touch. Review at work is one row of three lines with the
// living mark; a click on the row opens its drawer over the page (no
// navigation) with the task, the activity in plain words, each command
// behind a disclosure, the files touched and what it runs on, and it
@@ -68,9 +68,8 @@ func TestBrowserTeamPanel(t *testing.T) {
p.open(rail)
rev := `document.querySelector('#rail [data-specialist="review"]')`
eng := `document.querySelector('#rail [data-specialist="engineering"]')`
- // Compact: two lines, the title and what it is doing on the second.
p.wait(rev+`.querySelector('[data-spec-star] [data-live]')`, "Review's living mark (Stardust)")
- p.check(`(()=>{const r=`+rev+`,n=r.querySelector('[equipo-spec-name]').getBoundingClientRect(),l=r.querySelector('[equipo-spec-now]').getBoundingClientRect(),t=r.querySelector('[equipo-nav-task]').getBoundingClientRect(),d=r.querySelector('[equipo-spec-doing]').getBoundingClientRect();const lh=parseFloat(getComputedStyle(r.querySelector('[equipo-spec-now]')).lineHeight);return l.top>=n.bottom-1 && Math.abs(t.top-d.top)<=2 && l.height<=lh+1 && r.getBoundingClientRect().height<=n.height+l.height+30})()`, "Review's row is not two lines")
+ checkSpecialistRows(p, newest)
p.check(rev+`.querySelector('[equipo-spec-doing]').textContent===`+jsString(newest)+` && !`+rev+`.textContent.includes('/bin/') && !`+rev+`.textContent.includes('attempt')`, "Review's row content")
p.check(eng+`.dataset.state==='idle' && `+eng+`.querySelector('[equipo-spec-state]').textContent==='idle' && !`+eng+`.querySelector('[equipo-spec-now]')`, "Engineering idle")
p.check(`(()=>{const s=getComputedStyle(`+eng+`.querySelector('[equipo-spec-state]')),n=getComputedStyle(`+rev+`.querySelector('[equipo-spec-state]'));return s.color!==n.color})()`, "idle is not muted")
@@ -100,6 +99,7 @@ func TestBrowserTeamPanel(t *testing.T) {
a.activity(fmt.Sprintf("tp-live-%d", size.w), wire.StepActivityReport{TaskID: g.review, StepID: g.reviewStep, Attempt: 1, Kind: wire.ActivityRun, Subject: live})
p.wait(drawer+`.querySelector('[equipo-team-tl] > li p > span').textContent===`+jsString(plain)+` && `+rev+`.querySelector('[equipo-spec-doing]').textContent===`+jsString(plain), "the live line in the drawer and the row")
p.check(`[...`+drawer+`.querySelectorAll('[equipo-team-raw]')].some(d=>d.open && d.textContent.includes('git diff'))`, "the open disclosure closed on a live update")
+ p.wait(rev+`.querySelector('[equipo-spec-doing]').getAnimations().every(a=>a.playState==='finished')`, "the activity settled")
p.stayed("live drawer")
newest = plain
// Closing: Escape with a keyboard, the close button by touch; focus
@@ -111,6 +111,7 @@ func TestBrowserTeamPanel(t *testing.T) {
}
p.wait(`!`+drawer+`.open`, "the drawer closed")
p.wait(`document.activeElement===`+rev, "focus back on the row")
+ checkSpecialistRows(p, plain)
// Engineering idle: its recent work and an Ask box for the task it
// finished, which goes to its kept session.
diff --git a/scripts/runner-reference-allowlist.json b/scripts/runner-reference-allowlist.json
index 61c28532..dc68c6a9 100644
--- a/scripts/runner-reference-allowlist.json
+++ b/scripts/runner-reference-allowlist.json
@@ -15601,5 +15601,33 @@
"match": "equipo-runner",
"count": 1,
"reason": "Records the runner User-Agent used for the read-only Claude OAuth usage request."
+ },
+ {
+ "path": "internal/thintest/specialist_rows_browser_test.go",
+ "line_sha256": "2810518044fcd8e44c40e6882e872d78b7921a96dcd954309628b39f47da1efb",
+ "match": "node",
+ "count": 1,
+ "reason": "Chromium accessibility tree entries used to verify the complete specialist link name."
+ },
+ {
+ "path": "internal/thintest/specialist_rows_browser_test.go",
+ "line_sha256": "2810518044fcd8e44c40e6882e872d78b7921a96dcd954309628b39f47da1efb",
+ "match": "Node",
+ "count": 1,
+ "reason": "Chromium accessibility tree entries used to verify the complete specialist link name."
+ },
+ {
+ "path": "internal/thintest/specialist_rows_browser_test.go",
+ "line_sha256": "0bf20e12e99290ee89dbd227ba94fc0483efb303fdcfa4002fb123e400d8882a",
+ "match": "node",
+ "count": 3,
+ "reason": "Chromium accessibility tree entries used to verify the complete specialist link name."
+ },
+ {
+ "path": "internal/thintest/specialist_rows_browser_test.go",
+ "line_sha256": "264314845ad48e986abb66b2efde827686f4e1974b34f265b4eaeb878e0d732f",
+ "match": "node",
+ "count": 2,
+ "reason": "Chromium accessibility tree entries used to verify the complete specialist link name."
}
]