feat(app): open Search from the shell over the shared session
This commit is contained in:
@@ -326,6 +326,7 @@ export async function startFixture({ root }) {
|
||||
const decisionRequests = [];
|
||||
let chatSubscribed = 0;
|
||||
let chatHistory = 0;
|
||||
const searchRequests = [];
|
||||
const CHAT_SESSION = {
|
||||
id: 'ses_probechat',
|
||||
title: 'Probe conversation',
|
||||
@@ -383,6 +384,7 @@ export async function startFixture({ root }) {
|
||||
decisionRequests,
|
||||
chatSubscribed,
|
||||
chatHistory,
|
||||
searchRequests,
|
||||
}));
|
||||
return;
|
||||
}
|
||||
@@ -474,6 +476,35 @@ export async function startFixture({ root }) {
|
||||
client.send({ id: request.id, type: 'run', run_detail: humanDetail(true) });
|
||||
return;
|
||||
}
|
||||
if (request.type === 'search') {
|
||||
// Deterministic wire fixture for the Search page probe: the app's
|
||||
// exact request body is recorded and answered with one hit per kind
|
||||
// it can target. No production server or operator data is involved.
|
||||
const search = request.search ?? {};
|
||||
searchRequests.push(search);
|
||||
const query = String(search.query ?? '');
|
||||
client.send({
|
||||
id: request.id,
|
||||
type: 'search_results',
|
||||
search_results: {
|
||||
query,
|
||||
kind: search.kind ?? '',
|
||||
results: query.trim() ? [
|
||||
{ kind: 'run', target: 'run:1', run: {
|
||||
id: 1, pipeline_name: 'Fixture live run', status: 'running',
|
||||
workspace: '/srv/probe', created_at: '2026-10-21T12:00:00Z' } },
|
||||
{ kind: 'pipeline', target: 'pipeline:10', pipeline: {
|
||||
id: 10, name: 'Fixture pipeline', version: 1, stages: 2 } },
|
||||
] : [],
|
||||
truncated: false,
|
||||
scanned_steps: 4,
|
||||
scanned_bytes: 512,
|
||||
cap: 50,
|
||||
scan_bound_bytes: 1048576,
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (request.type === 'chat_sessions') {
|
||||
client.send({ id: request.id, type: 'chat_sessions',
|
||||
chat_sessions: [CHAT_SESSION] });
|
||||
|
||||
Reference in New Issue
Block a user