diff --git a/.github/workflows/cla-maintainer-skip.yml b/.github/workflows/cla-maintainer-skip.yml index acb76a93dd..eed7fadfc0 100644 --- a/.github/workflows/cla-maintainer-skip.yml +++ b/.github/workflows/cla-maintainer-skip.yml @@ -21,16 +21,26 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SHA: ${{ github.event.pull_request.head.sha }} run: | - for _ in 1 2 3 4 5 6; do - if gh api "repos/${GITHUB_REPOSITORY}/commits/${SHA}/status" \ - --jq '.statuses[] | select(.context=="license/cla") | .state' \ - | grep -q .; then - break + set -euo pipefail + deadline=$((SECONDS + 120)) + while [ "$SECONDS" -lt "$deadline" ]; do + state="$( + gh api "repos/${GITHUB_REPOSITORY}/commits/${SHA}/status" \ + --jq '[.statuses[] | select(.context=="license/cla") | .state] | first // empty' \ + || true + )" + if [ "$state" != "success" ]; then + gh api "repos/${GITHUB_REPOSITORY}/statuses/${SHA}" \ + -f state=success \ + -f context=license/cla \ + -f description="Skipped for maintainers" \ + >/dev/null \ + || true fi sleep 10 done - gh api "repos/${GITHUB_REPOSITORY}/statuses/${SHA}" \ -f state=success \ -f context=license/cla \ - -f description="Skipped for maintainers" + -f description="Skipped for maintainers" \ + >/dev/null diff --git a/apps/desktop/src/session/components/outer-header/index.test.tsx b/apps/desktop/src/session/components/outer-header/index.test.tsx index 6abded3a27..c1b37d750f 100644 --- a/apps/desktop/src/session/components/outer-header/index.test.tsx +++ b/apps/desktop/src/session/components/outer-header/index.test.tsx @@ -382,8 +382,6 @@ describe("OuterHeader", () => { }); it("places the record and overflow controls in order", () => { - mocks.hasTranscriptBySession = { "session-1": true }; - const { container } = render( { expect(screen.getByRole("button", { name: "More" })).not.toBeNull(); }); - it("shows record for an inactive ad hoc session with a transcript", () => { + it("hides record for an inactive ad hoc session with a transcript", () => { mocks.hasTranscriptBySession = { "session-1": true }; render( @@ -1226,12 +1224,12 @@ describe("OuterHeader", () => { />, ); - expect(screen.getByRole("button", { name: "Record" })).not.toBeNull(); + expect(screen.queryByRole("button", { name: "Record" })).toBeNull(); expect(screen.getByRole("button", { name: "More" })).not.toBeNull(); expect(mocks.startListening).not.toHaveBeenCalled(); }); - it("shows record for an inactive ad hoc session with audio", () => { + it("hides record for an inactive ad hoc session with audio", () => { mocks.audioExists = true; render( @@ -1241,7 +1239,7 @@ describe("OuterHeader", () => { />, ); - expect(screen.getByRole("button", { name: "Record" })).not.toBeNull(); + expect(screen.queryByRole("button", { name: "Record" })).toBeNull(); expect(screen.getByRole("button", { name: "More" })).not.toBeNull(); expect(mocks.startListening).not.toHaveBeenCalled(); }); @@ -1341,7 +1339,7 @@ describe("OuterHeader", () => { expect(mocks.stopListening).toHaveBeenCalledTimes(1); }); - it("shows record and overflow after the meeting is over", () => { + it("hides record and keeps overflow after the meeting is over", () => { mocks.sessionEvents = { "session-1": { title: "Design Review", @@ -1362,12 +1360,12 @@ describe("OuterHeader", () => { const moreButton = screen.getByRole("button", { name: "More" }); expect(screen.queryByRole("button", { name: "Join & record" })).toBeNull(); - expect(screen.getByRole("button", { name: "Record" })).not.toBeNull(); + expect(screen.queryByRole("button", { name: "Record" })).toBeNull(); expect(moreButton).not.toBeNull(); expect(mocks.startListening).not.toHaveBeenCalled(); }); - it("shows record instead of rejoining when a recorded event has no ended_at", () => { + it("hides record instead of rejoining when a recorded event has no ended_at", () => { mocks.sessionEvents = { "session-1": { title: "Design Review", @@ -1386,7 +1384,7 @@ describe("OuterHeader", () => { ); expect(screen.queryByRole("button", { name: "Join & record" })).toBeNull(); - expect(screen.getByRole("button", { name: "Record" })).not.toBeNull(); + expect(screen.queryByRole("button", { name: "Record" })).toBeNull(); expect(screen.getByRole("button", { name: "More" })).not.toBeNull(); expect(mocks.startListening).not.toHaveBeenCalled(); }); @@ -1402,6 +1400,6 @@ describe("OuterHeader", () => { expect(screen.queryByRole("button", { name: "Edit" })).toBeNull(); expect(screen.queryByRole("button", { name: "Done" })).toBeNull(); - expect(screen.getByRole("button", { name: "Record" })).not.toBeNull(); + expect(screen.queryByRole("button", { name: "Record" })).toBeNull(); }); }); diff --git a/apps/desktop/src/session/components/outer-header/index.tsx b/apps/desktop/src/session/components/outer-header/index.tsx index 5fb9189793..5e527d1fea 100644 --- a/apps/desktop/src/session/components/outer-header/index.tsx +++ b/apps/desktop/src/session/components/outer-header/index.tsx @@ -98,7 +98,11 @@ export function OuterHeader({ data-tauri-drag-region className="relative z-10 flex shrink-0 items-center pr-1" > - +