@ihyeon/flow-qa 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/dist/src/ui/public/app.js +8 -1
- package/dist/src/ui/public/i18n.js +2 -0
- package/docs/mobile.md +1 -1
- package/docs/releases.md +9 -0
- package/docs/ui.md +4 -2
- package/package.json +1 -1
package/README.ko.md
CHANGED
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Flow QA is available as a CLI and a web UI bound to `127.0.0.1`. Provide a targe
|
|
|
16
16
|
Node.js 24.8 or later is required. Install Chromium before the first web run:
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
npm install -g @ihyeon/flow-qa@0.2.
|
|
19
|
+
npm install -g @ihyeon/flow-qa@0.2.4
|
|
20
20
|
flow-qa browser install
|
|
21
21
|
flow-qa ui --demo
|
|
22
22
|
```
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
if (state.lastError && state.lastError !== app.lastError) { app.lastError = state.lastError; notice(state.lastError, true); }
|
|
244
244
|
}
|
|
245
245
|
async function work(fn) { if (app.busy) return; app.busy = true; readiness(); notice(''); try { await fn(); } catch (error) { showError(error); } finally { app.busy = false; readiness(); } }
|
|
246
|
-
async function loadSuite(file) { await work(async () => { const result = await api(`/api/suite?file=${encodeURIComponent(file)}`); $('flow-input').value = result.flow || ''; setDraft(result.suite, result.script, 'library', result.flow || '', file, result.suiteHash || ''); noticeKey('app.suiteLoaded'); view('scenario'); }); }
|
|
246
|
+
async function loadSuite(file) { await work(async () => { const result = await api(`/api/suite?file=${encodeURIComponent(file)}`); if (!confirmScenarioReplacement('app.confirmReplaceDraft')) return; $('flow-input').value = result.flow || ''; setDraft(result.suite, result.script, 'library', result.flow || '', file, result.suiteHash || ''); noticeKey('app.suiteLoaded'); view('scenario'); }); }
|
|
247
247
|
async function generate() { await work(async () => {
|
|
248
248
|
const flow = $('flow-input').value.trim();
|
|
249
249
|
if (!flow) throw localizedError('app.enterFlow');
|
|
@@ -267,6 +267,9 @@
|
|
|
267
267
|
|| suite !== JSON.stringify(app.draft, null, 2)
|
|
268
268
|
|| $('scenario-platform').value !== suitePlatform();
|
|
269
269
|
}
|
|
270
|
+
function confirmScenarioReplacement(key) {
|
|
271
|
+
return !hasUnsavedScenario() || window.confirm(t(key));
|
|
272
|
+
}
|
|
270
273
|
function warnBeforeUnload(event) {
|
|
271
274
|
if (!hasUnsavedScenario()) return;
|
|
272
275
|
event.preventDefault();
|
|
@@ -286,6 +289,7 @@
|
|
|
286
289
|
const body = { suite, ...(flow === undefined ? {} : { flow }) };
|
|
287
290
|
if (new TextEncoder().encode(JSON.stringify(body)).byteLength > 256 * 1024) throw localizedError('app.importTooLarge');
|
|
288
291
|
const result = await api('/api/import', body);
|
|
292
|
+
if (!confirmScenarioReplacement('app.confirmReplaceDraft')) return;
|
|
289
293
|
$('flow-input').value = flow || '';
|
|
290
294
|
setDraft(result.suite, result.script, 'imported', flow || '');
|
|
291
295
|
noticeKey('app.importComplete');
|
|
@@ -393,6 +397,9 @@
|
|
|
393
397
|
$('library-shortcut').addEventListener('click', () => view('library'));
|
|
394
398
|
$('new-draft-btn').addEventListener('click', () => {
|
|
395
399
|
if (app.busy) return;
|
|
400
|
+
const json = $('suite-editor').value;
|
|
401
|
+
const unsavedJson = json.trim() && (!app.savedFile || json !== JSON.stringify(app.draft, null, 2));
|
|
402
|
+
if (unsavedJson && !confirmScenarioReplacement('app.confirmNewDraft')) return;
|
|
396
403
|
app.draft = null; app.script = ''; app.savedFile = ''; app.savedHash = '';
|
|
397
404
|
app.origin = 'none'; app.sourceFlow = ''; app.boundSource = null; app.stale = false; app.dirty = false;
|
|
398
405
|
$('suite-editor').value = ''; $('review-checkbox').checked = false;
|
|
@@ -226,6 +226,8 @@
|
|
|
226
226
|
'app.plannerCliOnly': ['This model can be used from the CLI. Connect an OpenAI-compatible model to generate cases in the UI.', '이 모델은 CLI에서 사용할 수 있습니다. UI에서 생성하려면 OpenAI 호환 모델을 연결하세요.'],
|
|
227
227
|
'app.plannerReady': ['Ready to generate. The actual model call and costs may occur when you select Generate.', '생성 준비가 됐습니다. 실제 모델 호출과 비용은 생성 버튼을 누를 때 발생할 수 있습니다.'],
|
|
228
228
|
'app.runEnded': ['Run ended. Check Run history for results.', '실행이 종료됐습니다. 실행 기록에서 결과를 확인하세요.'],
|
|
229
|
+
'app.confirmReplaceDraft': ['Unsaved changes to the current scenario or cases will be discarded. Saved files will remain unchanged. Cancel to keep editing.', '현재 시나리오 또는 케이스의 저장되지 않은 변경 사항이 사라집니다. 저장된 파일은 변경되지 않습니다. 취소하면 계속 편집할 수 있습니다.'],
|
|
230
|
+
'app.confirmNewDraft': ['Unsaved case JSON will be cleared. The scenario text and saved files will remain unchanged. Cancel to keep editing.', '저장되지 않은 케이스 JSON이 지워집니다. 시나리오 내용과 저장된 파일은 유지됩니다. 취소하면 계속 편집할 수 있습니다.'],
|
|
229
231
|
'app.suiteLoaded': ['Saved cases loaded. Editing the linked scenario requires generating or loading cases again.', '저장된 케이스를 불러왔습니다. 연결된 시나리오를 수정하면 케이스를 다시 생성하거나 불러와야 합니다.'],
|
|
230
232
|
'app.enterFlow': ['Enter a scenario with expected behavior.', '기대 동작을 포함한 시나리오를 입력하세요.'],
|
|
231
233
|
'app.configurePlanner': ['Configure an OpenAI-compatible AI planner and key environment variable in Connections.', '연결 설정에서 OpenAI 호환 AI 플래너와 키 환경 변수를 준비하세요.'],
|
package/docs/mobile.md
CHANGED
|
@@ -9,7 +9,7 @@ Choose **Mobile** on the scenario screen, describe the flow, and generate or dow
|
|
|
9
9
|
With the installed CLI:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npm install -g @ihyeon/flow-qa@0.2.
|
|
12
|
+
npm install -g @ihyeon/flow-qa@0.2.4
|
|
13
13
|
flow-qa init ./my-qa
|
|
14
14
|
# Write your mobile flow in my-qa/flows/my-flow.md first.
|
|
15
15
|
flow-qa plan flows/my-flow.md --platform mobile --prompt-only --workspace ./my-qa
|
package/docs/releases.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
The alpha entries below are historical release records. They document earlier package versions and checks.
|
|
4
4
|
|
|
5
|
+
## 0.2.4: confirm before replacing unsaved cases
|
|
6
|
+
|
|
7
|
+
Loading a library suite, importing valid case files, or starting a new JSON draft now asks before discarding unsaved content. Cancel preserves the current draft and selected import files. New JSON drafts keep the scenario text; unchanged saved cases, flow-only JSON resets, and ordinary screen navigation stay quiet. Failed imports still report validation errors without replacing the draft. Existing save, review, generation, and execution behavior remains unchanged.
|
|
8
|
+
|
|
9
|
+
Locally verified on macOS with Node.js 24.14.1 on 2026-10-21: 92 tests, type checking, UI syntax and design-system audit, real Chromium confirmation acceptance/cancellation in English and Korean, preserved inputs and import selections, unchanged navigation and validation errors, and a fresh package install with three passing browser cases. Existing file download, re-import, and browser leave-page checks passed without model calls.
|
|
10
|
+
|
|
11
|
+
- Package: [`@ihyeon/flow-qa@0.2.4`](https://www.npmjs.com/package/@ihyeon/flow-qa/v/0.2.4)
|
|
12
|
+
- Release: [GitHub 0.2.4](https://github.com/hyeonse-swing/flow-qa/releases/tag/v0.2.4)
|
|
13
|
+
|
|
5
14
|
## 0.2.3: download saved case files
|
|
6
15
|
|
|
7
16
|
Adds separate case JSON and source Markdown download buttons to case review. Saved cases can be reused without finding workspace files manually; source-less cases offer JSON only. Unsaved or outdated drafts are excluded. The source text and hash remain compatible with file import, while existing save, review, and execution gates stay in place.
|
package/docs/ui.md
CHANGED
|
@@ -7,7 +7,7 @@ Describe a user flow, review cases, and configure a target when ready to run. We
|
|
|
7
7
|
Node.js 24.8 or later is required. Install Flow QA and start the web demo:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install -g @ihyeon/flow-qa@0.2.
|
|
10
|
+
npm install -g @ihyeon/flow-qa@0.2.4
|
|
11
11
|
flow-qa browser install
|
|
12
12
|
flow-qa ui --demo
|
|
13
13
|
```
|
|
@@ -42,7 +42,9 @@ For each attempt, the report can open or download an approved screenshot or text
|
|
|
42
42
|
|
|
43
43
|
To enter fresh JSON after changing a scenario, open the JSON editor in case review and choose **New JSON draft**. Existing saved files remain; validate and save the new JSON before reviewing it for a run.
|
|
44
44
|
|
|
45
|
-
From version `0.2.2`, the UI requests the browser's leave-page confirmation when refreshing or closing a tab with an unsaved scenario or case draft. Unchanged saved cases do not trigger it; saving clears the warning. Choose to stay on the page to keep editing. The browser controls the prompt wording and availability. This is not automatic saving
|
|
45
|
+
From version `0.2.2`, the UI requests the browser's leave-page confirmation when refreshing or closing a tab with an unsaved scenario or case draft. Unchanged saved cases do not trigger it; saving clears the warning. Choose to stay on the page to keep editing. The browser controls the prompt wording and availability. This is not automatic saving.
|
|
46
|
+
|
|
47
|
+
From version `0.2.4`, loading a suite from the library or importing valid case files also asks before replacing unsaved scenario or case content. **New JSON draft** asks before clearing unsaved JSON and keeps the scenario text. Cancel keeps the current content and selected import files. Unchanged saved cases and ordinary navigation between screens do not prompt; invalid imports still show their validation error without replacing anything.
|
|
46
48
|
|
|
47
49
|
### Import existing case files
|
|
48
50
|
|