Review fixes: call-window values kept, empty states, no-media and no-script Share audited
Fable's review (APPROVE, Lows only): noscript.css keeps the call header's 14px and 6px (allowed, not snapped); the scriptless title's padding writes its steps as steps around the allowed calc; the empty states are marked by [rst-empty]; the audit adds the holding screen with no camera or microphone to reach and Share without script, where the empty status line under a hidden row was 20px; it now keeps its line only beside the row it reports on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 files changed,
+23
−6
internal/calls/static/calls-shell.css+6 −0internal/calls/static/calls.css+1 −1internal/calls/static/noscript.css+1 −1internal/callstest/rhythm_browser_test.go+12 −4test/browser/rhythm.mjs+3 −0
CI passed — run details
CI log
=== vet === go vet ./... go vet -tags browser ./internal/calls/ ./internal/callstest/ === fmt === === test === go test ./... ok amadan.net/oficina/calls/callscore (cached) ok amadan.net/oficina/calls/cmd/calls 13.385s ? amadan.net/oficina/calls/cmd/calls-contract [no test files] ok amadan.net/oficina/calls/cmd/quality-summary (cached) ? amadan.net/oficina/calls/gen [no test files] ok amadan.net/oficina/calls/gen/locales (cached) ok amadan.net/oficina/calls/internal/calls 14.829s ok amadan.net/oficina/calls/internal/calls/apns (cached) ok amadan.net/oficina/calls/internal/calls/hub (cached) ? amadan.net/oficina/calls/internal/calls/icons [no test files] ? amadan.net/oficina/calls/internal/calls/keymailtest [no test files] ok amadan.net/oficina/calls/internal/calls/relay (cached) ok amadan.net/oficina/calls/internal/calls/seal (cached) ? amadan.net/oficina/calls/internal/calls/teamstate [no test files] ok amadan.net/oficina/calls/internal/callstest 12.638s ok amadan.net/oficina/calls/protocol (cached) ? amadan.net/oficina/calls/scripts/writeestilo [no test files] === migration-check === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo migration check rastrillo migration check: models and migrations agree === race === CGO_ENABLED=1 go test -race ./internal/... ok amadan.net/oficina/calls/internal/calls 110.971s ok amadan.net/oficina/calls/internal/calls/apns (cached) ok amadan.net/oficina/calls/internal/calls/hub (cached) ? amadan.net/oficina/calls/internal/calls/icons [no test files] ? amadan.net/oficina/calls/internal/calls/keymailtest [no test files] ok amadan.net/oficina/calls/internal/calls/relay (cached) ok amadan.net/oficina/calls/internal/calls/seal (cached) ? amadan.net/oficina/calls/internal/calls/teamstate [no test files] ok amadan.net/oficina/calls/internal/callstest 50.381s === spacing === go tool fiesta spacing -skip tokens.css internal/calls/static
Intent
diff --git a/internal/calls/static/calls-shell.css b/internal/calls/static/calls-shell.css| index c2d5d99..8ab15a9 100644 |
| --- a/internal/calls/static/calls-shell.css |
| +++ b/internal/calls/static/calls-shell.css |
| @@ -34,6 +34,12 @@ body { background: var(--rst-bg); } |
| .calls-share-actions[hidden], .calls-share-actions > [hidden] { display: none; } |
| /* …and Share… inside it, which share-link.js reveals only where the |
| browser can share: rst-btn's display beats hidden the same way. */ |
| +/* The status line under Copy link and Share… keeps its line, so "Link |
| + copied." moves nothing; without script there is no row and nothing |
| + will ever be said, so it takes no space either (share-link.js reveals |
| + the row). */ |
| +#share-status { min-block-size: 1lh; } |
| +#share-actions[hidden] + #share-status { display: none; } |
| .calls-link-input { inline-size: 100%; max-inline-size: 44rem; } |
| /* The holding screen: who you'll join as, then the device panel, then |
diff --git a/internal/calls/static/calls.css b/internal/calls/static/calls.css| index 598fe2e..30ec1fe 100644 |
| --- a/internal/calls/static/calls.css |
| +++ b/internal/calls/static/calls.css |
| @@ -419,7 +419,7 @@ body:has(> .calls-window) { background: var(--rst-bg); } |
| align-items: center; |
| justify-content: center; |
| gap: var(--rst-sp-3); |
| - padding: calc(var(--calls-title-h) + 40px) 24px 24px; /* spacing-allow: the call window's no-script sentence clears the title strip's own height, which is not a step */ |
| + padding: calc(var(--calls-title-h) + var(--rst-sp-6)) var(--rst-sp-5) var(--rst-sp-5); /* spacing-allow: the call window's no-script sentence clears the title strip's own height, which is not a step */ |
| text-align: center; |
| } |
| .calls-scriptless p { margin: 0; max-inline-size: 34rem; line-height: 1.5; } |
diff --git a/internal/calls/static/noscript.css b/internal/calls/static/noscript.css| index 29b80d7..786ce2b 100644 |
| --- a/internal/calls/static/noscript.css |
| +++ b/internal/calls/static/noscript.css |
| @@ -30,6 +30,6 @@ |
| white-space: normal; |
| text-shadow: none; |
| } |
| -.calls-window .calls-top-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rst-sp-1) var(--rst-sp-4); margin: var(--rst-sp-2) 0 0; font-size: 0.875rem; } |
| +.calls-window .calls-top-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rst-sp-1) 14px; /* spacing-allow: the no-script call header's links, 14px apart as the scripted strip's */ margin: 6px 0 0; /* spacing-allow: the links sit 6px under the title on the call header's card */ font-size: 0.875rem; } |
| .calls-window .calls-top-links form { margin: 0; } |
| .calls-window .calls-top-links button { padding: 0; border: 0; background: none; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; } |
diff --git a/internal/callstest/rhythm_browser_test.go b/internal/callstest/rhythm_browser_test.go| index 7df681b..5de8957 100644 |
| --- a/internal/callstest/rhythm_browser_test.go |
| +++ b/internal/callstest/rhythm_browser_test.go |
| @@ -14,8 +14,9 @@ |
| // What it reads: the meetings list (empty, with upcoming and ended |
| // meetings, the ended list open, the new-meeting form refused), Settings |
| // (empty, with agents, saved, refused), a meeting's settings, the three |
| -// confirm pages, the meeting and agent pages shown once, Share, the |
| -// holding screen (a member's with script, with its audio test open, and |
| +// confirm pages, the meeting and agent pages shown once, Share (with |
| +// script and without), the holding screen (a member's with script, with |
| +// its audio test open, with no camera or microphone to reach, and |
| // without script; a guest's), the guest's name page (and refused), the |
| // app hand-off page, Welcome, and the Colophon under Help. |
| // |
| @@ -75,6 +76,9 @@ type rhythmState struct { |
| After string `json:"after,omitempty"` |
| // NoRefresh takes the page's meta refresh out (rhythm.mjs). |
| NoRefresh bool `json:"noRefresh,omitempty"` |
| + // NoMedia takes navigator.mediaDevices away before the page's |
| + // scripts run, as an insecure context or an old browser has it. |
| + NoMedia bool `json:"noMedia,omitempty"` |
| } |
| // submitJS sends a form past the browser's own checks, so the server's |
| @@ -95,8 +99,8 @@ func TestEveryPageKeepsTheRhythm(t *testing.T) { |
| // Before anything exists: the empty lists. |
| empty := []rhythmState{ |
| - {Name: "the meetings, none yet", Path: "/", Marker: `form[action="/meetings/start"]`, As: "member"}, |
| - {Name: "Settings, no agents", Path: "/settings", Marker: `form[action="/settings/agents"]`, As: "member"}, |
| + {Name: "the meetings, none yet", Path: "/", Marker: `main [rst-empty]`, As: "member"}, |
| + {Name: "Settings, no agents", Path: "/settings", Marker: `main [rst-empty]`, As: "member"}, |
| } |
| found := rig.auditRhythm(t, empty) |
| @@ -135,8 +139,12 @@ func TestEveryPageKeepsTheRhythm(t *testing.T) { |
| Act: `(() => { const f = document.querySelector('form[action$="/share"]'); f.removeAttribute('target'); HTMLFormElement.prototype.submit.call(f); })()`, |
| After: "/m/" + sqid + "/share"}, |
| {Name: "the holding screen", Path: join, Marker: `#join:not([disabled])`, As: "member"}, |
| + {Name: "Share, without script", Path: join, Marker: `#invitation-link`, As: "member", NoScript: true, |
| + Act: `(() => { const f = document.querySelector('form[action$="/share"]'); f.removeAttribute('target'); HTMLFormElement.prototype.submit.call(f); })()`, |
| + After: "/m/" + sqid + "/share"}, |
| {Name: "the holding screen, its audio test open", Path: join, Marker: `#audio-test[open]`, As: "member", |
| Then: `#join:not([disabled])`, Act: `document.querySelector('#audio-test').open = true`}, |
| + {Name: "the holding screen, no camera or microphone to reach", Path: join, Marker: `#join:not([disabled])`, As: "member", NoMedia: true}, |
| {Name: "the holding screen, without script", Path: join, Marker: `.calls-holding-more`, As: "member", NoScript: true}, |
| {Name: "the guest's name page", Path: "/j/" + token, Marker: `form[action="/j/` + token + `/guest"]`}, |
| {Name: "the guest's name page, without script", Path: "/j/" + token, Marker: `form[action="/j/` + token + `/guest"]`, NoScript: true}, |
diff --git a/test/browser/rhythm.mjs b/test/browser/rhythm.mjs| index 743fcd8..83d8c38 100644 |
| --- a/test/browser/rhythm.mjs |
| +++ b/test/browser/rhythm.mjs |
| @@ -74,6 +74,9 @@ try { |
| colorScheme: 'light', |
| javaScriptEnabled: !state.noScript, |
| }); |
| + if (state.noMedia) { |
| + await context.addInitScript(() => { Object.defineProperty(Navigator.prototype, 'mediaDevices', { get: () => undefined }); }); |
| + } |
| if (state.as === 'member') { |
| await context.addCookies([{ name: config.cookie.name, value: config.cookie.value, url: config.base }]); |
| } |