@parhelia/core 0.3.12816 → 0.3.12822
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/dist/config/config.js +2 -12
- package/dist/config/config.js.map +1 -1
- package/dist/editor/ContentTree.d.ts +1 -1
- package/dist/editor/ContentTree.js +25 -3
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsSections.js +4 -4
- package/dist/editor/ai/terminal/components/AgentSettingsSections.js.map +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js +1 -1
- package/dist/editor/ai/terminal/components/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/useAgentStopCommand.js +16 -14
- package/dist/editor/ai/terminal/useAgentStopCommand.js.map +1 -1
- package/dist/editor/client/EditorShell.js +20 -4
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/hooks/activeSessionSnapshots.js +0 -2
- package/dist/editor/client/hooks/activeSessionSnapshots.js.map +1 -1
- package/dist/editor/client/hooks/useSocketMessageHandler.d.ts +2 -2
- package/dist/editor/client/hooks/useSocketMessageHandler.js +43 -29
- package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
- package/dist/editor/client/operations.js +12 -3
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/media-selector/Thumbnails.js +23 -10
- package/dist/editor/media-selector/Thumbnails.js.map +1 -1
- package/dist/editor/media-selector/mediaItemDrag.d.ts +22 -5
- package/dist/editor/media-selector/mediaItemDrag.js +108 -10
- package/dist/editor/media-selector/mediaItemDrag.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +13 -0
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/bridgeInsertModeExit.d.ts +22 -0
- package/dist/editor/page-viewer/bridgeInsertModeExit.js +20 -0
- package/dist/editor/page-viewer/bridgeInsertModeExit.js.map +1 -0
- package/dist/editor/reviews/DecisionsMatrix.js +8 -75
- package/dist/editor/reviews/DecisionsMatrix.js.map +1 -1
- package/dist/editor/settings/QuotaInfo.js +3 -2
- package/dist/editor/settings/QuotaInfo.js.map +1 -1
- package/dist/editor/settings/SettingsView.js +6 -5
- package/dist/editor/settings/SettingsView.js.map +1 -1
- package/dist/editor/settings/UsageLeaderboard.js +12 -12
- package/dist/editor/settings/UsageLeaderboard.js.map +1 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js +45 -1
- package/dist/editor/settings/panels/ProjectTemplatesPanel.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +12 -1
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/tree-indicators/GutterContext.js +14 -8
- package/dist/editor/tree-indicators/GutterContext.js.map +1 -1
- package/dist/lib/sanitize.js +1 -1
- package/dist/lib/sanitize.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/task-board/TaskBoardWorkspace.js +186 -7
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/CreateTaskDialog.d.ts +2 -0
- package/dist/task-board/components/CreateTaskDialog.js +6 -3
- package/dist/task-board/components/CreateTaskDialog.js.map +1 -1
- package/dist/task-board/components/GoalCoverageBar.d.ts +4 -0
- package/dist/task-board/components/GoalCoverageBar.js +22 -0
- package/dist/task-board/components/GoalCoverageBar.js.map +1 -0
- package/dist/task-board/components/GoalDataView.d.ts +39 -0
- package/dist/task-board/components/GoalDataView.js +385 -0
- package/dist/task-board/components/GoalDataView.js.map +1 -0
- package/dist/task-board/components/GoalsMatrix.d.ts +16 -0
- package/dist/task-board/components/GoalsMatrix.js +129 -0
- package/dist/task-board/components/GoalsMatrix.js.map +1 -0
- package/dist/task-board/components/ProjectDashboard.d.ts +1 -1
- package/dist/task-board/components/ProjectGoalsPanel.d.ts +16 -0
- package/dist/task-board/components/ProjectGoalsPanel.js +74 -113
- package/dist/task-board/components/ProjectGoalsPanel.js.map +1 -1
- package/dist/task-board/components/SubgoalStatusIcon.d.ts +4 -0
- package/dist/task-board/components/SubgoalStatusIcon.js +19 -0
- package/dist/task-board/components/SubgoalStatusIcon.js.map +1 -0
- package/dist/task-board/components/goalDisplaySpec.d.ts +19 -0
- package/dist/task-board/components/goalDisplaySpec.js +72 -0
- package/dist/task-board/components/goalDisplaySpec.js.map +1 -0
- package/dist/task-board/goalRefreshState.d.ts +6 -0
- package/dist/task-board/goalRefreshState.js +11 -0
- package/dist/task-board/goalRefreshState.js.map +1 -0
- package/dist/task-board/goalTaskNavigationState.d.ts +43 -0
- package/dist/task-board/goalTaskNavigationState.js +65 -0
- package/dist/task-board/goalTaskNavigationState.js.map +1 -0
- package/dist/task-board/types.d.ts +6 -0
- package/dist/types.d.ts +0 -2
- package/package.json +2 -1
|
@@ -16,6 +16,7 @@ import { Switch } from "../../../components/ui/switch";
|
|
|
16
16
|
import { Textarea } from "../../../components/ui/textarea";
|
|
17
17
|
import { cn } from "../../../lib/utils";
|
|
18
18
|
import { TaskAssigneePicker } from "../../../task-board/components/TaskAssigneePicker";
|
|
19
|
+
import { parseGoalDisplaySpec } from "../../../task-board/components/goalDisplaySpec";
|
|
19
20
|
import { deleteProjectTemplate, getProjectTemplateAgent, getProjectTemplates, resetProjectTemplateAgent, upsertProjectTemplate, } from "../../../task-board/services/taskService";
|
|
20
21
|
const DependencyGraphView = lazy(() => import("../../../task-board/views/DependencyGraphView").then((module) => ({
|
|
21
22
|
default: module.DependencyGraphView,
|
|
@@ -236,6 +237,7 @@ function createEmptyGoalDefinition(goalCount, title) {
|
|
|
236
237
|
sortOrder: goalCount * 100,
|
|
237
238
|
defaultScopeJson: null,
|
|
238
239
|
dataShape: null,
|
|
240
|
+
displaySpec: null,
|
|
239
241
|
};
|
|
240
242
|
}
|
|
241
243
|
function sortTemplates(templates) {
|
|
@@ -297,9 +299,19 @@ export function buildUpsertTemplateRequest(template) {
|
|
|
297
299
|
sortOrder: goal.sortOrder || index * 100,
|
|
298
300
|
defaultScopeJson: goal.defaultScopeJson?.trim() || null,
|
|
299
301
|
dataShape: goal.dataShape?.trim() || null,
|
|
302
|
+
displaySpec: goal.displaySpec?.trim() || null,
|
|
300
303
|
})),
|
|
301
304
|
};
|
|
302
305
|
}
|
|
306
|
+
function getGoalDisplaySpecError(goals) {
|
|
307
|
+
for (const goal of goals ?? []) {
|
|
308
|
+
const result = parseGoalDisplaySpec(goal.displaySpec);
|
|
309
|
+
if ("error" in result) {
|
|
310
|
+
return `${goal.title || "Untitled goal"}: ${result.error}`;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
303
315
|
export function mergeTemplateResponseWithRequest(serverTemplate, request) {
|
|
304
316
|
const requestedTaskById = new Map((request.taskTemplates ?? []).map((task) => [task.id, task]));
|
|
305
317
|
const requestedGoalById = new Map((request.goalTemplates ?? []).map((goal) => [goal.id, goal]));
|
|
@@ -314,6 +326,9 @@ export function mergeTemplateResponseWithRequest(serverTemplate, request) {
|
|
|
314
326
|
return {
|
|
315
327
|
...goal,
|
|
316
328
|
description: requested?.description ?? goal.description,
|
|
329
|
+
displaySpec: requested
|
|
330
|
+
? (requested.displaySpec ?? null)
|
|
331
|
+
: goal.displaySpec,
|
|
317
332
|
};
|
|
318
333
|
}),
|
|
319
334
|
...(request.goalTemplates ?? []).filter((goal) => !serverGoalIds.has(goal.id)),
|
|
@@ -370,6 +385,8 @@ function getActiveDescriptionDraftField(selectedTaskId, selectedGoalId) {
|
|
|
370
385
|
return { kind: "task", id: selectedTaskId };
|
|
371
386
|
case "project-template-goal-description-input":
|
|
372
387
|
return { kind: "goal", id: selectedGoalId };
|
|
388
|
+
case "project-template-goal-display-spec-input":
|
|
389
|
+
return { kind: "goalDisplaySpec", id: selectedGoalId };
|
|
373
390
|
default:
|
|
374
391
|
return null;
|
|
375
392
|
}
|
|
@@ -408,6 +425,17 @@ function preserveActiveDescriptionDraft(template, draft, activeField) {
|
|
|
408
425
|
: goal),
|
|
409
426
|
};
|
|
410
427
|
}
|
|
428
|
+
if (activeField.kind === "goalDisplaySpec" && activeField.id) {
|
|
429
|
+
const draftGoal = (draft.goalTemplates ?? []).find((goal) => goal.id === activeField.id);
|
|
430
|
+
if (!draftGoal)
|
|
431
|
+
return template;
|
|
432
|
+
return {
|
|
433
|
+
...template,
|
|
434
|
+
goalTemplates: (template.goalTemplates ?? []).map((goal) => goal.id === activeField.id
|
|
435
|
+
? { ...goal, displaySpec: draftGoal.displaySpec }
|
|
436
|
+
: goal),
|
|
437
|
+
};
|
|
438
|
+
}
|
|
411
439
|
return template;
|
|
412
440
|
}
|
|
413
441
|
function isValidGuid(value) {
|
|
@@ -518,6 +546,7 @@ function buildProjectTemplateAgentContext(template, selectedTaskTemplateId, sele
|
|
|
518
546
|
sortOrder: goal.sortOrder ?? 0,
|
|
519
547
|
defaultScopeJson: goal.defaultScopeJson?.trim() || null,
|
|
520
548
|
dataShape: goal.dataShape?.trim() || null,
|
|
549
|
+
displaySpec: goal.displaySpec?.trim() || null,
|
|
521
550
|
}));
|
|
522
551
|
const selectedGoal = selectedGoalTemplateId
|
|
523
552
|
? (goalDefinitions.find((goal) => goal.id === selectedGoalTemplateId) ??
|
|
@@ -1349,6 +1378,14 @@ export function ProjectTemplatesPanel() {
|
|
|
1349
1378
|
latestDraftSignatureRef.current = currentSaveSignature;
|
|
1350
1379
|
}, [currentSaveSignature]);
|
|
1351
1380
|
const persistTemplate = useCallback(async (request, signature, options) => {
|
|
1381
|
+
const displaySpecError = getGoalDisplaySpecError(request.goalTemplates);
|
|
1382
|
+
if (displaySpecError) {
|
|
1383
|
+
const message = `Invalid goal Display Spec — ${displaySpecError}`;
|
|
1384
|
+
setSaveError(message);
|
|
1385
|
+
if (options?.showErrorToast)
|
|
1386
|
+
toast.error(message);
|
|
1387
|
+
return false;
|
|
1388
|
+
}
|
|
1352
1389
|
const runId = ++saveRunIdRef.current;
|
|
1353
1390
|
setSaving(true);
|
|
1354
1391
|
setSaveError(null);
|
|
@@ -2502,7 +2539,14 @@ export function ProjectTemplatesPanel() {
|
|
|
2502
2539
|
})), placeholder: '{"rootItemId":"...","pagesOnly":true}' })] }), _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { className: "text-xs", htmlFor: "project-template-goal-data-shape-input", children: "Data shape hint (optional)" }), _jsx(Input, { id: "project-template-goal-data-shape-input", className: "text-xs md:text-xs", value: selectedGoal.dataShape ?? "", onChange: (event) => updateSelectedGoal((goal) => ({
|
|
2503
2540
|
...goal,
|
|
2504
2541
|
dataShape: event.target.value,
|
|
2505
|
-
})), placeholder: "e.g. { recommendations: string[] }" })] }), _jsxs("div", { className: "
|
|
2542
|
+
})), placeholder: "e.g. { recommendations: string[] }" })] }), _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { className: "text-xs", htmlFor: "project-template-goal-display-spec-input", children: "Display Spec (JSON, optional)" }), _jsx(Textarea, { id: "project-template-goal-display-spec-input", "data-testid": "project-template-goal-display-spec-input", className: "font-mono text-xs", rows: 5, value: selectedGoal.displaySpec ?? "", onChange: (event) => updateSelectedGoal((goal) => ({
|
|
2543
|
+
...goal,
|
|
2544
|
+
displaySpec: event.target.value,
|
|
2545
|
+
})), placeholder: '{"version":1,"sections":[{"widget":"summary"}]}', "aria-invalid": "error" in
|
|
2546
|
+
parseGoalDisplaySpec(selectedGoal.displaySpec) }), (() => {
|
|
2547
|
+
const result = parseGoalDisplaySpec(selectedGoal.displaySpec);
|
|
2548
|
+
return "error" in result ? (_jsx("div", { className: "text-feedback-red text-xs", "data-testid": "project-template-goal-display-spec-error", children: result.error })) : null;
|
|
2549
|
+
})()] }), _jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "text-neutral-grey-100 text-xs font-medium", children: "Disabled" }), _jsx("div", { className: "text-neutral-grey-50 mt-0.5 text-xs", children: "Keeps the definition but hides it from the runtime goal catalog." })] }), _jsx(Switch, { checked: selectedGoal.disabled === true, onCheckedChange: (checked) => updateSelectedGoal((goal) => ({
|
|
2506
2550
|
...goal,
|
|
2507
2551
|
disabled: checked,
|
|
2508
2552
|
})), "aria-label": "Disable this goal definition", "data-testid": "project-template-goal-disabled-switch" })] })] })) : (_jsx("div", { className: "border-border-default text-neutral-grey-50 flex items-center justify-center rounded-md border border-dashed p-6 text-center text-xs", children: "Select a goal to edit its details." }))] })) }));
|