From 8f1356e693896781b8b6dbd02732bf9c95ef5dbc Mon Sep 17 00:00:00 2001 From: Hsukqi Lee Date: Wed, 11 Nov 2026 06:05:49 +0800 Subject: [PATCH 1/3] refactor: share UI primitives and CLI transport Use immutable public release artifacts and retain product-specific behavior. Independent review and real release installation recorded in the sharing handoff. --- package.json | 3 + pnpm-lock.yaml | 33 ++ server/harness/adapters.ts | 19 +- server/harness/fixtures/transport.mjs | 56 +++ server/harness/harness.test.ts | 2 +- server/harness/repairPlans.test.ts | 2 +- server/harness/rpc.ts | 85 ++-- server/harness/service.ts | 12 +- server/harness/transport.test.ts | 88 ++++ server/imageDrafts/adapter.ts | 14 +- server/imageDrafts/service.ts | 6 +- src/components/charts/BoxplotSummary.vue | 2 +- src/components/charts/ChartAxesSummary.vue | 2 +- .../charts/ChartDataImportDialog.vue | 2 +- src/components/charts/ChartKeyColumns.vue | 2 +- .../charts/ChartPreparationPreview.vue | 2 +- src/components/charts/DataChartDialog.vue | 2 +- src/components/charts/DataChartLibrary.vue | 2 +- .../charts/PlotAlignmentControls.vue | 2 +- .../charts/PlotAlignmentSummary.vue | 2 +- .../charts/SharedColorbarControls.vue | 2 +- .../charts/SharedColorbarEditControls.vue | 2 +- .../charts/SharedColorbarSummary.vue | 2 +- .../charts/SharedLegendControls.vue | 2 +- .../charts/SharedLegendEditControls.vue | 2 +- src/components/charts/SharedLegendSummary.vue | 2 +- src/components/charts/SharedYAxisControls.vue | 2 +- src/components/charts/SharedYAxisSummary.vue | 2 +- .../figure/CalloutReflowSummary.vue | 2 +- src/components/figure/CalloutSummary.vue | 2 +- src/components/figure/FigureCanvas.vue | 2 +- .../figure/FigureTextCheckDialog.vue | 2 +- src/components/figure/InlineTextEditor.vue | 2 +- src/components/figure/PublicationReport.vue | 2 +- src/components/figure/TextCheckReport.vue | 2 +- src/components/harness/CandidateRepair.vue | 2 +- .../harness/CatalogueInputPreview.vue | 3 +- .../harness/ChartRecommendation.vue | 2 +- .../harness/ChartRecommendationView.vue | 2 +- src/components/harness/ChartToolSummary.vue | 2 +- .../harness/ComponentImageQuery.vue | 3 +- .../harness/CompositionPlanView.vue | 2 +- src/components/harness/DesignReviewReport.vue | 3 +- src/components/harness/FigureReview.vue | 2 +- src/components/harness/HarnessAttachments.vue | 3 +- src/components/harness/HarnessPanel.vue | 6 +- .../harness/HarnessRecipeTargets.vue | 2 +- .../harness/HarnessReconstruction.vue | 2 +- src/components/harness/HarnessTurn.vue | 3 +- .../harness/RecipeUpdateSummary.vue | 2 +- .../harness/ReconstructionReview.vue | 3 +- .../harness/ReferenceUseSummary.vue | 3 +- src/components/harness/RepairPlanProgress.vue | 2 +- src/components/harness/RepositoryRecall.vue | 3 +- src/components/harness/VisualAuditReport.vue | 3 +- src/components/inspector/ComponentPorts.vue | 2 +- .../inspector/ContainerConnections.vue | 2 +- src/components/inspector/GradientControls.vue | 2 +- src/components/inspector/InspectorPanel.vue | 3 +- src/components/inspector/PathBindings.vue | 2 +- .../inspector/ReconstructionInspector.vue | 2 +- src/components/inspector/TextRunsEditor.vue | 2 +- src/components/library/AssetPreview.vue | 2 +- src/components/library/ColorMapEditor.vue | 2 +- src/components/library/ColorMapSummary.vue | 2 +- src/components/library/ColorMappingDialog.vue | 2 +- .../library/ComponentBatchImport.vue | 3 +- .../library/ComponentCaptureDialog.vue | 2 +- .../library/ComponentContentReview.vue | 3 +- src/components/library/ComponentDialog.vue | 3 +- .../library/ComponentMetadataFields.vue | 2 +- .../library/ComponentMetadataRevision.vue | 3 +- .../library/ComponentRepositoryPanel.vue | 3 +- .../library/ComponentSourceDetails.vue | 2 +- .../library/ContainerStyleControls.vue | 3 +- src/components/library/FigureforgeLibrary.vue | 3 +- .../library/GalleryBenchmarkLibrary.vue | 2 +- src/components/library/IconLibrary.vue | 2 +- src/components/library/LibraryPanel.vue | 3 +- src/components/library/PaletteLibrary.vue | 2 +- .../library/RetrievalFeedbackDialog.vue | 3 +- .../library/RetrievalFeedbackHistory.vue | 3 +- src/components/library/StyleAssetDialog.vue | 2 +- src/components/library/StyleAssetLibrary.vue | 2 +- src/components/library/StyleAssetSummary.vue | 2 +- src/components/library/StyleGallery.vue | 3 +- .../library/StyleLinePresetEditor.vue | 2 +- src/components/library/ThemeColorPicker.vue | 2 +- src/components/library/VectorImportDialog.vue | 2 +- .../references/ImageDraftOriginView.vue | 2 +- src/components/references/ImageDraftPanel.vue | 3 +- .../references/OriginalImageCache.vue | 2 +- src/components/references/PaperGallery.vue | 3 +- .../references/ReconstructionReuseSummary.vue | 2 +- src/components/references/ReferenceGuide.vue | 3 +- src/components/references/ReferencePanel.vue | 3 +- src/components/ui/BrandMark.vue | 2 +- src/components/ui/ErrorMessage.vue | 17 +- src/components/ui/Icon.vue | 2 +- src/components/ui/IconButton.vue | 2 +- src/components/ui/Modal.vue | 45 -- src/components/ui/README.md | 8 +- src/components/ui/Select.vue | 418 ------------------ src/components/ui/color-mode.ts | 56 --- src/components/ui/index.ts | 10 - src/components/ui/primitives.ts | 203 --------- src/components/ui/styles.css | 411 ----------------- src/components/ui/tokens.css | 200 --------- src/components/ui/use-dialog-focus.ts | 58 --- src/components/workspace/ActivityRail.vue | 3 +- src/components/workspace/CalloutDialog.vue | 2 +- src/components/workspace/CanvasToolbar.vue | 3 +- .../workspace/DetailInsetDialog.vue | 2 +- src/components/workspace/ExportDialog.vue | 3 +- src/components/workspace/LayoutDialog.vue | 3 +- .../workspace/LineStyleControls.vue | 2 +- .../workspace/MaterialEditDialog.vue | 2 +- .../workspace/PanelLayoutDialog.vue | 2 +- src/components/workspace/ProjectDialog.vue | 34 +- .../workspace/PublicationDialog.vue | 2 +- .../workspace/RecipeParametersDialog.vue | 2 +- src/components/workspace/ScaleDialog.vue | 2 +- src/components/workspace/SelectionTools.vue | 3 +- .../workspace/StructureExpandDialog.vue | 2 +- src/components/workspace/TextToolbar.vue | 2 +- src/components/workspace/WorkspaceHeader.vue | 3 +- src/components/workspace/WorkspaceHelp.vue | 2 +- .../workspace/WorkspaceNotifications.vue | 3 +- src/components/workspace/WorkspaceShell.vue | 5 +- src/components/workspace/WorkspaceSidebar.vue | 2 +- src/composables/useArrowDrawing.ts | 2 +- src/main.ts | 6 +- src/styles/app.css | 50 +++ src/styles/workspace.css | 230 +++++----- tests/ui/assistant.mjs | 2 +- tests/ui/editor.mjs | 12 +- tests/ui/fastui.mjs | 34 ++ tests/ui/notifications.mjs | 15 +- tests/ui/project-import.mjs | 179 ++++++++ tests/ui/run.mjs | 17 +- tests/ui/workspace-settings.mjs | 4 +- 141 files changed, 830 insertions(+), 1756 deletions(-) create mode 100644 server/harness/fixtures/transport.mjs create mode 100644 server/harness/transport.test.ts delete mode 100644 src/components/ui/Modal.vue delete mode 100644 src/components/ui/Select.vue delete mode 100644 src/components/ui/color-mode.ts delete mode 100644 src/components/ui/primitives.ts delete mode 100644 src/components/ui/styles.css delete mode 100644 src/components/ui/tokens.css delete mode 100644 src/components/ui/use-dialog-focus.ts create mode 100644 src/styles/app.css create mode 100644 tests/ui/fastui.mjs create mode 100644 tests/ui/project-import.mjs diff --git a/package.json b/package.json index 7efbc24..b1b4a65 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,9 @@ "benchmark:retrieval": "node scripts/evaluate-component-retrieval.mjs" }, "dependencies": { + "@fastrd/ui-vue": "https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-vue-0.1.0.tgz", + "@fastrd/ui-foundation": "https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-foundation-0.1.0.tgz", + "@fastrd/harness-transport": "https://github.com/FastR-D/FastHarness/releases/download/v0.1.0/fastrd-harness-transport-0.1.0.tgz", "roughjs": "^4.6.6", "svgpath": "^2.6.0", "vue": "^3.5.44", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f29be41..684e73b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,15 @@ importers: .: dependencies: + '@fastrd/harness-transport': + specifier: https://github.com/FastR-D/FastHarness/releases/download/v0.1.0/fastrd-harness-transport-0.1.0.tgz + version: https://github.com/FastR-D/FastHarness/releases/download/v0.1.0/fastrd-harness-transport-0.1.0.tgz + '@fastrd/ui-foundation': + specifier: https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-foundation-0.1.0.tgz + version: https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-foundation-0.1.0.tgz + '@fastrd/ui-vue': + specifier: https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-vue-0.1.0.tgz + version: https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-vue-0.1.0.tgz(vue@3.5.44(typescript@6.0.2)) roughjs: specifier: ^4.6.6 version: 4.6.6 @@ -125,6 +134,21 @@ packages: resolution: {integrity: sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@fastrd/harness-transport@https://github.com/FastR-D/FastHarness/releases/download/v0.1.0/fastrd-harness-transport-0.1.0.tgz': + resolution: {integrity: sha512-/z1hrN4BlFVPW86RuaCwIMypQ7nMXajgA120Lkim+n2oNdLasAWmBs235gjlVe2ON4dcGb1xBq5xAjLgo6jlwA==, tarball: https://github.com/FastR-D/FastHarness/releases/download/v0.1.0/fastrd-harness-transport-0.1.0.tgz} + version: 0.1.0 + engines: {node: '>=22'} + + '@fastrd/ui-foundation@https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-foundation-0.1.0.tgz': + resolution: {integrity: sha512-5O4s9BXXHXWk7GbzPfMYX6HjNi0DKryfWLRPYMZINNb4ew3arjCKbJvxFaSvqcCvhHxmrf8OZDg9GPmfvdnRtw==, tarball: https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-foundation-0.1.0.tgz} + version: 0.1.0 + + '@fastrd/ui-vue@https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-vue-0.1.0.tgz': + resolution: {integrity: sha512-HlZncAErMt0kRgJSHim2EyK1Wr2Ed1Sx4ahkEKnqEeKsJkegJfKGs5Nz0c/087yyOUyfoiBF3ILcSxi8ilXrzw==, tarball: https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-vue-0.1.0.tgz} + version: 0.1.0 + peerDependencies: + vue: ^3.5.0 + '@humanfs/core@0.19.2': resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} engines: {node: '>=18.18.0'} @@ -1079,6 +1103,15 @@ snapshots: '@eslint/core': 1.2.1 levn: 0.4.1 + '@fastrd/harness-transport@https://github.com/FastR-D/FastHarness/releases/download/v0.1.0/fastrd-harness-transport-0.1.0.tgz': {} + + '@fastrd/ui-foundation@https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-foundation-0.1.0.tgz': {} + + '@fastrd/ui-vue@https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-vue-0.1.0.tgz(vue@3.5.44(typescript@6.0.2))': + dependencies: + '@fastrd/ui-foundation': https://github.com/FastR-D/FastUI/releases/download/v0.1.0/fastrd-ui-foundation-0.1.0.tgz + vue: 3.5.44(typescript@6.0.2) + '@humanfs/core@0.19.2': dependencies: '@humanfs/types': 0.15.0 diff --git a/server/harness/adapters.ts b/server/harness/adapters.ts index 7105ed8..a9ad625 100644 --- a/server/harness/adapters.ts +++ b/server/harness/adapters.ts @@ -12,7 +12,7 @@ export interface HarnessAdapter { kind: HarnessKind status(): Promise send(input: HarnessTurn): Promise - dispose(): void + dispose(): void | Promise } export interface AdapterOptions { command?: string; args?: string[]; env?: NodeJS.ProcessEnv } async function cliStatus(kind: HarnessKind, options: AdapterOptions): Promise { @@ -36,14 +36,14 @@ export class CodexAdapter implements HarnessAdapter { '-c', 'features.shell_tool=false', '-c', 'features.unified_exec=false', '-c', 'features.multi_agent=false', '-c', 'features.apps=false', '-c', 'features.plugins=false', '-c', 'features.hooks=false', '-c', 'web_search="disabled"', '-c', 'mcp_servers={}'], input.cwd, this.options.env) this.rpc = rpc - const abortInitialization = () => this.dispose() + const abortInitialization = () => { void this.dispose().catch(() => undefined) } input.signal.addEventListener('abort', abortInitialization, { once: true }) try { await rpc.request('initialize', { clientInfo: { name: 'fastfigure', version: '0.2.0' } }); rpc.notify('initialized') const started = record(await rpc.request('thread/start', { cwd: input.cwd, approvalPolicy: 'never', sandbox: 'read-only', ephemeral: true })) this.threadId = String(record(started.thread).id ?? '') if (!this.threadId) throw new Error('Codex 未返回会话 ID') - } catch (e) { this.dispose();input.signal.throwIfAborted(); throw e } + } catch (e) { await this.dispose();input.signal.throwIfAborted(); throw e } finally { input.signal.removeEventListener('abort', abortInitialization) } } input.signal.throwIfAborted() @@ -52,7 +52,7 @@ export class CodexAdapter implements HarnessAdapter { let turnId = '', finished = false, finalText = '' const deltas = new Map(), finals = new Map(), early: RpcMessageWithParams[] = [] const cleanup = () => { rpc.listeners.delete(handle); rpc.exits.delete(fail); input.signal.removeEventListener('abort', abort) } - const fail = (error: Error) => { if (finished) return; finished = true; cleanup(); this.dispose(); reject(error) } + const fail = (error: Error) => { if (finished) return; finished = true; cleanup(); reject(error) } const finish = () => { if (finished) return; finished = true; cleanup(); resolve(finalText || [...finals.values()].at(-1) || [...deltas.values()].at(-1) || '') } const abort = () => { if (turnId) void rpc.request('turn/interrupt', { threadId: this.threadId, turnId }).catch(() => undefined) @@ -94,9 +94,16 @@ export class CodexAdapter implements HarnessAdapter { if (!turnId) { fail(new Error('Codex 未返回运行 ID')); return } for (const event of early) handle(event) }, fail) - }) + }).catch(async error => { await this.dispose(); throw error }) + } + async dispose(): Promise { + const rpc = this.rpc + this.threadId = '' + if (rpc) { + await rpc.dispose() + if (this.rpc === rpc) this.rpc = undefined + } } - dispose() { const rpc = this.rpc; this.rpc = undefined; this.threadId = ''; rpc?.dispose() } } interface RpcMessageWithParams { method?: string; params: Record } diff --git a/server/harness/fixtures/transport.mjs b/server/harness/fixtures/transport.mjs new file mode 100644 index 0000000..441fe1c --- /dev/null +++ b/server/harness/fixtures/transport.mjs @@ -0,0 +1,56 @@ +import { createInterface } from 'node:readline' +import { writeFileSync } from 'node:fs' +import process from 'node:process' +import { Buffer } from 'node:buffer' + +writeFileSync(process.env.FASTFIGURE_TRANSPORT_PID, String(process.pid)) +const send = value => process.stdout.write(JSON.stringify(value) + '\n') +const scenario = process.env.FASTFIGURE_TRANSPORT_SCENARIO +const image = process.env.FASTFIGURE_TRANSPORT_IMAGE === '1' +const threadId = 'transport-thread', turnId = 'transport-turn' +let turnRequest +createInterface({ input: process.stdin }).on('line', line => { + const m = JSON.parse(line) + if (m.method === 'initialize') { + if (scenario === 'null') { send(null); return } + if (scenario === 'invalid') { process.stdout.write('{bad\n'); return } + if (scenario === 'frame') { send({ method: 42 }); return } + if (scenario === 'exit') process.exit(9) + if (scenario === 'stall') return + send({ id: m.id, result: {} }) + } + if (m.method === 'thread/start') { + if (m.params.sandbox !== (image ? 'workspace-write' : 'read-only') || m.params.approvalPolicy !== 'never' || m.params.ephemeral !== true) process.exit(10) + const args = process.argv.slice(2) + for (const flag of ['features.shell_tool=false','features.unified_exec=false','features.multi_agent=false','features.apps=false','features.plugins=false','features.hooks=false','web_search="disabled"','mcp_servers={}']) if (!args.includes(flag)) process.exit(11) + if (image && !args.includes('image_generation')) process.exit(16) + send({ id: m.id, result: { thread: { id: threadId } } }) + } + if (m.method === 'turn/start') { + const policy = m.params.sandboxPolicy + if (policy.type !== (image ? 'workspaceWrite' : 'readOnly') || m.params.approvalPolicy !== 'never') process.exit(12) + if (image && (policy.networkAccess !== false || policy.excludeSlashTmp !== true || policy.excludeTmpdirEnvVar !== true || JSON.stringify(policy.writableRoots) !== JSON.stringify([process.cwd()]))) process.exit(17) + writeFileSync(process.env.FASTFIGURE_TRANSPORT_PID + '.turn', 'started') + if (scenario === 'turn-stall') return + turnRequest = m.id + send({ id: 'approval-command', method: 'item/commandExecution/requestApproval', params: { threadId } }) + } + if (m.id === 'approval-command') { + if (m.result?.decision !== 'decline') process.exit(13) + send({ id: 'approval-files', method: 'item/fileChange/requestApproval', params: { threadId } }) + } + if (m.id === 'approval-files') { + if (m.result?.decision !== 'decline') process.exit(14) + send({ id: 'tool', method: 'host/unexpectedTool', params: { threadId } }) + } + if (m.id === 'tool') { + if (m.error?.code !== -32601) process.exit(15) + send({ id: turnRequest, result: { turn: { id: turnId } } }) + if (image) { + send({ method: 'item/completed', params: { threadId, turnId, item: { type: 'imageGeneration', status: 'completed', result: Buffer.alloc(1_600_000, 1).toString('base64') } } }) + return + } + send({ method: 'item/agentMessage/delta', params: { threadId, turnId, itemId: 'reply', delta: 'permissions retained' } }) + send({ method: 'turn/completed', params: { threadId, turn: { id: turnId, status: 'completed' } } }) + } +}) diff --git a/server/harness/harness.test.ts b/server/harness/harness.test.ts index 505e411..8d60e7d 100644 --- a/server/harness/harness.test.ts +++ b/server/harness/harness.test.ts @@ -33,7 +33,7 @@ const fixture = fileURLToPath(new URL('./fixtures/cli.mjs', import.meta.url)) const options = (scenario = 'proposal', log?: string): AdapterOptions => ({ command: process.execPath, args: [fixture], env: { ...process.env, FASTFIGURE_TEST_SCENARIO: scenario, ...(log ? { FASTFIGURE_TEST_LOG: log } : {}) } }) const adapters: HarnessAdapter[] = [], services: HarnessService[] = [], servers: Server[] = [], dirs: string[] = [] afterEach(async () => { - adapters.splice(0).forEach(a => a.dispose()) + await Promise.all(adapters.splice(0).map(a => a.dispose())) await Promise.all(services.splice(0).map(s => s.dispose())) await Promise.all(servers.splice(0).map(s => new Promise(resolve => { s.closeAllConnections(); s.close(() => resolve()) }))) await Promise.all(dirs.splice(0).map(d => rm(d, { recursive: true, force: true }))) diff --git a/server/harness/repairPlans.test.ts b/server/harness/repairPlans.test.ts index 25125c8..1156ace 100644 --- a/server/harness/repairPlans.test.ts +++ b/server/harness/repairPlans.test.ts @@ -26,7 +26,7 @@ describe('repair plans',()=>{ const history=service.history(session.id);expect(history.turns).toHaveLength(50);expect(history.omitted).toBe(3) expect(history.turns.find(t=>t.id===initial.id)).toMatchObject({ordinal:1,available:true,review:'pending'});expect(history.turns.at(-1)?.ordinal).toBe(53) expect(service.getRun(initial.id).status).toBe('completed');expect(history.turns.filter(t=>t.available).length).toBeLessThanOrEqual(20) - },15_000) + },60_000) it('retains the selected parent after an unchanged plan while other sessions evict old snapshots',async()=>{ const {service,input,initial,session}=await setup('slow'),job=service.startPlan({...input,content:'RECONSTRUCTION_NO_CHANGE'}),other=service.createSession('codex','Other work') for(let i=0;i<24;i++){const run=service.start({sessionId:other.id,figure:createExample(),content:`Other ${i}`,selectedIds:[]});await run.done} diff --git a/server/harness/rpc.ts b/server/harness/rpc.ts index dbd435c..f1e64dc 100644 --- a/server/harness/rpc.ts +++ b/server/harness/rpc.ts @@ -1,69 +1,34 @@ -import { spawn, type ChildProcessWithoutNullStreams } from 'node:child_process' -export interface RpcMessage { id?: number | string; method?: string; params?: unknown; result?: unknown; error?: { message?: string } } +import { JsonlRpcClient, type RpcMessage } from '@fastrd/harness-transport' + export const record = (value: unknown): Record => value !== null && typeof value === 'object' && !Array.isArray(value) ? value as Record : {} -/** JSONL RPC based on FastPPT's app-server bridge, with bounded records and explicit process cleanup. */ +/** Figure host policy, used by suggestions and image drafts. Wire/process ownership is in transport. */ export class JsonlRpc { - readonly child: ChildProcessWithoutNullStreams readonly listeners = new Set<(message: RpcMessage) => void>() readonly exits = new Set<(error: Error) => void>() - private pending = new Map void; reject: (error: Error) => void; timer: ReturnType }>() - private sequence = 0 - private closed = false - constructor(command: string, args: string[], cwd: string, env = process.env, maxRecordBytes=2_000_000) { - this.child = spawn(command, args, { cwd, env, stdio: 'pipe', windowsHide: true }) - let buffer = '' - this.child.stdout.setEncoding('utf8') - this.child.stdout.on('data', (chunk: string) => { - buffer += chunk - if (buffer.length > maxRecordBytes) { this.fail(new Error('Harness 协议记录超出限制')); this.dispose(); return } - let newline: number - while ((newline = buffer.indexOf('\n')) >= 0) { - const line = buffer.slice(0, newline); buffer = buffer.slice(newline + 1) - if (!line.trim()) continue - let message: RpcMessage - try { message = JSON.parse(line) as RpcMessage } catch { this.fail(new Error('Harness 返回了无效的 JSONL')); this.dispose(); return } - if (message.method) { - if (message.id !== undefined) { - // This integration produces structured suggestions; it has no interactive host tools. - this.write({ id: message.id, ...(message.method.endsWith('requestApproval') ? { result: { decision: 'decline' } } : { error: { code: -32601, message: 'FastFigure does not expose this host capability' } }) }) - } else for (const listener of this.listeners) listener(message) - } else if (typeof message.id === 'number') { - const pending = this.pending.get(message.id) - if (!pending) continue - this.pending.delete(message.id); clearTimeout(pending.timer) - if (message.error) pending.reject(new Error(message.error.message || 'Harness RPC 失败')) - else pending.resolve(message.result) - } - } - }) - // Drain stderr without returning local configuration or credentials to the browser. - this.child.stderr.resume() - this.child.stdin.on('error', error => this.fail(error)) - this.child.once('error', error => this.fail(error)) - this.child.once('exit', code => this.fail(new Error(`Harness 进程已退出 (${code})`))) - } - private write(message: unknown) { if (!this.closed) this.child.stdin.write(`${JSON.stringify(message)}\n`) } - request(method: string, params: unknown): Promise { - if (this.closed) return Promise.reject(new Error('Harness 连接已关闭')) - const id = ++this.sequence - return new Promise((resolve, reject) => { - const timer = setTimeout(() => { this.pending.delete(id); reject(new Error(`Harness 请求超时:${method}`)) }, 30_000) - this.pending.set(id, { resolve, reject, timer }); this.write({ id, method, params }) + private readonly rpc: JsonlRpcClient + private disposal?: Promise + + constructor(command: string, args: string[], cwd: string, env = process.env, maxRecordBytes = 2_000_000) { + this.rpc = new JsonlRpcClient({ commandFactory: () => ({ command, args, cwd, env }), + maxRecordBytes, maxStderrLines: 0, stopTimeoutMs: 1000 }) + this.rpc.onMessage(message => { + if (message.id !== undefined && message.method) { + // Both Figure entry points forbid interactive host tools and approvals. + if (message.method.endsWith('requestApproval')) this.rpc.respond(message.id, { decision: 'decline' }) + else this.rpc.respondError(message.id, -32601, 'FastFigure does not expose this host capability') + } else if (message.method) for (const listener of this.listeners) listener(message) }) + this.rpc.onExit(error => { for (const listener of this.exits) listener(error) }) + this.rpc.start() } - notify(method: string, params: unknown = {}) { this.write({ method, params }) } - private fail(error: Error) { - if (this.closed) return - this.closed = true - for (const item of this.pending.values()) { clearTimeout(item.timer); item.reject(error) } - this.pending.clear() - for (const listener of this.exits) listener(error) - } - dispose() { - this.fail(new Error('Harness 连接已关闭')) - this.child.kill('SIGTERM') - const timer = setTimeout(() => { if (this.child.exitCode === null) this.child.kill('SIGKILL') }, 1000) - timer.unref(); this.child.once('exit', () => clearTimeout(timer)) + request(method: string, params: unknown): Promise { return this.rpc.request(method, params) } + notify(method: string, params: unknown = {}): void { this.rpc.notify(method, params) } + dispose(): Promise { + if (!this.disposal) { + this.disposal = this.rpc.stop() + for (const listener of this.exits) listener(new Error('Harness 连接已关闭')) + } + return this.disposal } } diff --git a/server/harness/service.ts b/server/harness/service.ts index 85f6701..27101c9 100644 --- a/server/harness/service.ts +++ b/server/harness/service.ts @@ -75,7 +75,7 @@ export class HarnessService { private plans=new Map() private factory: AdapterFactory constructor(factory: AdapterFactory = defaultAdapterFactory,private library?:ComponentLibraryStore) { this.factory = factory } - async status() { return await Promise.all((['codex', 'claude'] as const).map(async kind => { const adapter = this.factory(kind); try { return await adapter.status() } finally { adapter.dispose() } })) } + async status() { return await Promise.all((['codex', 'claude'] as const).map(async kind => { const adapter = this.factory(kind); try { return await adapter.status() } finally { await adapter.dispose() } })) } listSessions() { return [...this.sessions.values()].map(s => ({...s.info,...(s.plan?{activePlanId:s.plan}:{})})).reverse() } createSession(kind: HarnessKind, title: string): HarnessSession { if (this.sessions.size >= 12) throw new HarnessError(409, '最多保留 12 个会话,请先移除不需要的会话') @@ -115,7 +115,7 @@ export class HarnessService { const session = this.sessions.get(id) if (!session) throw new HarnessError(404, '会话不存在,服务重启后请新建会话') if (session.active||session.plan) throw new HarnessError(409, '请先停止当前运行或分区核对') - this.sessions.delete(id); session.adapter.dispose() + this.sessions.delete(id); await session.adapter.dispose() for (const [runId, run] of this.runs) if (run.sessionId === id) this.runs.delete(runId) for(const [planId,plan] of this.plans)if(plan.state.sessionId===id)this.plans.delete(planId) if (session.cwd) await rm(session.cwd, { recursive: true, force: true }) @@ -413,7 +413,7 @@ export class HarnessService { let emitted=0 response=await adapter.send({cwd:directory,content:prompt,images:[{path,dataUrl:image.dataUrl}],signal:run.controller.signal,...(input.model?{model:input.model}:{}),emit:(type,text)=>{if(run.controller.signal.aborted)return;emitted+=text.length;if(emitted>20_000){run.controller.abort(new Error('看图检索输出超过 20000 字'));return}if(type==='activity')this.emit(run,'activity',`看图检索:${text}`)}}) run.controller.signal.throwIfAborted() - }finally{adapter.dispose()} + }finally{await adapter.dispose()} run.imageQueryEvidence.response=response await writeFile(join(directory,'image-query-response.txt'),response,{mode:0o600}) if(response.length>20_000)throw new Error('看图检索响应超过 20000 字') @@ -472,7 +472,7 @@ export class HarnessService { Object.assign(selection,{status:reason instanceof Error&&reason.name==='AbortError'?'cancelled':'failed',message:(reason instanceof Error?reason.message:'素材筛选失败').slice(0,1500),elapsedMs:Date.now()-started}) this.updateRepositoryRecall(run,report) throw error - }finally{adapter.dispose();run.selectionInputs=undefined} + }finally{await adapter.dispose();run.selectionInputs=undefined} } private emit(run: Run, type: HarnessEvent['type'], text?: string, proposal?: HarnessEvent['proposal'], components?: HarnessEvent['components'],auditReport?:VisualAuditReport,chartRecommendation?:ChartRecommendationReport,referenceUse?:ReferenceUse[],compositionRecord?:CompositionRecord,recipeUpdates?:HarnessEvent['recipeUpdates'],sharedYAxes?:HarnessEvent['sharedYAxes'],sharedLegends?:HarnessEvent['sharedLegends'],plotAlignments?:HarnessEvent['plotAlignments'],sharedColorbars?:HarnessEvent['sharedColorbars'],callouts?:HarnessEvent['callouts'],calloutReflows?:HarnessEvent['calloutReflows']) { const textCheck=type==='run.completed'&&proposal?checkFigureText(proposal):undefined,designReviewReport=type==='run.completed'?this.summary(run.id).designReviewReport:undefined @@ -581,12 +581,12 @@ export class HarnessService { if(recall?.selection?.status==='pending'){const report=clone(recall);Object.assign(report.selection!,{status:cancelled?'cancelled':'failed',message:(reason instanceof Error?reason.message:'素材筛选未完成').slice(0,1500)});this.updateRepositoryRecall(run,report)} run.status = cancelled ? 'cancelled' : 'failed' this.emit(run, cancelled ? 'run.cancelled' : 'run.failed', reason instanceof Error ? reason.message.slice(0, 1200) : 'Harness 运行失败') - } finally { clearTimeout(flushTimer);auditAdapter?.dispose();run.selectionInputs=undefined;run.feedbackInputs=undefined;run.feedbackInherited=undefined;session.active = undefined } + } finally { clearTimeout(flushTimer);await auditAdapter?.dispose();run.selectionInputs=undefined;run.feedbackInputs=undefined;run.feedbackInherited=undefined;session.active = undefined } } async dispose() { for(const p of this.plans.values())if(p.state.status==='running')this.cancelPlan(p.state.id) for (const run of this.runs.values()) if (run.status === 'running') this.cancel(run.id) - for (const session of this.sessions.values()) session.adapter.dispose() + await Promise.all([...this.sessions.values()].map(session => session.adapter.dispose())) await Promise.allSettled([...this.runs.values()].flatMap(r => r.done ? [r.done] : [])) await Promise.allSettled([...this.plans.values()].flatMap(p=>p.done?[p.done]:[])) await Promise.allSettled([...this.sessions.values()].flatMap(s => s.cwd ? [rm(s.cwd, { recursive: true, force: true })] : [])) diff --git a/server/harness/transport.test.ts b/server/harness/transport.test.ts new file mode 100644 index 0000000..d2a1e9b --- /dev/null +++ b/server/harness/transport.test.ts @@ -0,0 +1,88 @@ +import { afterEach, expect, it } from 'vitest' +import { mkdtemp, readFile, rm } from 'node:fs/promises' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { fileURLToPath } from 'node:url' +import { CodexAdapter } from './adapters' +import { CodexImageDraftAdapter } from '../imageDrafts/adapter' + +const dirs: string[] = [], adapters: (CodexAdapter | CodexImageDraftAdapter)[] = [] +afterEach(async () => { + await Promise.all(adapters.splice(0).map(adapter => adapter.dispose())) + await Promise.all(dirs.splice(0).map(dir => rm(dir, { recursive: true, force: true }))) +}) +async function setup(scenario: string) { + const cwd = await mkdtemp(join(tmpdir(), 'figure-transport-')); dirs.push(cwd) + const pidFile = join(cwd, 'pid') + const adapter = new CodexAdapter({ command: process.execPath, args: [fileURLToPath(new URL('./fixtures/transport.mjs', import.meta.url))], + env: { ...process.env, FASTFIGURE_TRANSPORT_SCENARIO: scenario, FASTFIGURE_TRANSPORT_PID: pidFile } }) + adapters.push(adapter) + return { adapter, cwd, pidFile } +} +function alive(pid: number) { try { process.kill(pid, 0); return true } catch { return false } } +async function stopped(pidFile: string) { + const pid = Number(await readFile(pidFile, 'utf8')) + await expect.poll(() => alive(pid)).toBe(false) +} + +async function imageSetup(scenario: string) { + const { cwd, pidFile } = await setup(scenario) + const adapter = new CodexImageDraftAdapter({ command: process.execPath, args: [fileURLToPath(new URL('./fixtures/transport.mjs', import.meta.url))], + env: { ...process.env, FASTFIGURE_TRANSPORT_SCENARIO: scenario, FASTFIGURE_TRANSPORT_PID: pidFile, FASTFIGURE_TRANSPORT_IMAGE: '1' } }) + adapters.push(adapter) + return { adapter, cwd, pidFile } +} + +it.each(['null', 'invalid', 'frame', 'exit'])('image draft send awaits child cleanup after %s during initialization', async scenario => { + const { adapter, cwd, pidFile } = await imageSetup(scenario) + await expect(adapter.send({ cwd, content: 'image', paths: [], signal: new AbortController().signal, emit: () => {} })).rejects.toMatchObject({ + code: scenario === 'null' || scenario === 'frame' ? 'INVALID_MESSAGE' : scenario === 'invalid' ? 'INVALID_JSON' : 'PROCESS_EXITED', + }) + expect(alive(Number(await readFile(pidFile, 'utf8')))).toBe(false) + await rm(cwd, { recursive: true }) +}) + +it('image draft keeps workspace-only/no-network policy, declines approvals, rejects tools and accepts frames over the suggestion limit', async () => { + const { adapter, cwd, pidFile } = await imageSetup('approval') + const result = await adapter.send({ cwd, content: 'image', paths: [], signal: new AbortController().signal, emit: () => {} }) + expect(result.bytes).toEqual(Buffer.alloc(1_600_000, 1)) + expect(alive(Number(await readFile(pidFile, 'utf8')))).toBe(false) + await rm(cwd, { recursive: true }) +}) + +it.each(['stall', 'turn-stall'])('image draft cancellation during %s awaits exit before releasing cwd', async scenario => { + const { adapter, cwd, pidFile } = await imageSetup(scenario), controller = new AbortController(), reason = new DOMException('cancel image', 'AbortError') + const rejected = expect(adapter.send({ cwd, content: 'image', paths: [], signal: controller.signal, emit: () => {} })).rejects.toBe(reason) + await expect.poll(async () => { try { return !!await readFile(scenario === 'stall' ? pidFile : pidFile + '.turn') } catch { return false } }).toBe(true) + controller.abort(reason) + await rejected + expect(alive(Number(await readFile(pidFile, 'utf8')))).toBe(false) + await rm(cwd, { recursive: true }) +}) + +it.each(['null', 'invalid', 'frame', 'exit'])('Codex public send rejects %s during initialization and cleans the child', async scenario => { + const { adapter, cwd, pidFile } = await setup(scenario) + await expect(adapter.send({ cwd, content: 'ping', signal: new AbortController().signal, emit: () => {} })).rejects.toMatchObject({ + code: scenario === 'null' || scenario === 'frame' ? 'INVALID_MESSAGE' : scenario === 'invalid' ? 'INVALID_JSON' : 'PROCESS_EXITED', + }) + await stopped(pidFile) +}) + +it('Codex retains read-only parameters, declines both approval kinds and rejects host tools before normal output', async () => { + const { adapter, cwd, pidFile } = await setup('approval') + const deltas: string[] = [] + await expect(adapter.send({ cwd, content: 'ping', signal: new AbortController().signal, emit: (type, text) => { if (type === 'assistant.delta') deltas.push(text) } })).resolves.toBe('permissions retained') + expect(deltas).toEqual(['permissions retained']) + await adapter.dispose() + await stopped(pidFile) +}) + +it('Codex abort rejects pending initialization with the explicit reason and leaves no child', async () => { + const { adapter, cwd, pidFile } = await setup('stall') + const controller = new AbortController(), reason = new Error('run cancelled') + const rejected = expect(adapter.send({ cwd, content: 'ping', signal: controller.signal, emit: () => {} })).rejects.toBe(reason) + await expect.poll(async () => { try { return !!await readFile(pidFile) } catch { return false } }).toBe(true) + controller.abort(reason) + await rejected + await stopped(pidFile) +}) diff --git a/server/imageDrafts/adapter.ts b/server/imageDrafts/adapter.ts index 341c440..3ad3fb6 100644 --- a/server/imageDrafts/adapter.ts +++ b/server/imageDrafts/adapter.ts @@ -4,23 +4,24 @@ import {JsonlRpc,record} from '../harness/rpc.ts' import {CodexAdapter,type AdapterOptions} from '../harness/adapters.ts' export interface DraftImageResult{bytes:Buffer;revisedPrompt?:string;inputImages?:{path:string;sha256:string}[];imageModel?:string} export interface DraftImageTurn{cwd:string;content:string;model?:string;paths:string[];signal:AbortSignal;emit:(message:string)=>void} -export interface DraftImageAdapter{status:()=>ReturnType;send:(input:DraftImageTurn)=>Promise;dispose:()=>void} +export interface DraftImageAdapter{status:()=>ReturnType;send:(input:DraftImageTurn)=>Promise;dispose:()=>Promise} export class CodexImageDraftAdapter implements DraftImageAdapter{ private rpc?:JsonlRpc constructor(private options:AdapterOptions={}){} status(){return new CodexAdapter(this.options).status()} - dispose(){this.rpc?.dispose();this.rpc=undefined} + async dispose(){const rpc=this.rpc;if(rpc){await rpc.dispose();if(this.rpc===rpc)this.rpc=undefined}} async send(input:DraftImageTurn):Promise{ input.signal.throwIfAborted() const rpc=new JsonlRpc(this.options.command??'codex',[...(this.options.args??[]),'app-server','--stdio','--enable','image_generation','-c','features.shell_tool=false','-c','features.unified_exec=false','-c','features.multi_agent=false','-c','features.apps=false','-c','features.plugins=false','-c','features.hooks=false','-c','web_search="disabled"','-c','mcp_servers={}'],input.cwd,this.options.env,24_000_000);this.rpc=rpc - const abortInit=()=>this.dispose();input.signal.addEventListener('abort',abortInit,{once:true}) + try{ + const abortInit=()=>{void this.dispose().catch(()=>undefined)};input.signal.addEventListener('abort',abortInit,{once:true}) let threadId='' try{await rpc.request('initialize',{clientInfo:{name:'fastfigure-image-drafts',version:'0.2.0'}});rpc.notify('initialized');const started=record(await rpc.request('thread/start',{cwd:input.cwd,approvalPolicy:'never',sandbox:'workspace-write',ephemeral:true}));threadId=String(record(started.thread).id??'');if(!threadId)throw new Error('Codex 未返回图像会话 ID')}finally{input.signal.removeEventListener('abort',abortInit)} input.signal.throwIfAborted() - return new Promise((resolve,reject)=>{ + return await new Promise((resolve,reject)=>{ let turnId='',settled=false,reading=false,imageCalls=0,lastText='';const early:{method?:string;params?:unknown}[]=[] const cleanup=()=>{rpc.listeners.delete(handle);rpc.exits.delete(fail);input.signal.removeEventListener('abort',abort)} - const fail=(error:Error)=>{if(settled)return;settled=true;cleanup();this.dispose();reject(error)} + const fail=(error:Error)=>{if(settled)return;settled=true;cleanup();reject(error)} const abort=()=>fail(new DOMException('图像生成已取消','AbortError')) const image=async(item:Record)=>{ if(reading||settled)return;reading=true @@ -33,7 +34,7 @@ export class CodexImageDraftAdapter implements DraftImageAdapter{ else throw new Error('CLI 没有提供可读取的生成图片;请更新 CLI 或手动导入草稿') input.signal.throwIfAborted();if(bytes.length>12_000_000)throw new Error('生成图片超过 12 MB') const result:DraftImageResult={bytes,...(typeof item.revisedPrompt==='string'?{revisedPrompt:item.revisedPrompt}:{}),...(typeof item.model==='string'?{imageModel:item.model}:{}),...(Array.isArray(item.inputImages)?{inputImages:item.inputImages.map(value=>{const row=record(value);if(typeof row.path!=='string'||typeof row.sha256!=='string')throw new Error('图像输入指纹报告无效');return{path:row.path,sha256:row.sha256}})}:{})} - if(settled)return;settled=true;cleanup();this.dispose();resolve(result) + if(settled)return;settled=true;cleanup();resolve(result) }catch(e){fail(e instanceof Error?e:new Error('无法读取生成图片'))} } const handle=(message:{method?:string;params?:unknown})=>{ @@ -49,5 +50,6 @@ export class CodexImageDraftAdapter implements DraftImageAdapter{ rpc.listeners.add(handle);rpc.exits.add(fail);input.signal.addEventListener('abort',abort,{once:true});if(input.signal.aborted){abort();return} void rpc.request('turn/start',{threadId,cwd:input.cwd,approvalPolicy:'never',sandboxPolicy:{type:'workspaceWrite',writableRoots:[input.cwd],networkAccess:false,excludeSlashTmp:true,excludeTmpdirEnvVar:true},input:[{type:'text',text:input.content,text_elements:[]},...input.paths.map(path=>({type:'localImage',path}))],...(input.model?{model:input.model}:{})}).then(value=>{turnId=String(record(record(value).turn).id??'');if(!turnId){fail(new Error('Codex 未返回图像轮次 ID'));return}for(const event of early)handle(event)}).catch(fail) }) + }catch(error){input.signal.throwIfAborted();throw error}finally{await this.dispose()} } } diff --git a/server/imageDrafts/service.ts b/server/imageDrafts/service.ts index a14b69f..f861698 100644 --- a/server/imageDrafts/service.ts +++ b/server/imageDrafts/service.ts @@ -12,7 +12,7 @@ interface Run{info:ImageDraftRun;input:ImageDraftInput;fingerprint:string;contro export class ImageDraftService{ private runs=new Map();private requests=new Map() constructor(private factory:()=>DraftImageAdapter=()=>new CodexImageDraftAdapter({...(process.env.FASTFIGURE_CODEX_COMMAND?{command:process.env.FASTFIGURE_CODEX_COMMAND}:{})})){} - async status(){const adapter=this.factory();try{return await adapter.status()}finally{adapter.dispose()}} + async status(){const adapter=this.factory();try{return await adapter.status()}finally{await adapter.dispose()}} list(){return [...this.runs.values()].map(r=>structuredClone(r.info)).reverse()} get(id:string){const run=this.runs.get(id);if(!run)throw new ImageDraftError(404,'草稿记录已过期或不存在');return run} start(raw:unknown){ @@ -43,11 +43,11 @@ export class ImageDraftService{ const finishedAt=new Date().toISOString(),origin=imageDraftOriginSchema.parse({version:1,runId:run.info.id,provider:'codex-imagegen',illustrative:true,title:run.input.title,content:run.input.content,visual:run.input.visual,aspect:run.input.aspect,...(run.input.outputKind?{outputKind:run.input.outputKind}:{}),...(run.input.model?{model:run.input.model}:{}),...(result.imageModel?{imageModel:result.imageModel}:{}),style:run.input.style,...(run.input.composition?{composition:run.input.composition}:{}),submittedPrompt:prompt,...(result.revisedPrompt?{revisedPrompt:result.revisedPrompt.slice(0,24000),revisedPromptTruncated:result.revisedPrompt.length>24000}:{}),createdAt:run.info.createdAt,finishedAt,sha256:sha(result.bytes),...dimensions,referenceInputs:run.info.referenceInputs,inputVerification:result.inputImages===undefined?'unreported':observedReferenceIndices.length===paths.length?'verified':'partial',observedReferenceIndices:observedReferenceIndices.sort(),cliVersion:status.version,timeoutSeconds:run.input.timeoutSeconds}) run.image={bytes:result.bytes,mime};run.info.origin=origin;run.info.available=true;run.info.status='completed';activity('草稿已生成,请核对后导入为参考图并重绘') }catch(e){const reason=run.controller.signal.aborted?run.controller.signal.reason:e;run.info.status=run.controller.signal.aborted?'cancelled':'failed';run.info.error=(reason instanceof Error?reason.message:'图像生成失败').slice(0,1000)} - finally{clearTimeout(timer);run.adapter.dispose();run.info.finishedAt=new Date().toISOString();run.input.references=[];if(run.cwd)await rm(run.cwd,{recursive:true,force:true});this.prune()} + finally{clearTimeout(timer);await run.adapter.dispose();run.info.finishedAt=new Date().toISOString();run.input.references=[];if(run.cwd)await rm(run.cwd,{recursive:true,force:true});this.prune()} } cancel(id:string){const run=this.get(id);if(run.info.status==='running')run.controller.abort(new DOMException('已停止生成草稿','AbortError'));return run.info} review(id:string,decision:'imported'|'discarded'){const run=this.get(id);if(run.info.status!=='completed'||!run.image)throw new ImageDraftError(409,'草稿图片当前不可用');if(run.info.review!=='pending'&&run.info.review!==decision)throw new ImageDraftError(409,'草稿已经处理,请保留历史记录');run.info.review=decision;return run.info} image(id:string){const run=this.get(id);if(!run.image)throw new ImageDraftError(410,'草稿图片已过期,请重新导入已下载的原文件');return run.image} private prune(){let count=0,bytes=0;for(const run of [...this.runs.values()].reverse()){if(run.image){count++;bytes+=run.image.bytes.length;if(count>12||bytes>96_000_000){run.image=undefined;run.info.available=false}}}for(const [id,run]of this.runs)if(this.runs.size>20&&run.info.status!=='running')this.runs.delete(id);while(this.requests.size>200)this.requests.delete(this.requests.keys().next().value!)} - async dispose(){for(const run of this.runs.values())if(run.info.status==='running')run.controller.abort(new DOMException('本地服务已关闭','AbortError'));await Promise.allSettled([...this.runs.values()].map(run=>run.done));for(const run of this.runs.values())run.adapter.dispose();this.runs.clear()} + async dispose(){for(const run of this.runs.values())if(run.info.status==='running')run.controller.abort(new DOMException('本地服务已关闭','AbortError'));await Promise.allSettled([...this.runs.values()].map(run=>run.done));await Promise.all([...this.runs.values()].map(run=>run.adapter.dispose()));this.runs.clear()} } diff --git a/src/components/charts/BoxplotSummary.vue b/src/components/charts/BoxplotSummary.vue index 9c84372..f059795 100644 --- a/src/components/charts/BoxplotSummary.vue +++ b/src/components/charts/BoxplotSummary.vue @@ -1,5 +1,5 @@ diff --git a/src/components/charts/ChartAxesSummary.vue b/src/components/charts/ChartAxesSummary.vue index 9e669a3..538b072 100644 --- a/src/components/charts/ChartAxesSummary.vue +++ b/src/components/charts/ChartAxesSummary.vue @@ -1,5 +1,5 @@ diff --git a/src/components/charts/SharedYAxisControls.vue b/src/components/charts/SharedYAxisControls.vue index c9bdd4f..500fda9 100644 --- a/src/components/charts/SharedYAxisControls.vue +++ b/src/components/charts/SharedYAxisControls.vue @@ -1,5 +1,5 @@ diff --git a/src/components/harness/ReconstructionReview.vue b/src/components/harness/ReconstructionReview.vue index 5abd84b..9b23469 100644 --- a/src/components/harness/ReconstructionReview.vue +++ b/src/components/harness/ReconstructionReview.vue @@ -1,6 +1,7 @@ diff --git a/src/components/library/ColorMapEditor.vue b/src/components/library/ColorMapEditor.vue index ad1bd76..ee53e7c 100644 --- a/src/components/library/ColorMapEditor.vue +++ b/src/components/library/ColorMapEditor.vue @@ -1,6 +1,6 @@ diff --git a/src/components/references/ReferenceGuide.vue b/src/components/references/ReferenceGuide.vue index 2a755c4..fb23f77 100644 --- a/src/components/references/ReferenceGuide.vue +++ b/src/components/references/ReferenceGuide.vue @@ -1,6 +1,7 @@