Agent Skillsudecode/plate › potion-yjs-dev-browser-test

potion-yjs-dev-browser-test

GitHub

利用Potion作为行为参考,通过dev-browser隔离单个标签页模拟离线/重连场景,复现并对比Slate Yjs协作bug。

.agents/skills/potion-yjs-dev-browser-test/SKILL.md udecode/plate

触发场景

怀疑Slate Yjs协作行为异常 需要验证离线、重连或选择状态

安装

npx skills add udecode/plate --skill potion-yjs-dev-browser-test -g -y
更多选项

非标准路径

npx skills add https://github.com/udecode/plate/tree/main/.agents/skills/potion-yjs-dev-browser-test -g -y

不安装直接使用

npx skills use udecode/plate@potion-yjs-dev-browser-test

指定 Agent (Claude Code)

npx skills add udecode/plate --skill potion-yjs-dev-browser-test -a claude-code -g -y

安装 repo 全部 skill

npx skills add udecode/plate --all -g -y

预览 repo 内 skill

npx skills add udecode/plate --list

SKILL.md

Frontmatter
{
    "name": "potion-yjs-dev-browser-test",
    "metadata": {
        "skiller": {
            "source": ".agents\/rules\/potion-yjs-dev-browser-test.mdc"
        }
    },
    "description": "Use when a Slate Yjs collaboration behavior is suspicious and Potion should be used as a live reference implementation through dev-browser, especially for offline\/reconnect, selection, or history scenarios."
}

Potion Yjs Dev Browser Test

Purpose

Use Potion as a live behavioral oracle, not as the product under test. The skill records how to isolate one Potion tab offline with dev-browser and then replay the current bug's repro steps. Do not bake one historical repro into the workflow.

Workflow

  1. Confirm the user is logged in to the persistent debug Chrome connected at 127.0.0.1:9222.
  2. Use the existing debug browser, never a disposable browser, unless the user explicitly asks.
  3. Use a disposable or agreed Potion document. Only reset or overwrite content when the current repro requires it.
  4. Open two named pages, usually potion-yjs-reference-a and potion-yjs-reference-b, pointing at the same Potion URL.
  5. Use per-page CDP to make only B offline. Never use page.context().setOffline(true) for this workflow; it affects the whole browser context and usually disconnects both tabs.
  6. Execute the current repro steps exactly:
    • B-only local edits while B is offline
    • A-side online edits while A remains connected
    • B reconnect
    • observe final convergence, selection, history, or presence state
  7. Compare the observed Potion result with the local Slate Yjs result. Treat Potion as reference evidence, not automatic proof; confirm the local schema and operation shape are equivalent.

No Bundled Script

Do not keep a reusable script in this skill. Each collaboration bug has different setup, operations, waits, and assertions. A fixed script becomes stale fast and tempts agents to rerun yesterday's bug.

For each new case, write a small one-off dev-browser --connect http://127.0.0.1:9222 <<'EOF' script from the current repro steps. Keep it in the terminal or .tmp/ only if it needs iteration; do not promote it into the skill unless the user explicitly asks for a durable tool.

Per-Page CDP Pattern

Use this shape inside the current repro script:

const pageA = await browser.getPage('potion-yjs-reference-a');
const pageB = await browser.getPage('potion-yjs-reference-b');
const cdpB = await pageB.context().newCDPSession(pageB);

await cdpB.send('Network.enable');
await cdpB.send('Network.emulateNetworkConditions', {
  offline: true,
  latency: 0,
  downloadThroughput: 0,
  uploadThroughput: 0,
});

// Run B-local offline repro steps here.

await cdpB.send('Network.emulateNetworkConditions', {
  offline: false,
  latency: 0,
  downloadThroughput: -1,
  uploadThroughput: -1,
});

Before editing, probe network isolation:

  • A fetch should succeed.
  • B fetch should fail while offline.

One-Off Repro Template

For each new case, write a small dev-browser script from the user's steps:

  1. Open both Potion pages and wait for [data-slate-editor="true"].
  2. Prepare only the starting document state required by this repro.
  3. Put B offline with per-page CDP.
  4. Perform the B-side offline operation.
  5. Perform the A-side online operation.
  6. Reconnect B.
  7. Read the document state from both pages and log the result.
  8. Restore B online and detach CDP sessions before exiting.

Interpretation

  • If Potion preserves content or history that local Slate Yjs loses, treat the local behavior as suspicious.
  • If Potion produces the same result as local Slate Yjs, treat that conflict behavior as plausible, then verify the local operation sequence really matches Potion.
  • If Potion and local differ, do not jump straight to a fix. First compare editor schema, normalization, command path, selection shape, and operation ordering.

Failure Handling

  • If no editor is found, stop and ask the user to log in to Potion in the debug Chrome.
  • If the Potion page says the document does not exist, stop and ask for a valid shared document URL.
  • If navigation is interrupted, force both pages online with CDP and retry once.
  • If a live observed run times out, keep the current tab state and resume from the printed step instead of restarting blindly.

版本历史

  • af5e430 当前 2026-08-20 19:27

同 Skill 集合

.agents/skills/adversarial-document-reviewer/SKILL.md
.agents/skills/agent-browser-issue/SKILL.md
.agents/skills/agent-native-reviewer/SKILL.md
.agents/skills/architecture-strategist/SKILL.md
.agents/skills/autoclosure/SKILL.md
.agents/skills/autogoal/SKILL.md
.agents/skills/autoreview/SKILL.md
.agents/skills/best-practices-researcher/SKILL.md
.agents/skills/clawpatch/SKILL.md
.agents/skills/clawsweeper/SKILL.md
.agents/skills/code-simplicity-reviewer/SKILL.md
.agents/skills/coherence-reviewer/SKILL.md
.agents/skills/components/SKILL.md
.agents/skills/continue/SKILL.md
.agents/skills/correctness-reviewer/SKILL.md
.agents/skills/dev-browser/SKILL.md
.agents/skills/diagnosing-bugs/SKILL.md
.agents/skills/docs-creator/SKILL.md
.agents/skills/editor-harvest-plan/SKILL.md
.agents/skills/editor-test-harvester/SKILL.md
.agents/skills/feasibility-reviewer/SKILL.md
.agents/skills/framework-docs-researcher/SKILL.md
.agents/skills/frontend-design/SKILL.md
.agents/skills/git-history-analyzer/SKILL.md
.agents/skills/gpt-pro/SKILL.md
.agents/skills/grill-me/SKILL.md
.agents/skills/hard-cut/SKILL.md
.agents/skills/issue-intelligence-analyst/SKILL.md
.agents/skills/learnings-researcher/SKILL.md
.agents/skills/maintainability-reviewer/SKILL.md
.agents/skills/major-task/SKILL.md
.agents/skills/north-star/SKILL.md
.agents/skills/orchestrator/SKILL.md
.agents/skills/pattern-recognition-specialist/SKILL.md
.agents/skills/performance-oracle/SKILL.md
.agents/skills/performance/SKILL.md
.agents/skills/plate-plan/SKILL.md
.agents/skills/plate-plugin-creator/SKILL.md
.agents/skills/plate-ui/SKILL.md
.agents/skills/product-lens-reviewer/SKILL.md
.agents/skills/project-standards-reviewer/SKILL.md
.agents/skills/promote-beta/SKILL.md
.agents/skills/react-useeffect/SKILL.md
.agents/skills/react/SKILL.md
.agents/skills/registry-changelog/SKILL.md
.agents/skills/release-lanes/SKILL.md
.agents/skills/repo-research-analyst/SKILL.md
.agents/skills/reproduce-bug/SKILL.md
.agents/skills/research-wiki/SKILL.md

元信息

文件数
0
版本
cce36d3
Hash
94845370
收录时间
2026-08-20 19:27

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-16 20:01
浙ICP备14020137号-1