Skip to content
Merged
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
33 changes: 29 additions & 4 deletions .github/workflows/sync-workspace.yml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] Please update the boxel-cli-version input description, since a caller pinning the CLI reads it to learn what the sync needs from the CLI. It doesn't mention --no-realm-events. A version without the flag still pushes fine, but it announces every pushed file to open tabs. The description also says the version "has to support" --changed-since, but both sync steps fall back when it doesn't. Suggested text:

          Version spec for `npm install -g @cardstack/boxel-cli`.
          Default `latest` follows the most recent published version.
          Staging and production syncs pass `realm push --changed-since`
          and `--no-realm-events` when the version lists them. Without
          them, every file goes up and the push is announced to open tabs.

Non-blocking. The --no-realm-events half is introduced by this change; the --changed-since half is pre-existing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] Fixed in acd72df. The boxel-cli-version description now says the syncs pass --changed-since and --no-realm-events only when the version lists them, and that an older version sends every file and announces the push.

Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ on:
description: |
Version spec for `npm install -g @cardstack/boxel-cli`.
Default `latest` follows the most recent published version.
Staging and production syncs pass `realm push --changed-since`,
so the version has to support it.
Staging and production syncs pass `realm push --changed-since`
and `--no-realm-events` when this version lists them. An older
version sends every file and announces the push to open tabs.
type: string
default: latest
secrets:
Expand Down Expand Up @@ -286,8 +287,20 @@ jobs:
echo "::notice::This boxel-cli has no --changed-since, so every file goes up."
fi

# The push is indexed without announcing it to the workspace's open
# tabs, which pick the new content up on their next load instead of
# resetting mid-session. A boxel-cli without --no-realm-events
# rejects it, so that one announces.
realm_events=()
if grep -q -- '--no-realm-events' <<< "$push_help"; then
realm_events+=(--no-realm-events)
echo "Pushing with --no-realm-events: open tabs pick the changes up on their next load."
else
echo "::notice::This boxel-cli has no --no-realm-events, so the push is announced to open tabs."
fi
Comment on lines +294 to +300

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] The run log never shows whether the flag was used. If the CLI doesn't have the flag, the step falls back without saying so. If it does have it, nothing in the log says that either: boxel realm push doesn't print anything about realm events, and the step doesn't echo the push command line. So a caller pinned to an older boxel-cli-version keeps resetting open tabs and leaves no trace of it. The test plan's "push log shows --no-realm-events in effect" also has nothing in the log to check. Mirror the --changed-since notice:

Suggested change
realm_events=()
if grep -q -- '--no-realm-events' <<< "$push_help"; then
realm_events+=(--no-realm-events)
fi
realm_events=()
if grep -q -- '--no-realm-events' <<< "$push_help"; then
realm_events+=(--no-realm-events)
else
echo "::notice::This boxel-cli has no --no-realm-events, so the push is announced to open tabs."
fi

Make the same change to the realm_events block in "Sync to production workspace". Introduced by this change. Non-blocking.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Claude Code 🤖] Fixed in acd72df. Both sync steps now log 'Pushing with --no-realm-events…' when the CLI lists the flag, and print a ::notice:: saying the push is announced when it doesn't.


set +e
OUTPUT=$(boxel realm push . "${WORKSPACE_URL}" --delete "${changed_since[@]}" 2>&1)
OUTPUT=$(boxel realm push . "${WORKSPACE_URL}" --delete "${changed_since[@]}" "${realm_events[@]}" 2>&1)
STATUS=$?
set -e
echo "$OUTPUT"
Expand Down Expand Up @@ -345,8 +358,20 @@ jobs:
echo "::notice::This boxel-cli has no --changed-since, so every file goes up."
fi

# The push is indexed without announcing it to the workspace's open
# tabs, which pick the new content up on their next load instead of
# resetting mid-session. A boxel-cli without --no-realm-events
# rejects it, so that one announces.
realm_events=()
if grep -q -- '--no-realm-events' <<< "$push_help"; then
realm_events+=(--no-realm-events)
echo "Pushing with --no-realm-events: open tabs pick the changes up on their next load."
else
echo "::notice::This boxel-cli has no --no-realm-events, so the push is announced to open tabs."
fi

set +e
OUTPUT=$(boxel realm push . "${WORKSPACE_URL}" --delete "${changed_since[@]}" 2>&1)
OUTPUT=$(boxel realm push . "${WORKSPACE_URL}" --delete "${changed_since[@]}" "${realm_events[@]}" 2>&1)
STATUS=$?
set -e
echo "$OUTPUT"
Expand Down
Loading