EnergyVenom commited on
Commit
e0ba7b4
·
verified ·
1 Parent(s): eee145b

Patchwise Agent Studio: Oracle AI Agent Studio cycles

Browse files
web/src/pages/RunWorkspace.tsx CHANGED
@@ -368,7 +368,7 @@ function DetailView({ id, tab, r, watching, browserRun, fusionPod }: { id: strin
368
  const el = switcher.current?.querySelector<HTMLElement>('[aria-current="page"]') ?? switcher.current?.querySelector<HTMLElement>('[aria-label="More views of this test run"]');
369
  el?.scrollIntoView?.({ inline: 'nearest', block: 'nearest' }); // nearest: the first view stays in sight when it fits
370
  }, [tab]);
371
- const VIEW: Record<string, string> = { scenarios: 'Scenarios', failures: 'Failures', workflow: 'Team board', report: 'Report and sign-off' };
372
  return (
373
  <div className="fpt-ws-scroll" tabIndex={-1}>
374
  {/* one h1 per view: the run, then the view (the toolbar shows the run's name as plain text) */}
@@ -377,16 +377,16 @@ function DetailView({ id, tab, r, watching, browserRun, fusionPod }: { id: strin
377
  <div className="fpt-detail-head">
378
  <Button component={Link} to={`/runs/${id}`} variant="subtle" color="gray" size="compact-sm" leftSection={<IconArrowLeft size={14} />} style={{ flex: '0 0 auto' }}>Test run</Button>
379
  <NavTabs ref={switcher} label="Views of this test run" className="fpt-detail-switch"
380
- items={[['scenarios', `Scenarios${your('scenarios')}`], ['failures', `Failures${your('failures')}`], ['workflow', 'Team'], ['report', 'Report & sign-off']]
381
  .map(([v, label]) => ({ to: `/runs/${id}/${v}`, label, active: tab === v }))}
382
  extra={(
383
  <Menu position="bottom-end" withArrow>
384
  <Menu.Target>
385
- <Button variant={MORE[tab] ? 'filled' : 'subtle'} color={MORE[tab] ? undefined : 'gray'} size="compact-sm" radius="xl" ml={4} style={{ alignSelf: 'center' }}
386
- rightSection={<IconChevronDown size={12} />} aria-label="More views of this test run">{MORE[tab] ? `More: ${MORE[tab]}` : 'More'}</Button>
387
  </Menu.Target>
388
  <Menu.Dropdown>
389
- {Object.entries(MORE_ALL).map(([v, label]) => <Menu.Item key={v} onClick={() => nav(`/runs/${id}/${v}`)}>{label}</Menu.Item>)}
390
  {can('admin') && <Menu.Label>Engineering views (admin)</Menu.Label>}
391
  {can('admin') && Object.entries(MORE_ADMIN).map(([v, label]) => <Menu.Item key={v} onClick={() => nav(`/runs/${id}/${v}`)}>{label}</Menu.Item>)}
392
  </Menu.Dropdown>
 
368
  const el = switcher.current?.querySelector<HTMLElement>('[aria-current="page"]') ?? switcher.current?.querySelector<HTMLElement>('[aria-label="More views of this test run"]');
369
  el?.scrollIntoView?.({ inline: 'nearest', block: 'nearest' }); // nearest: the first view stays in sight when it fits
370
  }, [tab]);
371
+ const VIEW: Record<string, string> = { scenarios: 'Scenarios', failures: 'Failures', workflow: 'Team board', activity: 'Activity', report: 'Report and sign-off' };
372
  return (
373
  <div className="fpt-ws-scroll" tabIndex={-1}>
374
  {/* one h1 per view: the run, then the view (the toolbar shows the run's name as plain text) */}
 
377
  <div className="fpt-detail-head">
378
  <Button component={Link} to={`/runs/${id}`} variant="subtle" color="gray" size="compact-sm" leftSection={<IconArrowLeft size={14} />} style={{ flex: '0 0 auto' }}>Test run</Button>
379
  <NavTabs ref={switcher} label="Views of this test run" className="fpt-detail-switch"
380
+ items={[['scenarios', `Scenarios${your('scenarios')}`], ['failures', `Failures${your('failures')}`], ['workflow', 'Team'], ['activity', 'Activity'], ['report', 'Report & sign-off']]
381
  .map(([v, label]) => ({ to: `/runs/${id}/${v}`, label, active: tab === v }))}
382
  extra={(
383
  <Menu position="bottom-end" withArrow>
384
  <Menu.Target>
385
+ <Button variant={MORE[tab] && tab !== 'activity' ? 'filled' : 'subtle'} color={MORE[tab] && tab !== 'activity' ? undefined : 'gray'} size="compact-sm" radius="xl" ml={4} style={{ alignSelf: 'center' }}
386
+ rightSection={<IconChevronDown size={12} />} aria-label="More views of this test run">{MORE[tab] && tab !== 'activity' ? `More: ${MORE[tab]}` : 'More'}</Button>
387
  </Menu.Target>
388
  <Menu.Dropdown>
389
+ {Object.entries(MORE_ALL).filter(([v]) => v !== 'activity').map(([v, label]) => <Menu.Item key={v} onClick={() => nav(`/runs/${id}/${v}`)}>{label}</Menu.Item>)}
390
  {can('admin') && <Menu.Label>Engineering views (admin)</Menu.Label>}
391
  {can('admin') && Object.entries(MORE_ADMIN).map(([v, label]) => <Menu.Item key={v} onClick={() => nav(`/runs/${id}/${v}`)}>{label}</Menu.Item>)}
392
  </Menu.Dropdown>
web/src/pages/ScenarioSplit.tsx CHANGED
@@ -32,10 +32,42 @@ export function ScenarioSplit({ list, screens, Body }: { list: Scenario[]; scree
32
  return [...m.entries()];
33
  }, [shown]);
34
  const cur = list.find((s) => s.id === pick) ?? shown[0] ?? null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  return (
37
  <div className="sp-split">
38
  <nav className="sp-list" aria-label="Scenarios">
 
39
  <TextInput size="sm" placeholder="Title or ID" aria-label="Find a scenario" leftSection={<IconSearch size={14} />} value={q} onChange={(e) => setQ(e.currentTarget.value)} />
40
  <div className="sp-chips" role="group" aria-label="Show scenarios">
41
  {FILTERS.filter((f) => f.value === 'all' || count(f.value) > 0).map((f) => (
 
32
  return [...m.entries()];
33
  }, [shown]);
34
  const cur = list.find((s) => s.id === pick) ?? shown[0] ?? null;
35
+ const [view, setView] = useState<'list' | 'board'>(() => { try { return localStorage.getItem('pw.scenarioView') === 'board' ? 'board' : 'list'; } catch { return 'list'; } });
36
+ const choose = (v: 'list' | 'board') => { setView(v); try { localStorage.setItem('pw.scenarioView', v); } catch { /* private window */ } };
37
+ const toggle = (
38
+ <div className="sp-view" role="group" aria-label="Show the scenarios as">
39
+ <button type="button" aria-pressed={view === 'list'} onClick={() => choose('list')}>List</button>
40
+ <button type="button" aria-pressed={view === 'board'} onClick={() => choose('board')}>Board</button>
41
+ </div>
42
+ );
43
+
44
+ if (view === 'board') {
45
+ return (
46
+ <div className="sp-boardwrap">
47
+ <div className="sp-boardbar">{toggle}<span className="sp-sub">Pick a card to open the scenario.</span></div>
48
+ <div className="sp-board">
49
+ {(['fail', 'flaky', 'todo', 'pass'] as Kind[]).filter((k) => count(k) > 0).map((k) => (
50
+ <section key={k} className="sp-col" data-k={k} aria-label={`${WORDS[k]}: ${count(k)}`}>
51
+ <h3 className="sp-colh"><span className="sp-dot" data-k={k} aria-hidden />{WORDS[k]}<span className="fpt-num">{count(k)}</span></h3>
52
+ {list.filter((s) => kindOf(s) === k).slice(0, 40).map((s) => (
53
+ <button key={s.id} type="button" className="sp-card" onClick={() => { setPick(s.id); choose('list'); }}>
54
+ <span className="sp-kicker">{s.id}{s.priority_words ? ` · ${s.priority_words}` : ''}</span>
55
+ <b>{s.title}</b>
56
+ {(s.step ?? s.process) && <span className="sp-sub">{s.step ?? s.process}</span>}
57
+ </button>
58
+ ))}
59
+ {count(k) > 40 && <span className="sp-sub sp-more">and {count(k) - 40} more in the list</span>}
60
+ </section>
61
+ ))}
62
+ </div>
63
+ </div>
64
+ );
65
+ }
66
 
67
  return (
68
  <div className="sp-split">
69
  <nav className="sp-list" aria-label="Scenarios">
70
+ {toggle}
71
  <TextInput size="sm" placeholder="Title or ID" aria-label="Find a scenario" leftSection={<IconSearch size={14} />} value={q} onChange={(e) => setQ(e.currentTarget.value)} />
72
  <div className="sp-chips" role="group" aria-label="Show scenarios">
73
  {FILTERS.filter((f) => f.value === 'all' || count(f.value) > 0).map((f) => (
web/src/pages/cockpit.css CHANGED
@@ -84,3 +84,15 @@
84
  .rc-sq[data-k='run'] { animation: none; }
85
  .rc-pbar i, .rc-sq { transition: none; }
86
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  .rc-sq[data-k='run'] { animation: none; }
85
  .rc-pbar i, .rc-sq { transition: none; }
86
  }
87
+
88
+ /* the Activity log as a timeline: a rail on the left, a dot per entry coloured by what happened */
89
+ .fpt-ws-detail [aria-label='activity feed'] { position: relative; padding-left: 26px; }
90
+ .fpt-ws-detail [aria-label='activity feed']::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--sep-strong); }
91
+ .fpt-ws-detail [aria-label='activity feed'] > * { position: relative; }
92
+ .fpt-ws-detail [aria-label='activity feed'] > *::before { content: ""; position: absolute; left: -24px; top: 16px; width: 10px; height: 10px; border-radius: 50%;
93
+ background: var(--green); box-shadow: 0 0 0 3px var(--bg); }
94
+ .fpt-ws-detail [aria-label='activity feed'] > .fpt-feed-meta::before { top: 7px; width: 8px; height: 8px; left: -23px; background: var(--label-3); }
95
+ .fpt-ws-detail [aria-label='activity feed'] > [data-kind='interrupted']::before { background: var(--ember); }
96
+ .fpt-ws-detail [aria-label='activity feed'] > [data-kind='error']::before, .fpt-ws-detail [aria-label='activity feed'] > [data-kind='killed']::before { background: var(--red); }
97
+ .fpt-ws-detail [aria-label='activity feed'] > .fpt-live::before { background: var(--blue); animation: rc-pulse 1.4s var(--ease) infinite; }
98
+ .fpt-ws-detail [aria-label='activity feed'] > .fpt-card { border-radius: 14px; }
web/src/pages/split.css CHANGED
@@ -44,3 +44,23 @@
44
  .sp-split { grid-template-columns: minmax(0, 1fr); }
45
  .sp-list { position: static; max-height: 320px; }
46
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  .sp-split { grid-template-columns: minmax(0, 1fr); }
45
  .sp-list { position: static; max-height: 320px; }
46
  }
47
+
48
+ /* List / Board switch, and the board: one column per result */
49
+ .sp-view { display: inline-flex; align-self: flex-start; padding: 3px; gap: 2px; border: 1px solid var(--sep-strong); border-radius: 10px; background: var(--fill); }
50
+ .sp-view button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--label-2); font: 600 12px var(--font); cursor: pointer; }
51
+ .sp-view button[aria-pressed='true'] { background: var(--bg-elev); color: var(--label); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
52
+ .sp-view button:focus-visible, .sp-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
53
+ .sp-boardbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
54
+ .sp-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
55
+ .sp-col { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px; background: var(--fill); }
56
+ .sp-col[data-k='fail'] { background: color-mix(in srgb, var(--red) 9%, transparent); }
57
+ .sp-col[data-k='flaky'] { background: color-mix(in srgb, var(--orange) 9%, transparent); }
58
+ .sp-col[data-k='pass'] { background: color-mix(in srgb, var(--green) 8%, transparent); }
59
+ .sp-colh { display: flex; align-items: center; gap: 8px; margin: 2px 4px 2px; font: 600 14px var(--font-display); color: var(--label); }
60
+ .sp-colh .fpt-num { margin-left: auto; color: var(--label-3); font-size: 13px; }
61
+ .sp-colh .sp-dot { margin-top: 0; }
62
+ .sp-card { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 11px 12px; border: 1px solid var(--sep); border-radius: 12px; background: var(--bg-elev);
63
+ color: var(--label); text-align: left; font: 500 13px/18px var(--font); cursor: pointer; transition: border-color var(--d1), transform var(--d1); }
64
+ .sp-card:hover { border-color: var(--ember); transform: translateY(-1px); }
65
+ .sp-card b { font-weight: 650; }
66
+ .sp-more { padding: 2px 6px; }