File size: 110,506 Bytes
f9c7101
 
 
 
 
 
 
 
 
 
2effee4
 
f9c7101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2effee4
 
f9c7101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2effee4
 
f9c7101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2effee4
 
f9c7101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2effee4
 
f9c7101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2effee4
 
f9c7101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2effee4
 
f9c7101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
# Patch Testing Co-worker: UI redesign spec

Status: design spec for the developer agent. Scope: `web/` only (React 18, TypeScript, Vite, Mantine 7, TanStack Query).
Author: UI/UX design pass, 17 Oct 2026. Basis: the current app (code read in full for the files listed in section 0, plus screenshots
of a local run at 1440x900 and 390x844 in light and dark) and the interaction patterns of AionUi (github.com/iOfficeAI/AionUi, Apache-2.0).

This is a **redesign of layout and look only**. Every current function stays available and works as it does now (section 9 is
the checklist). No route is removed. No new backend endpoint is needed for steps 1 to 7. Step 8 (scheduled runs "once" / "cron",
pause, edit) needs the small backend additions listed in section 7.1, and the UI for those parts stays hidden until they exist.

> **Amended 20 Oct 2026 by `UI-SIMPLIFY.md`** (calm palette, one accent, colour only for states, no caps labels, readiness shows the last finished verdict). Where the two disagree, `UI-SIMPLIFY.md` wins. Sections marked *Superseded* below point to it. Sections 9 and 10 are unchanged and still binding.

Contents

0. What the current app does well and where it hurts
1. Design principles
2. App shell (layout, proportions, breakpoints, wireframes)
3. Screen-by-screen specs
4. Design tokens
5. Component inventory
6. Implementation plan (ordered, independently shippable steps)
7. Backend needs, out of scope, risks
8. Reusing AionUi code (licence obligations)
9. Functionality preservation checklist
10. Test hooks that must keep working

---

## 0. What the current app does well and where it hurts

Read: `components/Layout.tsx`, `components/common.tsx`, `pages/AssistantPage.tsx`, `RunPage.tsx`, `RunGuide.tsx`, `LiveView.tsx`,
`RunProof.tsx`, `RunWorkflow.tsx`, `ScenarioReview.tsx`, `FailureReview.tsx`, `SignOffReport.tsx`, `RunReport.tsx`, `ReadinessPage.tsx`,
`RunsPage.tsx`, `SettingsPage.tsx`, `AdminPages.tsx`, `PodsPage.tsx`, `AuthShell.tsx`, `LoginPage.tsx`, `chat/ChatDock.tsx`, `styles.css`,
`theme.ts`, `glossary.ts`, `agents.ts`, `web/e2e/coworker.e2e.ts`, `src/**/*.test.tsx`.

Keep (it works):

- Consultant vocabulary (`glossary.ts`): "Scenario", "Your review", "Ready / Not ready / On hold", with the exact rule result kept for audit.
- The four-stage guide (Prepare, Approve, Testing, Result) with one recommended action per stage ("Approve all 79 and start testing").
- The honesty cue: "Practice environment, Mock app, not Oracle Fusion" in the menu, the chat header and the reports.
- The pill system (`.fpt-pill` + `data-tone`), AA pairs already checked.
- The Ask dock (Ctrl K) as a push column, not a modal.

Hurts (seen in the screenshots):

1. **Two places for one run.** `/runs/:id` (guide + 10 tabs + "More" menu) and `/assistant/:id` (the same run as a chat) show the same
   facts in two layouts. Consultants do not know which one is "the" run.
2. **The run is invisible from the menu.** The sidebar has a badge "1" on Test runs but no list of runs; to get back to the run that waits
   for you, you go through a list page.
3. **Evidence hides behind tabs.** The live browser, the screens and the Excel are tabs that replace the guide; you cannot approve or decide
   while looking at the screen that failed.
4. **The workflow tab is a static diagram.** It shows state but not what each agent did, how long it took, or which one went quiet.
5. **Desktop wastes width, phone wastes height.** At 1440 the guide uses 1160px for one sentence and a progress bar; at 390 the stepper's
   connector lines run across the labels and the run header takes 170px.
6. **Dim text on the tinted page fails AA** (`--fpt-dim` #6b7673 on `--fpt-page` #e9f0ee is 4.07:1).
7. **Scheduler is an admin form** (UTC, minutes, "stub"/"live") rather than a consultant feature.

---

## 1. Design principles

1. **Consultant first.** Every label is a business word a functional consultant uses. Technical names (node ids, GO/NO-GO, P1-P4, "stub")
   appear only in tooltips, audit sections and admin views. Sentences, not field dumps.
2. **One run, one place.** A test run is a conversation with a team. Its workspace shows the conversation in the middle and the evidence on
   the right. Everything else about the run is one click away from that workspace.
3. **Human approval is always visible.** If a run waits for a person, that is shown in three places at once: an amber badge on the run in the
   sidebar, an amber "Waiting for you" chip in the top bar, and the action card at the end of the conversation. Approval and decision buttons
   are never inside a collapsed section or a menu.
4. **Honest about where the test ran.** Every run, report, screen and environment shows **Practice environment** (amber) or **Oracle Fusion pod**
   (blue) next to it. The words "Oracle Fusion" are never used for the practice pod. Quick simulations say "no browser" wherever a screen
   would be expected.
5. **Calm.** One accent per state, no gradients on working surfaces (the brand gradient stays on sign-in only), motion only for live state
   (a pulsing dot while an agent works). Quiet greys for everything that needs no action.
6. **Evidence beside the decision.** When you approve a scenario or judge a failure, its steps, its screen and its Excel row are visible in the
   side panel without leaving the card.
7. **Nothing lost.** Every current function keeps working; anything moved stays reachable within two clicks of where a consultant would look
   (section 9).
8. **Same app on web and desktop.** The Electron app loads this web app; the shell must work full-bleed in a window from 1024x700 upwards.

---

## 2. App shell

### 2.1 Regions

```

+------------+-----------------------------------------------+------------------+

|  SIDEBAR   |  TOP BAR (52px)                               |  CONTEXT PANEL   |

|  (nav +    +-----------------------------------------------+  (run pages and  |

|   runs as  |                                               |   scenario       |

|   conver-  |  CENTER (page or run conversation)            |   library only)  |

|   sations) |                                               |                  |

|            |                                               |  tabs: Live |    |

|            |                                               |  Screens |       |

|            |                                               |  Report | Excel  |

|            |                                               |  | Steps         |

+------------+-----------------------------------------------+------------------+

                                                   (+ Ask dock column, Ctrl K, unchanged behaviour)

```

- **Full bleed.** Remove the outer 14px padding and the rounded `.fpt-frame` border. The sidebar sits on `--fpt-sidebar` (tinted), the
  center and panel on `--fpt-surface`. One 1px `--fpt-border` line separates the regions. (Matches desktop-app conventions; the old frame
  doubled the margins on laptops.)
- The **center** has a max content width of 1080px for reading pages (readiness, lists, settings) and is fluid for the run workspace.
- The **context panel** only exists on run routes (`/runs/:id`, `/runs/:id/:tab`, `/runs/new`, `/assistant*`) and on the Scenarios library.
  Other pages are two-region.
- The **Ask dock** (`ChatDock`) keeps its behaviour: Ctrl K toggles it, it is an `<aside aria-label="Ask the co-worker">` that pushes the
  page, it stays open across screens. It is a separate column to the right of the context panel.

### 2.2 Proportions and breakpoints

| Breakpoint | Width | Sidebar | Center | Context panel | Ask dock |
|---|---|---|---|---|---|
| Desktop | >= 1280 | 264px, expanded; user can collapse to 64px rail | fluid, min 560px | inline, default 440px, resizable 360px to min(720px, 50vw); collapsible to a 44px tab strip | inline 380px. If dock + panel would leave the center < 560px, the panel collapses to its 44px strip while the dock is open (its saved width is kept). |
| Laptop | 1024-1279 | 64px rail by default (icons + badges; hover/focus shows tooltip; "Expand" opens it as an overlay 264px with shadow) | fluid, min 520px | inline, default 380px, resizable 340-560px | Opening the dock collapses the panel to its strip (as today the dock hides the menu below 1280). |
| Tablet | 768-1023 | hidden; hamburger in top bar opens a 288px drawer (Mantine `Drawer`, left) | full width | not inline: a right `Drawer` 420px (max 92vw), opened from the panel button in the top bar or any "Show screen / steps" link | `Drawer` right, as today |
| Phone | < 768 (designed at 390) | hidden; drawer 300px (max 86vw) | full width, 12px side gutter | full-screen sheet (`Drawer` position bottom, size 92dvh, with a grab handle and tab bar) | full-screen `Drawer` |

Phone also gets a **bottom bar** (56px + safe-area inset) with four items: Readiness, Runs (amber badge = runs waiting for you), Ask
(opens the dock), Menu (opens the sidebar drawer). The top bar on phone is 48px: menu-less (the bottom bar owns navigation), title truncated
to one line, and on run routes a "Panel" icon button that opens the sheet.

Persisted per user (`localStorage`, key `fpt.ui.<username>`, JSON, every read/write in try/catch, safe defaults when missing):

```json

{ "sidebar": "expanded" | "rail", "panel": { "open": true, "width": 440, "tab": "live" }, "env": 1 }

```

`env` is the id of the environment chosen in the environment switcher (2.4). No backend storage.

### 2.3 Wireframes

Desktop 1440x900, run waiting for scenario approval:

```

+--------------------------+-------------------------------------------------------+------------------------------------------+

| [PT] Patch Testing       | Procure-to-Pay · 26C · 17 Oct 11:24     (o) Waiting   | [Live] [Screens] [Report] [Excel] [Steps]|

|      Co-worker           | Practice env · Quick simulation · ref   for you  [...]| ---------------------------------------- |

| [+ New test run       ]  |                    [Ask  Ctrl K] [Cancel] [|> panel] | STEPS · P2P-REQ-014                      |

|                          +-------------------------------------------------------+ Requisition below threshold is          |

|  Patch readiness         |                                                       | approved by the first approver           |

|  Test runs               |   (you) Test Procure-to-Pay · quick simulation        | Critical · Written by the AI model       |

|  Scenarios               |                                                       | Dry run: passed on Local mock pod        |

|  Defects                 |   (AI) On it. The team is working:                    |  #  Action   Field     Value  Expected   |

|  Test environments       |        [Team strip: 5 done · 1 waiting for you]      |  1  open     Requis... ...    ...        |

|  Reports                 |        Scout ✓  Research ✓  Synthesizer ✓ ...         |  2  fill     Amount    900    ...        |

|  Scheduled runs          |   ── YOUR APPROVAL ──────────────────────────────     |  ...                                     |

|  ----------------------  |   +-----------------------------------------------+   |                                          |

|  RUNS            [filter]|   | 79 scenarios are ready to test     [1 of 4]   |   |                                          |

|  NEEDS YOU               |   | 75 cover something this patch changes.        |   |                                          |

|  (o) P2P · 26C · 11:24 [Review]  | 2 written by the AI model passed a dry run.  |   |                                          |

|  RUNNING                 |   | [Approve all 79 and start testing ->]         |   |                                          |

|  (*) P2P · 26C · 11:24   |   | Let me look at them first · [Excel test script]|  |                                          |

|  RECENT                  |   +-----------------------------------------------+   |                                          |

|  (✓) P2P · 26C · 11:20 Not ready                                                 |                                          |

|  (x) O2C · 26C · 10:02   |                                                       |                                          |

|  Show all test runs ->   | +---------------------------------------------------+ |                                          |

|                          | | [Status] [Approve all] [Cancel]  (suggestions)    | |                                          |

| [!] Practice environment v| | Tell the co-worker what to do, e.g. "status"   [>]| |                                          |

|     Local mock pod        | +---------------------------------------------------+ |                                          |

| admin · Admin   (moon)(->)|                                                       |                                          |

+--------------------------+-------------------------------------------------------+------------------------------------------+

   264px                                     fluid (>= 560)                               440px (drag handle on left edge)

```

Laptop 1180x800 (rail sidebar, panel 380):

```

+----+---------------------------------------------------+-------------------------------+

|[PT]| P2P · 26C · 17 Oct 11:24   (o) Waiting for you [..]| [Live][Screens][Report][Excel]|

| +  |                         [Ask] [Cancel] [|> panel] | [Steps]                       |

|----+---------------------------------------------------+-------------------------------+

|(H) |  conversation ...                                 |  panel content                |

|(R)1|                                                   |                               |

|(S) |                                                   |                               |

|(D) |                                                   |                               |

|(E) |                                                   |                               |

|(F) |                                                   |                               |

|(C) |                                                   |                               |

|----|                                                   |                               |

|runs|  composer                                         |                               |

|(o) |                                                   |                               |

|(*) |                                                   |                               |

|[!] |  <- practice-environment shield (amber), tooltip  |                               |

|(me)|                                                   |                               |

+----+---------------------------------------------------+-------------------------------+

 64px  In rail mode the RUNS list shows only status dots for the 5 most recent runs (tooltip = run title);

       a run waiting for you shows an amber ring + dot.

```

Tablet 834x1112:

```

+------------------------------------------------------------------+

| [=]  P2P · 26C · 17 Oct 11:24        (o) Waiting for you  [panel] |

+------------------------------------------------------------------+

|  conversation (full width)                                       |

|                                                                  |

|  ...                                    +-------------------------+

|                                         | right Drawer 420px      |

|                                         | [Live][Screens][Report] |

|                                         | [Excel][Steps]          |

|  composer                               |                         |

+-----------------------------------------+-------------------------+

```

Phone 390x844, run workspace:

```

+--------------------------------------+

| P2P · 26C · 11:24          [panel]   |  48px top bar, title 1 line

| Practice env · (o) Waiting for you   |  20px sub-line, amber chip

+--------------------------------------+

| (AI) 79 scenarios are ready to test  |

| ...                                  |

| [ Approve all 79 and start testing ] |  full-width primary

| Let me look at them first            |

| [Excel test script]                  |

|                                      |

| [Status] [Approve all] [Cancel]      |  suggestion chips, horizontal scroll

| [ Tell the co-worker...        (>) ] |  composer (sticks above bottom bar)

+--------------------------------------+

| Readiness | Runs (1) | Ask | Menu    |  56px bottom bar

+--------------------------------------+

```

Phone panel sheet (opened from [panel] or from "See the failed screen"):

```

+--------------------------------------+

|              ────  (grab)            |

| [Live][Screens][Report][Excel][Steps]|  scrollable tab row

|--------------------------------------|

|  tab content, full width              |

|                                      |

|                              [Close] |

+--------------------------------------+

```

### 2.4 Sidebar spec (`AppSidebar`)

> *Amended by UI-SIMPLIFY 3.1:* grey sidebar, sentence-case group headings, status as dot + word (no badge pills). The env cue is amber text for practice and neutral text for Fusion. "New test run" is a secondary button.

Top to bottom, 264px wide, padding 12px 10px, background `--fpt-sidebar`:

1. **Brand row** (48px): the existing `.fpt-mark` initials + product name (`useBrand`), org name small below. `data-testid="brand"` stays.
   Right of it a 28px icon button "Collapse the menu" (`IconLayoutSidebarLeftCollapse`), hidden below 1024.
2. **New test run** button, full width, 36px, filled ink, `IconPlus` left, label "New test run". Permission `run.start` (wrap in `Can`);
   without it, the button is not rendered. Click navigates to `/runs/new` (the intake conversation, 3.1). Keyboard shortcut: `N` when focus
   is not in a text field (shown as `<kbd>` hint in the tooltip).
3. **Navigation** (labelled links, 34px rows, 13.5px, icon 17px, active row = ink pill as today):
   Patch readiness `/` · Test runs `/runs` · Scenarios `/scenarios` · Defects `/tickets` · Test environments `/pods` · Reports `/reports` ·
   Scheduled runs `/schedules` (new route, 3.11) · separator · Ask a question (Ctrl K, existing `chat-toggle` button) · Settings `/admin`
   (admin only, existing `match` list kept so `/agents`, `/heal`, `/scripts`, `/learner`, `/audit` light it up).
   The "Chat" link is removed from the menu because `/assistant` now opens the run workspace (it redirects; 3.1). The "Test runs" badge stays
   (count of runs with `pending_gate`).
4. **RUNS section** (the AionUi "conversations" pattern). Heading row: "Runs" (10.5px uppercase, `--fpt-dim`) + a 24px filter icon button that
   toggles "Only mine" (filters `created_by === user.username`, client side). Groups, each hidden when empty:
   - **Needs you**: runs with `pending_gate` (approval or failure decision).
   - **Running**: `queued`, `running`.
   - **Recent**: everything else, newest first.
   Source: the `useRuns(40, 0)` query the Layout already polls. Show at most 12 rows in total (Needs you first, all of them, then Running,
   then Recent to fill), then a "Show all test runs" link to `/runs`. The list scrolls inside the sidebar if the window is short; the brand,
   New button, nav and footer do not scroll. Each row is a `RunListItem` (5.2).
5. **Footer** (pinned):
   - Emergency stop indicator when engaged: existing red filled badge `data-testid="kill-indicator"` "EMERGENCY STOP IS ON", full width.
   - "Test environment down" amber badge when `health.mock_up === false` (existing).
   - **Environment switcher** `EnvSwitcher` (5.2): replaces `MockBanner` in the sidebar but keeps `data-testid="mock-banner"` and
     `role="note"` `aria-label="target system"` on its visible label. Shows the chosen environment's kind and name:

     amber shield + "Practice environment" / "Local mock pod" or blue cloud + "Oracle Fusion pod" / pod name. Click opens a menu of runnable

     environments (`usePods`), grouped "Practice" and "Oracle Fusion", each with its last connection check (dot + "checked 2 h ago" /

     "not checked"), plus "Manage test environments" → `/pods`. Choosing one stores `env` in the per-user UI prefs; it becomes the

     preselected environment in New test run, Patch readiness and the intake conversation. It does **not** change the server default pod

     (that stays an admin action on `/pods`). The text "Mock app, not Oracle Fusion" (`MOCK_TEXT`) must remain visible when a practice pod is

     chosen.

   - **Desktop settings** subtle button when `desktop()` exists (unchanged).

   - **User row**: `data-testid="whoami"` "admin (admin)" text unchanged, theme toggle button (same aria-label "Switch to dark theme" / "Switch

     to light theme"), sign-out button (aria-label "Sign out").


Rail mode (64px): brand mark only; New test run becomes a 40px round ink icon button with tooltip; nav items icon-only with tooltips and the
amber count badge (`.fpt-rail-badge` style, but amber); runs list shows up to 5 `StatusDot`s with tooltip titles; env switcher becomes a
40px shield/cloud icon with tooltip "Practice environment: Local mock pod (Mock app, not Oracle Fusion)"; user row becomes an avatar button
opening a menu (theme, sign out). The visible text "Mock app, not Oracle Fusion" moves into the top bar sub-line on run pages in rail mode
(see 2.5) so the honesty cue never disappears.

### 2.5 Top bar (`TopBar`)

52px high, padding 0 16px, bottom border, sticky at top of the center column. Three zones:

- **Left**: page title (h1, 16px/600, one line, truncated) and a 12px sub-line (`--fpt-dim`). On run routes: title = `runTitle(r)` with
  `data-testid="run-title"`; sub-line = `EnvBadge` (Practice environment / Oracle Fusion pod + pod name) · "Quick simulation (no browser)" or
  "Full browser run" · the `ref` copy pill (`data-testid="run-id"`, unchanged CopyButton behaviour and aria-label). On other pages: title
  only (e.g. "Patch readiness") and an optional sub-line.
- **Middle** (run routes only): the **state chip** (`RunStateChip`): `StatusDot` + words from `RUN_STATUS_WORDS`, amber filled when waiting
  for you ("Waiting for your scenario review"), plus `DecisionBadge`(s) when finished (`data-testid="decision-badge"` unchanged).
- **Right**: page actions. Run routes: "All details" menu (`data-testid="all-details"`, 3.1.4), Resume / Cancel test run (permission
  `run.control`, unchanged logic), and the panel toggle (`IconLayoutSidebarRight`, aria-label "Show the run details panel" / "Hide the run
  details panel", aria-expanded, shortcut Ctrl+\). Other pages: their primary action (e.g. "New test run" on readiness) and filters.
  The "Ask (Ctrl K)" button appears in the top bar on tablet/phone only (desktop has it in the sidebar).

The old gradient `PageHeader` band is replaced by the top bar on every page. `PageHeader` stays as a component (same props) but renders
the top-bar layout, so pages that call it do not change. Breadcrumbs move into the sub-line as plain text links ("Test runs ›").
The `.fpt-embedded .fpt-band { display: none }` rule becomes `.fpt-embedded .fpt-topbar { display: none }`.

### 2.6 Context panel (`SidePanel`)

```

+--------------------------------------------------+

|| [Live ●] [Screens 12] [Report] [Excel] [Steps]  [x]|   40px tab row, scrolls horizontally if narrow

|+--------------------------------------------------+

|| tab content (own scroll)                          |

||                                                   |

+--------------------------------------------------+

 ^ 6px drag handle (role="separator")

```

- `<aside aria-label="Run details">` (must not be named "Ask the co-worker").
- Tabs (Mantine `Tabs`, variant `default`, 13px): **Live browser** (label "Live"), **Screens**, **Report**, **Excel & script** ("Excel"),
  **Steps**. For quick simulations, Live and Screens stay visible (not disabled) and their content explains why they are empty:
  "Quick simulations don't open a browser, so there is nothing to watch" (existing copy). This teaches the difference instead of hiding it.
- Live tab label carries a pulsing green `StatusDot` while `live.active`. Screens tab shows the count of scenarios with a saved screen.
  Report tab shows a small `DecisionBadge` dot when decided. Steps tab shows the selected scenario id.
- Header right: close button (aria-label "Hide the run details panel").
- **Resize**: drag the 6px handle on the left edge; keyboard: the handle is focusable, `role="separator" aria-orientation="vertical"
  aria-valuemin/max/now` (px), Left/Right arrows ±16px, Home = min, End = max. Double-click resets to the breakpoint default. Width saved
  on pointer-up (debounced 300ms).
- **Collapsed** state: a 44px vertical strip with one icon button per tab (tooltip with the tab name, the Live dot and badges still shown).
  Clicking an icon opens the panel on that tab.
- **Selection**: the panel follows a "selected scenario", held in the URL search param `?scenario=<case_id>` so it survives reload and can be
  linked. Any "Show steps" / "See the screen" control sets it and switches the tab. Without a selection, Steps shows an `EmptyState`
  ("Pick a scenario to see its steps here").
- **Auto-switch rules** (only when the user has not touched the tab in the last 60s): run starts testing with live view → Live; a failure
  arrives (`live.failed`) → Live shows the failure banner (no auto-switch); run reaches `waiting_review` → Screens filtered to failed
  scenarios; run completes → Report.
- Tab contents:
  - **Live**: the existing `LiveView` in a compact layout: title + "Now:" action line, the 16:10 frame, Pause view / Jump to live /
    Fullscreen buttons, the honesty line "Test data only. This is the test environment's browser, not your own session." (exact text kept),

    then "Results so far" and "Up next" stacked **below** the frame (not beside it). `data-testid` values `live-view`, `live-frame`,

    `live-title`, `live-action`, `live-failure-banner`, `live-unavailable` unchanged.

  - **Screens**: the existing `RunProof` in one column: search box, filter chips All / Failed / Passed, cards (`data-testid="proof-card"`)

    with title, outcome pill, screen (click = open full size in a `Modal`, plus "Open in a new tab"), expected result, test data used,

    "Watch the recording" link. Card header has "Show steps" (sets `?scenario`). Footer note: "Screens come from the practice environment

    (the mock app), not Oracle Fusion." or "...from the Oracle Fusion pod <name>." depending on the run's pod kind.

  - **Report**: a compact summary (5.2 `ReportSummary`): verdict band per business area (`DecisionBadge` + the sentence from

    `decision-explained`), counts (tested / failing / not run / defects / gaps), buttons Download PDF (only when the PDF exists), Share (copy

    link), Download the results (Excel), and "Open the full report and sign-off" → `/runs/:id/report`. Before completion: `EmptyState`

    "The report appears when the test run has finished."

  - **Excel & script**: two download cards. "Test script (Excel)": every step and expected result, columns for your verdict and comments

    (href `/api/runs/:id/test-script.xlsx`, `data-testid="excel-script"` stays on the in-conversation button; this one uses

    `data-testid="panel-excel-script"`). "Results (Excel)": same endpoint, labelled as results once the run finished (current behaviour: the

    same file is offered as "Download the results (Excel)"). Below, for admins: "Automation scripts" list (existing `RunScripts`) and a link

    to the Scripts view.

  - **Steps**: `ScenarioSteps` (5.2) for `?scenario`: title, priority pill, origin pill (Library / New / Written by the AI model), dry-run

    line (`DryRunLine`, `data-testid="dry-run"`), job roles, setup needed, steps (numbered; AI steps as the existing action/field/value/

    expected table), test data, expected result, outcome in this run, and "Technical details (scenario file)" accordion. Source data:

    `useRunScenarios(id)` + `useGate` pending item (both already loaded on the page).


---

## 3. Screen-by-screen specs

States vocabulary used below (every screen must define all that apply):
`loading` · `empty` · `error` · `waiting for you` · `running` · `done` · `stopped` (failed / killed / cancelled / interrupted).
Common implementations: loading = skeleton rows (Mantine `Skeleton`, 3 rows) with `aria-busy="true"` on the region, never a bare spinner
for more than 300ms; error = `ErrorAlert` (existing) at the top of the region with a "Try again" button that calls `refetch()`;
empty = `EmptyState` (5.2).

### 3.1 Run workspace (merges the Chat page and the Run page)

Routes:

| Route | Renders |
|---|---|
| `/runs/new` (new) | Workspace with the **intake** conversation (current `Intake` from `AssistantPage`): business area chips, run type chips, plus a new third question "Where?" (environment chips, preselected from the env switcher). Starting navigates to `/runs/:id`. Also offers "Use the full form" which opens the existing `StartRunForm` in a modal (all options incl. Demo options and patch name). |
| `/assistant` | Redirect (replace) to `/runs/new`. |
| `/assistant/:id` | Redirect (replace) to `/runs/:id`. |
| `/runs/:id` | Workspace, center = **conversation**. |
| `/runs/:id/live`, `/runs/:id/proof`, `/runs/:id/script` | Workspace, center = conversation, panel open on Live / Screens / Excel. (`script` is new; the other two keep their current URLs.) |
| `/runs/:id/scenarios`, `failures`, `report`, `workflow`, `process`, `changes`, `activity`, `research`, `data`, `scripts`, `technical` | Workspace, center = **detail view** for that tab (3.1.3), panel stays. |
| `/runs/:id/progress`, `cases`, `triage` | Legacy aliases, mapped as today (`LEGACY_TAB`). |
| `/runs/:id/team` | Alias of `/runs/:id/workflow` (the Team board). |

#### 3.1.1 Wireframe (desktop, center column)

```

TOP BAR: Procure-to-Pay · 26C · 17 Oct 11:24 | Practice environment · Quick simulation · ref | (o) Testing | All details v | Cancel test run | [panel]

-------------------------------------------------------------------------------------------------------------------------

 [!] Reminder: <r.attention>                                         (amber Alert, data-testid="attention", only if set)



                (you) Test Procure-to-Pay · quick simulation · Practice environment

 (AI)  On it. This is test run Procure-to-Pay · 26C · 17 Oct 11:24. The team:

       +--------------------------------------------------------------------------------+

       | TEAM  ✓ Scout  ✓ Research  ✓ Synthesizer  ✓ Test designer  (o) Approval  ...  |  TeamStrip, 1 line, scrolls

       |       9 of 15 done · 1 waiting for you                     Open the team board>|

       +--------------------------------------------------------------------------------+

 ───────────────────────────── YOUR APPROVAL ─────────────────────────────

 (AI) +--------------------------------------------------------------------------------+  <- data-testid="run-guide"

      | STAGE 2 OF 4 · APPROVE                                                          |     data-stage="approve"

      | 79 scenarios are ready to test                                                  |

      | A scenario is one business check... 75 of them cover something this patch     |

      | changes. 2 are new scenarios written by the AI model that passed a dry run.    |

      | [ Approve all 79 and start testing -> ]                                        |

      | Let me look at them first   [Download the test script (Excel)]                 |

      +--------------------------------------------------------------------------------+

 ───────────────────────────── TESTING ─────────────────────────────────

   ...

 ------------------------------------------------------------------------------------------

 COMPOSER: [Status] [Approve all] [Cancel]                                                 (suggestion chips)

           [ Tell the co-worker what to do, for example "status"                    (>) ]

           Have a question about the patch? Ask a question (Ctrl K)

```

#### 3.1.2 Conversation content

> *Amended by UI-SIMPLIFY 3.2:* the kicker becomes the sentence-case line "Step 2 of 4: approve the scenarios"; the progress bar is neutral with an accent current segment; phase separators are sentence case; the result card has no filled verdict band.

The thread is the current `Conversation` component (AssistantPage.tsx) with these changes:

1. **Stage progress line** replaces the Mantine `Stepper` (which breaks at 390px): a 4-segment bar in the current-stage card header,
   text "Stage 2 of 4 · Approve" (11px uppercase), segments coloured done / current / todo. `aria-label="Progress of this test run: stage 2
   of 4, Approve"`.
2. **The current-stage card is the guide.** Exactly one element in the thread has `data-testid="run-guide"` and `data-stage` =
   `guideStage(...)` (`prepare | approve | testing | judge | result | stopped`). It renders the existing `Prepare`, `Approve`, `Testing`,
   `Judge`, `Result`, `Stopped` components from `RunGuide.tsx` unchanged in behaviour (all their test ids stay: `guide-approve-all`,
   `excel-script`, `guide-progress`, `no-live-note`, `guide-failure-<case>`, `guide-submit-decisions`, `guide-result`, `guide-ai-count`,
   `guide-judge-count`). In `prepare` the card shows `Prepare` (the three ticks) instead of only the typing dots. `RunGuide` itself stays
   exported for any other caller and renders the same card standalone.
3. **Past stages collapse to summaries** (as today: "I chose 79 scenarios and asked for your approval" + Excel chip; "Approved. Start
   testing."; "Testing finished: 64 passed, 1 failed, 14 not run").
4. **Team strip** (`TeamStrip`, 5.2) replaces the long `AgentSteps` grid: one line of agent chips (icon + name), done ones collapse into
   "9 done" when the line overflows; running agent pulses; waiting one is amber "Approval: waiting for you". "Open the team board" →
   `/runs/:id/workflow`. The full list (old `AgentSteps`, `data-testid="agent-feed"`) is in an expander "Show every step".
5. **Evidence hooks in the thread**: the Testing card gets "Watch live" (opens panel Live) when a browser run; the Judge card gets "See the
   failed screen" (sets `?scenario`, opens Screens) next to "We expected / What happened"; the Approve card's "Let me look at them first"
   expands the full `ScenarioReview` inline as today **and** each scenario row gets "Show steps" (panel Steps).
6. **Composer** is the current one (`assistant-input`, suggestions, same command understanding: status, approve, cancel, report, screens,
   new). Placeholder: `Tell the co-worker what to do, for example "status"`. Under it, 12px dim: "Have a question about the patch? Ask a
   question (Ctrl K)" where the link calls `chat.focusInput()`. Typed notes stay local to the stage as today.
7. **Run notes**: the "Add a note for the team (saved to the audit log)" box (`NoteBox`, permission `run.note`) moves from the Activity tab
   to the composer as a second mode: a small segmented toggle left of the input, "Command | Team note". In Team note mode the send button
   posts to `/api/runs/:id/notes` exactly like `NoteBox`. NoteBox also stays in the Activity view.
8. Autoscroll/"Latest" jump button behaviour unchanged.

States:

| State | Center | Top bar chip | Sidebar row |
|---|---|---|---|
| loading | typing bubble "Opening the test run..." (existing) | skeleton chip | - |
| error (run not found / 403) | `ErrorAlert` + "Back to test runs" | none | - |
| queued / prepare | Prepare card with ticks; typing dots | blue "Starting" | blue dot |
| waiting_approval | Approve card, amber left border 3px | amber "Waiting for your scenario review" | amber ring + "Review" badge |

| running / testing | Testing card with progress, Watch live | blue pulsing "Testing" | blue pulsing dot |

| waiting_review | Judge card, amber left border | amber "Waiting for your failure review" | amber ring + "Decide" badge |
| completed | Result card (verdict band), "What next?" chips | green/red/amber decision badge | green / red / amber dot + "Ready" / "Not ready" / "On hold" |
| failed / killed / cancelled / interrupted | Stopped card with reason and "Carry on from where it stopped" (run.control) | red/grey "Stopped" | red (failed, killed) / grey (cancelled) / amber (interrupted) dot |

Copy (new strings only; everything else stays as in RunGuide):
- Stage card kicker: "Stage 1 of 4 · Prepare", "Stage 2 of 4 · Approve", "Stage 3 of 4 · Testing", "Stage 3 of 4 · Your decision",
  "Stage 4 of 4 · Result".
- Team strip summary: "{done} of {total} steps done", "· 1 waiting for you", "· 1 stopped".
- Intake "Where?" question: "Where should I test?" chips: "Local mock pod · practice" / "<pod name> · Oracle Fusion".

Keyboard and accessibility:
- Thread is `role="log"` `aria-live="polite"` `aria-label="Conversation"` (currently the scroll container has the label; keep
  `data-testid="assistant-thread"` on the inner list and `data-testid="assistant-page"` on the workspace root).
- `Alt+1` focus the thread, `Alt+2` focus the composer, `Alt+3` focus the panel tabs. Documented in the Glossary popover footer.
- The primary button of the current stage card receives focus when the stage changes to `approve` or `judge` **only if** focus was in
  the thread or on `body` (never steal focus from the composer or a form field).
- Stage changes are announced via a visually hidden `role="status"` line: "Waiting for your approval: 79 scenarios".

#### 3.1.3 Detail views (the former tabs)

Rendered in the center instead of the conversation, below the top bar, with a 40px sub-header row:
`[<- Conversation]  Scenarios · your review     (view switcher: Scenarios | Failures | Team | Report | More v)`.
`← Conversation` navigates to `/runs/:id`. The view switcher is a Mantine `Tabs` (variant pills, radius xl, size sm) with the same values
as today (`scenarios`, `failures`, `workflow` labelled "Team", `report` labelled "Report & sign-off") and a "More" menu with the same items
as today (By business process, What the patch changes, Activity log; admin group "Engineering views (admin)": Coverage map, Data plan,
Scripts, Technical report). The "• your review" suffixes on Scenarios/Failures stay. Live and Screens are not in this switcher any more:
they are panel tabs (the "Live" and "Screens" items remain in the "All details" menu, which opens the panel on them).

Below the sub-header, for detail views only: `NextStep` (`data-testid="next-step"`) and `NowTesting` (`data-testid="now-testing"`), as today.

#### 3.1.4 "All details" menu (top bar)

`data-testid="all-details"`, Mantine `Menu`, items in this order: Watch the test live (browser runs; opens panel Live) · Screens (opens
panel Screens) · Scenarios · Failures · Team board · Report and sign-off · Excel test script (panel) · By business process · What the patch
changes · Activity log · label "Engineering views (admin)" · Coverage map · Data plan · Scripts · Technical report. Menu item names
"Activity log", "Scenarios", "Failures", "Report and sign-off" must stay verbatim (e2e).

### 3.2 Team board (upgrade of the Workflow tab, `/runs/:id/workflow`)

> *Amended by UI-SIMPLIFY 3.4 and UI-REVIEW-2:* neutral avatars, no coloured phase borders, colour only on waiting / failed / paused cards. The engine label is what actually ran. Columns follow the container width.

Purpose: the 15 agents as teammates of a team lead ("Coordinator"), each with live state, last action, and flags for failed or silent ones.

```

+------------------------------------------------------------------------------------------------------+

| (C) Coordinator · leads the team                         9 of 15 done · 1 waiting for you · 0 stopped |

|     "Waiting for you: approve the scenarios"                         [Open scenario review]          |

+------------------------------------------------------------------------------------------------------+

| 1 UNDERSTAND        | 2 CHOOSE           | 3 PREPARE          | 4 TEST             | 5 ANALYSE          | 6 REPORT |

| +----------------+  | +----------------+ | +----------------+ | +----------------+ | +----------------+ | ...      |

| |(Sc) Scout   ✓  |  | |(TD) Test       | | |(DP) Data       | | |(TR) Test runner| | |(FA) Failure    | |          |

| |Read the test   |  | |  designer  ✓   | | |  planner  ...  | | |  (*) Working   | | |  analysis      | |          |

| |environment     |  | |Chose 79        | | |                | | | 65 of 79 tested| | |  Not started   | |          |

| |Built-in rules  |  | |scenarios       | | |                | | | 2 min ago      | | |                | |          |

| |12 s · 11:24    |  | +----------------+ | +----------------+ | +----------------+ | +----------------+ |          |

| +----------------+  | +----------------+ |                    | +----------------+ | +----------------+ |          |

| ...                 | |(Ap) Approval   | |                    | |(SH) Self-heal  | | |(YR) Your review| |          |

|                     | | YOU · Waiting  | |                    | | Not needed     | | | YOU            | |          |

|                     | | [Approve ->]   | |                    | +----------------+ | +----------------+ |          |

|                     | +----------------+ |                    | ↻ A failed scenario is tried once more   |          |

+------------------------------------------------------------------------------------------------------+

 Legend: ✓ Done · (*) Working now · (o) Waiting for you · ( ) Not started · (x) Failed · (!) No news for 3 min · – Not needed

```

- Root keeps `data-testid="run-workflow"`; each card keeps `data-testid="flow-<node>"`; phases from `LAYOUT` (GraphView) and words from
  `STEP_WORDS` and `PHASE_WORDS` as today.
- **AgentCard** (5.2): 2-letter avatar on the agent's engine tone (mint = built-in rules, blue = local AI model, lav = external AI model,
  amber = you), name, one-line job in the past tense when done ("Chose 79 scenarios") built from the agent's last `finished` event summary
  (`n_cases`, `n_scenarios`, `ms` etc.; fall back to the `STEP_WORDS` sentence), state chip, "took 12 s · finished 11:24" footer, engine
  label in consultant words ("Built-in rules", "Local AI model", "External AI model", "You").
- **Human gate cards** (`approval_gate`, `human_review`) carry the "YOU" tag and, when waiting, the action button ("Open scenario review" /
  "Open failure review") with the existing permission checks.
- **Silent flag** (AionUi's "silent agents escalate"): if an agent has been `running` and the run stream has delivered no event for that
  run for 3 minutes (client-side, from `useRunStream` timestamps; for quick simulations 60 s), the card shows an amber "(!) No news for
  3 min" chip and the Coordinator header says "Scout has been quiet for 3 min. It may be waiting on the test environment." No action button
  (there is no per-agent restart endpoint); for `run.control` holders, the header offers the run-level "Cancel test run" only.
- **Failed** (`error` state): red card border-top, the error message from the event summary (first 200 chars), and for `failed` /
  `interrupted` runs the run-level "Resume" (run.control).
- **Click a card** → a popover (desktop) / sheet (phone) "What Scout did" listing that agent's events from the stream (the existing
  `FeedCard` rendering filtered by `node`), plus "What this agent does" (`AgentDef.job`).
- Retry note under Test phase stays: "A failed scenario is tried once more".
- Columns: 6 at >= 1280 (min 150px each, horizontal scroll inside the board if the panel leaves less); 3x2 grid at 768-1279; one column
  (phases as sections) on phone.
- States: loading = 6 skeleton columns; empty (no events yet) = all cards "Not started" + Coordinator "Starting the agents..."; stopped =
  Coordinator header red "This test run stopped: <reason>"; done = header green "All steps finished in 4 min 12 s".
- A11y: board is `role="list"` of phases (`aria-label="<Phase>: <state words>"` as today), each card `role="listitem"` with
  `aria-label="<Agent>: <state words>"`; card is a button (Enter/Space opens the popover). State is never colour-only (icon + words).
- The admin-only **Agent team** page (`/agents`, `AgentTeamPage`) is unchanged in function; restyle with the same `AgentCard` (static mode).

### 3.3 Approvals (scenario review, `/runs/:id/scenarios` and inline in the Approve card)

```

+--------------------------------------------------------------------------------------------+

| Read the scenarios by process step, then approve them or skip them for this patch.         |

| [All 79] [Changed by the patch 75] [Written by the AI model 2] [Critical 12]   Search [   ]|  filter chips (client side)

|                                                                                            |

| WRITTEN BY THE AI MODEL (2)                                                                |

| +-------------------------------------------+ +-------------------------------------------+|

| | (lav) Written by the AI model · Critical  | | ...                                       ||  ApprovalCard

| | Requisition below threshold approved by   | |                                           ||

| | the first approver                        | |                                           ||

| | ✓ Dry run passed on Local mock pod        | |                                           ||

| |   17 Oct 11:23                            | |                                           ||

| | 7 steps · from Oracle's standard screen   | |                                           ||

| | labels, no client data sent               | |                                           ||

| | [Show steps]           [Skip] [Approve]   | |                                           ||

| +-------------------------------------------+ +-------------------------------------------+|

| Written by the AI model, not offered (1) v   (failed dry run, collapsed, data-testid ai-not-runnable)

|                                                                                            |

| NEW OR CHANGED BY THIS PATCH (75)                                                          |

| > Invoice / AP matching   20 scenarios · 0 approved                      [Approve all 20]  |  existing accordion

| > Requisition             7 scenarios · 0 approved                       [Approve all 7]   |

| ...                                                                                        |

| > Unchanged (4)  Library scenarios this patch does not touch: 0 approved [Approve all 4 unchanged]

|                                                                                            |

| +----------------------------------------------------------------------------------------+ |

| | 2 of 79 approved · 77 not decided yet     [Approve the remaining 77]   [Submit review] | |  sticky bar (review-bar)

| +----------------------------------------------------------------------------------------+ |

+--------------------------------------------------------------------------------------------+

```

- Behaviour is the existing `ScenarioReview` (decisions map, notes, `approve` mutation with approved / rejected / comments). Additions are
  presentation only:
  - **Filter chips** (client side over `toReview`): All, Changed by the patch, Written by the AI model, Critical. Filtering never changes
    decisions; the sticky bar always counts all pending ids.

  - **AI-written scenarios** move to a card grid at the top (2 columns >= 1280, 1 column below), `ApprovalCard` (5.2). The card shows the

    origin pill, priority, title, `DryRunLine` result with an icon (green check "passed", red x "failed", grey "simulated: no browser, not on

    a pod"), model name when known, step count, and the Approve / Skip for this patch toggle (same aria-labels as `ScenarioCard`:

    "Approve <title>", "Skip <title> for this patch"). "Show steps" opens the panel Steps tab. The card also stays reachable in its process

    step group (it is listed in both places; the same decision state).

  - Each `ScenarioCard` row gets a "Show steps" icon button (aria-label "Show the steps of <title> in the side panel") before the

    Approve/Skip group. The inline expand (chevron) keeps working.

  - Not-offered AI drafts (`NotRunnable`) collapse under "Written by the AI model, not offered (n)" with a red count; expanded content

    unchanged.

- Sticky bar: unchanged text and logic (`review-bar`, `review-count`, "Approve the remaining N", "Submit review" disabled until every

  scenario is decided, success line "Review recorded; testing continues."). On phone it sits above the bottom bar.

- Permission: `gate.approve_cases`, fallback alert unchanged.

- States: loading "Loading scenarios..." (skeleton); empty pending + not waiting: "Scenarios in this test run (n)" read-only list (as today);

  done (approved): success line and the read-only list; error: `ErrorAlert`.

- Keyboard: within a step group, Up/Down move between rows (roving tabindex on the row title button), `A` approve, `S` skip the focused row

  (only when focus is on a row; announced in the group's description "Keys: A approve, S skip"). Buttons keep `aria-pressed`.


### 3.4 Failure decision (Judge card, `/runs/:id/failures`)

Conversation card (existing `Judge`, one failure at a time) with a layout upgrade:

```

+------------------------------------------------------------------------------------------+

| STAGE 3 OF 4 · YOUR DECISION                                        [1 of 2] (amber pill)|

| One scenario needs your decision                                                         |

| +---------------------------------------------+ +--------------------------------------+ |

| | Three-way match blocks an invoice above the | | [screen at the moment it failed]     | |

| | PO price                                    | |  (from evidence; click = full size)  | |

| | It stopped at: Validate invoice             | |  See all screens ->                  | |

| | We expected: Matched     What happened: ... | +--------------------------------------+ |

| | Our suggestion: Looks like a real defect    |                                          |

| | Is this a real problem?                     |                                          |

| | (•) Yes, this is a real defect · suggested  |                                          |

| | ( ) No, not a defect                        |                                          |

| | ( ) The patch changed this on purpose       |                                          |

| +---------------------------------------------+                                          |

| [<- Back]                                              [Next ->] / [Submit my 2 decisions]|

| Want the full picture first? Open all failure details.                                   |

+------------------------------------------------------------------------------------------+

```

- Right column (>= 1024 only; below it stacks under the text): the failed scenario's last screenshot from `useEvidence(id)` (latest attempt
  image of that `case_id`), or for quick simulations an `EmptyState` "Quick simulations don't open a browser, so there is no screen."
  "See all screens" opens panel Screens filtered to failed. If no evidence yet: nothing (no empty box).
- Unchanged: three choices with `role="radio"` and the exact labels, the suggestion preselected, the flaky "Who should look into it?" owner
  field, Back / Next / Submit (`guide-submit-decisions`), permission `gate.human_review`, link "Open all failure details" → `/runs/:id/failures`.
- `/runs/:id/failures` detail view = existing `FailureReview` (all failures at once, with verdict radio, owner, waiver reference for P2 real
  defects, note, "Submit failure review"), restyled as cards with the same screen thumbnail column.
- States: loading "Loading the failures..."; empty "Nothing is waiting for your decision."; done "Decisions recorded. Tickets are raised
  for confirmed defects."; error `ErrorAlert`.

### 3.5 Result and report

**Result card** (conversation, existing `Result`): a full-width verdict band (green / red / amber background from the pill tokens,
`data-testid="guide-result"`), 22px/600 verdict word, one sentence, the bullet facts (tested, failing, not run, defects with link to
Defects, gaps, signed off by), actions: "Open the report and sign off" (primary), "Download the results (Excel)", "See the screens" (browser
runs; opens panel Screens; the link to `/runs/:id/proof` stays as its href), then the honesty line (practice vs Fusion pod) unchanged.
"What next?" chips: "Test another business area" (`data-testid="chat-new"`, → `/runs/new`), "Open the full test run" is removed (you are
in it) and replaced by "Open the team board".

**Report & sign-off** (`/runs/:id/report`, existing `SignOffReport`), reading layout, max width 880px:

```

Report & sign-off

+--------------------------------------------------------------------------------+

| Procure-to-Pay   [Not ready]                 [Download PDF] [Share] [Downloads v]|

| Not ready: at least one required check failed on the mock app. ...            |   decision-explained

+--------------------------------------------------------------------------------+

| Results by business process   (table, process-summary)                         |

| Open defects                                                                   |

| Not covered yet  (gaps-summary)   See what this patch changes ->               |

+--------------------------------------------------------------------------------+

| Sign-off  (signoff)  comment [                ]  [Sign off this report]        |

+--------------------------------------------------------------------------------+

| > Audit details (exact rule result, criteria C1-C6, executive summary)         |

+--------------------------------------------------------------------------------+

| Practice environment: these results come from the mock app, not Oracle Fusion.|

+--------------------------------------------------------------------------------+

```

- New "Downloads" menu (per business area) lists every file the technical report offers: Markdown, HTML, PDF, run-summary.json (same hrefs
  as `RunReport`), and the Excel results. The technical report view (`/runs/:id/technical`) keeps its own links, evidence list and the
  admin "Delete this run's evidence" (`data-testid="delete-evidence"`) unchanged.
- Everything else unchanged: `pdf-link`, Share (copy link), `decision-explained`, `process-summary`, `gaps-summary`, `signoff`,
  "Sign off this report", "Audit details" button, `exec-summary`, `criteria` table, `rule-result`, the HTML report iframe titled
  "<MOD> go/no-go report".
- States: before completion `Alert` "The report appears when the test run has finished. Current status: ..." (unchanged); signed: green
  line "Signed off by <name> on <date>" and the form disabled.

### 3.6 Patch readiness home ("release cockpit", `/`)

> *Superseded by UI-SIMPLIFY 3.8:* no KPI tiles, no tinted release band, no separate Needs-you box. Each area shows its **last finished verdict** plus a line for a newer in-progress run.

```

TOP BAR: Patch readiness              [Environment: Local mock pod v] [Patch: latest v] [+ New test run]

-------------------------------------------------------------------------------------------------------

+--------------------------------------------------------------------------------------------------+

| ORACLE UPDATE 26C · pod release 26C (checked 17 Oct 11:20) · Next update: 2 Jan 2027 (if known)  |  ReleaseStrip

| Practice environment: results say nothing about a real Oracle Fusion pod.                        |

+--------------------------------------------------------------------------------------------------+

| [ 0 Ready ] [ 1 Not ready ] [ 1 Waiting for you ] [ 3 Not tested yet ]                           |  KPI tiles = filters

+--------------------------------------------------------------------------------------------------+

| NEEDS YOU                                                                                        |

| (o) Procure-to-Pay · 26C · 11:24 — 79 scenarios waiting for your approval      [Open your review] |

+--------------------------------------------------------------------------------------------------+

| BUSINESS AREAS                                                                                   |

| +------------------------------------------+ +------------------------------------------+        |

| | Procure-to-Pay              [Not ready]  | | Order-to-Cash          [Not tested yet]  |        |  ModuleCard (existing)

| | 1 scenario failing in Invoice / AP ...   | | Not tested yet for this environment ...  |        |  2 columns >= 1280

| | (process chips)                          | | [Start a test run]                        |        |

| | [See the failures] [Open the test run]   | |                                          |        |

| +------------------------------------------+ +------------------------------------------+        |

| > What this patch changes   19 change areas · 9 not covered by a test yet                       |  existing accordion

| (?) What do these words mean?                                                                    |

+--------------------------------------------------------------------------------------------------+

```

- **ReleaseStrip**: patch label = selected patch or latest from `useReadiness().patches`; pod release from `usePodProfile().about.release`
  (already used on Test runs); last checked from `usePatchWatch().last_checked_at` when available; **"Next update" is shown only if a date is

  available** (see 7.1, optional field); otherwise the strip omits it (never guess dates). Env cue (practice / Fusion) uses `EnvBadge`.
- **KPI tiles**: counts of module verdicts from `useReadiness` (`m.verdict`): Ready, Not ready, Waiting for you, Testing, Not tested yet. A
  tile is a toggle button (`aria-pressed`) that filters the cards below (client side). Zero-count tiles are shown dimmed, not hidden.
- **Needs you list**: runs with `pending_gate` from `useRuns`, max 5, each with the gate in words and the action button to the right view.
  Hidden when empty.
- **Area cards**: existing `ModuleCard` unchanged in content (`readiness-<MOD>`, `verdict-<MOD>`, `summary-<MOD>`, `details-<MOD>`, process
  chips `step-<name>`), grid 2 columns >= 1280, 1 column below. Cards with no run get a "Start a test run" button (permission `run.start`)
  that opens `/runs/new?area=<MOD>`.
- New test run button keeps the accessible name "New test run" and still opens the `StartRunForm` modal (`?new=1`), because e2e drives the
  full form from here (`getByRole('main').getByRole('button', { name: 'New test run', exact: true })`). Keep this button inside `<main>`.
  (The sidebar "New test run" goes to the conversation intake; both coexist. The sidebar one is outside `<main>`, so the e2e locator
  stays unique.)
- Selectors: "Test environment" select keeps `aria-label="Test environment"`, "Patch" select keeps `aria-label="Patch"`. Default value =
  env switcher choice, else server default.
- Heading "Patch readiness" must remain an accessible heading (the top bar h1).
- States: loading = 2 skeleton cards; error `ErrorAlert`; empty (no modules) = `EmptyState` "No business areas found for this test
  environment. Check the environment's modules on Test environments." with link.

### 3.7 Test runs list (`/runs`)

```

TOP BAR: Test runs                    Testing on: Local mock pod · pod release 26C   (?) [+ New test run]

---------------------------------------------------------------------------------------------------------

 Getting started (existing 4-step card, hidden when all done)

 [All] [Needs you 1] [Running 1] [Finished 3] [Stopped 0]      Status: [all statuses v]   Area: [All v]

+-------------------------------------------------------------------------------------------------------+

| (o) Procure-to-Pay · 26C · 17 Oct 11:24   [Practice] [Quick simulation] [Waiting...] [your review] (...)|

|     started by admin · ref 2026...                                                                     |

| (✓) Procure-to-Pay · 26C · 17 Oct 11:20   [Practice] [Quick simulation] [finished] P2P [Not ready]  (...)|

+-------------------------------------------------------------------------------------------------------+

 79 item(s)                                                                         < 1 2 3 >

```

- Existing `RunsPage` content kept: rows `data-testid="run-row-<id>"`, links, `StatusBadge`, "your review" link, `DecisionBadge`s, the row
  menu (Open, Report, Resume, Cancel with permissions), status `Select` (`aria-label="Filter by status"`), `Pager`, query params
  `?module=` and `?waiting=1` and `?new=1`.
- Additions: segmented quick filters (map to `status` / `waiting=1`; "Running" = queued+running, "Finished" = completed, "Stopped" =
  failed+killed+cancelled+interrupted, client side over the current page), the `EnvBadge` per row (pod kind via `usePods` lookup of
  `pod_id`), a `StatusDot` replacing the module colour dot (module colour moves to a 3px left border of the row).
- Mobile: rows become 2-line cards; pills wrap; row menu stays.
- States: loading skeleton rows; empty "No test runs yet. Start one to test the patch." + New test run button; filtered empty "No test
  runs match this filter." + Clear filter.

### 3.8 Scenarios library (`/scenarios`)

- Existing filters (Business area, Process step, Priority, Search) move into a left filter column (220px) on >= 1280, a filter bar above the
  list below that. Table `aria-label="scenarios library"` unchanged.
- Clicking a row selects it (`?scenario=<id>`) and opens the context panel with only the **Steps** tab (same `SidePanel` component, tabs
  prop = `['steps']`), fed by `GET /api/scenarios/{case_id}`. On tablet/phone the panel is the drawer/sheet.
- Origin pills (Library / New / Written by the AI model) and verification ("not yet checked on a real Fusion pod") shown per row.
- States: loading skeleton; empty "No scenarios match these filters."; error `ErrorAlert`.

### 3.9 Test environments (`/pods`)

```

+----------------------------------------------+ +----------------------------------------------+

| [amber shield] PRACTICE ENVIRONMENT          | | [blue cloud] ORACLE FUSION POD               |

| Local mock pod                    (default)  | | ACME UAT                         [Enabled o] |

| http://127.0.0.1:3100 · test                 | | https://xxxx.fa.ocs.oraclecloud.com · uat    |

| Mock app, not Oracle Fusion                  | | Procure-to-Pay, Order-to-Cash                |

| ● Connected · checked 17 Oct 11:20           | | ○ Not checked yet                            |

| Sign-in details: 2 roles saved               | | Sign-in details: none saved                  |

| [Test connection] [Sign-in details]          | | [Test connection] [Sign-in details] [...]    |

+----------------------------------------------+ +----------------------------------------------+

[+ Add test environment]

```

- Same functions as `PodsPage`: Add pod form (Pod name, Pod URL, Environment type, Modules enabled on this pod, Notes; Save pod / Cancel),
  Sign-in details form (Module, Test username, Test password; Save sign-in / Cancel), Test connection (`pod-test-result`), Enabled switch,
  `data-testid="pod-<id>"`. Button labels unchanged ("Test connection", "Sign-in details"). The add button reads "Add test environment";
  no test uses "Add pod", but give it `aria-label="Add pod"` anyway so existing scripts keep finding it.
- Card header is the honesty cue: practice pods are amber "PRACTICE ENVIRONMENT" + "Mock app, not Oracle Fusion"; Fusion pods are blue
  "ORACLE FUSION POD". The default pod gets a "(default)" pill.
- Screen capture (`POST /api/pods/{id}/screens/capture`, no UI today): if another work stream adds a "Capture screens" action, it goes in
  the card's "..." menu with the same permission check. This redesign does not add it.
- States: loading skeleton cards; empty "No test environments yet. Add the practice pod or an Oracle Fusion test pod."; connection test
  running = button loading + "Testing the connection..."; failure = red line with the reason (`pod-test-result`).

### 3.10 Settings (`/admin`)

- Two-pane: vertical tab list on the left (200px, Mantine `Tabs orientation="vertical"`), content on the right (max 960px). Below 1024 the
  tab list becomes the current horizontal pill list. Tabs and their **accessible names stay exactly**: "AI models", "Users",
  "Schedules", "Automatic approval", "Emergency stop", "Advanced". `?tab=` param unchanged.
- **AI models (one place)**: top explainer card (unchanged copy); then a two-column grid "Local model" (`aria-label="Local model"`) and
  "External model" (`aria-label="External model"`) cards (unchanged controls, test buttons, key handling, `llm-local-active`,
  `llm-external-active`, `llm-key-state`, `llm-test-result`, label "API key", buttons "Save key", "Remove", "Test"); then **"Which agent uses

  which model"**: a read-only table built client-side from `AGENTS` (`agents.ts` engine) joined with the `routing` rows: Agent · Job · Uses
  (Built-in rules / Local model now: <active.local> / External model now: <active.external> / You) · Data it sees. Then the existing "What
  goes where" table. No new endpoint.
- **Schedules** tab shows the new Scheduled runs screen (3.11) embedded (`.fpt-embedded`).
- **Emergency stop**: unchanged controls (`kill-state`, label "Reason", "Engage kill switch", "Release"), with a red-bordered danger zone
  card.
- **Advanced**: the AdvCard links unchanged (names "Agent team", "Self-heal review", "Scripts & drafts", "Learner", "Audit log", "Autonomy
  (full page)").

### 3.11 Scheduled runs (`/schedules`, also `/admin?tab=schedules` and `/admin/scheduler`)

AionUi pattern: a list of scheduled tasks with status, next run and an enable switch, and a details drawer to create or edit.

```

TOP BAR: Scheduled runs                                                     [+ New scheduled run]

+-------------------------------------------------------------------------------------------------+

| PATCH WATCH                                                                                     |

| Looks for a new Oracle release on the pod. Last seen 26C at 17 Oct 11:20.   [Enabled o] [Check now]|

| Start a test run automatically when a new release appears  [o]   Check every [300] seconds       |

+-------------------------------------------------------------------------------------------------+

| +---------------------------------------------------------------------------------------------+ |

| | (clock) Every day at 02:00 UTC (07:30 your time)          Procure-to-Pay · Full browser run  | |

| |         Next run: 18 Oct 07:30 your time                    [Enabled o]* [Run now]* [...]    | |

| +---------------------------------------------------------------------------------------------+ |

| | (clock) Every 6 hours                                     All areas · Quick simulation       | |

| +---------------------------------------------------------------------------------------------+ |

+-------------------------------------------------------------------------------------------------+

 * shown only when the backend supports it (7.1)



DRAWER (right, 420px): New scheduled run

  Repeat:  ( Every day )( Every few hours )( Once )*( Cron )*        SegmentedControl

  Every day  -> Time [02:00]  shown as "UTC" with "= 07:30 your time" helper

  Every few hours -> Every [6] [hours v | minutes]   (converted to every_minutes)

  Once*  -> Date and time [ ]                         (needs backend kind "once")

  Cron*  -> Expression [0 2 * * 1-5]  Time zone [Asia/Kolkata v]  "Runs at 02:00 Mon-Fri" preview (needs backend kind "cron")

  Business areas [Procure-to-Pay x] [+]

  How   ( Quick simulation (no browser) )( Full browser run )

  [Cancel]                                  [Save scheduled run]

```

- Today's API: `GET/POST /api/schedules` (kind `daily` with `at` HH:MM UTC, or `interval` with `every_minutes`), `DELETE
  /api/schedules/{sid}`; patch watch `GET/PUT /api/patch-watch`, `POST /api/patch-watch/check`. Step 7 ships with exactly these:
  Every day, Every few hours, delete (in the "..." menu, with a confirm), patch watch controls. All admin-gated as today (`Can perm="admin"`).
- Human wording: "daily 02:00" → "Every day at 02:00 UTC (07:30 your time)"; "every 1440 min" → "Every day"; `stub` → "Quick simulation";
  `live` → "Full browser run"; empty modules → "All areas".
- Items marked * (Once, Cron, Enabled switch per schedule, Run now, Edit) appear only when the backend supports them (7.1). The developer
  feature-detects by a `schedules_v2: true` flag on `GET /api/config` (or the presence of the new fields in the schedule rows) and hides
  them otherwise.
- No test uses the old SchedulerPage labels. Keep `aria-label="schedules"` on the list container so the region stays findable.
- States: empty "No scheduled runs yet. Schedule one to test every night or after each update."; loading skeleton; error `ErrorAlert`.

### 3.12 Defects (`/tickets`), Reports (`/reports`), engineering views

- Restyle only: top bar, `.fpt-card` table containers, `EmptyState`s. Table names `aria-label="tickets"`, `aria-label="reports"` unchanged.
  Reports rows get the `EnvBadge` and `DecisionBadge`.
- `/agents`, `/heal`, `/scripts`, `/learner`, `/audit`, `/admin/kill-switch`, `/admin/autonomy`, `/admin/scheduler`, `/admin/users`:
  unchanged content inside the new shell.

### 3.13 Sign-in, register, forgot, reset

Keep the split layout (`AuthShell`); it already tests well. Small improvements:
- The right side gets dark-mode tokens (it is `--fpt-surface` already; check inputs in dark).
- The `MockBanner` above the form stays (`data-testid="mock-banner"`).
- Phone: the brand panel shrinks to a 64px strip (logo + name) as today; the form gets 20px gutters.
- No copy changes. Labels "Username", "Password", button "Sign in", links "Forgot your password?", "Create an account" unchanged.

---

## 4. Design tokens

Keep every existing token name in `styles.css` (`--fpt-*`, `--pill-*`, the ink Mantine overrides). Change values only where noted; add new
tokens below. All text pairs verified (WCAG 2.1 contrast, computed):

### 4.1 Colour

> *Superseded by UI-SIMPLIFY.md section 2:* neutral greys, a single blue accent `#2b59c3` / `#8ea8f0`, and status colours only for verdicts, waiting-for-you, failures and the practice warning. "Running" is neutral. The Fusion pod cue is neutral, not blue.

| Token | Light | Dark | Use / contrast |
|---|---|---|---|
| `--fpt-page` | #e9f0ee (unchanged) | #0c1110 | app background behind panels (now only visible in gaps) |
| `--fpt-sidebar` (new) | #eef3f1 | #101615 | sidebar background. Text #1b1f1e on it 14.9:1; dim #5d6966 5.1:1 |
| `--fpt-surface` | #ffffff | #151b1a | center, panel |
| `--fpt-surface-2` | #f6f9f8 | #1b2321 | hover rows, inset cards |
| `--fpt-border` | #e3e9e7 | #29322f | 1px separators |
| `--fpt-text` | #1b1f1e | #e7eceb (15.3:1 on #101615) | body text |
| `--fpt-dim` | **#5d6966** (was #6b7673: 4.07:1 on page, failed) → 5.7:1 on white, 4.9:1 on page | #98a5a1 (6.8:1) | secondary text |
| `--fpt-ink` / `--fpt-ink-text` | #111111 / #ffffff | #eef2f0 / #111111 | primary buttons, active nav |
| `--fpt-focus` (new) | #4b6fd8 (4.6:1 on white) | #8fa8f0 (7.5:1) | focus ring (replace hard-coded `:focus-visible` colour) |
| `--fpt-status-running` (new) | #1c7ed6 (4.2:1, graphics >= 3:1) | #4dabf7 | StatusDot, running borders |
| `--fpt-status-waiting` (new) | #c76a00 (3.8:1) | #f59f00 | waiting for you (replaces #f08c00, 2.3:1, too light for a dot) |
| `--fpt-status-done` (new) | #2f9e44 (3.5:1) | #51cf66 | passed / done |
| `--fpt-status-failed` (new) | #c92a2a (5.5:1) | #ff6b6b | failed / stopped with error |
| `--fpt-status-idle` (new) | #868e96 (3.3:1) | #909a97 | queued, cancelled, not started |
| `--fpt-env-practice-bg/fg` (new, alias) | `var(--pill-amber-bg)` / `var(--pill-amber-fg)` (6.3:1) | same aliases | Practice environment cue |
| `--fpt-env-fusion-bg/fg` (new, alias) | `var(--pill-blue-bg)` / `var(--pill-blue-fg)` (7.0:1) | same | Oracle Fusion pod cue |
| `--fpt-band` | unchanged | unchanged | no longer used by the shell (the gradient header band goes); used only as the `ReleaseStrip` background |
| pill tones | unchanged | unchanged | all >= 4.5:1 already |

Status is never conveyed by colour alone: every dot has an icon or words next to it, or an `aria-label`/tooltip.

### 4.2 Type (Poppins stays; sizes nudged up for readability)

> *Amended:* weights 400 and 600 only; no uppercase or letter-spaced labels anywhere (UI-SIMPLIFY 2.4).

| Mantine size | Old | New | Use |
|---|---|---|---|
| `xs` | 11px | 11.5px | meta, pills |
| `sm` | 12.5px | 13px | secondary text, table cells |
| `md` | 13.5px | 14px | body, chat bubbles |
| `lg` | 15px | 16px | card titles |
| `xl` | 18px | 20px | verdict words, page section titles |

Headings: top-bar h1 16px/600 line-height 1.3; stage card title 18px/500; verdict 22px/600. Line-height body 1.5. Numbers in tables use
`font-variant-numeric: tabular-nums`. Monospace (ids, cron) `ui-monospace, SFMono-Regular, Menlo, Consolas, monospace` 12px.

### 4.3 Spacing, radii, shadows, motion

- Spacing scale (CSS vars, also Mantine `spacing`): `--fpt-space-1` 4px, `-2` 8px, `-3` 12px, `-4` 16px, `-5` 20px, `-6` 24px, `-8` 32px.
  Mantine `spacing: { xs: 8, sm: 12, md: 16, lg: 20, xl: 24 }` (px).
- Density: sidebar rows 34px, run list rows 44px (2 lines), table rows 36px, top bar 52px, panel tab row 40px, bottom bar 56px.
  Minimum touch target on phone 44x44px.
- Radii (unchanged Mantine radius map): xs 6, sm 8, md 10, lg 14, xl 999. Cards 12px (`.fpt-card`), stage cards 14px, pills 999px.
- Shadows (new): `--fpt-shadow-1: 0 1px 2px rgba(0,0,0,.05)` (cards on hover), `--fpt-shadow-2: 0 4px 14px rgba(0,0,0,.10)` (menus,
  sticky bars), `--fpt-shadow-3: 0 12px 32px rgba(0,0,0,.18)` (drawers, overlay sidebar). Dark: same offsets, alpha x2.
- Motion: `--fpt-ease: cubic-bezier(.2,.8,.2,1)`; durations `--fpt-dur-1: 120ms` (hover, tab), `--fpt-dur-2: 200ms` (panel collapse,
  sidebar rail), `--fpt-dur-3: 280ms` (drawers). Live pulse 1.2s. All motion disabled under `prefers-reduced-motion` (existing rule kept).
  Panel resize has no animation.

### 4.4 Mantine mapping (`theme.ts`)

Keep `primaryColor: 'ink'`, `colors: { ink, mint, lavender }`, the component defaultProps. Change `fontSizes` (4.2) and add `spacing`
(4.3). Add `components.Drawer: { defaultProps: { radius: 'lg', overlayProps: { backgroundOpacity: 0.35 } } }`,
`components.Tabs: { defaultProps: { radius: 'md' } }` (unchanged), `components.Menu: { defaultProps: { radius: 'md', shadow: 'md' } }`.
`:focus-visible { outline: 2px solid var(--fpt-focus); outline-offset: 2px; }`.

---

## 5. Component inventory

### 5.1 Existing, reused as is (logic unchanged; restyle via CSS only)

`Pill`, `StatusBadge`, `DecisionBadge`, `RuleResult`, `Term`, `GlossaryButton`, `ErrorAlert`, `Pre`, `Diff`, `Pager`, `Can`,
`MockBanner` (still used on auth pages and the chat dock), `ModuleCard`, `PatchChanges`, `ProcessFlow`, `StepLegend`, `GraphView`,
`ScenarioReview`, `ScenarioCard`, `DryRunLine`, `FailureReview`, `SignOffReport`, `RunReport`, `RunResearch`, `RunData`, `RunScripts`,
`RunProof`, `LiveView`, `NowTesting`, `Prepare`/`Approve`/`Testing`/`Judge`/`Result`/`Stopped`/`RunGuide`, `StartRunForm`, `ChatDock`,
`ChatCards`, `AIModelsTab`, `UsersPage`, `AutonomyPage`, `KillSwitchPage`, `AuthShell`, all hooks in `api/hooks.ts`, `useRunStream`,
`nodeStates`, `runTitle`/`runShort`/`runAreas`, `STEP_WORDS`, `AGENTS`.

`PageHeader` keeps its props (`crumbs`, `title`, `children`, `extra`) but renders `TopBar` markup.

### 5.2 New components (file: `web/src/components/shell/*.tsx` unless noted)



```ts

// Status dot used everywhere a run or agent state is shown.

type RunState = 'queued' | 'running' | 'waiting' | 'done-ready' | 'done-notready' | 'done-held' | 'done' | 'failed' | 'stopped' | 'paused' | 'idle';

function StatusDot(props: { state: RunState; pulse?: boolean; size?: 8 | 10; label: string /* aria-label + title */ }): JSX.Element;

function runState(r: Pick<RunSummary, 'status' | 'pending_gate' | 'decision' | 'decisions'>): RunState;   // pure, unit-tested



// Sidebar row ("runs as conversations").

function RunListItem(props: {

  run: RunSummary; active: boolean; compact?: boolean;          // compact = rail mode (dot only + tooltip)

  envKind?: 'mock' | 'fusion';                                  // from usePods lookup of run.pod_id

}): JSX.Element;

// Renders <a href="/runs/:id"> with: StatusDot, title runAreas(run), sub-line "26C · 11:24 · Practice|Fusion",

// right badge: pending_gate approve_cases -> amber "Review"; human_review -> amber "Decide"; completed -> decision words pill.

// data-testid={`side-run-${run.run_id}`}, aria-current="page" when active, aria-label "<title>, <status words>".



function AppSidebar(props: { mode: 'expanded' | 'rail' | 'drawer'; onNavigate?: () => void }): JSX.Element;

function EnvSwitcher(props: { compact?: boolean }): JSX.Element;      // reads/writes prefs.env; keeps data-testid="mock-banner"

function EnvBadge(props: { kind: 'mock' | 'fusion'; name?: string | null; size?: 'xs' | 'sm' }): JSX.Element;

function TopBar(props: { title: ReactNode; sub?: ReactNode; middle?: ReactNode; actions?: ReactNode; titleTestId?: string }): JSX.Element;

function BottomBar(): JSX.Element;                                      // phone only (< 768)



// Right context panel.

type PanelTab = 'live' | 'screens' | 'report' | 'excel' | 'steps';

function SidePanel(props: {

  tabs: PanelTab[]; runId?: string; scenarioId?: string | null;

  render: Partial<Record<PanelTab, () => ReactNode>>;

  badges?: Partial<Record<PanelTab, ReactNode>>;

}): JSX.Element;

function useSidePanel(): {                                              // context provided by the workspace

  open: boolean; tab: PanelTab; width: number;

  show(tab: PanelTab, opts?: { scenario?: string }): void; hide(): void; toggle(): void; setWidth(px: number): void;

};

function useUiPrefs(): { prefs: UiPrefs; set(patch: Partial<UiPrefs>): void };   // localStorage fpt.ui.<username>, try/catch



function ReportSummary(props: { runId: string }): JSX.Element;          // panel Report tab

function ScenarioSteps(props: { runId?: string; scenarioId: string }): JSX.Element;   // panel Steps tab, also library

function ExcelPanel(props: { runId: string; finished: boolean }): JSX.Element;



// Run workspace.

function RunWorkspace(): JSX.Element;            // pages/RunWorkspace.tsx; owns routes /runs/new, /runs/:id[/:tab]

function StageCard(props: { stage: GuideStage; children: ReactNode }): JSX.Element;    // data-testid="run-guide" data-stage

function StageProgress(props: { stage: GuideStage }): JSX.Element;

function TeamStrip(props: { runId: string; finished: boolean }): JSX.Element;



// Team board.

function TeamBoard(props: { runId: string; status: string; gate?: string | null }): JSX.Element;   // replaces RunWorkflow body

function AgentCard(props: {

  agent: AgentDef; state: NodeState; lastEvent?: RunEvent; startedAt?: string; finishedAt?: string;

  silentForMs?: number; human?: boolean; action?: ReactNode; onOpen?: () => void; testId: string;

}): JSX.Element;

function CoordinatorCard(props: { runId: string; states: Record<string, { state: NodeState }>; status: string }): JSX.Element;



// Approvals.

function ApprovalCard(props: {

  s: Scenario; p?: PendingCase; decision?: Decision; onDecision?: (d: Decision) => void; onShowSteps: () => void; editable: boolean;

}): JSX.Element;

function FilterChips<T extends string>(props: { value: T; onChange: (v: T) => void; options: { value: T; label: string; count?: number }[]; label: string }): JSX.Element;



// Readiness.

function ReleaseStrip(props: { podId: number | null; patch: string | null }): JSX.Element;

function KpiTiles(props: { modules: ModuleReadiness[]; value: string | null; onChange: (verdict: string | null) => void }): JSX.Element;

function NeedsYouList(props: { limit?: number }): JSX.Element;



// Schedules.

function ScheduledRunsPage(): JSX.Element;       // pages/ScheduledRunsPage.tsx

function ScheduleCard(props: { s: Schedule; v2: boolean }): JSX.Element;

function ScheduleDrawer(props: { opened: boolean; onClose: () => void; v2: boolean; initial?: Schedule }): JSX.Element;



// Generic.

function EmptyState(props: { icon?: ReactNode; title: string; body?: ReactNode; action?: ReactNode; testId?: string }): JSX.Element;

```



---



## 6. Implementation plan



Rules for every step: no route removed; no endpoint call removed; every `data-testid`, accessible name and permission check in section 10

keeps working; `npm run lint`, `npm test` and the Playwright e2e (`web/e2e/coworker.e2e.ts`) pass after each step; screenshots at

1440x900 and 390x844, light and dark, of the touched screens go to the designer for review.



### Step 1. Tokens and shell (sidebar, top bar, full bleed)



- `styles.css`: new tokens (4.1, 4.3), `--fpt-dim` value change, focus token, shell classes `.fpt-shell`, `.fpt-sidebar`, `.fpt-topbar`,

  `.fpt-bottombar`, remove frame padding. `theme.ts`: font sizes, spacing, Drawer/Menu defaults.

- `Layout.tsx` → `AppSidebar` (nav, New test run, RUNS list with `RunListItem`, footer with `EnvSwitcher`, kill indicator, health badge,

  desktop settings, user row), `BottomBar` on phone, `useUiPrefs`.

- `PageHeader` renders `TopBar`.

- Route `/schedules` added now, pointing at the existing `SchedulerPage` (admin-gated, replaced in step 7).

Acceptance: all pages render inside the new shell at 4 breakpoints; sidebar run list shows Needs you / Running / Recent with correct dots

and badges and updates within the existing poll interval; rail mode and drawer mode work with keyboard; env switcher changes the

preselected pod in the New test run form; `mock-banner`, `kill-indicator`, `whoami`, `brand`, `chat-toggle` present; e2e passes.



### Step 2. Run workspace and context panel



- New `pages/RunWorkspace.tsx`; routes `/runs/new`, `/runs/:id`, `/runs/:id/:tab`; `/assistant` and `/assistant/:id` redirect.

- Conversation from `AssistantPage` moved into the workspace (keep `AssistantPage.tsx` exporting the pieces; `STEP_WORDS` export stays).

- `StageCard` (`run-guide` + `data-stage`), `StageProgress`, `TeamStrip`, composer with Team note mode.

- `SidePanel` with Live, Screens, Report, Excel, Steps; resize, collapse, prefs, `?scenario`, auto-switch rules.

- Detail views (former tabs) with `← Conversation` and the view switcher; "All details" menu in the top bar.

Acceptance: e2e run flow passes unchanged (guide stages approve → judge → result, "Let me look at them first", `excel-script` href,

`guide-approve-all`, `guide-failure-P2P-APR-001`, `guide-submit-decisions`, `guide-result`, All details → Activity log → `stream-mode`);

live e2e (`live-frame` img, honesty text, Fullscreen button) passes with the panel open on Live for `/runs/:id/live` and for `/runs/:id`

while testing; chat-dock e2e passes with the panel present (dock still `complementary` "Ask the co-worker", panel named "Run details");

panel width/tab persist per user across reloads; 390px shows the sheet.



### Step 3. Team board



- `TeamBoard`, `AgentCard`, `CoordinatorCard` replacing the body of `RunWorkflow` (keep the export name `RunWorkflow` as a wrapper).

- Silent flag (3 min / 60 s) and failed flag; agent popover with that agent's events.

- Restyle `/agents` with static `AgentCard`s.

Acceptance: `run-workflow` and every `flow-<node>` test id present; states match `nodeStates`; a stalled stream shows the silent flag after

the threshold (unit test with fake timers); keyboard opens/closes popovers; 3x2 and 1-column layouts correct.



### Step 4. Approvals and failure decision



- `ApprovalCard`, filter chips, "Show steps" on rows, AI section at the top, not-offered collapse; Judge card screen column; FailureReview

  cards with thumbnails.

Acceptance: unit tests in `components.test.tsx` that click "Approve all 2 Requisition scenarios", "Approve all 1 Invoice scenarios",

"Approve all 1 unchanged", "Submit review", "Skip Rejected requisition for this patch", "Unchanged (1)" pass unchanged; `review-count`,

`step-group-changed-Invoice`, `dry-run`, `ai-not-runnable`, `ai-failed-*` present; approve payload identical to before (unit test on the
mutation call).

### Step 5. Result, report, readiness cockpit

- Result card restyle; report Downloads menu; `ReleaseStrip`, `KpiTiles`, `NeedsYouList`, 2-column area grid.
Acceptance: report e2e (decision badge text + `data-rule`, `process-summary`, `gaps-summary`, Audit details, `criteria` C1, iframe text,
"Sign off this report") passes; readiness e2e ("What this patch changes" button, `change-*`, `readiness-P2P`, `summary-P2P`) passes;
"Next update" hidden when no date.

### Step 6. Lists, library, environments, settings

- Test runs filters + `EnvBadge`; Scenarios library filter column + panel Steps; Test environments cards; Settings vertical tabs + "Which
  agent uses which model" table; Defects/Reports restyle; auth pages dark-mode check.
Acceptance: e2e settings (API key save/remove, local Test, Advanced → Agent team, Emergency stop engage/release, Audit verify) and pods
("Test connection") pass; tables keep their aria-labels.

### Step 7. Scheduled runs screen (current API)

- `ScheduledRunsPage`, `ScheduleCard`, `ScheduleDrawer` with Every day / Every few hours; patch watch card; human wording; local-time helper.
  Embedded in Settings › Schedules and served at `/schedules` and `/admin/scheduler`.
Acceptance: create daily and interval schedules and delete them against the current API; v2 controls hidden; admin-only actions gated.

### Step 8 (needs backend, 7.1). Scheduled runs v2

- Once, Cron with time zone, per-schedule Enabled switch, Run now, Edit, name. Feature-detected.
Acceptance: each control round-trips through the new endpoints; with an old backend nothing v2 is shown.

---

## 7. Backend needs, out of scope, risks

### 7.1 Backend additions (only for step 8 and one optional field)

1. `POST /api/schedules`: accept `kind: "once"` with `run_at` (ISO datetime, UTC) and `kind: "cron"` with `cron` (5-field) and `tz` (IANA);
   optional `name` (max 60). `GET` returns these fields plus `enabled`.
2. `PATCH /api/schedules/{sid}`: `{ enabled?, name?, at?, every_minutes?, run_at?, cron?, tz?, modules?, playwright_mode? }` (admin).
3. `POST /api/schedules/{sid}/run-now` (admin): starts a run with the schedule's settings (same audit as a scheduled trigger).
4. `GET /api/config`: `schedules_v2: true` when 1-3 exist.
5. Optional: `next_release_date` (ISO date or null) on `GET /api/patch-watch` (or `/api/pod/profile.about`) if the team wants the cockpit to
   show the next Oracle update date. The UI never invents it.

No other endpoint is needed: the sidebar run list, panel, team board, filters and env switcher use existing queries.

### 7.2 Out of scope

- Multiple concurrent conversations per run, branching, or free-form LLM chat inside the run thread (the Ask dock remains the LLM chat).
- Per-agent restart/remove (AionUi's "one-click removal"): there is no per-node control in the workflow; only run-level cancel/resume.
- Changing the server default pod from the env switcher (stays on `/pods`, admin).
- Drag-and-drop ordering of runs, run pinning, run renaming (no backend fields).
- Theme skins beyond light/dark.
- Translations.

### 7.3 Risks

| Risk | Mitigation |
|---|---|
| e2e/unit tests rely on text and roles that move | Section 10 lists them; each step's acceptance runs the full suites. `run-guide` stays in the thread; `PageHeader` keeps rendering an accessible h1. |
| Two "New test run" entries (sidebar intake vs readiness form) confuse | Same label, both end in the same run; the sidebar one goes to the conversational intake that offers "Use the full form". e2e locator is scoped to `main`. |
| Panel + dock + sidebar squeeze the center on laptops | Breakpoint rules collapse the panel to its strip when the dock opens below 1600px effective width; center min widths enforced. |
| Two text inputs (run composer and Ask dock) | Different placeholders and the hint line under the composer; the composer only takes commands and team notes. |
| Silent-agent flag false alarms on slow pods | Thresholds are client constants (3 min browser runs, 60 s simulations), wording is neutral ("No news for 3 min"), no automatic action. |
| localStorage blocked (private mode, desktop profile reset) | try/catch, defaults, nothing important stored there. |
| Live MJPEG stream in a narrow panel | Frame keeps 16:10 and `object-fit: contain`; Fullscreen stays; at < 380px panel width the "Results so far" list collapses into a disclosure. |
| Mobile bottom bar overlaps sticky review bar | Sticky bars use `bottom: calc(56px + env(safe-area-inset-bottom))` on phone. |

---

## 8. Reusing AionUi code

AionUi (github.com/iOfficeAI/AionUi, branch `main`) is licensed **Apache-2.0**, "Copyright 2025 AionUi (aionui.com)". Each source file
carries the header `@license Copyright 2025 AionUi (aionui.com) SPDX-License-Identifier: Apache-2.0`. At the time of this review the repo
has **no NOTICE file** (`/NOTICE` returns 404); re-check before copying, and if one appears, its contents must be reproduced.

### 8.1 Stack difference

AionUi's renderer is React 19 + **Arco Design** (`@arco-design/web-react`) + UnoCSS + `@icon-park/react`, inside Electron 37
(`packages/desktop/src/renderer`). We use React 18 + Mantine 7 + plain CSS + Tabler icons. Porting their components would drag in a second
UI library and a second CSS system. **Recommendation: re-implement the patterns with Mantine; copy only small, library-free logic** where it
saves real effort, under the licence rules in 8.3.

### 8.2 Files worth studying, and what to do with each

| AionUi path (under `packages/desktop/src/renderer/`) | Pattern | Our use | Port? |
|---|---|---|---|
| `components/layout/Layout.tsx`, `hooks/context/LayoutContext.tsx` | three-region shell, collapsed state in context | `AppShell` + `useUiPrefs` | Re-implement (Arco Layout) |
| `components/layout/Sider/index.tsx`, `SiderItem.tsx`, `SiderFooter.tsx`, `TeamSiderSection.tsx`, `Sider.module.css`, `useSiderTeamRunning.ts` | sidebar with sections, running indicator per item, footer settings | `AppSidebar`, `RunListItem` | Re-implement; `Sider.module.css` spacing values are a reference only |
| `pages/conversation/GroupedHistory/index.tsx`, `ConversationRow.tsx`, `utils/groupingHelpers.ts` | conversations grouped by time/state with badges | RUNS section grouping | `groupingHelpers.ts` is pure TS: may be adapted (8.3) but our grouping is by state, so re-implementing is simpler |
| `hooks/ui/useResizableSplit.tsx`, `hooks/ui/useProjectPreviewRegionWidth.tsx` | drag-to-resize split with min/max and persistence | `SidePanel` resize | **Candidate to adapt**: small, React-only (uses `classnames`). Must add keyboard support (separator role, arrows) which it lacks |
| `pages/conversation/Preview/components/PreviewPanel/PreviewPanel.tsx`, `PreviewTabs.tsx`, `PreviewToolbar.tsx`, `preview.css` | right preview panel with tabs and toolbar | `SidePanel` tabs | Re-implement with Mantine `Tabs` |
| `pages/conversation/Preview/browser/BrowserViewer.tsx`, `agentActivity.ts` | embedded browser view with agent activity caption | Live tab layout ideas | Re-implement (ours is an MJPEG image, theirs a webview) |
| `pages/team/activity/ActivityBoardLayout.tsx`, `TaskCard.tsx`, `TeamActivityView.tsx`, `components/AgentStatusBadge.tsx`, `components/TeamAgentIdentity.tsx` | leader + teammates board, status badges, identity avatars | `TeamBoard`, `AgentCard`, `CoordinatorCard`, `StatusDot` | Re-implement |
| `pages/conversation/Messages/components/MessagePermission/PermissionRequestPanel.tsx` | per-agent approval prompt inline in the thread | `StageCard` for approve/judge | Re-implement (ours is a domain card) |
| `pages/cron/ScheduledTasksPage/index.tsx`, `CreateTaskDialog.tsx`, `TaskDetailPage.tsx`, `CronStatusTag.tsx`, `components/CronJobManager.tsx` | scheduled tasks list, create dialog with cron/interval/once, status tag | `ScheduledRunsPage`, `ScheduleDrawer`, `ScheduleCard` | Re-implement; cron-to-words helper may be adapted if it is library-free |
| `styles/themes/base.css`, `styles/themes/default-color-scheme.css`, `common/theme/tokenContract.ts` | token contract for light/dark | our `:root` / dark tokens | Reference only. Do not copy colour values; ours are checked for AA and branded |

### 8.3 Licence obligations for anything copied or adapted

1. Keep the original header in the file:
   ```

   /**

    * @license

    * Copyright 2025 AionUi (aionui.com)

    * SPDX-License-Identifier: Apache-2.0

    *

    * Modified by Patch Testing Co-worker, <YYYY-MM-DD>: <one line on what changed>.

    */

   ```
   (Apache-2.0 §4(b): modified files must carry prominent notices stating that you changed them.)
2. Add `THIRD_PARTY_NOTICES.md` at the repo root (or extend it if it exists) with: the component name "AionUi", the repo URL, the copyright
   line "Copyright 2025 AionUi (aionui.com)", the licence "Apache License 2.0", the list of our files derived from it, and the full licence
   text in `LICENSES/Apache-2.0.txt` (linked from the notices file). Reproduce AionUi's NOTICE file contents there if one exists at the time
   of copying.
3. Never use the AionUi name, logo, icons, illustrations or screenshots in the product UI or marketing. No AionUi branding in titles,
   favicons, empty states or about screens.
4. Do not copy files that import Arco/UnoCSS/icon-park; rewriting them for Mantine is re-implementation (no header needed), which is the
   preferred route.
5. The developer lists every copied/adapted file in the PR description.

---

## 9. Functionality preservation checklist

Rule: the developer must not remove any route, endpoint call, download, button or permission check. Moved items stay reachable within two
clicks from where a consultant would look. Format: **current location → new location → acceptance check**.

### 9.1 Runs: report, downloads, evidence

| # | Feature | Current location | New location | Acceptance check |
|---|---|---|---|---|
| 1 | Report & sign-off view | `/runs/:id/report` tab | same URL, detail view; also panel Report tab → "Open the full report and sign-off"; Result card primary button | e2e report block passes; reachable in 1 click from the workspace |
| 2 | Sign-off form (comment + "Sign off this report") | report view `signoff` section | same, report view | `getByTestId('signoff')`, button name unchanged, POST `/api/runs/:id/signoff` sent |
| 3 | Download PDF | report view per area (`pdf-link`), Activity side box | report view header, panel Report tab, Downloads menu | `pdf-link` href `/api/runs/:id/report/:m/pdf` present when PDF exists |
| 4 | Share (copy link) | report view | report view header + panel Report tab | copies `<origin>/runs/:id/report` |
| 5 | Markdown / HTML / run-summary.json downloads | `/runs/:id/technical` | technical view (unchanged) + report Downloads menu | hrefs `.../md?download=true`, `.../html?download=true`, `.../summary?download=true` present |
| 6 | Criteria explanation (Audit details, C1-C6, exec summary, rule result) | report view | same | "Audit details" button, `criteria` table contains C1, `exec-summary`, `rule-result` |
| 7 | HTML report iframe | report view | same | iframe title "<MOD> go/no-go report" contains NOT ORACLE FUSION |
| 8 | Excel test script download | guide Approve stage, chat chip | conversation Approve card (`excel-script`), panel Excel tab, All details menu | href `/api/runs/:id/test-script.xlsx`, content-type spreadsheetml |
| 9 | Excel results download | guide Result stage | Result card + panel Report and Excel tabs | same href, label "Download the results (Excel)" |
| 10 | Screens / proof (per-scenario screen, test data, recording, search, pager) | `/runs/:id/proof` tab | panel Screens tab; `/runs/:id/proof` opens it | `proof-card`s render; search filters; "Watch the recording" link; evidence permission fallback |
| 11 | Technical report + evidence list | `/runs/:id/technical` (admin menu) | same detail view; All details › Engineering views | `aria-label="evidence"` list present |
| 12 | Admin "Delete this run's evidence" | technical view | same | `delete-evidence` button for admin only; DELETE `/api/runs/:id/evidence` |
| 13 | Coverage map / Data plan / Scripts (admin) | More menu | detail-view More menu + All details › Engineering views | routes `research`, `data`, `scripts` render for admin; hidden for others |

### 9.2 Runs: live, workflow, review, decisions

| # | Feature | Current location | New location | Acceptance check |
|---|---|---|---|---|
| 14 | Live view (stream, pause view, jump to live, fullscreen, failed-screen modal, results so far, up next, honesty line) | `/runs/:id/live`, Testing stage | panel Live tab; `/runs/:id/live` opens it; "Watch live" in Testing card | `live-frame` img with `/live/stream`, "Pause view", "Jump to live", "Fullscreen" buttons, text "Test data only. This is the test environment's browser, not your own session." |
| 15 | Now testing line + Watch | header of non-guide tabs | detail views (unchanged) + Live tab dot | `now-testing` shows while live is active |
| 16 | Workflow / agent states | `/runs/:id/workflow` | Team board, same URL (+ `/team` alias), Team strip in thread | `run-workflow`, `flow-<node>`, legend words |
| 17 | Agent team graph + stream mode | Activity side box (`GraphView`, `stream-mode`) | Activity view (unchanged) | All details → "Activity log" → `stream-mode` visible |
| 18 | Activity log + team notes | Activity tab | Activity view (unchanged) + composer "Team note" mode | NoteBox posts `/api/runs/:id/notes` (run.note) |
| 19 | Scenario review (approve / skip per scenario, approve all per step, approve all unchanged, approve remaining, notes per scenario, submit, AI drafts with dry-run, not-offered drafts, technical details) | `/runs/:id/scenarios`, guide "Let me look at them first" | same + ApprovalCards + filter chips + panel Steps | unit tests pass; `approve_cases` payload unchanged; `review-count`; `scenario review` label |
| 20 | Approve all (one click) | guide Approve stage | Approve stage card | `guide-approve-all` |
| 21 | Failure decision (three choices, suggestion preselected, owner for flaky, back/next/submit) | guide Judge stage | Judge stage card (+ screen column) | `guide-failure-<id>`, radios, `guide-submit-decisions` |
| 22 | Open all failure details (verdict, owner, waiver for P2, note, submit) | `/runs/:id/failures` | same detail view | "Submit failure review"; `failure-<id>` cards; permission `gate.human_review` |
| 23 | What the patch changes (per run) | More › What the patch changes | detail-view More + All details | `change-*` items |
| 24 | By business process (progress, module cards) | More › By business process | same | `business-progress` testid |
| 25 | Next step banner | non-guide tabs | detail views | `next-step` |
| 26 | Attention reminder | run page | top of workspace center | `attention` |
| 27 | Resume / Cancel test run | run header (run.control) | top bar | buttons render under the same conditions |
| 28 | Run reference id copy | run header `ref` pill | top bar sub-line | `run-id` aria-label contains id |
| 29 | Temporal link (admin, temporal runs) | run header | top bar actions | `temporal-link` for admin |
| 30 | Chat command input (status, approve, cancel, report, screens, new) | `/assistant/:id` composer | run workspace composer | same commands work; `assistant-input` |

### 9.3 App-level pages and features

| # | Feature | Current location | New location | Acceptance check |
|---|---|---|---|---|
| 31 | Patch readiness (env + patch selects, module cards, What this patch changes, glossary, New test run modal) | `/` | `/` cockpit | e2e heading + "What this patch changes"; `readiness-P2P`; `?new=1` modal with full wizard |
| 32 | Start run wizard (Where/What/How, demo options, patch name, live view, P2) | modal from readiness/runs | same modal; also "Use the full form" from intake | e2e wizard path passes |
| 33 | Test runs list (status filter, module/waiting filters, row menu, getting started, pager) | `/runs` | `/runs` | `run-row-<id>`; row menu items; `?waiting=1` |
| 34 | Defects / tickets | `/tickets` | `/tickets` | `aria-label="tickets"` table |
| 35 | Scenarios library | `/scenarios` | `/scenarios` + panel Steps | `aria-label="scenarios library"`; filters |
| 36 | Reports page | `/reports` | `/reports` | `aria-label="reports"` |
| 37 | Test environments (add pod, sign-in details, test connection, enabled) | `/pods` | `/pods` cards | "Test connection" → `pod-test-result`; forms save |
| 38 | Screen capture | API only (`POST /api/pods/{id}/screens/capture`), no UI today | unchanged (if a UI is added elsewhere, it goes in the pod card "..." menu) | no regression |
| 39 | Settings › AI models (local/external, test, key save/remove, routing table) | `/admin?tab=ai` | same + "Which agent uses which model" | e2e settings block |
| 40 | Settings › Users | `?tab=users`, `/admin/users` | same | users table, role select |
| 41 | Settings › Automatic approval (autonomy) | `?tab=autonomy`, `/admin/autonomy` | same | page renders, PUT autonomy works |
| 42 | Settings › Schedules (scheduler + patch watch) | `?tab=schedules`, `/admin/scheduler` | same URLs + `/schedules` (new screen) | create/delete schedule; patch watch toggles; Check now |
| 43 | Settings › Emergency stop / kill switch | `?tab=stop`, `/admin/kill-switch` | same | e2e engage/release; `kill-state`; `kill-indicator` in sidebar |
| 44 | Audit log (filter, verify chain) | `/audit` via Advanced | same | e2e "Verify chain" → `audit-verify` |
| 45 | Learner | `/learner` via Advanced | same | page renders |
| 46 | Self-heal review | `/heal` via Advanced | same | approve/reject buttons |
| 47 | Scripts & drafts | `/scripts` via Advanced | same | promote/discard |
| 48 | Agent team | `/agents` via Advanced | same (restyled cards) | e2e link "Agent team" |
| 49 | Chat page | `/assistant`, `/assistant/:id`, sidebar "Chat" | run workspace (`/runs/new`, `/runs/:id`); old URLs redirect | redirects verified; intake chips `area-<MOD>`, `mode-quick`, `mode-full` kept |
| 50 | Ask-a-question dock (Ctrl K), cards, confirm actions, context chip | sidebar button + Ctrl K | same | chat e2e passes (`complementary` "Ask the co-worker", `chat-*` test ids) |
| 51 | Sign in / register / forgot / reset | `/login`, `/register`, `/forgot`, `/reset` | same | labels and buttons unchanged; `forgot-sent`, `reset-done`, `register-sent` |
| 52 | Dark mode toggle | sidebar user row | sidebar user row (rail: avatar menu; phone: Menu drawer) | aria-label "Switch to dark theme"/"Switch to light theme" |
| 53 | Sign out | sidebar user row | same | aria-label "Sign out" |
| 54 | Desktop-app notifications (`DesktopNotifier`) and Desktop settings button | Layout | Layout (unchanged) | notifications fire on status transitions in Electron |
| 55 | Practice vs Fusion honesty cues | sidebar banner, chat header, reports, proof | env switcher (`mock-banner`), `EnvBadge` in top bar/run rows/cards, report and proof lines | "Mock app, not Oracle Fusion" visible on every page when a practice pod is selected |
| 56 | Glossary popover | readiness, runs | same + top bar help button on run pages | popover lists GLOSSARY |
| 57 | Health badge "test environment down" | sidebar | sidebar footer | shown when `mock_up` is false |
| 58 | Brand (product/org name, version on sign-in) | sidebar, auth | same | `brand` testid |

---

## 10. Test hooks that must keep working

From `web/e2e/coworker.e2e.ts` and `web/src/**/*.test.ts(x)`.

**Routes**: `/`, `/login`, `/register`, `/forgot`, `/reset`, `/runs`, `/runs/:id`, `/runs/:id/:tab` (all tab values in 3.1),
`/assistant`, `/assistant/:id` (redirect), `/scenarios`, `/tickets`, `/pods`, `/reports`, `/admin` (`?tab=`), `/agents`, `/heal`,
`/scripts`, `/learner`, `/audit`, `/admin/kill-switch`, `/admin/autonomy`, `/admin/scheduler`, `/admin/users`, `*` → `/`.
e2e asserts URL `/\/runs\/[\w-]+$/` right after starting a run (both from the wizard and from the chat dock): starting must land on
`/runs/:id` with no extra path segment or query.

**data-testid** (must exist with the same meaning): `review-count`, `decision-badge` (+ `data-rule`), `llm-key-state`, `chat-confirm`,
`chat-confirm-button`, `chat-answer`, `step-<name>` (e.g. `step-Requisition`, `step-Sourcing`), `run-title`, `run-guide` (+ `data-stage`),
`rule-result`, `orchestrator`, `mock-banner`, `kill-state`, `guide-approve-all`, `chat-action-done`, `chat-action-closed`, `whoami`,
`summary-P2P`, `stream-mode`, `step-group-changed-Invoice`, `signoff`, `run-id`, `readiness-P2P`, `process-summary`, `pod-test-result`,
`pdf-link`, `node-approval_gate`, `no-live-note`, `llm-test-result`, `llm-local-active`, `live-frame`, `live-action`, `kill-indicator`,
`guide-submit-decisions`, `guide-result`, `guide-progress`, `guide-failure-<case>`, `gaps-summary`, `exec-summary`, `excel-script`,
`chat-source`, `chat-run-progress`, `chat-mock-strip`, `chat-context`, `chat-card-readiness`, `audit-verify`, `all-details`,
`change-*` (prefix), plus the non-tested but referenced ids kept for stability: `next-step`, `now-testing`, `attention`, `business-progress`,
`run-workflow`, `flow-<node>`, `live-view`, `live-title`, `live-failure-banner`, `live-unavailable`, `proof-card`, `dry-run`,
`ai-not-runnable`, `ai-failed-<id>`, `scenario-<id>`, `review-bar`, `delete-evidence`, `decision-explained`, `temporal-link`,
`assistant-page`, `assistant-thread`, `assistant-input`, `agent-feed`, `area-<MOD>`, `mode-quick`, `mode-full`, `chat-new`,
`chat-toggle`, `chat-dock`, `brand`, `pod-<id>`, `run-row-<id>`, `verdict-<MOD>`, `details-<MOD>`, `forgot-sent`, `reset-done`,
`register-sent`, `mode-live`, `areas-source`.

**Accessible names / text used by tests**:
- Labels: "Username", "Password", "API key", "Reason", "Scenarios that fail with a real defect", "scenario review", "Local model" (section).
- Buttons: "Sign in", "Save key", "Remove", "Test" (inside Local model), "Test connection", "New test run" (exact, inside `main`),
  "Next", "Start run", "Demo options" (regex), "Let me look at them first", "Audit details" (regex), "Sign off this report", "Verify chain",
  "Engage kill switch", "Release", "Fullscreen", "Cancel", "Start test run", "Approve 2 scenarios", "Approve all 1 Invoice scenarios",
  "Approve all 2 Requisition scenarios", "Approve all 1 unchanged", "Show the list", "Submit review", "Skip Rejected requisition for this
  patch", "Unchanged (1)" (prefix), "Create account", "What this patch changes" (regex), "Local mock pod" (regex, `aria-pressed`).
- Links: "Settings" (exact), "Test environments" (first), "Patch readiness" (first), "Defects" (first), "Agent team" (regex), "Audit log"
  (regex), "Review them first", "Open the test run".
- Tabs: "Advanced", "Emergency stop". Menu item: "Activity log".
- Headings: "Patch readiness", "Settings".
- Radios/checkboxes: "Quick simulation (no browser)", "Procure-to-Pay" (checkbox, regex), "Yes, this is a real defect" (regex, `aria-checked`).
- Tables: "criteria", "tickets". Landmark: complementary "Ask the co-worker" with textbox "Ask the co-worker".
- Texts: "Across the whole process", "Three-way match" (regex), "created by an administrator" (regex), "ready to test", "Matched",
  "Looks like a real defect", "Not ready", "Requisition", "NOT ORACLE FUSION", "not Oracle Fusion", "Nothing changes until you confirm",
  "Quick simulation (no browser)", "Done · test run started", "this test run", "Sign-off is yours to give", "Test data only. This is the
  test environment's browser, not your own session.", "Source:".

Note for the developer: the links "Patch readiness", "Test environments", "Defects" are matched with `.first()`; the sidebar must render
them before any same-named link in the page (DOM order: sidebar first). "Settings" is matched `exact: true`, so no other link may be named
exactly "Settings".