feat: import Chinese-localized Buzz source snapshot
Docker image / Build (linux/amd64) (push) Has been cancelled
Docker image / Build (linux/arm64) (push) Has been cancelled
Docker image / Merge release multi-arch manifest (push) Has been cancelled
Docker image / Merge debug multi-arch manifest (push) Has been cancelled
Docker image / Build public push gateway (linux/amd64) (push) Has been cancelled
Docker image / Build public push gateway (linux/arm64) (push) Has been cancelled
Docker image / Publish public push gateway image (push) Has been cancelled
Sprig image / Build (linux/amd64) (push) Has been cancelled
Sprig image / Build (linux/arm64) (push) Has been cancelled
Sprig image / Merge multi-arch manifest (push) Has been cancelled
Harbor Buzz Orchestra / Python tests and lint (push) Has been cancelled
CI / Detect Changed Paths (push) Has been cancelled
CI / Rust Lint (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Desktop Core (push) Has been cancelled
CI / Desktop Smoke E2E (1) (push) Has been cancelled
CI / Desktop Smoke E2E (2) (push) Has been cancelled
CI / Desktop Smoke E2E (3) (push) Has been cancelled
CI / Desktop Smoke E2E (4) (push) Has been cancelled
CI / Desktop (push) Has been cancelled
CI / Desktop E2E Relay (push) Has been cancelled
CI / Desktop E2E Integration (1/2) (push) Has been cancelled
CI / Desktop E2E Integration (2/2) (push) Has been cancelled
CI / Desktop E2E Integration (push) Has been cancelled
CI / Backend Integration (relay e2e) (push) Has been cancelled
CI / Relay E2E (push) Has been cancelled
CI / Web (push) Has been cancelled
CI / Mobile (push) Has been cancelled
CI / Security (push) Has been cancelled
CI / Dead Token Reference Guard (push) Has been cancelled
CI / Server Cross-Compile (aarch64-unknown-linux-musl) (push) Has been cancelled
CI / Server Cross-Compile (x86_64-unknown-linux-musl) (push) Has been cancelled
CI / Windows Rust (x86_64-pc-windows-msvc) (push) Has been cancelled
CI / Desktop Build (macOS) (push) Has been cancelled
helm chart / lint + unittest + render matrix (push) Has been cancelled
helm chart / install on kind (gated) (push) Has been cancelled
helm chart / publish chart to GHCR (push) Has been cancelled
Mesh Lifecycle / Relay-Driven Mesh Lifecycle Smoke (push) Has been cancelled
Sprig / Build (aarch64-unknown-linux-musl) (push) Has been cancelled
Sprig / Build (x86_64-unknown-linux-musl) (push) Has been cancelled
Sprig / Publish rolling release (push) Has been cancelled
Sprig / Publish tagged release (push) Has been cancelled
Docker image / Build (linux/amd64) (push) Has been cancelled
Docker image / Build (linux/arm64) (push) Has been cancelled
Docker image / Merge release multi-arch manifest (push) Has been cancelled
Docker image / Merge debug multi-arch manifest (push) Has been cancelled
Docker image / Build public push gateway (linux/amd64) (push) Has been cancelled
Docker image / Build public push gateway (linux/arm64) (push) Has been cancelled
Docker image / Publish public push gateway image (push) Has been cancelled
Sprig image / Build (linux/amd64) (push) Has been cancelled
Sprig image / Build (linux/arm64) (push) Has been cancelled
Sprig image / Merge multi-arch manifest (push) Has been cancelled
Harbor Buzz Orchestra / Python tests and lint (push) Has been cancelled
CI / Detect Changed Paths (push) Has been cancelled
CI / Rust Lint (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Desktop Core (push) Has been cancelled
CI / Desktop Smoke E2E (1) (push) Has been cancelled
CI / Desktop Smoke E2E (2) (push) Has been cancelled
CI / Desktop Smoke E2E (3) (push) Has been cancelled
CI / Desktop Smoke E2E (4) (push) Has been cancelled
CI / Desktop (push) Has been cancelled
CI / Desktop E2E Relay (push) Has been cancelled
CI / Desktop E2E Integration (1/2) (push) Has been cancelled
CI / Desktop E2E Integration (2/2) (push) Has been cancelled
CI / Desktop E2E Integration (push) Has been cancelled
CI / Backend Integration (relay e2e) (push) Has been cancelled
CI / Relay E2E (push) Has been cancelled
CI / Web (push) Has been cancelled
CI / Mobile (push) Has been cancelled
CI / Security (push) Has been cancelled
CI / Dead Token Reference Guard (push) Has been cancelled
CI / Server Cross-Compile (aarch64-unknown-linux-musl) (push) Has been cancelled
CI / Server Cross-Compile (x86_64-unknown-linux-musl) (push) Has been cancelled
CI / Windows Rust (x86_64-pc-windows-msvc) (push) Has been cancelled
CI / Desktop Build (macOS) (push) Has been cancelled
helm chart / lint + unittest + render matrix (push) Has been cancelled
helm chart / install on kind (gated) (push) Has been cancelled
helm chart / publish chart to GHCR (push) Has been cancelled
Mesh Lifecycle / Relay-Driven Mesh Lifecycle Smoke (push) Has been cancelled
Sprig / Build (aarch64-unknown-linux-musl) (push) Has been cancelled
Sprig / Build (x86_64-unknown-linux-musl) (push) Has been cancelled
Sprig / Publish rolling release (push) Has been cancelled
Sprig / Publish tagged release (push) Has been cancelled
Signed-off-by: cls_宁波本机 <908705107@qq.com>
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
---
|
||||
name: desktop-screenshot
|
||||
description: >
|
||||
Capture desktop app screenshots and post them to GitHub PRs with immutable URLs.
|
||||
version: 1
|
||||
---
|
||||
|
||||
# Desktop Screenshot Skill
|
||||
|
||||
## CRITICAL: How to Host Screenshots for PRs
|
||||
|
||||
**NEVER use `buzz upload`, the relay media endpoint, or any third-party image
|
||||
host (imgur, imgbb, etc.) for PR screenshots.** Relay media URLs fail through
|
||||
GitHub's camo proxy (`Non-Image content-type returned`). External hosts are
|
||||
unreliable and may expose content.
|
||||
|
||||
**ALWAYS use `scripts/post-screenshots.sh`** — it hosts PNGs on a per-developer
|
||||
git branch with immutable commit-SHA URLs that render correctly on GitHub.
|
||||
If you manually compose or edit PR markdown, run
|
||||
`scripts/check-pr-image-urls.sh <markdown-file>` before posting. The checker
|
||||
fails on Buzz/relay media URLs so broken images are caught locally.
|
||||
|
||||
This hosting rule applies to any PNG you want in a PR, including mobile
|
||||
simulator screenshots captured outside the desktop Playwright helper.
|
||||
|
||||
## Step 1 — Capture Screenshots
|
||||
|
||||
`just desktop-screenshot` builds the frontend, starts a preview server, and
|
||||
runs Playwright with the mock bridge (no relay needed).
|
||||
|
||||
```bash
|
||||
just desktop-screenshot --name home
|
||||
just desktop-screenshot --name channel --route /channels/general
|
||||
just desktop-screenshot --name ctx-menu --right-click channel-random --clip 0,200,320,300
|
||||
just desktop-screenshot --name sidebar --active-channel general --messages /tmp/msgs.json --clip 0,0,256,720
|
||||
```
|
||||
|
||||
**Flags:** `--name` (filename, required), `--route` (client route), `--active-channel`
|
||||
(channel to view), `--click`/`--right-click`/`--hover` (interact before capture),
|
||||
`--clip` (crop as `x,y,w,h`), `--messages` (JSON file), `--wait` (ms, default 2000),
|
||||
`--viewport` (WxH, default 1280x720), `--outdir` (default `test-results/screenshots`).
|
||||
|
||||
Output: PNG path on stdout.
|
||||
|
||||
### Injecting Messages
|
||||
|
||||
Write a JSON array to a temp file. `channelName` and `content` are required:
|
||||
|
||||
```json
|
||||
[
|
||||
{"channelName": "random", "content": "Hey check this out", "kind": 40002},
|
||||
{"channelName": "random", "content": "Another message"}
|
||||
]
|
||||
```
|
||||
|
||||
Without `--active-channel`, the helper navigates to the message channel (for
|
||||
showing content). With `--active-channel`, messages can target other channels
|
||||
while the camera stays put (for unread indicators, badges).
|
||||
|
||||
### Available Mock Channels
|
||||
|
||||
`general`, `random`, `design`, `sales`, `engineering`, `agents`, `watercooler`,
|
||||
`announcements`, `alice-tyler`, `bob-tyler`.
|
||||
|
||||
`general` has pre-seeded messages (always shows `hasUnread`). Use `engineering`
|
||||
for "no unread" visual states.
|
||||
|
||||
## Step 2 — Post to a PR
|
||||
|
||||
```bash
|
||||
./scripts/post-screenshots.sh <PR-number> test-results/screenshots
|
||||
./scripts/post-screenshots.sh <PR-number> test-results/screenshots body.md
|
||||
```
|
||||
|
||||
The script pushes images to `agent-screenshots/<github-username>` and posts a
|
||||
PR comment with `## Screenshots` and all images. Re-runs overwrite that PR's
|
||||
images only.
|
||||
|
||||
### Body Templates
|
||||
|
||||
The optional third argument is a markdown file with `{{filename}}` placeholders
|
||||
(without `.png`). Images not referenced by a placeholder are appended at the end.
|
||||
|
||||
```markdown
|
||||
### Context menu
|
||||
Right-click shows "Star channel".
|
||||
|
||||
{{01-ctx-menu}}
|
||||
|
||||
### Starred section
|
||||
`engineering` appears under Starred.
|
||||
|
||||
{{02-starred}}
|
||||
```
|
||||
|
||||
## Gotchas
|
||||
|
||||
1. **Stale server** — `reuseExistingServer: true` means a prior build serves old
|
||||
code. Kill port 4173 and rebuild (`cd desktop && pnpm run build`) after code changes.
|
||||
2. **Clip for readability** — full 1280x720 screenshots are hard to read for sidebar
|
||||
features. Sidebar = 256px wide; context menus ~450px.
|
||||
3. **`post-screenshots.sh` requires `gh` auth** — the script uses `gh api` and
|
||||
`gh pr comment`. Ensure `gh auth status` succeeds.
|
||||
Reference in New Issue
Block a user