Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/workflows/cla-maintainer-skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
)"
Comment thread
cursor[bot] marked this conversation as resolved.
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
20 changes: 9 additions & 11 deletions apps/desktop/src/session/components/outer-header/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,6 @@ describe("OuterHeader", () => {
});

it("places the record and overflow controls in order", () => {
mocks.hasTranscriptBySession = { "session-1": true };

const { container } = render(
<OuterHeader
sessionId="session-1"
Expand Down Expand Up @@ -1216,7 +1214,7 @@ describe("OuterHeader", () => {
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(
Expand All @@ -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(
Expand All @@ -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();
});
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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();
});
Expand All @@ -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();
});
});
14 changes: 12 additions & 2 deletions apps/desktop/src/session/components/outer-header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ export function OuterHeader({
data-tauri-drag-region
className="relative z-10 flex shrink-0 items-center pr-1"
>
<HeaderMeetingControl sessionId={sessionId} sessionMode={sessionMode} />
<HeaderMeetingControl
sessionId={sessionId}
sessionMode={sessionMode}
meetingOver={meetingOver}
/>
<OverflowButton
standaloneWindow={standaloneWindow}
sessionId={sessionId}
Expand All @@ -112,9 +116,11 @@ export function OuterHeader({
function HeaderMeetingControl({
sessionId,
sessionMode,
meetingOver,
}: {
sessionId: string;
sessionMode: string;
meetingOver: boolean;
}) {
const sessionEvent = useSessionEvent(sessionId);
const hasTranscript = useHasTranscript(sessionId);
Expand All @@ -124,7 +130,11 @@ function HeaderMeetingControl({
? safeParseDate(sessionEvent.ended_at)
: null;
const ended = !!endedAt && endedAt.getTime() <= now.getTime();
if (sessionMode === "finalizing" || sessionMode === "running_batch") {
if (
sessionMode === "finalizing" ||
sessionMode === "running_batch" ||
meetingOver
) {
return null;
}

Expand Down
Loading