chore: update plan automation and chat status UI

This commit is contained in:
2026-04-23 20:27:40 +09:00
parent 6e863feafd
commit 346d4c2208
26 changed files with 317 additions and 74 deletions

View File

@@ -1,11 +1,12 @@
import process from 'node:process';
import { chromium } from 'playwright';
import { createCaptureContext, getCaptureRuntimeConfig } from './capture-auth-utils.mjs';
import { ensureDirectory, getKstDate, resolveCapturePaths, updateWorklogCaptureSection } from './worklog-capture-utils.mjs';
const cwd = process.cwd();
const componentId = process.argv[2];
const captureDate = process.argv[3] ?? getKstDate();
const baseUrl = process.env.CAPTURE_BASE_URL ?? 'http://127.0.0.1:5174';
const { baseUrl } = getCaptureRuntimeConfig(cwd);
if (!componentId) {
console.error('Usage: node scripts/capture-component-screenshot.mjs <component-id> [YYYY-MM-DD]');
@@ -21,13 +22,14 @@ const { screenshotDir, screenshotPath, worklogPath, markdownImagePath } = resolv
const targetSelector = `#component-sample-${componentId}`;
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({
const context = await createCaptureContext(browser, {
viewport: {
width: 1600,
height: 1200,
},
deviceScaleFactor: 2,
});
const page = await context.newPage();
try {
await ensureDirectory(screenshotDir);
@@ -59,5 +61,6 @@ try {
console.log(`Saved: ${screenshotPath}`);
console.log(`Linked in: ${worklogPath}`);
} finally {
await context.close();
await browser.close();
}