@molecule/app-ide-react 1.12.1 → 1.14.0
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.md +504 -1
- package/dist/command-metadata.d.ts.map +1 -1
- package/dist/command-metadata.js +7 -2
- package/dist/command-metadata.js.map +1 -1
- package/dist/components/ChatPanel.d.ts +9 -1
- package/dist/components/ChatPanel.d.ts.map +1 -1
- package/dist/components/ChatPanel.js +161 -22
- package/dist/components/ChatPanel.js.map +1 -1
- package/dist/components/TestsBar.d.ts +55 -0
- package/dist/components/TestsBar.d.ts.map +1 -0
- package/dist/components/TestsBar.js +296 -0
- package/dist/components/TestsBar.js.map +1 -0
- package/dist/components/TestsCard.d.ts +67 -0
- package/dist/components/TestsCard.d.ts.map +1 -0
- package/dist/components/TestsCard.js +185 -0
- package/dist/components/TestsCard.js.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/tests-bar-utilities.d.ts +129 -0
- package/dist/components/tests-bar-utilities.d.ts.map +1 -0
- package/dist/components/tests-bar-utilities.js +236 -0
- package/dist/components/tests-bar-utilities.js.map +1 -0
- package/dist/components/tests-card-utilities.d.ts +145 -0
- package/dist/components/tests-card-utilities.d.ts.map +1 -0
- package/dist/components/tests-card-utilities.js +262 -0
- package/dist/components/tests-card-utilities.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +160 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure state + grouping helpers for the {@link TestsCard}.
|
|
3
|
+
*
|
|
4
|
+
* Everything here is a plain function over plain data, so the card's behaviour
|
|
5
|
+
* (which rows a group runs, how a streamed event moves the run forward, what
|
|
6
|
+
* the collapsed summary says) is unit-testable without rendering anything.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { TestItem, TestKind, TestRunEvent, TestRunOutcome, TestStatus, TestWorkspace } from '../types.js';
|
|
11
|
+
/** One rendered group of rows: a kind within a project directory. */
|
|
12
|
+
export interface TestGroup {
|
|
13
|
+
kind: TestKind;
|
|
14
|
+
workspace: TestWorkspace;
|
|
15
|
+
/** The directory's name for the heading; `null` for the workspace root. */
|
|
16
|
+
label: string | null;
|
|
17
|
+
items: TestItem[];
|
|
18
|
+
}
|
|
19
|
+
/** What one test file ended as in the last run. */
|
|
20
|
+
export interface TestResultEntry {
|
|
21
|
+
status: TestStatus;
|
|
22
|
+
durationMs?: number;
|
|
23
|
+
passed: number;
|
|
24
|
+
failed: number;
|
|
25
|
+
skipped: number;
|
|
26
|
+
/** The runner's output, kept for a FAILURE so the row can keep showing it. */
|
|
27
|
+
output?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Everything the card knows about the run it is showing. */
|
|
30
|
+
export interface TestsRunState {
|
|
31
|
+
runId: string | null;
|
|
32
|
+
running: boolean;
|
|
33
|
+
/** The ids this run covers, in run order. */
|
|
34
|
+
queued: string[];
|
|
35
|
+
/** The id whose output is streaming right now, when the host says which. */
|
|
36
|
+
currentId: string | null;
|
|
37
|
+
/** The live output lines, newest last, capped at {@link MAX_OUTPUT_LINES}. */
|
|
38
|
+
output: string[];
|
|
39
|
+
/** Per-id outcome from this run (and from earlier runs, until re-run). */
|
|
40
|
+
results: Record<string, TestResultEntry>;
|
|
41
|
+
/** How the run ended, once it has. */
|
|
42
|
+
outcome: TestRunOutcome | null;
|
|
43
|
+
/** A run-level failure message (timeout, transport error) shown in the card. */
|
|
44
|
+
error: string | null;
|
|
45
|
+
startedAt: number | null;
|
|
46
|
+
durationMs: number | null;
|
|
47
|
+
}
|
|
48
|
+
/** Live output lines retained — enough to read, bounded so a chatty run cannot grow forever. */
|
|
49
|
+
export declare const MAX_OUTPUT_LINES = 400;
|
|
50
|
+
/** A run that has not started. */
|
|
51
|
+
export declare const EMPTY_RUN_STATE: TestsRunState;
|
|
52
|
+
/**
|
|
53
|
+
* Group tests for display: by kind (end-to-end first), then by project
|
|
54
|
+
* directory (whatever directories are present — `app`, `my-app/app`,
|
|
55
|
+
* `packages/web`, the root last), with the files sorted inside each group.
|
|
56
|
+
*
|
|
57
|
+
* @param tests - Every discovered test.
|
|
58
|
+
* @returns The groups, in display order. Empty groups are never produced.
|
|
59
|
+
*/
|
|
60
|
+
export declare function groupTests(tests: readonly TestItem[]): TestGroup[];
|
|
61
|
+
/**
|
|
62
|
+
* How many tests there are of each kind.
|
|
63
|
+
*
|
|
64
|
+
* @param tests - Every discovered test.
|
|
65
|
+
* @returns The per-kind counts.
|
|
66
|
+
*/
|
|
67
|
+
export declare function countByKind(tests: readonly TestItem[]): Record<TestKind, number>;
|
|
68
|
+
/**
|
|
69
|
+
* The tallies of the last run, over the tests that are still listed. Counted
|
|
70
|
+
* per FILE (one row, one verdict) so the collapsed summary matches the rows.
|
|
71
|
+
*
|
|
72
|
+
* @param tests - The currently listed tests.
|
|
73
|
+
* @param results - The per-id outcomes.
|
|
74
|
+
* @returns Passed/failed/skipped file counts.
|
|
75
|
+
*/
|
|
76
|
+
export declare function summarizeResults(tests: readonly TestItem[], results: Record<string, TestResultEntry>): {
|
|
77
|
+
passed: number;
|
|
78
|
+
failed: number;
|
|
79
|
+
skipped: number;
|
|
80
|
+
reported: number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Fold one streamed event into the run state.
|
|
84
|
+
*
|
|
85
|
+
* Deliberately total: an event for an id the card no longer lists is recorded
|
|
86
|
+
* anyway (a re-list may be in flight), and an unknown event type leaves the
|
|
87
|
+
* state untouched rather than throwing inside a stream handler.
|
|
88
|
+
*
|
|
89
|
+
* @param state - The current state.
|
|
90
|
+
* @param event - The event just received.
|
|
91
|
+
* @returns The next state (a new object whenever anything changed).
|
|
92
|
+
*/
|
|
93
|
+
export declare function applyTestRunEvent(state: TestsRunState, event: TestRunEvent): TestsRunState;
|
|
94
|
+
/**
|
|
95
|
+
* The state after a run that never produced a `done` event — the host's stream
|
|
96
|
+
* died, or its request failed before the server could answer.
|
|
97
|
+
*
|
|
98
|
+
* @param state - The current state.
|
|
99
|
+
* @param message - What to show in the card.
|
|
100
|
+
* @returns The next state, no longer running.
|
|
101
|
+
*/
|
|
102
|
+
export declare function failRun(state: TestsRunState, message: string): TestsRunState;
|
|
103
|
+
/**
|
|
104
|
+
* Whether a row should render as "running": the run is live and either the host
|
|
105
|
+
* named this row as current, or it is in the queue and has no verdict yet.
|
|
106
|
+
*
|
|
107
|
+
* @param state - The run state.
|
|
108
|
+
* @param id - The row's test id.
|
|
109
|
+
* @returns True when the row is part of the live run and still undecided.
|
|
110
|
+
*/
|
|
111
|
+
export declare function isRowRunning(state: TestsRunState, id: string): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* The label for a row: the host's title when it gave one, else the file path.
|
|
114
|
+
*
|
|
115
|
+
* @param item - The test.
|
|
116
|
+
* @returns The label to render.
|
|
117
|
+
*/
|
|
118
|
+
export declare function testRowLabel(item: TestItem): string;
|
|
119
|
+
/**
|
|
120
|
+
* Filters tests by a free-text query, matching (case-insensitively) against the
|
|
121
|
+
* file path, the row title, and the project directory. A blank query returns
|
|
122
|
+
* every test in input order — the same contract as `filterScripts`.
|
|
123
|
+
*
|
|
124
|
+
* @param tests - The tests to filter.
|
|
125
|
+
* @param query - The search query.
|
|
126
|
+
* @returns The matching tests, in input order.
|
|
127
|
+
*/
|
|
128
|
+
export declare function filterTests(tests: readonly TestItem[], query: string): TestItem[];
|
|
129
|
+
/**
|
|
130
|
+
* Parses a `/test [query | all]` command (`/tests` is the registered alias).
|
|
131
|
+
*
|
|
132
|
+
* `all` is the one argument that ACTS: it runs everything immediately. Every
|
|
133
|
+
* other argument only filters the list, exactly the way `/scripts <query>` seeds
|
|
134
|
+
* the scripts browser — running ONE test by name is what the per-row Run button
|
|
135
|
+
* is for, and giving the argument a second meaning would make `/test <thing>`
|
|
136
|
+
* sometimes list and sometimes execute.
|
|
137
|
+
*
|
|
138
|
+
* @param input - The raw chat input.
|
|
139
|
+
* @returns `{ query, runAll }` when it is a `/test` command, else `null`.
|
|
140
|
+
*/
|
|
141
|
+
export declare function parseTestCommand(input: string): {
|
|
142
|
+
query: string;
|
|
143
|
+
runAll: boolean;
|
|
144
|
+
} | null;
|
|
145
|
+
//# sourceMappingURL=tests-card-utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests-card-utilities.d.ts","sourceRoot":"","sources":["../../src/components/tests-card-utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,UAAU,EACV,aAAa,EACd,MAAM,aAAa,CAAA;AAEpB,qEAAqE;AACrE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EAAE,aAAa,CAAA;IACxB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,QAAQ,EAAE,CAAA;CAClB;AAED,mDAAmD;AACnD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,UAAU,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,4EAA4E;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YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAItE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,EAAE,CASjF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAMzF"}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure state + grouping helpers for the {@link TestsCard}.
|
|
3
|
+
*
|
|
4
|
+
* Everything here is a plain function over plain data, so the card's behaviour
|
|
5
|
+
* (which rows a group runs, how a streamed event moves the run forward, what
|
|
6
|
+
* the collapsed summary says) is unit-testable without rendering anything.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/** Live output lines retained — enough to read, bounded so a chatty run cannot grow forever. */
|
|
11
|
+
export const MAX_OUTPUT_LINES = 400;
|
|
12
|
+
/** Display order of the kinds: the preview-driven specs lead, unit tests follow. */
|
|
13
|
+
const KIND_ORDER = ['e2e', 'unit'];
|
|
14
|
+
/**
|
|
15
|
+
* Display order of the project directories within a kind: by path, with the
|
|
16
|
+
* workspace root (`.`) last — it is the least specific place a test can live.
|
|
17
|
+
*
|
|
18
|
+
* @param a - One directory.
|
|
19
|
+
* @param b - The other.
|
|
20
|
+
* @returns The sort order.
|
|
21
|
+
*/
|
|
22
|
+
function compareWorkspaces(a, b) {
|
|
23
|
+
if (a === b)
|
|
24
|
+
return 0;
|
|
25
|
+
if (a === '.')
|
|
26
|
+
return 1;
|
|
27
|
+
if (b === '.')
|
|
28
|
+
return -1;
|
|
29
|
+
return a.localeCompare(b);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The heading name for a directory: the host's label when it sent one, else
|
|
33
|
+
* the path itself, and `null` for the root either way.
|
|
34
|
+
*
|
|
35
|
+
* @param item - Any test in the group.
|
|
36
|
+
* @returns The label, or `null` for the workspace root.
|
|
37
|
+
*/
|
|
38
|
+
function labelFor(item) {
|
|
39
|
+
if (item.workspaceLabel !== undefined)
|
|
40
|
+
return item.workspaceLabel;
|
|
41
|
+
return item.workspace === '.' ? null : item.workspace;
|
|
42
|
+
}
|
|
43
|
+
/** A run that has not started. */
|
|
44
|
+
export const EMPTY_RUN_STATE = {
|
|
45
|
+
runId: null,
|
|
46
|
+
running: false,
|
|
47
|
+
queued: [],
|
|
48
|
+
currentId: null,
|
|
49
|
+
output: [],
|
|
50
|
+
results: {},
|
|
51
|
+
outcome: null,
|
|
52
|
+
error: null,
|
|
53
|
+
startedAt: null,
|
|
54
|
+
durationMs: null,
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Group tests for display: by kind (end-to-end first), then by project
|
|
58
|
+
* directory (whatever directories are present — `app`, `my-app/app`,
|
|
59
|
+
* `packages/web`, the root last), with the files sorted inside each group.
|
|
60
|
+
*
|
|
61
|
+
* @param tests - Every discovered test.
|
|
62
|
+
* @returns The groups, in display order. Empty groups are never produced.
|
|
63
|
+
*/
|
|
64
|
+
export function groupTests(tests) {
|
|
65
|
+
const groups = [];
|
|
66
|
+
for (const kind of KIND_ORDER) {
|
|
67
|
+
const workspaces = [
|
|
68
|
+
...new Set(tests.filter((t) => t.kind === kind).map((t) => t.workspace)),
|
|
69
|
+
].sort(compareWorkspaces);
|
|
70
|
+
for (const workspace of workspaces) {
|
|
71
|
+
const items = tests
|
|
72
|
+
.filter((t) => t.kind === kind && t.workspace === workspace)
|
|
73
|
+
.slice()
|
|
74
|
+
.sort((a, b) => a.file.localeCompare(b.file));
|
|
75
|
+
if (items.length > 0)
|
|
76
|
+
groups.push({ kind, workspace, label: labelFor(items[0]), items });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return groups;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* How many tests there are of each kind.
|
|
83
|
+
*
|
|
84
|
+
* @param tests - Every discovered test.
|
|
85
|
+
* @returns The per-kind counts.
|
|
86
|
+
*/
|
|
87
|
+
export function countByKind(tests) {
|
|
88
|
+
return {
|
|
89
|
+
e2e: tests.filter((t) => t.kind === 'e2e').length,
|
|
90
|
+
unit: tests.filter((t) => t.kind === 'unit').length,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The tallies of the last run, over the tests that are still listed. Counted
|
|
95
|
+
* per FILE (one row, one verdict) so the collapsed summary matches the rows.
|
|
96
|
+
*
|
|
97
|
+
* @param tests - The currently listed tests.
|
|
98
|
+
* @param results - The per-id outcomes.
|
|
99
|
+
* @returns Passed/failed/skipped file counts.
|
|
100
|
+
*/
|
|
101
|
+
export function summarizeResults(tests, results) {
|
|
102
|
+
let passed = 0;
|
|
103
|
+
let failed = 0;
|
|
104
|
+
let skipped = 0;
|
|
105
|
+
for (const test of tests) {
|
|
106
|
+
const entry = results[test.id];
|
|
107
|
+
if (!entry)
|
|
108
|
+
continue;
|
|
109
|
+
if (entry.status === 'passed')
|
|
110
|
+
passed += 1;
|
|
111
|
+
else if (entry.status === 'failed')
|
|
112
|
+
failed += 1;
|
|
113
|
+
else
|
|
114
|
+
skipped += 1;
|
|
115
|
+
}
|
|
116
|
+
return { passed, failed, skipped, reported: passed + failed + skipped };
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Fold one streamed event into the run state.
|
|
120
|
+
*
|
|
121
|
+
* Deliberately total: an event for an id the card no longer lists is recorded
|
|
122
|
+
* anyway (a re-list may be in flight), and an unknown event type leaves the
|
|
123
|
+
* state untouched rather than throwing inside a stream handler.
|
|
124
|
+
*
|
|
125
|
+
* @param state - The current state.
|
|
126
|
+
* @param event - The event just received.
|
|
127
|
+
* @returns The next state (a new object whenever anything changed).
|
|
128
|
+
*/
|
|
129
|
+
export function applyTestRunEvent(state, event) {
|
|
130
|
+
switch (event.type) {
|
|
131
|
+
case 'start': {
|
|
132
|
+
// A new run clears the previous run's verdicts for the ids it covers, so
|
|
133
|
+
// a stale green pill never sits next to a row that is running again.
|
|
134
|
+
const results = { ...state.results };
|
|
135
|
+
for (const id of event.ids)
|
|
136
|
+
delete results[id];
|
|
137
|
+
return {
|
|
138
|
+
...state,
|
|
139
|
+
runId: event.runId,
|
|
140
|
+
running: true,
|
|
141
|
+
queued: [...event.ids],
|
|
142
|
+
currentId: null,
|
|
143
|
+
output: [],
|
|
144
|
+
results,
|
|
145
|
+
outcome: null,
|
|
146
|
+
error: null,
|
|
147
|
+
startedAt: Date.now(),
|
|
148
|
+
durationMs: null,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
case 'output': {
|
|
152
|
+
const output = [...state.output, ...event.chunk.split('\n')];
|
|
153
|
+
return {
|
|
154
|
+
...state,
|
|
155
|
+
currentId: event.id ?? state.currentId,
|
|
156
|
+
output: output.length > MAX_OUTPUT_LINES ? output.slice(-MAX_OUTPUT_LINES) : output,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
case 'result': {
|
|
160
|
+
return {
|
|
161
|
+
...state,
|
|
162
|
+
results: {
|
|
163
|
+
...state.results,
|
|
164
|
+
[event.id]: {
|
|
165
|
+
status: event.status,
|
|
166
|
+
...(event.durationMs != null ? { durationMs: event.durationMs } : {}),
|
|
167
|
+
passed: event.passed ?? 0,
|
|
168
|
+
failed: event.failed ?? 0,
|
|
169
|
+
skipped: event.skipped ?? 0,
|
|
170
|
+
...(event.output ? { output: event.output } : {}),
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
case 'done': {
|
|
176
|
+
return {
|
|
177
|
+
...state,
|
|
178
|
+
running: false,
|
|
179
|
+
currentId: null,
|
|
180
|
+
outcome: event.outcome,
|
|
181
|
+
error: event.error ?? null,
|
|
182
|
+
durationMs: event.durationMs ?? (state.startedAt ? Date.now() - state.startedAt : null),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
default:
|
|
186
|
+
return state;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* The state after a run that never produced a `done` event — the host's stream
|
|
191
|
+
* died, or its request failed before the server could answer.
|
|
192
|
+
*
|
|
193
|
+
* @param state - The current state.
|
|
194
|
+
* @param message - What to show in the card.
|
|
195
|
+
* @returns The next state, no longer running.
|
|
196
|
+
*/
|
|
197
|
+
export function failRun(state, message) {
|
|
198
|
+
return { ...state, running: false, currentId: null, outcome: 'error', error: message };
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Whether a row should render as "running": the run is live and either the host
|
|
202
|
+
* named this row as current, or it is in the queue and has no verdict yet.
|
|
203
|
+
*
|
|
204
|
+
* @param state - The run state.
|
|
205
|
+
* @param id - The row's test id.
|
|
206
|
+
* @returns True when the row is part of the live run and still undecided.
|
|
207
|
+
*/
|
|
208
|
+
export function isRowRunning(state, id) {
|
|
209
|
+
if (!state.running)
|
|
210
|
+
return false;
|
|
211
|
+
if (state.currentId === id)
|
|
212
|
+
return true;
|
|
213
|
+
return state.queued.includes(id) && state.results[id] == null;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* The label for a row: the host's title when it gave one, else the file path.
|
|
217
|
+
*
|
|
218
|
+
* @param item - The test.
|
|
219
|
+
* @returns The label to render.
|
|
220
|
+
*/
|
|
221
|
+
export function testRowLabel(item) {
|
|
222
|
+
return item.title?.trim() || item.file;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Filters tests by a free-text query, matching (case-insensitively) against the
|
|
226
|
+
* file path, the row title, and the project directory. A blank query returns
|
|
227
|
+
* every test in input order — the same contract as `filterScripts`.
|
|
228
|
+
*
|
|
229
|
+
* @param tests - The tests to filter.
|
|
230
|
+
* @param query - The search query.
|
|
231
|
+
* @returns The matching tests, in input order.
|
|
232
|
+
*/
|
|
233
|
+
export function filterTests(tests, query) {
|
|
234
|
+
const q = query.trim().toLowerCase();
|
|
235
|
+
if (!q)
|
|
236
|
+
return [...tests];
|
|
237
|
+
return tests.filter((t) => t.file.toLowerCase().includes(q) ||
|
|
238
|
+
(t.title ?? '').toLowerCase().includes(q) ||
|
|
239
|
+
String(t.workspace).toLowerCase().includes(q));
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Parses a `/test [query | all]` command (`/tests` is the registered alias).
|
|
243
|
+
*
|
|
244
|
+
* `all` is the one argument that ACTS: it runs everything immediately. Every
|
|
245
|
+
* other argument only filters the list, exactly the way `/scripts <query>` seeds
|
|
246
|
+
* the scripts browser — running ONE test by name is what the per-row Run button
|
|
247
|
+
* is for, and giving the argument a second meaning would make `/test <thing>`
|
|
248
|
+
* sometimes list and sometimes execute.
|
|
249
|
+
*
|
|
250
|
+
* @param input - The raw chat input.
|
|
251
|
+
* @returns `{ query, runAll }` when it is a `/test` command, else `null`.
|
|
252
|
+
*/
|
|
253
|
+
export function parseTestCommand(input) {
|
|
254
|
+
const match = input.trim().match(/^\/tests?(?:\s+(.*))?$/i);
|
|
255
|
+
if (!match)
|
|
256
|
+
return null;
|
|
257
|
+
const argument = (match[1] ?? '').trim();
|
|
258
|
+
if (argument.toLowerCase() === 'all')
|
|
259
|
+
return { query: '', runAll: true };
|
|
260
|
+
return { query: argument, runAll: false };
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=tests-card-utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests-card-utilities.js","sourceRoot":"","sources":["../../src/components/tests-card-utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmDH,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;AAEnC,oFAAoF;AACpF,MA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AC,CAAC,CAAC;QACzC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAChD,CAAA;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC3D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IACvB,MAAM,QAAQ,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;IACxC,IAAI,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK;QAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IACxE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AAC3C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -73,6 +73,36 @@
|
|
|
73
73
|
* - A custom card is a critical event only when its factory sets
|
|
74
74
|
* `critical: true` (a failure, a blocked action, a limit that stopped work) —
|
|
75
75
|
* the package never infers it from tone or copy.
|
|
76
|
+
* - `ChatPanel` owns no pricing or auth routes, so every limit/upgrade button
|
|
77
|
+
* comes from the host's `buildUpgradeCta(context)`. The context forwards the
|
|
78
|
+
* backend's whole description of the refusal: `requiresSignup`, `limitType`
|
|
79
|
+
* (the rule that fired), `billingAction` (the remedy it resolved — e.g.
|
|
80
|
+
* `add_funds`, `add_payment_method`, `raise_spend_cap`, `upgrade`, `none`) and
|
|
81
|
+
* `upgradeTier` (`null` = no higher plan). Branch on `billingAction` first;
|
|
82
|
+
* every field is optional, so keep a fallback. A live limit banner and a
|
|
83
|
+
* recorded card that declares the same `coversLimitType` state one fact, so
|
|
84
|
+
* the card steps aside while the banner is up — which only reads as one
|
|
85
|
+
* consistent message if the banner's button is resolved from the same
|
|
86
|
+
* `billingAction` the card used.
|
|
87
|
+
* - **`/test` lists and runs the project's tests** (`TestsCard`, opened by the
|
|
88
|
+
* `/test` command — `/tests` is a registered alias — in the same closeable
|
|
89
|
+
* overlay as `/scripts` and `/skills`, and renderable in the timeline as the
|
|
90
|
+
* `tests` system card). It owns no routes: pass `listTests` and `runTests`
|
|
91
|
+
* and the command works; omit either and it has nothing to run.
|
|
92
|
+
* `runTests(selection, onEvent)` returns a handle whose `cancel()` must
|
|
93
|
+
* really stop the run, and it must deliver exactly one `done` event however
|
|
94
|
+
* the run ends — including when the request never opened — or the card spins
|
|
95
|
+
* forever. `canRunTests` (a viewer: false) and `testsAvailable` (the
|
|
96
|
+
* environment is up) each disable the run controls and state their own
|
|
97
|
+
* reason in the card. The RUN is owned by `ChatPanel`, not the card, so it
|
|
98
|
+
* keeps streaming while the overlay is closed. `/test all` runs everything;
|
|
99
|
+
* any other argument only filters the list.
|
|
100
|
+
* - **End-to-end specs are meant to run against the LIVE PREVIEW.** The host
|
|
101
|
+
* should drive them through `@molecule/app-e2e-preview` (what every
|
|
102
|
+
* `mlcl create` app already bonds in `e2e/bonds.ts`), not a browser binary —
|
|
103
|
+
* in a sandbox there is none. That bond drives the page the person is
|
|
104
|
+
* actually looking at, so **a preview must be open** somewhere or the driver
|
|
105
|
+
* waits and fails; the card says so next to the end-to-end group.
|
|
76
106
|
* - Text routes through `t('ide.*')` — `@molecule/app-locales-ide` supplies
|
|
77
107
|
* translations.
|
|
78
108
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GG;AAEH,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,mBAAmB,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -73,6 +73,36 @@
|
|
|
73
73
|
* - A custom card is a critical event only when its factory sets
|
|
74
74
|
* `critical: true` (a failure, a blocked action, a limit that stopped work) —
|
|
75
75
|
* the package never infers it from tone or copy.
|
|
76
|
+
* - `ChatPanel` owns no pricing or auth routes, so every limit/upgrade button
|
|
77
|
+
* comes from the host's `buildUpgradeCta(context)`. The context forwards the
|
|
78
|
+
* backend's whole description of the refusal: `requiresSignup`, `limitType`
|
|
79
|
+
* (the rule that fired), `billingAction` (the remedy it resolved — e.g.
|
|
80
|
+
* `add_funds`, `add_payment_method`, `raise_spend_cap`, `upgrade`, `none`) and
|
|
81
|
+
* `upgradeTier` (`null` = no higher plan). Branch on `billingAction` first;
|
|
82
|
+
* every field is optional, so keep a fallback. A live limit banner and a
|
|
83
|
+
* recorded card that declares the same `coversLimitType` state one fact, so
|
|
84
|
+
* the card steps aside while the banner is up — which only reads as one
|
|
85
|
+
* consistent message if the banner's button is resolved from the same
|
|
86
|
+
* `billingAction` the card used.
|
|
87
|
+
* - **`/test` lists and runs the project's tests** (`TestsCard`, opened by the
|
|
88
|
+
* `/test` command — `/tests` is a registered alias — in the same closeable
|
|
89
|
+
* overlay as `/scripts` and `/skills`, and renderable in the timeline as the
|
|
90
|
+
* `tests` system card). It owns no routes: pass `listTests` and `runTests`
|
|
91
|
+
* and the command works; omit either and it has nothing to run.
|
|
92
|
+
* `runTests(selection, onEvent)` returns a handle whose `cancel()` must
|
|
93
|
+
* really stop the run, and it must deliver exactly one `done` event however
|
|
94
|
+
* the run ends — including when the request never opened — or the card spins
|
|
95
|
+
* forever. `canRunTests` (a viewer: false) and `testsAvailable` (the
|
|
96
|
+
* environment is up) each disable the run controls and state their own
|
|
97
|
+
* reason in the card. The RUN is owned by `ChatPanel`, not the card, so it
|
|
98
|
+
* keeps streaming while the overlay is closed. `/test all` runs everything;
|
|
99
|
+
* any other argument only filters the list.
|
|
100
|
+
* - **End-to-end specs are meant to run against the LIVE PREVIEW.** The host
|
|
101
|
+
* should drive them through `@molecule/app-e2e-preview` (what every
|
|
102
|
+
* `mlcl create` app already bonds in `e2e/bonds.ts`), not a browser binary —
|
|
103
|
+
* in a sandbox there is none. That bond drives the page the person is
|
|
104
|
+
* actually looking at, so **a preview must be open** somewhere or the driver
|
|
105
|
+
* waits and fails; the card says so next to the end-to-end group.
|
|
76
106
|
* - Text routes through `t('ide.*')` — `@molecule/app-locales-ide` supplies
|
|
77
107
|
* translations.
|
|
78
108
|
*
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GG;AAEH,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA"}
|