chore: land in-progress workspace changes before 1.16.2

The tree carried uncommitted work from several areas (web push, mobile
screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed
as one commit so the release pipeline can start from a clean tree; the
desktop transcript-correction behaviour shipped in the previous commit and
is unchanged here.
This commit is contained in:
Yun Chan 2026-11-05 21:58:44 +09:00
parent 9c2b6a9782
commit 7fe49c437e
144 changed files with 3760 additions and 4523 deletions

View file

@ -1,83 +0,0 @@
const { chromium } = require('@playwright/test');
const path = require('path');
const fs = require('fs');
const SCREENSHOT_DIR = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots';
const HTML_FILE = 'file:///' + path.resolve(__dirname, '../site/public/launch-readiness.html').replace(/\\/g, '/');
async function run() {
if (!fs.existsSync(SCREENSHOT_DIR)) {
fs.mkdirSync(SCREENSHOT_DIR, { recursive: true });
}
const browser = await chromium.launch({ channel: 'msedge', headless: true });
const context = await browser.newContext({ viewport: { width: 1440, height: 900 } });
const page = await context.newPage();
console.log('Navigating to:', HTML_FILE);
await page.goto(HTML_FILE);
await page.waitForTimeout(1000);
// 1. Hub 1: Free Tier Ads
console.log('Capturing Hub 1: Free Tier Ads...');
await page.screenshot({ path: path.join(SCREENSHOT_DIR, '05_sandbox_free_tier_ads.png'), fullPage: false });
// Open Rewarded Video Modal
const refillBtn = page.locator('button:has-text("Refill AI Quota")').first();
if (await refillBtn.isVisible()) {
await refillBtn.click();
await page.waitForTimeout(1200);
await page.screenshot({ path: path.join(SCREENSHOT_DIR, '06_sandbox_rewarded_video_modal.png'), fullPage: false });
await page.evaluate(() => {
const el = document.getElementById('rewarded-ad-modal');
if (el) el.classList.add('hidden');
});
await page.waitForTimeout(400);
}
// 2. Hub 2: Payment & Checkout
console.log('Capturing Hub 2: Multi-PG Checkout...');
await page.evaluate(() => switchTab('payment'));
await page.waitForTimeout(600);
await page.screenshot({ path: path.join(SCREENSHOT_DIR, '07_sandbox_payment_pricing_tiers.png'), fullPage: false });
// Click Subscribe Pro+ to show Checkout Modal
const subProPlusBtn = page.locator('button:has-text("Subscribe Pro+")').first();
if (await subProPlusBtn.isVisible()) {
await subProPlusBtn.click();
await page.waitForTimeout(600);
await page.screenshot({ path: path.join(SCREENSHOT_DIR, '08_sandbox_checkout_gateway_modal.png'), fullPage: false });
await page.evaluate(() => {
const el = document.getElementById('checkout-modal');
if (el) el.classList.add('hidden');
});
await page.waitForTimeout(400);
}
// 3. Hub 3: AI Customer Support (CA)
console.log('Capturing Hub 3: AI Customer Support...');
await page.evaluate(() => switchTab('support'));
await page.waitForTimeout(600);
// Ask prompt
await page.evaluate(() => {
if (typeof askBotQuestion === 'function') {
askBotQuestion('마이크 음성 인식이 안 돼요');
}
});
await page.waitForTimeout(1000);
await page.screenshot({ path: path.join(SCREENSHOT_DIR, '09_sandbox_ai_support_chat.png'), fullPage: false });
// 4. Hub 4: Admin Executive Command Desk
console.log('Capturing Hub 4: Admin Executive Command Desk...');
await page.evaluate(() => switchTab('admin'));
await page.waitForTimeout(600);
await page.screenshot({ path: path.join(SCREENSHOT_DIR, '10_sandbox_admin_monetization_crm.png'), fullPage: false });
await browser.close();
console.log('All 6 Sandbox E2E screenshots successfully captured!');
}
run().catch((err) => {
console.error(err);
process.exit(1);
});

View file

@ -38,6 +38,7 @@ async function main() {
await runStep('Run Vitest Test Suites', 'npm', ['test']);
await runStep('Build Desktop App (Renderer + Main + Preload)', 'npm', ['run', 'build', '--workspace=@d3ro/desktop']);
await runStep('Build Admin Dashboard (Next.js 14)', 'npm', ['run', 'build', '--workspace=@d3ro/admin']);
await runStep('Build Web App (Next.js)', 'npm', ['run', 'build', '--workspace=@d3ro/web']);
const totalDuration = ((Date.now() - totalStart) / 1000).toFixed(2);
console.log(`\n==================================================`);

View file

@ -0,0 +1,183 @@
#!/usr/bin/env node
// scripts/ci/check-test-hygiene.mjs
// 테스트 위생 게이트 — "의미 없는 RED" 를 커밋 단계에서 막는다.
//
// 정책 정본: docs/tdd-red/02-meaningful-vs-meaningless-red.md · 06-repo-application.md
// 규칙은 테스트가 검증하는 행위를 흐리지 않는 것만 담는다 (스타일 취향 아님):
//
// focused-test .only / fit / fdescribe — 나머지 스위트를 조용히 건너뛴다
// empty-skip 인자 없는 .skip() — 이유 없는 영구 스킵
// trivial-assertion 항상 참인 단정 (expect(true).toBe(true) 류)
// conditional-assertion isVisible() 를 조건으로 삼아 단정을 감싸는 형태 — 실패해도 초록
// machine-path 개발 머신의 스크린샷/임시 경로(Antigravity brain, AppData Temp)
// fixed-wait Playwright 의 waitForTimeout — web-first assert / auto-wait 로 대체
// misnamed-e2e `.e2e.test.ts` — E2E 는 Playwright(`*.spec.ts`)만, 단위는 `*.test.ts`
// spec-outside-e2e e2e/ 밖의 `*.spec.ts` — Vitest/Jest 는 `*.test.ts` 로
// assertion-free 단정이 한 줄도 없는 테스트 파일 — 렌더만 하고 아무것도 증명하지 않음
//
// 사용:
// node scripts/ci/check-test-hygiene.mjs
// node scripts/ci/check-test-hygiene.mjs --self-test
import { execFileSync } from 'node:child_process'
import { readFileSync } from 'node:fs'
const TEST_FILE = /(?:^|\/)(?:tests?|__tests__|e2e)\/.*\.(?:test|spec)\.[cm]?[jt]sx?$|\.(?:test|spec)\.[cm]?[jt]sx?$/
const EXCLUDED_PATH = /(?:^|\/)(?:node_modules|dist|build|out|coverage|playwright-report|test-results|scratch)(?:\/|$)/
const RULES = [
{
name: 'focused-test',
pattern: /\b(?:describe|it|test)\.only\s*\(|\bf(?:it|describe)\s*\(/,
hint: '.only 를 지우고 필요한 테스트만 -g 로 실행하세요.',
},
{
name: 'empty-skip',
pattern: /\b(?:describe|it|test)\.skip\(\s*\)/,
hint: '스킵에는 조건과 이유를 인자로 넘기세요: test.skip(condition, reason).',
},
{
name: 'trivial-assertion',
pattern:
/expect\(\s*(?:true|false|[01])\s*\)\.(?:toBe|toEqual|toStrictEqual)\(\s*(?:true|false|[01])\s*\)|assert\.(?:ok|equal|strictEqual)\(\s*(?:true|false|[01])\s*(?:,\s*(?:true|false|[01])\s*)?\)/,
hint: '항상 참인 단정은 아무것도 증명하지 않습니다. 관찰 가능한 결과를 단정하세요.',
},
{
name: 'conditional-assertion',
pattern: /if\s*\(\s*await\s+[^\n]*\.isVisible\(\)\s*\)/,
hint: 'isVisible() 로 단정을 감싸면 실패해도 초록입니다. expect(locator).toBeVisible() 로 바꾸세요.',
},
{
name: 'machine-path',
pattern:
/(?:antigravity|\.gemini)[\\/]|[A-Za-z]:[\\/]{1,2}Users[\\/][^\\/\n'"`]+[\\/]AppData[\\/]Local[\\/]Temp/i,
hint: '개발 머신 경로 대신 os.tmpdir()/mkdtemp 와 Playwright trace 를 쓰세요.',
},
{
name: 'fixed-wait',
pattern: /\.waitForTimeout\(\s*\d+\s*\)/,
hint: 'Playwright auto-wait / web-first assertion 을 쓰세요. waitForTimeout 은 flaky 의 근원입니다.',
},
{
name: 'misnamed-e2e',
pathPattern: /\.e2e\.test\.[cm]?[jt]sx?$/,
pattern: /^/,
hint: '브라우저/E2E 는 `*.spec.ts`(Playwright), 단위·통합은 `*.test.ts`(Vitest/Jest)로 나누세요.',
},
{
name: 'spec-outside-e2e',
pathPattern: /\.spec\.[cm]?[jt]sx?$/,
excludePathPattern: /(?:^|\/)e2e\//,
pattern: /^/,
hint: '`*.spec.ts` 는 Playwright E2E 전용입니다. Vitest/Jest 는 `*.test.ts` 로 바꾸세요.',
},
]
const ASSERTION_TOKEN = /\bexpect\s*\(|\bassert(?:\.\w+|[A-Z]\w*)?\s*\(|\bt\.(?:is|truthy|falsy|deepEqual|throws)\s*\(|\.should\b/
function normalize(path) {
return path.replaceAll('\\', '/')
}
function isCandidate(path) {
const normalized = normalize(path)
if (EXCLUDED_PATH.test(normalized)) return false
return TEST_FILE.test(normalized)
}
export function scanSource(path, source) {
const normalized = normalize(path)
const findings = []
for (const rule of RULES) {
if (rule.pathPattern && !rule.pathPattern.test(normalized)) continue
if (rule.excludePathPattern?.test(normalized)) continue
const match = rule.pattern.exec(source)
if (!match) continue
const line = source.slice(0, match.index).split('\n').length
findings.push({ rule: rule.name, path: normalized, line, hint: rule.hint })
}
if (!ASSERTION_TOKEN.test(source)) {
findings.push({
rule: 'assertion-free',
path: normalized,
line: 1,
hint: '단정이 없습니다. 관찰 가능한 결과를 expect/assert 로 고정하세요.',
})
}
return findings
}
function collectTestFiles() {
const output = execFileSync('git', ['ls-files', '--cached', '--others', '--exclude-standard', '-z'], {
encoding: 'utf8',
})
return output.split('\0').filter(Boolean).filter(isCandidate)
}
function selfTest() {
const unsafeCases = [
['apps/desktop/tests/unit/a.test.ts', `it.only('x', () => {})`],
['apps/desktop/tests/unit/a.test.ts', `describe.skip()`],
['apps/desktop/tests/unit/a.test.ts', `expect(true).toBe(true)`],
['apps/web/e2e/a.spec.ts', `if (await page.getByText('x').isVisible()) { expect(await page.getByText('x').isVisible()).toBeTruthy() }`],
['apps/desktop/tests/e2e/a.spec.ts', `const dir = 'C:/Users/me/AppData/Local/Temp/playwright-run'`],
['apps/desktop/tests/e2e/a.spec.ts', `const dir = 'C:/Users/me/.gemini/antigravity/brain/x/screenshots'`],
['apps/desktop/tests/e2e/a.spec.ts', `await page.waitForTimeout(1500)`],
['apps/desktop/tests/red/ads/a.e2e.test.ts', `describe('x', () => {})`],
['apps/web/tests/payple.test.ts', `describe('x', () => { it('y', () => {}) })`],
['apps/desktop/tests/unit/a.spec.ts', `expect(1).toBe(1)`],
]
const safeCases = [
[
'apps/web/e2e/billing.spec.ts',
`test.skip(!hasFixtureAccess, 'Local Supabase fixture credentials are required')\nexpect(page.url()).toContain('/login')`,
],
['packages/core/__tests__/url-policy.test.ts', `expect(isFileUrlWithinRoot('file:///C:/Users/me/app/index.html', ROOT)).toBe(true)`],
['apps/desktop/tests/main/windows/x.test.ts', `expect(w.fire('will-navigate', 'file:///C:/Users/me/Downloads/evil.html')).toHaveBeenCalled()`],
['apps/desktop/tests/unit/a.test.ts', `await expect(page.getByText('x')).toBeVisible()`],
['apps/desktop/tests/e2e/a.spec.ts', `await expect(page.getByTestId('nav-home')).toHaveAttribute('aria-current', 'page')`],
]
const failures = []
for (const [path, source] of unsafeCases) {
if (scanSource(path, source).length === 0) failures.push(`missed unsafe fixture: ${path} :: ${source}`)
}
for (const [path, source] of safeCases) {
const found = scanSource(path, source)
if (found.length > 0) failures.push(`flagged safe fixture: ${path} :: ${found.map((f) => f.rule).join(',')}`)
}
if (failures.length > 0) {
for (const failure of failures) console.error(failure)
process.exit(1)
}
console.log('Test hygiene scanner self-test passed.')
process.exit(0)
}
if (process.argv.includes('--self-test')) {
selfTest()
} else {
const findings = []
for (const path of collectTestFiles()) {
let source
try {
source = readFileSync(path, 'utf8')
} catch {
continue
}
findings.push(...scanSource(path, source))
}
if (findings.length > 0) {
console.error('의미 없는 테스트 패턴이 발견되었습니다:')
for (const finding of findings.sort((a, b) => a.path.localeCompare(b.path) || a.line - b.line)) {
console.error(`- ${finding.path}:${finding.line} [${finding.rule}] ${finding.hint}`)
}
process.exit(1)
}
console.log(`Test hygiene gate passed (${collectTestFiles().length} test files).`)
}

View file

@ -17,14 +17,17 @@
import { spawnSync } from 'node:child_process'
import { copyFileSync, existsSync, mkdirSync, readFileSync, rmSync } from 'node:fs'
import { dirname, join } from 'node:path'
import { dirname, join, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..')
const inPlace = process.argv.includes('--in-place')
const dirFlagIndex = process.argv.indexOf('--dir')
const packagedDir = dirFlagIndex >= 0 ? process.argv[dirFlagIndex + 1] : null
const packagedDir =
dirFlagIndex >= 0 && process.argv[dirFlagIndex + 1]
? resolve(process.argv[dirFlagIndex + 1])
: null
if (!inPlace && (!packagedDir || !existsSync(packagedDir))) {
console.error('사용: node scripts/ci/fix-native-abi.mjs --dir <packagedDir> | --in-place')
process.exit(1)
@ -119,4 +122,4 @@ if (hostNodeLoads(scratchBinary)) {
copyFileSync(scratchBinary, targetBinary)
console.log(`[native-abi] 교체 완료: ${targetBinary}`)
rmSync(scratchRoot, { recursive: true, force: true })
rmSync(scratchRoot, { recursive: true, force: true })

View file

@ -128,7 +128,7 @@ async function validateContract(source) {
}
const quota = contract.PLAN_QUOTA
const features = ['stt_transcribe', 'llm_haiku', 'llm_sonnet', 'llm_opus', 'realtime_session']
const features = ['stt_transcribe', 'llm_haiku', 'llm_sonnet', 'llm_opus', 'realtime_session', 'knowledge_embedding']
expectKeys('PLAN_QUOTA', quota, ['free', 'pro', 'pro_plus', 'team', 'enterprise'])
for (const [tier, perFeature] of Object.entries(quota)) {
expectKeys(`PLAN_QUOTA.${tier}`, perFeature, features)

View file

@ -171,14 +171,8 @@ updateJson('apps/admin-swagger/openapi.json', (document) => {
document.info.version = metadata.version
})
updateText('apps/web/src/components/layout/sidebar.tsx', (text) =>
replaceExactlyOnce(
text,
/\bv\d+\.\d+\.\d+\b/,
`v${metadata.version}`,
'Web sidebar product version',
),
)
// The web sidebar imports apps/web/package.json at build time, so its displayed
// version follows the package surface updated above without another text mirror.
// The download section (site/ only) builds the installer filename from these
// constants. They once drifted to 1.2.0 while the feed served newer versions, so the

View file

@ -13,16 +13,107 @@
// 사용:
// node scripts/ci/verify-native-abi.mjs # release/<version>/win-unpacked 자동 탐색
// node scripts/ci/verify-native-abi.mjs --dir <packagedDir>
// node scripts/ci/verify-native-abi.mjs --self-test # 필수 prebuild 누락 fixture 검증
import { spawnSync } from 'node:child_process'
import { existsSync, readFileSync, readdirSync } from 'node:fs'
import { dirname, join } from 'node:path'
import {
existsSync,
mkdtempSync,
mkdirSync,
readFileSync,
readdirSync,
rmSync,
writeFileSync,
} from 'node:fs'
import { tmpdir } from 'node:os'
import { basename, dirname, join, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..')
/** N-API 기반이라 Electron ABI 재빌드는 불필요하지만, 대상 플랫폼 prebuild는 필수다. */
const REQUIRED_NAPI = [
{ name: 'uiohook-napi', binaryName: 'uiohook-napi.node' },
]
function inferPackagedTarget(directory) {
const directoryName = basename(directory)
if (directoryName === 'win-unpacked') return { platform: 'win32', arch: 'x64' }
const macDirectory = /^mac-(.+)$/.exec(directoryName)
if (macDirectory) return { platform: 'darwin', arch: macDirectory[1] }
if (directoryName === 'mac') return { platform: 'darwin', arch: process.arch }
return { platform: process.platform, arch: process.arch }
}
function requiredNapiResults(unpackedRoot, target) {
const failures = []
const notes = []
for (const module of REQUIRED_NAPI) {
const binaryPath = join(
unpackedRoot,
module.name,
'prebuilds',
`${target.platform}-${target.arch}`,
module.binaryName,
)
if (!existsSync(binaryPath)) {
failures.push(
`${module.name}: ${target.platform}-${target.arch} 필수 N-API prebuild가 없습니다 → ${binaryPath}`,
)
} else {
notes.push(
`${module.name}: ${target.platform}-${target.arch} 필수 N-API prebuild 존재 확인`,
)
}
}
return { failures, notes }
}
function runSelfTest() {
const fixtureRoot = mkdtempSync(join(tmpdir(), 'd3ro-native-abi-'))
const target = { platform: 'win32', arch: 'x64' }
const binaryPath = join(
fixtureRoot,
'uiohook-napi',
'prebuilds',
'win32-x64',
'uiohook-napi.node',
)
try {
const missing = requiredNapiResults(fixtureRoot, target)
if (missing.failures.length !== 1 || !missing.failures[0].includes(binaryPath)) {
throw new Error('누락된 win32-x64 prebuild가 실패로 고정되지 않았습니다.')
}
mkdirSync(dirname(binaryPath), { recursive: true })
writeFileSync(binaryPath, 'fixture')
const present = requiredNapiResults(fixtureRoot, target)
if (present.failures.length !== 0 || present.notes.length !== 1) {
throw new Error('존재하는 win32-x64 prebuild fixture가 통과하지 못했습니다.')
}
console.log('[native-abi] SELF-TEST GREEN — win32-x64 prebuild 누락/존재 계약 확인')
} finally {
rmSync(fixtureRoot, { recursive: true, force: true })
}
}
if (process.argv.includes('--self-test')) {
runSelfTest()
process.exit(0)
}
const dirFlagIndex = process.argv.indexOf('--dir')
let packagedDir = dirFlagIndex >= 0 ? process.argv[dirFlagIndex + 1] : null
let packagedDir =
dirFlagIndex >= 0 && process.argv[dirFlagIndex + 1]
? resolve(process.argv[dirFlagIndex + 1])
: null
if (!packagedDir) {
const version = JSON.parse(
@ -56,11 +147,6 @@ const REQUIRED_ELECTRON_ABI = [
},
]
/** N-API 기반이라 타임 무관 — 존재만 확인 */
const NAPI_MODULES = [
{ name: 'uiohook-napi', binary: join('uiohook-napi', 'build', 'Release', 'uiohook_napi.node') },
]
const failures = []
const notes = []
@ -97,14 +183,10 @@ for (const module of REQUIRED_ELECTRON_ABI) {
}
}
for (const module of NAPI_MODULES) {
const binaryPath = join(unpackedRoot, module.binary)
if (!existsSync(binaryPath)) {
notes.push(`${module.name}: 바이너리 없음(선택) — ${binaryPath}`)
} else {
notes.push(`${module.name}: 존재 확인 (N-API)`)
}
}
const target = inferPackagedTarget(packagedDir)
const napiResults = requiredNapiResults(unpackedRoot, target)
failures.push(...napiResults.failures)
notes.push(...napiResults.notes)
for (const note of notes) console.log(`[native-abi] ${note}`)
@ -114,4 +196,4 @@ if (failures.length > 0) {
process.exit(1)
}
console.log('[native-abi] GREEN — 패키징된 네이티브 모듈이 Electron에서 실행 가능한 ABI입니다.')
console.log('[native-abi] GREEN — 패키징된 네이티브 모듈이 Electron에서 실행 가능한 ABI입니다.')

View file

@ -77,13 +77,20 @@ if (-not $SkipBuild) {
# Web app (@d3ro/web, served at /app). NEXT_PUBLIC_* values are baked in at build time.
Write-Host "`n[1.6/4] Building D3RO Voice Next.js Web App Image..." -ForegroundColor Yellow
$webBuildArgs = @()
foreach ($name in @("NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", "NEXT_PUBLIC_PAYPLE_CLIENT_KEY")) {
foreach ($name in @("NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", "NEXT_PUBLIC_PAYPLE_CLIENT_KEY", "NEXT_PUBLIC_VAPID_PUBLIC_KEY")) {
$value = if ($envDict.ContainsKey($name)) { $envDict[$name] } else { [Environment]::GetEnvironmentVariable($name) }
if ($name -eq "NEXT_PUBLIC_VAPID_PUBLIC_KEY" -and [string]::IsNullOrWhiteSpace($value)) {
$value = if ($envDict.ContainsKey("WEBPUSH_VAPID_PUBLIC_KEY")) { $envDict["WEBPUSH_VAPID_PUBLIC_KEY"] } else { [Environment]::GetEnvironmentVariable("WEBPUSH_VAPID_PUBLIC_KEY") }
}
if ([string]::IsNullOrWhiteSpace($value)) {
if ($name -eq "NEXT_PUBLIC_PAYPLE_CLIENT_KEY") {
Write-Warning "$name is empty: the web app will build with Payple checkout disabled."
continue
}
if ($name -eq "NEXT_PUBLIC_VAPID_PUBLIC_KEY") {
Write-Warning "$name is empty: browser notifications will stay unavailable and fail closed."
continue
}
throw "$name is required to build the web app image."
}
if ($value.Contains("`r") -or $value.Contains("`n")) {

View file

@ -35,7 +35,8 @@ for value in \
"$SUPABASE_SERVICE_ROLE_KEY" \
"$NEXT_PUBLIC_SUPABASE_URL" \
"$NEXT_PUBLIC_SUPABASE_ANON_KEY" \
"${NEXT_PUBLIC_PAYPLE_CLIENT_KEY:-}"; do
"${NEXT_PUBLIC_PAYPLE_CLIENT_KEY:-}" \
"${NEXT_PUBLIC_VAPID_PUBLIC_KEY:-${WEBPUSH_VAPID_PUBLIC_KEY:-}}"; do
case "$value" in
*$'\n'*|*$'\r'*) echo "Deployment values must be single-line" >&2; exit 1 ;;
esac
@ -79,10 +80,15 @@ echo -e "\n${YELLOW}[1.6/4] Building D3RO Voice Next.js Web App Image (/app)...$
if [ -z "${NEXT_PUBLIC_PAYPLE_CLIENT_KEY:-}" ]; then
echo -e "${YELLOW}NEXT_PUBLIC_PAYPLE_CLIENT_KEY is empty: Payple checkout will be disabled in the web app.${NC}"
fi
WEB_VAPID_PUBLIC_KEY="${NEXT_PUBLIC_VAPID_PUBLIC_KEY:-${WEBPUSH_VAPID_PUBLIC_KEY:-}}"
if [ -z "$WEB_VAPID_PUBLIC_KEY" ]; then
echo -e "${YELLOW}NEXT_PUBLIC_VAPID_PUBLIC_KEY is empty: browser notifications will stay unavailable and fail closed.${NC}"
fi
docker build -t d3ro-voice-web:latest -f "$ROOT_DIR/apps/web/Dockerfile" \
--build-arg "NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL" \
--build-arg "NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY" \
--build-arg "NEXT_PUBLIC_PAYPLE_CLIENT_KEY=${NEXT_PUBLIC_PAYPLE_CLIENT_KEY:-}" \
--build-arg "NEXT_PUBLIC_VAPID_PUBLIC_KEY=$WEB_VAPID_PUBLIC_KEY" \
"$ROOT_DIR"
echo -e "${GREEN}Docker image built: d3ro-voice-web:latest${NC}"

View file

@ -1,69 +0,0 @@
const { _electron: electron } = require('playwright');
const path = require('path');
const fs = require('fs');
async function runE2E() {
console.log('=== STARTING REAL ELECTRON DESKTOP APP E2E TEST ===');
const electronPath = require('electron');
console.log('Electron Executable:', electronPath);
console.log('App Directory:', path.resolve('apps/desktop'));
const outDir = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots/live_production_verified';
if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true });
const app = await electron.launch({
executablePath: electronPath,
args: ['.'],
cwd: path.resolve('apps/desktop'),
env: Object.assign({}, process.env, {
NODE_ENV: 'production',
ELECTRON_ENABLE_LOGGING: '1'
})
});
const pid = app.process().pid;
console.log('Electron Process Launched! PID:', String(pid));
console.log('Waiting for Main BrowserWindow...');
const window = await app.firstWindow({timeout: 30000});
const winTitle = await window.title();
console.log('Main Window Opened! Title:', winTitle);
await window.waitForLoadState('domcontentloaded');
await window.waitForTimeout(3000);
const shot1 = path.join(outDir, '08_electron_main_dashboard.png');
await window.screenshot({path: shot1});
console.log('Saved Main Dashboard Screenshot:', shot1);
const pageState = await window.evaluate(() => {
return {
title: document.title,
url: window.location.href,
bodyTextSnippet: document.body.innerText.substring(0, 300),
buttons: Array.from(document.querySelectorAll('button, a')).map(b => b.innerText.trim()).filter(Boolean).slice(0, 20),
hasErrors: !!document.querySelector('.error-banner, .crash-banner')
};
});
console.log('Page State Evaluated:', JSON.stringify(pageState, null, 2));
await window.waitForTimeout(2000);
const shot2 = path.join(outDir, '09_electron_dashboard_interactive.png');
await window.screenshot({path: shot2});
console.log('Saved Interactive Screenshot:', shot2);
console.log('Gracefully closing Electron application...');
await app.close();
console.log('=== ELECTRON DESKTOP APP E2E TEST COMPLETED SUCCESSFULLY ===');
return {success: true, pageState};
}
runE2E().then(res => {
console.log('FINAL E2E RESULT SSPOT_TEST_FINISHED');
process.exit(0);
}).catch(err => {
console.error('E2E TEST FAILED:g', err);
process.exit(1);
});

View file

@ -1,74 +0,0 @@
const { _electron: electron } = require('playwright');
const path = require('path');
const fs = require('fs');
async function runFullJourney() {
const outDir = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots/live_production_verified';
if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true });
const app = await electron.launch({
executablePath: require('electron'),
args: ['.'],
cwd: path.resolve('apps/desktop'),
env: Object.assign({}, process.env, { NODE_ENV: 'production' })
});
console.log('Electron Launched, PID:', app.process().pid);
const window = await app.firstWindow({timeout: 30000});
await window.waitForLoadState('domcontentloaded');
await window.waitForTimeout(2000);
// 1. Dashboard Screenshot
await window.screenshot({ path: path.join(outDir, '08_electron_dashboard.png') });
console.log('1. Saved Dashboard');
// 2. Click History
const hightoryEl = await window.$('div >> text="his"i, div >> text="히스토리"');
if (hightoryEl) {
await hightoryEl.click();
await window.waitForTimeout(1500);
await window.screenshot({ path: path.join(outDir, '09_electron_history.png') });
console.log('2. Saved History');
}
// 3. Click Commands
console.log('Clicking Commands...');
console.log('Clicking Commands tab.');
await window.evaluate(() => {
const els = Array.from(document.querySelectorAll('div, button, a'));
const cmdEl = els.find(e => e.innerText && e.innerText.trim() === '몵령어');
if (cmdEl) cmdEl.click();
});
await window.waitForTimeout(1500);
await window.screenshot({ path: path.join(outDir, '10_electron_commands.png') });
console.log('3. Saved Commands');
// 4. Click Meeting Mode
await window.evaluate(() => {
const els = Array.from(document.querySelectorAll('div, button, a'));
const meetEl = els.find(e => e.innerText && e.innerText.trim() === 'meeting' || e.innerText.trim() === '뚜환');
if (meetEl) meetEl.click();
});
await window.waitForTimeout(1500);
await window.screenshot({ path: path.join(outDir, '11_electron_meeting_mode.png') });
console.log('4. Saved Meeting Mode');
// 5. Click Settings
await window.evaluate(() => {
const els = Array.from(document.querySelectorAll('div, button, a'));
const settEl = els.find(e => e.innerText && (e.innerText.trim() === 'settings' || e.innerText.trim() === '설앩'));
if (settEl) settEl.click();
});
await window.waitForTimeout(1500);
await window.screenshot({ path: path.join(outDir, '12_electron_settings_modal.png') });
console.log('5. Saved Settings Modal');
await app.close();
console.log('FULL_JOUT<EFBFBD><EFBFBD>VW<EFBFBD><EFBFBD>P<EFBFBD><EFBFBD>T<EFBFBD><EFBFBD><EFBFBD>NŸB<EFBFBD><EFBFBD><EFBFBD>[<EFBFBD><EFBFBD>[<EFBFBD><EFBFBD>\<EFBFBD><EFBFBD>^J
K<EFBFBD>[<EFBFBD>
HO<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\<EFBFBD>˙^]
JK<EFBFBD><EFBFBD>]<EFBFBD>
\<EFBFBD><EFBFBD>O<EFBFBD>ˆ<EFBFBD>ۜ<EFBFBD><EFBFBD>K<EFBFBD>\<EFBFBD><EFBFBD>܊ ғ<EFBFBD>T<EFBFBD><EFBFBD>VHT<EFBFBD><EFBFBD>Ԏ<EFBFBD><EFBFBD>\<EFBFBD><EFBFBD>Nˆ<EFBFBD><EFBFBD><EFBFBD>\<EFBFBD>˙^]
JNŸJN

View file

@ -1,58 +0,0 @@
const { _electron: electron } = require('playwright');
const path = require('path');
const fs = require('fs');
async function runSettingsUpdaterE2E() {
console.log('=== STARTING SETTINGS & UPDATER E2E TEST ===');
const electronPath = require('electron');
const outDir = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots/live_production_verified';
const app = await electron.launch({
executablePath: electronPath,
args: ['.'],
cwd: path.resolve('apps/desktop'),
env: Object.assign({}, process.env, { NODE_ENV: 'production', ELECTRON_ENABLE_LOGGING: '1' })
});
console.log('Electron Process Launched! PID:', String(app.process().pid));
const window = await app.firstWindow({timeout: 30000});
await window.waitForLoadState('domcontentloaded');
await window.waitForTimeout(3000);
// Click Settings (설정)
console.log('Navigating to Settings tab...');
const settingsBtn = await window.$('text=설정');
if (settingsBtn) {
await settingsBtn.click();
await window.waitForTimeout(1500);
console.log('Clicked Settings tab!');
}
const shotSettings = path.join(outDir, '10_electron_settings_updater.png');
await window.screenshot({path: shotSettings});
console.log('Saved Settings Screenshot:', shotSettings);
// Click History (히스Ī<EC8AA4>림)
console.log('Navigating to History tab...');
const historyBtn = await window.$('text=히스토리');
if (historyBtn) {
await historyBtn.click();
await window.waitForTimeout(1500);
console.log('Clicked History tab!');
}
const shotHistory = path.join(outDir, '11_electron_history_voice_logs.png');
await window.screenshot({path: shotHistory});
console.log('Saved History Screenshot:', shotHistory);
await app.close();
console.log('=== SETTINGS & UPDATER E2E TEST COMPLETED ===');
}
runSettingsUpdaterE2E().then(() => process.exit(0)).catch(err => {
console.error('TEST ERROR:', err);
process.exit(1);
});

View file

@ -1,92 +0,0 @@
const { _electron: electron } = require('playwright');
const path = require('path');
const fs = require('fs');
async function runRealETE() {
console.log('=== REAL LIVE ELECTRON SCREEN VERIFICATION ===');
const outDir = 'C:/Users/encep/.gemini/antigravity-cli/brain/3ab7ae82-5634-41d5-93a7-3c12c22503e2/screenshots/live_production_verified';
if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true });
const app = await electron.launch({
executablePath: require('electron'),
args: ['.'],
cwd: path.resolve('apps/desktop'),
env: Object.assign({}, process.env, { NODE_ENV: 'production' })
});
const pid = app.process().pid;
console.log('[1] Real Electron Process Active, PID:', pid);
const window = await app.firstWindow({ timeout: 30000 });
await window.waitForLoadState('domcontentloaded');
await window.waitForTimeout(2500);
// 1. Dashboard
const shotDash = path.join(outDir, '11_real_electron_dashboard.png');
await window.screenshot({ path: shotDash });
console.log('[2] Captured Dashboard', shotDash);
// 2. Click History tab ('히스토리': \uD788\uC2A4\uD1A0\uB9AC)
await window.evaluate(() => {
const el = Array.from(document.querySelectorAll('div, button, a, span')).find(
q => q.innerText && q.innerText.trim() === '\uD788\uC2A4\uD1A0\uB9AC'
);
if (el) el.click();
});
await window.waitForTimeout(1500);
const shotHistory = path.join(outDir, '12_real_electron_history.png');
await window.screenshot({ path: shotHistory });
console.log('[3] Captured History', shotHistory);
// 3. Click Dictionary tab ('사전': \uC0AC\uC804)
await window.evaluate(() => {
const el = Array.from(document.querySelectorAll('div, button, a, span')).find(
q => q.innerText && q.innerText.trim() === '\uC0AC\uC804'
);
if (el) el.click();
});
await window.waitForTimeout(1500);
const shotDict = path.join(outDir, '13_real_electron_dictionary.png');
await window.screenshot({ path: shotDict });
console.log('[4] Captured Dictionary', shotDict);
// 4. Click Commands tab ('명령어': \uBA85\uB839\uC5B4)
await window.evaluate(() => {
const el = Array.from(document.querySelectorAll('div, button, a, span')).find(
q => q.innerText && q.innerText.trim() === '\uBA85\uB839\uC5B4'
);
if (el) el.click();
});
await window.waitForTimeout(1500);
const shotCmd = path.join(outDir, '14_real_electron_commands.png');
await window.screenshot({ path: shotCmd });
console.log('[5] Captured Commands', shotCmd);
// 5. Click Meeting tab ('회의': \uD68C\uC758)
await window.evaluate(() => {
const el = Array.from(document.querySelectorAll('div, button, a, span')).find(
q => q.innerText && q.innerText.trim() === '\uD68C\uC758'
);
if (el) el.click();
});
await window.waitForTimeout(1500);
const shotMeet = path.join(outDir, '15_real_electron_meeting.png');
await window.screenshot({ path: shotMeet });
console.log('[6] Captured Meeting Mode', shotMeet);
// 6. Click Voice Conversation tab ('대화': \uB300\uD654)
await window.evaluate(() => {
const el = Array.from(document.querySelectorAll('div, button, a, span')).find(
q => q.innerText && q.innerText.trim() === '\uB300\uD654'
);
if (el) el.click();
});
await window.waitForTimeout(1500);
const shotConv = path.join(outDir, '16_real_electron_conversation.png');
await window.screenshot({ path: shotConv });
console.log('[7] Captured Voice Conversation', shotConv);
await app.close();
console.log('=== ALL REAL SCREENS VERIFIED SUCCESSFULLY ===');
}
runRealETE().then(() => process.exit(0)).catch(e => { console.error('E2E ERROR:', e); process.exit(1); });