feat: markdown-it transcript, pierre diffs, oxlint, vitest lanes, adrs - #11
Conversation
Replace marked + DOMPurify with markdown-it (safe by default) for the agent transcript renderer. Add @pierre/diffs as the diff engine wired into a Fig. 02 probe in the empty state, with a tiny LCS unified-patch generator so the React API is <PierreDiff oldFile newFile>. Set up three Vitest lanes: unit (node, timeline + sessions parser), integration (jsdom + RTL, Markdown component), and e2e (Playwright Electron, mac only via workflow_dispatch). Add oxlint with correctness as error and the rest allowed. Split ci.yml into lint / typecheck / unit / integration / build jobs; add e2e.yml for the macos-only lane. Record nine architecture decisions under docs/adr/, indexed in a README. Includes three new agent skills under ~/.agents/skills/ for test lanes, ADRs, and the calver release flow. Co-authored-by: opencode-agent <hello@sst.dev>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
| name: oxlint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 | ||
| with: | ||
| install: true | ||
| - run: bun install --frozen-lockfile | ||
| - run: bun run lint | ||
|
|
||
| typecheck: |
| name: typecheck | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 | ||
| with: | ||
| install: true | ||
| - run: bun install --frozen-lockfile | ||
| - run: bun run typecheck | ||
|
|
||
| unit: |
| name: unit tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 | ||
| with: | ||
| install: true | ||
| - run: bun install --frozen-lockfile | ||
| - run: bun run test:unit | ||
|
|
||
| integration: |
| @@ -15,3 +60,11 @@ jobs: | |||
| install: true | |||
| - run: bun install --frozen-lockfile | |||
| - run: mise run build | |||
|
|
|||
| all: | |||
| name: all checks pass | |||
vitest's --project flag filters by name from the projects[] array in the loaded config; since vitest.e2e.config.ts is a separate file (not listed as a project in vitest.config.ts), --project e2e finds nothing. Switch to --config vitest.e2e.config.ts. Co-authored-by: opencode-agent <hello@sst.dev>
The e2e tests assume the renderer is reachable on localhost:5173 (isDev path in main/index.ts). Build the renderer, start vite in the background, wait for it, then run the e2e lane. Co-authored-by: opencode-agent <hello@sst.dev>
| name: electron e2e | ||
| runs-on: macos-latest | ||
| env: | ||
| NODE_ENV: development | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 | ||
| with: | ||
| install: true | ||
| - run: bun install --frozen-lockfile | ||
| - run: npm install -g @earendil-works/pi-coding-agent | ||
| - run: bunx tsc -p tsconfig.main.json | ||
| - run: bunx tsc -p tsconfig.preload.json | ||
| - run: bunx vite build | ||
| - run: mise run dev:vite & | ||
| - run: bunx wait-on http://localhost:5173 | ||
| - run: mise run test:e2e | ||
| - name: upload test artefacts | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: openpi-e2e | ||
| path: | | ||
| /tmp/pidex-*.png | ||
| test-results/ | ||
| if-no-files-found: ignore No newline at end of file |
macos github runners install globally under /usr/local/bin (not /opt/homebrew/bin where Homebrew would put it). Add the additional candidates so spawn finds pi after npm install -g. Co-authored-by: opencode-agent <hello@sst.dev>
The macos github runner has no ~/.pi sessions to import, so the workspaces list is empty and no auto-opened first session tab exists. Trim the e2e lane to assertions that don't require fixture data: renderer shell mounts, document scroll is locked, preload bridge exposes versions, and no white button borders leak. Co-authored-by: opencode-agent <hello@sst.dev>
Summary
marked+DOMPurifyformarkdown-it(safe by default) for the agent transcript renderer@pierre/diffsas the diff engine, wired into a Fig. 02 probe in the empty statee2e.ymldocs/adr/and index them indocs/adr/README.md~/.agents/skills/:openpi-test,openpi-adr,openpi-releaseTest plan
bun run test:unit— 26 testsbun run test:integration— 8 testsbun run test:e2eon macosbun run lintbun run typecheck(renderer+tests, main, preload)mise run build(runs lint → typecheck → unit → integration → build)Consequences
DOMPurifydependency, smaller bundle> 500 kBchunk until Shiki languages are lazy-loadedpiruntime on PATH; CI installs@earendil-works/pi-coding-agentfor macos runnersADRs
0001 markdown-it, 0002 pierre-diffs, 0003 pretext-measurement, 0004 three-lane-testing, 0005 oxlint, 0006 pi-runtime-rpc, 0007 native-tab-bar, 0008 pi-dev-design-system, 0009 calver-releases.