PHY041 commited on
Commit
4cc7d22
·
verified ·
1 Parent(s): 42334f5

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. americanexpress_com/20260128_041709/state_graph.json +0 -0
  2. amtrak_com/20260128_004014/coverage_report.json +92 -0
  3. amtrak_com/20260128_004014/error_log.json +11 -0
  4. amtrak_com/20260128_004014/html/state_ed56886a3281327d.html +0 -0
  5. amtrak_com/20260128_004014/html/state_ef58603dcba9862e.html +0 -0
  6. amtrak_com/20260128_013657/coverage_report.json +84 -0
  7. amtrak_com/20260128_013657/crawl_summary.json +21 -0
  8. amtrak_com/20260128_013657/error_log.json +11 -0
  9. amtrak_com/20260128_013657/execution_trace.jsonl +16 -0
  10. amtrak_com/20260128_013657/exploration_report.json +26 -0
  11. amtrak_com/20260128_013657/html/state_744f8f9a25b7640f.html +0 -0
  12. amtrak_com/20260128_013657/html/state_75fbd3b0cc158494.html +0 -0
  13. amtrak_com/20260128_013657/html/state_ed56886a3281327d.html +0 -0
  14. amtrak_com/20260128_013657/state_graph.graphml +33 -0
  15. amtrak_com/20260128_013657/state_graph.json +0 -0
  16. amtrak_com/20260128_013657/utg_interactive.html +1728 -0
  17. amtrak_com/20260129_201508/coverage_report.json +68 -0
  18. amtrak_com/20260129_201508/crawl_summary.json +21 -0
  19. amtrak_com/20260129_201508/error_log.json +11 -0
  20. amtrak_com/20260129_201508/execution_trace.jsonl +18 -0
  21. amtrak_com/20260129_201508/exploration_report.json +26 -0
  22. amtrak_com/20260129_201508/html/state_34b6fd1c376fedca.html +0 -0
  23. amtrak_com/20260129_201508/html/state_7abc7f44a0d8bb2a.html +0 -0
  24. amtrak_com/20260129_201508/html/state_9233f1aeb151a82d.html +0 -0
  25. amtrak_com/20260129_201508/state_graph.graphml +33 -0
  26. amtrak_com/20260129_201508/state_graph.json +0 -0
  27. amtrak_com/20260129_201508/utg_interactive.html +1728 -0
  28. arxiv_org/20260127_211418/screenshots/state_89742596975b7029.png +3 -0
  29. arxiv_org/20260127_211418/screenshots/transition_state_0f3553_20260127_212358_172471.png +3 -0
  30. arxiv_org/20260127_211418/screenshots/transition_state_0f3553_20260127_212405_324053.png +3 -0
  31. arxiv_org/20260127_211418/screenshots/transition_state_0f3553_20260127_212412_891652.png +3 -0
  32. arxiv_org/20260127_211418/screenshots/transition_state_0f3553_20260127_212649_237759.png +3 -0
  33. arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213148_759381.png +3 -0
  34. arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213154_863659.png +3 -0
  35. arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213339_264462.png +3 -0
  36. arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213343_827758.png +3 -0
  37. arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213349_941738.png +3 -0
  38. arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213352_757985.png +3 -0
  39. arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213359_153991.png +3 -0
  40. arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213423_036740.png +3 -0
  41. arxiv_org/20260127_211418/screenshots/transition_state_45b5b5_20260127_214521_283175.png +3 -0
  42. arxiv_org/20260127_211418/screenshots/transition_state_45b5b5_20260127_214618_483783.png +3 -0
  43. arxiv_org/20260127_211418/screenshots/transition_state_4b71e7_20260127_212516_721075.png +3 -0
  44. arxiv_org/20260127_211418/screenshots/transition_state_4b71e7_20260127_212525_285927.png +3 -0
  45. arxiv_org/20260127_211418/screenshots/transition_state_4b71e7_20260127_212542_763658.png +3 -0
  46. arxiv_org/20260127_211418/screenshots/transition_state_557faa_20260127_212836_012664.png +3 -0
  47. arxiv_org/20260127_211418/screenshots/transition_state_557faa_20260127_212906_134682.png +3 -0
  48. arxiv_org/20260127_211418/screenshots/transition_state_897425_20260127_212351_381753.png +3 -0
  49. arxiv_org/20260127_211418/screenshots/transition_state_897425_20260127_212720_882296.png +3 -0
  50. arxiv_org/20260127_211418/screenshots/transition_state_897425_20260127_213117_855076.png +3 -0
americanexpress_com/20260128_041709/state_graph.json ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260128_004014/coverage_report.json ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "summary": {
3
+ "total_decisions": 51,
4
+ "explored": 12,
5
+ "skipped": 39,
6
+ "exploration_rate": "23.5%"
7
+ },
8
+ "by_action_type": {
9
+ "click": {
10
+ "explored": 12,
11
+ "skipped": 39
12
+ }
13
+ },
14
+ "skip_reasons": {
15
+ "non-informative sibling group (probed, same result)": {
16
+ "count": 39,
17
+ "samples": [
18
+ "a:has-text(\"TRAIN STATUS\")",
19
+ "a:has-text(\"PLAN\")",
20
+ "a:has-text(\"SCHEDULES\")",
21
+ "a:has-text(\"DEALS\")",
22
+ "a:has-text(\"Seat options and features\")"
23
+ ]
24
+ }
25
+ },
26
+ "sibling_probes": {
27
+ "button:has-text-group": {
28
+ "probes": 1,
29
+ "unique_states": 1,
30
+ "is_informative": null,
31
+ "samples": [
32
+ "button:has-text(\"carousel control right\")"
33
+ ]
34
+ },
35
+ "text-group:a": {
36
+ "probes": 2,
37
+ "unique_states": 1,
38
+ "is_informative": false,
39
+ "samples": [
40
+ "a:has-text(\"Winter Storm Fern Adjustments\")",
41
+ "a:has-text(\"BOOK\")"
42
+ ]
43
+ },
44
+ "tab-group": {
45
+ "probes": 2,
46
+ "unique_states": 1,
47
+ "is_informative": false,
48
+ "samples": [
49
+ "a[aria-label='Learn more about Trip Planning Map']",
50
+ "a[aria-label='Learn more about Track Your Train']:"
51
+ ]
52
+ },
53
+ "text-group:a[aria-label='Learn more about Travel Easier']": {
54
+ "probes": 1,
55
+ "unique_states": 1,
56
+ "is_informative": null,
57
+ "samples": [
58
+ "a[aria-label='Learn more about Travel Easier']:has"
59
+ ]
60
+ },
61
+ "text-group:a[aria-label='Learn more about Amtrak RideReserve for Multi-Ride Passes']": {
62
+ "probes": 1,
63
+ "unique_states": 1,
64
+ "is_informative": null,
65
+ "samples": [
66
+ "a[aria-label='Learn more about Amtrak RideReserve "
67
+ ]
68
+ }
69
+ },
70
+ "skipped_actions_sample": [
71
+ "a:has-text(\"TRAIN STATUS\")",
72
+ "a:has-text(\"PLAN\")",
73
+ "a:has-text(\"SCHEDULES\")",
74
+ "a:has-text(\"DEALS\")",
75
+ "a:has-text(\"Seat options and features\")",
76
+ "a:has-text(\"JOIN NOW\")",
77
+ "a:has-text(\"Play store(opens in a new tab)\")",
78
+ "a:has-text(\"App Store(opens in a new tab)\")",
79
+ "a:has-text(\"Learn More\")",
80
+ "a:has-text(\"More About Redeeming Points\")",
81
+ "a:has-text(\"About Amtrak\")",
82
+ "a:has-text(\"A New Era of Rail(opens in a new tab)\")",
83
+ "a:has-text(\"News & Media(opens in a new tab)\")",
84
+ "a:has-text(\"Careers(opens in a new tab)\")",
85
+ "a:has-text(\"FOIA\")",
86
+ "a:has-text(\"Office of Inspector General(opens in a new tab)\"",
87
+ "a:has-text(\"Amtrak Customer Service Commitments\")",
88
+ "a:has-text(\"Baggage Policy & Services\")",
89
+ "a:has-text(\"Changing Your Reservation\")",
90
+ "a:has-text(\"Unique Amtrak Experience\")"
91
+ ]
92
+ }
amtrak_com/20260128_004014/error_log.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "site": "amtrak_com",
3
+ "crawl_id": "crawl_20260128_004014",
4
+ "generated_at": "2026-01-28T00:44:52.462574",
5
+ "total_errors": 0,
6
+ "errors_by_category": {},
7
+ "error_hotspots": {},
8
+ "errors": [],
9
+ "state_explosion_warnings": [],
10
+ "anti_bot_events": []
11
+ }
amtrak_com/20260128_004014/html/state_ed56886a3281327d.html ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260128_004014/html/state_ef58603dcba9862e.html ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260128_013657/coverage_report.json ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "summary": {
3
+ "total_decisions": 58,
4
+ "explored": 11,
5
+ "skipped": 47,
6
+ "exploration_rate": "19.0%"
7
+ },
8
+ "by_action_type": {
9
+ "click": {
10
+ "explored": 11,
11
+ "skipped": 47
12
+ }
13
+ },
14
+ "skip_reasons": {
15
+ "non-informative sibling group (probed, same result)": {
16
+ "count": 47,
17
+ "samples": [
18
+ "a:has-text(\"BOOK\")",
19
+ "a:has-text(\"TRAIN STATUS\")",
20
+ "a:has-text(\"PLAN\")",
21
+ "a:has-text(\"SCHEDULES\")",
22
+ "a:has-text(\"DEALS\")"
23
+ ]
24
+ }
25
+ },
26
+ "sibling_probes": {
27
+ "text-group:a": {
28
+ "probes": 2,
29
+ "unique_states": 1,
30
+ "is_informative": false,
31
+ "samples": [
32
+ "a:has-text(\"Winter Storm Fern Adjustments\")",
33
+ "a:has-text(\"Winter Storm Fern Adjustments\")"
34
+ ]
35
+ },
36
+ "tab-group": {
37
+ "probes": 2,
38
+ "unique_states": 1,
39
+ "is_informative": false,
40
+ "samples": [
41
+ "a[aria-label='Learn more about Trip Planning Map']",
42
+ "a[aria-label='Learn more about Trip Planning Map']"
43
+ ]
44
+ },
45
+ "text-group:a[aria-label='Learn more about Travel Easier']": {
46
+ "probes": 1,
47
+ "unique_states": 1,
48
+ "is_informative": null,
49
+ "samples": [
50
+ "a[aria-label='Learn more about Travel Easier']:has"
51
+ ]
52
+ },
53
+ "text-group:a[aria-label='Learn more about Amtrak RideReserve for Multi-Ride Passes']": {
54
+ "probes": 1,
55
+ "unique_states": 1,
56
+ "is_informative": null,
57
+ "samples": [
58
+ "a[aria-label='Learn more about Amtrak RideReserve "
59
+ ]
60
+ }
61
+ },
62
+ "skipped_actions_sample": [
63
+ "a:has-text(\"BOOK\")",
64
+ "a:has-text(\"TRAIN STATUS\")",
65
+ "a:has-text(\"PLAN\")",
66
+ "a:has-text(\"SCHEDULES\")",
67
+ "a:has-text(\"DEALS\")",
68
+ "a:has-text(\"Winter Storm Fern Adjustments\")",
69
+ "a:has-text(\"BOOK\")",
70
+ "a:has-text(\"TRAIN STATUS\")",
71
+ "a:has-text(\"PLAN\")",
72
+ "a:has-text(\"SCHEDULES\")",
73
+ "a:has-text(\"DEALS\")",
74
+ "a:has-text(\"Seat options and features\")",
75
+ "a[aria-label='Learn more about Track Your Train']:has-text(\"",
76
+ "a:has-text(\"JOIN NOW\")",
77
+ "a:has-text(\"Play store(opens in a new tab)\")",
78
+ "a:has-text(\"App Store(opens in a new tab)\")",
79
+ "a:has-text(\"Learn More\")",
80
+ "a:has-text(\"More About Redeeming Points\")",
81
+ "a:has-text(\"About Amtrak\")",
82
+ "a:has-text(\"A New Era of Rail(opens in a new tab)\")"
83
+ ]
84
+ }
amtrak_com/20260128_013657/crawl_summary.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "site": "amtrak_com",
3
+ "trace_file": "output/run_20260128_013657/execution_trace.jsonl",
4
+ "generated_at": "2026-01-28T01:40:59.131425",
5
+ "statistics": {
6
+ "total_attempts": 11,
7
+ "successful_attempts": 11,
8
+ "failed_attempts": 0,
9
+ "new_states_found": 2,
10
+ "same_state_results": 9,
11
+ "by_action_type": {
12
+ "unknown": {
13
+ "success": 11,
14
+ "fail": 0
15
+ }
16
+ },
17
+ "by_error_category": {},
18
+ "success_rate": 1.0,
19
+ "new_state_rate": 0.18181818181818182
20
+ }
21
+ }
amtrak_com/20260128_013657/error_log.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "site": "amtrak_com",
3
+ "crawl_id": "crawl_20260128_013657",
4
+ "generated_at": "2026-01-28T01:40:59.130517",
5
+ "total_errors": 0,
6
+ "errors_by_category": {},
7
+ "error_hotspots": {},
8
+ "errors": [],
9
+ "state_explosion_warnings": [],
10
+ "anti_bot_events": []
11
+ }
amtrak_com/20260128_013657/execution_trace.jsonl ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"_type": "trace_header", "site": "amtrak_com", "started_at": "2026-01-28T01:36:57.886318", "format_version": "1.0"}
2
+ {"_type": "exploration_event", "event_id": "evt_0001", "event_type": "exploration_started", "timestamp": "2026-01-28T01:36:59.137799", "data": {"strategy": "dfs", "start_url": "https://www.amtrak.com/", "max_depth": 9999, "max_iterations": 5000}}
3
+ {"_type": "action_attempt", "attempt_id": "att_0001", "iteration": 1, "timestamp": "2026-01-28T01:37:46.004137", "from_state_id": "state_75fbd3b0cc158494", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a:has-text(\"Winter Storm Fern Adjustments\")', description='Click a: Winter Storm Fern Adjustments', element_text='Winter Storm Fern Adjustments', attributes={'href': 'javascript:void(0);', 'data-redirect-url': 'https://www.amtrak.com/alert/potential-winter-storm-fern-adjustments.html', 'class': 'home-alerts__wrap_alerts_item primary-link-dark', 'data-di-id': 'di-id-a7ec3872-bd5f1783'}, position=None)", "selector": "a:has-text(\"Winter Storm Fern Adjustments\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": "state_744f8f9a25b7640f", "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "new_state"}
4
+ {"_type": "action_attempt", "attempt_id": "att_0002", "iteration": 2, "timestamp": "2026-01-28T01:37:58.680226", "from_state_id": "state_744f8f9a25b7640f", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a:has-text(\"Winter Storm Fern Adjustments\")', description='Click a: Winter Storm Fern Adjustments', element_text='Winter Storm Fern Adjustments', attributes={'href': 'javascript:void(0);', 'data-redirect-url': 'https://www.amtrak.com/alert/potential-winter-storm-fern-adjustments.html', 'class': 'home-alerts__wrap_alerts_item primary-link-dark'}, position=None)", "selector": "a:has-text(\"Winter Storm Fern Adjustments\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
5
+ {"_type": "action_attempt", "attempt_id": "att_0003", "iteration": 2, "timestamp": "2026-01-28T01:38:28.224250", "from_state_id": "state_744f8f9a25b7640f", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a[aria-label=\\'Learn more about Trip Planning Map\\']:has-text(\"START PLANNING(opens in a new tab)\")', description='Click a: START PLANNING(opens in a new tab)', element_text='START PLANNING(opens in a new tab)', attributes={'href': 'https://www.amtrak.com/plan-your-trip.html?intcmp=wsp_hp-trip-planning_link_start-planning_slide1', 'target': '_blank', 'data-popupurl': 'https://www.amtrak.com/plan-your-trip.html?intcmp=wsp_hp-trip-planning_link_start-planning_", "selector": "a[aria-label='Learn more about Trip Planning Map']:has-text(\"START PLANNING(opens in a new tab)\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": "state_ed56886a3281327d", "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "new_state"}
6
+ {"_type": "action_attempt", "attempt_id": "att_0004", "iteration": 3, "timestamp": "2026-01-28T01:38:42.245897", "from_state_id": "state_ed56886a3281327d", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a[aria-label=\\'Learn more about Trip Planning Map\\']:has-text(\"START PLANNING(opens in a new tab)\")', description='Click a: START PLANNING(opens in a new tab)', element_text='START PLANNING(opens in a new tab)', attributes={'href': 'https://www.amtrak.com/plan-your-trip.html?intcmp=wsp_hp-trip-planning_link_start-planning_slide1', 'target': '_blank', 'data-popupurl': 'https://www.amtrak.com/plan-your-trip.html?intcmp=wsp_hp-trip-planning_link_start-planning_", "selector": "a[aria-label='Learn more about Trip Planning Map']:has-text(\"START PLANNING(opens in a new tab)\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
7
+ {"_type": "action_attempt", "attempt_id": "att_0005", "iteration": 3, "timestamp": "2026-01-28T01:39:00.315967", "from_state_id": "state_ed56886a3281327d", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a[aria-label=\\'Learn more about Travel Easier\\']:has-text(\"GET THE APP\")', description='Click a: GET THE APP', element_text='GET THE APP', attributes={'href': 'https://www.amtrak.com/planning-booking/mobile.html?intcmp=wsp_hp-trip-planning_link_get-the-app_slide3', 'target': '_self', 'data-popupurl': 'https://www.amtrak.com/planning-booking/mobile.html?intcmp=wsp_hp-trip-planning_link_get-the-app_slide3', 'aria-label': 'Learn more about Travel Easier', 'clas", "selector": "a[aria-label='Learn more about Travel Easier']:has-text(\"GET THE APP\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
8
+ {"_type": "action_attempt", "attempt_id": "att_0006", "iteration": 3, "timestamp": "2026-01-28T01:39:18.415911", "from_state_id": "state_ed56886a3281327d", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a[aria-label=\\'Learn more about Amtrak RideReserve for Multi-Ride Passes\\']:has-text(\"Learn About Confirming Trips\")', description='Click a: Learn About Confirming Trips', element_text='Learn About Confirming Trips', attributes={'href': 'https://www.amtrak.com/deals-discounts/multi-ride-rail-passes/ride-reserve.html?intcmp=wsp_hp-trip-planning_link_ride-reserve_slide4', 'target': '_self', 'data-popupurl': 'https://www.amtrak.com/deals-discounts/multi-ride-ra", "selector": "a[aria-label='Learn more about Amtrak RideReserve for Multi-Ride Passes']:has-text(\"Learn About Confirming Trips\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
9
+ {"_type": "action_attempt", "attempt_id": "att_0007", "iteration": 3, "timestamp": "2026-01-28T01:39:39.411494", "from_state_id": "state_ed56886a3281327d", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a:nth-of-type(1)', description='Click a', element_text='', attributes={'class': 'cmp-image__link', 'href': '/home', 'data-di-id': 'di-id-2f020851-4adc62e0'}, position=None)", "selector": "a:nth-of-type(1)", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
10
+ {"_type": "action_attempt", "attempt_id": "att_0008", "iteration": 3, "timestamp": "2026-01-28T01:39:59.252332", "from_state_id": "state_ed56886a3281327d", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='#my-trip-desktop', description='Click a: MY TRIP', element_text='MY TRIP', attributes={'id': 'my-trip-desktop', 'class': 'nav-link', 'role': 'tab', 'href': '#', 'data-di-id': '#my-trip-desktop'}, position=None)", "selector": "#my-trip-desktop", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
11
+ {"_type": "action_attempt", "attempt_id": "att_0009", "iteration": 3, "timestamp": "2026-01-28T01:40:16.296554", "from_state_id": "state_ed56886a3281327d", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='#guest-reward-desktop', description='Click a: Guest Rewards', element_text='Guest Rewards', attributes={'id': 'guest-reward-desktop', 'class': 'nav-link', 'href': '#', 'data-di-id': '#guest-reward-desktop'}, position=None)", "selector": "#guest-reward-desktop", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
12
+ {"_type": "action_attempt", "attempt_id": "att_0010", "iteration": 3, "timestamp": "2026-01-28T01:40:33.624945", "from_state_id": "state_ed56886a3281327d", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='#languageDropdown', description='Click a: English', element_text='English', attributes={'id': 'languageDropdown', 'class': 'nav-link', 'href': '#', 'role': 'tab', 'data-di-id': '#languageDropdown'}, position=None)", "selector": "#languageDropdown", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
13
+ {"_type": "action_attempt", "attempt_id": "att_0011", "iteration": 3, "timestamp": "2026-01-28T01:40:54.736368", "from_state_id": "state_ed56886a3281327d", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='#need-help-desktop', description='Click a: Need Help?', element_text='Need Help?', attributes={'class': 'nav-link font-small', 'href': '#', 'id': 'need-help-desktop', 'data-di-id': '#need-help-desktop'}, position=None)", "selector": "#need-help-desktop", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
14
+ {"_type": "exploration_event", "event_id": "evt_0002", "event_type": "backtrack", "timestamp": "2026-01-28T01:40:58.565283", "data": {"from_state": "state_ed56886a3281327d", "depth": 2, "iteration": 3, "reason": "exhausted", "actions_tried": 50, "actions_total": 50, "stack_size": 2}}
15
+ {"_type": "exploration_event", "event_id": "evt_0003", "event_type": "exploration_completed", "timestamp": "2026-01-28T01:40:58.577159", "data": {"strategy": "dfs", "completion_reason": "exhaustive", "iterations": 5, "states_discovered": 3, "transitions_discovered": 2, "states_explored": 3, "actions_tried": 58, "cycles_detected": 11, "novelty_ratio": 0.0}}
16
+ {"_type": "trace_footer", "ended_at": "2026-01-28T01:40:59.131951", "final_statistics": {"total_attempts": 11, "successful_attempts": 11, "failed_attempts": 0, "new_states_found": 2, "same_state_results": 9, "by_action_type": {"unknown": {"success": 11, "fail": 0}}, "by_error_category": {}, "success_rate": 1.0, "new_state_rate": 0.18181818181818182}}
amtrak_com/20260128_013657/exploration_report.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_states": 3,
3
+ "total_transitions": 2,
4
+ "unique_urls": 2,
5
+ "avg_actions_per_state": 50.0,
6
+ "avg_outgoing_edges": 0.6666666666666666,
7
+ "max_depth": 2,
8
+ "strongly_connected_components": 3,
9
+ "is_dag": true,
10
+ "exploration_time": 240.6905279159546,
11
+ "states_explored": 3,
12
+ "actions_executed": 11,
13
+ "errors_encountered": 0,
14
+ "start_time": "2026-01-28 01:36:57.886692",
15
+ "end_time": "2026-01-28 01:40:58.577223",
16
+ "cross_state_dedup": {
17
+ "total_unique_actions": 9,
18
+ "total_explorations": 11,
19
+ "by_type": {
20
+ "unique": {
21
+ "keys": 9,
22
+ "explorations": 11
23
+ }
24
+ }
25
+ }
26
+ }
amtrak_com/20260128_013657/html/state_744f8f9a25b7640f.html ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260128_013657/html/state_75fbd3b0cc158494.html ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260128_013657/html/state_ed56886a3281327d.html ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260128_013657/state_graph.graphml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"><key id="d5" for="edge" attr.name="selector" attr.type="string"/>
3
+ <key id="d4" for="edge" attr.name="action_type" attr.type="string"/>
4
+ <key id="d3" for="edge" attr.name="label" attr.type="string"/>
5
+ <key id="d2" for="node" attr.name="dom_hash" attr.type="string"/>
6
+ <key id="d1" for="node" attr.name="url" attr.type="string"/>
7
+ <key id="d0" for="node" attr.name="label" attr.type="string"/>
8
+ <graph edgedefault="directed"><node id="state_75fbd3b0cc158494">
9
+ <data key="d0">Train Tickets, Schedules &amp; Routes | Amtrak</data>
10
+ <data key="d1">https://www.amtrak.com/</data>
11
+ <data key="d2">75fbd3b0cc158494</data>
12
+ </node>
13
+ <node id="state_744f8f9a25b7640f">
14
+ <data key="d0">Train Tickets, Schedules &amp; Routes | Amtrak</data>
15
+ <data key="d1">https://www.amtrak.com/home</data>
16
+ <data key="d2">744f8f9a25b7640f</data>
17
+ </node>
18
+ <node id="state_ed56886a3281327d">
19
+ <data key="d0">Train Tickets, Schedules &amp; Routes | Amtrak</data>
20
+ <data key="d1">https://www.amtrak.com/home</data>
21
+ <data key="d2">ed56886a3281327d</data>
22
+ </node>
23
+ <edge source="state_75fbd3b0cc158494" target="state_744f8f9a25b7640f">
24
+ <data key="d3">click</data>
25
+ <data key="d4">click</data>
26
+ <data key="d5">a:has-text("Winter Storm Fern Adjustments")</data>
27
+ </edge>
28
+ <edge source="state_744f8f9a25b7640f" target="state_ed56886a3281327d">
29
+ <data key="d3">click</data>
30
+ <data key="d4">click</data>
31
+ <data key="d5">a[aria-label='Learn more about Trip Planning Map']</data>
32
+ </edge>
33
+ </graph></graphml>
amtrak_com/20260128_013657/state_graph.json ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260128_013657/utg_interactive.html ADDED
@@ -0,0 +1,1728 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>UTG Interactive Visualization</title>
5
+ <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.28.1/cytoscape.min.js"></script>
8
+ <style>
9
+ :root {
10
+ --bg-primary: #ffffff;
11
+ --bg-secondary: #f5f5f5;
12
+ --bg-tertiary: #e8e8e8;
13
+ --text-primary: #333333;
14
+ --text-secondary: #666666;
15
+ --border-color: #dddddd;
16
+ --accent-blue: #2196F3;
17
+ --accent-teal: #4ECDC4;
18
+ --accent-red: #FF6B6B;
19
+ --accent-orange: #FFA726;
20
+ --accent-purple: #9C27B0;
21
+ --accent-green: #66BB6A;
22
+ --graph-bg: #f8f9fa;
23
+ --node-text: #ffffff;
24
+ --edge-color: #999999;
25
+ --shadow: rgba(0, 0, 0, 0.1);
26
+ }
27
+
28
+ [data-theme="dark"] {
29
+ --bg-primary: #1a1a2e;
30
+ --bg-secondary: #16213e;
31
+ --bg-tertiary: #0f3460;
32
+ --text-primary: #e8e8e8;
33
+ --text-secondary: #a0a0a0;
34
+ --border-color: #2d3748;
35
+ --accent-blue: #64B5F6;
36
+ --accent-teal: #4DB6AC;
37
+ --accent-red: #EF5350;
38
+ --accent-orange: #FFB74D;
39
+ --accent-purple: #BA68C8;
40
+ --accent-green: #81C784;
41
+ --graph-bg: #0d1b2a;
42
+ --node-text: #ffffff;
43
+ --edge-color: #5a6578;
44
+ --shadow: rgba(0, 0, 0, 0.3);
45
+ }
46
+
47
+ * {
48
+ box-sizing: border-box;
49
+ transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
50
+ }
51
+
52
+ html, body {
53
+ width: 100%;
54
+ height: 100%;
55
+ margin: 0;
56
+ padding: 0;
57
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
58
+ background: var(--bg-primary);
59
+ color: var(--text-primary);
60
+ }
61
+
62
+ .container {
63
+ display: flex;
64
+ flex-direction: column;
65
+ height: 100%;
66
+ }
67
+
68
+ /* Header / Toolbar */
69
+ .toolbar {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: space-between;
73
+ padding: 12px 20px;
74
+ background: var(--bg-secondary);
75
+ border-bottom: 1px solid var(--border-color);
76
+ flex-wrap: wrap;
77
+ gap: 10px;
78
+ }
79
+
80
+ .toolbar-left {
81
+ display: flex;
82
+ align-items: center;
83
+ gap: 20px;
84
+ }
85
+
86
+ .toolbar-right {
87
+ display: flex;
88
+ align-items: center;
89
+ gap: 15px;
90
+ }
91
+
92
+ .title {
93
+ font-size: 18px;
94
+ font-weight: 600;
95
+ color: var(--text-primary);
96
+ }
97
+
98
+ /* Theme Toggle */
99
+ .theme-toggle {
100
+ display: flex;
101
+ align-items: center;
102
+ gap: 8px;
103
+ cursor: pointer;
104
+ padding: 6px 12px;
105
+ border-radius: 20px;
106
+ background: var(--bg-tertiary);
107
+ border: 1px solid var(--border-color);
108
+ }
109
+
110
+ .theme-toggle:hover {
111
+ background: var(--border-color);
112
+ }
113
+
114
+ .theme-icon {
115
+ font-size: 16px;
116
+ }
117
+
118
+ /* Layout Selector */
119
+ .layout-select {
120
+ padding: 6px 12px;
121
+ border-radius: 6px;
122
+ border: 1px solid var(--border-color);
123
+ background: var(--bg-tertiary);
124
+ color: var(--text-primary);
125
+ font-size: 13px;
126
+ cursor: pointer;
127
+ }
128
+
129
+ /* Search */
130
+ .search-container {
131
+ position: relative;
132
+ }
133
+
134
+ .search-input {
135
+ padding: 6px 12px 6px 32px;
136
+ border-radius: 20px;
137
+ border: 1px solid var(--border-color);
138
+ background: var(--bg-tertiary);
139
+ color: var(--text-primary);
140
+ font-size: 13px;
141
+ width: 200px;
142
+ }
143
+
144
+ .search-input::placeholder {
145
+ color: var(--text-secondary);
146
+ }
147
+
148
+ .search-icon {
149
+ position: absolute;
150
+ left: 10px;
151
+ top: 50%;
152
+ transform: translateY(-50%);
153
+ color: var(--text-secondary);
154
+ }
155
+
156
+ /* Main Content */
157
+ .main-content {
158
+ display: flex;
159
+ flex: 1;
160
+ overflow: hidden;
161
+ }
162
+
163
+ /* Graph Container */
164
+ #cy {
165
+ flex: 1;
166
+ background: var(--graph-bg);
167
+ }
168
+
169
+ /* Side Panel */
170
+ .side-panel {
171
+ width: 320px;
172
+ background: var(--bg-secondary);
173
+ border-left: 1px solid var(--border-color);
174
+ display: flex;
175
+ flex-direction: column;
176
+ overflow: hidden;
177
+ }
178
+
179
+ .panel-section {
180
+ padding: 16px;
181
+ border-bottom: 1px solid var(--border-color);
182
+ }
183
+
184
+ .panel-title {
185
+ font-size: 14px;
186
+ font-weight: 600;
187
+ color: var(--text-primary);
188
+ margin-bottom: 12px;
189
+ display: flex;
190
+ align-items: center;
191
+ gap: 8px;
192
+ }
193
+
194
+ /* Statistics Grid */
195
+ .stats-grid {
196
+ display: grid;
197
+ grid-template-columns: repeat(2, 1fr);
198
+ gap: 12px;
199
+ }
200
+
201
+ .stat-card {
202
+ background: var(--bg-tertiary);
203
+ padding: 12px;
204
+ border-radius: 8px;
205
+ text-align: center;
206
+ }
207
+
208
+ .stat-value {
209
+ font-size: 24px;
210
+ font-weight: 700;
211
+ color: var(--accent-blue);
212
+ }
213
+
214
+ .stat-value.cycle {
215
+ color: var(--accent-red);
216
+ }
217
+
218
+ .stat-value.teal {
219
+ color: var(--accent-teal);
220
+ }
221
+
222
+ .stat-value.orange {
223
+ color: var(--accent-orange);
224
+ }
225
+
226
+ .stat-value.purple {
227
+ color: var(--accent-purple);
228
+ }
229
+
230
+ .stat-label {
231
+ font-size: 11px;
232
+ color: var(--text-secondary);
233
+ margin-top: 4px;
234
+ text-transform: uppercase;
235
+ letter-spacing: 0.5px;
236
+ }
237
+
238
+ /* Legend */
239
+ .legend {
240
+ display: flex;
241
+ flex-direction: column;
242
+ gap: 8px;
243
+ }
244
+
245
+ .legend-item {
246
+ display: flex;
247
+ align-items: center;
248
+ gap: 10px;
249
+ font-size: 13px;
250
+ color: var(--text-secondary);
251
+ }
252
+
253
+ .legend-color {
254
+ width: 16px;
255
+ height: 16px;
256
+ border-radius: 50%;
257
+ flex-shrink: 0;
258
+ }
259
+
260
+ /* Node Details */
261
+ .node-details {
262
+ flex: 1;
263
+ overflow-y: auto;
264
+ padding: 16px;
265
+ }
266
+
267
+ .detail-placeholder {
268
+ text-align: center;
269
+ color: var(--text-secondary);
270
+ font-size: 13px;
271
+ padding: 40px 20px;
272
+ }
273
+
274
+ .detail-content {
275
+ display: none;
276
+ }
277
+
278
+ .detail-header {
279
+ margin-bottom: 16px;
280
+ }
281
+
282
+ .detail-state-id {
283
+ font-family: 'Monaco', 'Menlo', monospace;
284
+ font-size: 14px;
285
+ color: var(--accent-blue);
286
+ word-break: break-all;
287
+ background: var(--bg-tertiary);
288
+ padding: 8px 12px;
289
+ border-radius: 6px;
290
+ }
291
+
292
+ .detail-url {
293
+ font-size: 12px;
294
+ color: var(--text-secondary);
295
+ margin-top: 8px;
296
+ word-break: break-all;
297
+ }
298
+
299
+ .detail-row {
300
+ display: flex;
301
+ justify-content: space-between;
302
+ padding: 8px 0;
303
+ border-bottom: 1px solid var(--border-color);
304
+ font-size: 13px;
305
+ }
306
+
307
+ .detail-label {
308
+ color: var(--text-secondary);
309
+ }
310
+
311
+ .detail-value {
312
+ font-weight: 500;
313
+ color: var(--text-primary);
314
+ }
315
+
316
+ .badge {
317
+ display: inline-block;
318
+ padding: 2px 8px;
319
+ border-radius: 12px;
320
+ font-size: 11px;
321
+ font-weight: 500;
322
+ }
323
+
324
+ .badge-root {
325
+ background: var(--accent-purple);
326
+ color: white;
327
+ }
328
+
329
+ .badge-leaf {
330
+ background: var(--accent-green);
331
+ color: white;
332
+ }
333
+
334
+ .badge-cycle {
335
+ background: var(--accent-red);
336
+ color: white;
337
+ }
338
+
339
+ .actions-list {
340
+ margin-top: 12px;
341
+ }
342
+
343
+ .actions-title {
344
+ font-size: 12px;
345
+ font-weight: 600;
346
+ color: var(--text-primary);
347
+ margin-bottom: 8px;
348
+ }
349
+
350
+ .action-item {
351
+ font-size: 12px;
352
+ color: var(--text-secondary);
353
+ padding: 4px 8px;
354
+ background: var(--bg-tertiary);
355
+ border-radius: 4px;
356
+ margin-bottom: 4px;
357
+ word-break: break-all;
358
+ }
359
+
360
+ /* Detail Type Badge */
361
+ .detail-type-badge {
362
+ display: inline-block;
363
+ padding: 4px 12px;
364
+ border-radius: 4px;
365
+ font-size: 11px;
366
+ font-weight: 600;
367
+ text-transform: uppercase;
368
+ letter-spacing: 0.5px;
369
+ margin-bottom: 12px;
370
+ }
371
+
372
+ .node-badge {
373
+ background: var(--accent-teal);
374
+ color: white;
375
+ }
376
+
377
+ .edge-badge {
378
+ background: var(--accent-orange);
379
+ color: white;
380
+ }
381
+
382
+ /* Edge Flow Display */
383
+ .edge-flow {
384
+ display: flex;
385
+ align-items: center;
386
+ justify-content: center;
387
+ gap: 12px;
388
+ padding: 16px;
389
+ background: var(--bg-tertiary);
390
+ border-radius: 8px;
391
+ margin-bottom: 16px;
392
+ }
393
+
394
+ .edge-flow-node {
395
+ font-family: 'Monaco', 'Menlo', monospace;
396
+ font-size: 13px;
397
+ color: var(--accent-blue);
398
+ background: var(--bg-primary);
399
+ padding: 6px 12px;
400
+ border-radius: 6px;
401
+ border: 1px solid var(--border-color);
402
+ }
403
+
404
+ .edge-flow-arrow {
405
+ font-size: 20px;
406
+ color: var(--accent-orange);
407
+ font-weight: bold;
408
+ }
409
+
410
+ /* Edge Section */
411
+ .edge-section {
412
+ margin-top: 12px;
413
+ padding: 10px;
414
+ background: var(--bg-tertiary);
415
+ border-radius: 6px;
416
+ }
417
+
418
+ .edge-section-title {
419
+ font-size: 11px;
420
+ font-weight: 600;
421
+ color: var(--text-secondary);
422
+ text-transform: uppercase;
423
+ letter-spacing: 0.5px;
424
+ margin-bottom: 6px;
425
+ }
426
+
427
+ .edge-section-content {
428
+ font-size: 13px;
429
+ color: var(--text-primary);
430
+ word-break: break-all;
431
+ line-height: 1.5;
432
+ }
433
+
434
+ .edge-section-content.code {
435
+ font-family: 'Monaco', 'Menlo', monospace;
436
+ font-size: 11px;
437
+ background: var(--bg-primary);
438
+ padding: 8px;
439
+ border-radius: 4px;
440
+ overflow-x: auto;
441
+ }
442
+
443
+ /* Active button state */
444
+ .btn.active {
445
+ background: var(--accent-blue);
446
+ border-color: var(--accent-blue);
447
+ color: white;
448
+ }
449
+
450
+ /* Footer */
451
+ .footer {
452
+ padding: 10px 20px;
453
+ background: var(--bg-secondary);
454
+ border-top: 1px solid var(--border-color);
455
+ font-size: 12px;
456
+ color: var(--text-secondary);
457
+ display: flex;
458
+ justify-content: space-between;
459
+ align-items: center;
460
+ }
461
+
462
+ /* Buttons */
463
+ .btn {
464
+ padding: 6px 14px;
465
+ border-radius: 6px;
466
+ border: 1px solid var(--border-color);
467
+ background: var(--bg-tertiary);
468
+ color: var(--text-primary);
469
+ font-size: 13px;
470
+ cursor: pointer;
471
+ display: flex;
472
+ align-items: center;
473
+ gap: 6px;
474
+ }
475
+
476
+ .btn:hover {
477
+ background: var(--border-color);
478
+ }
479
+
480
+ .btn-primary {
481
+ background: var(--accent-blue);
482
+ border-color: var(--accent-blue);
483
+ color: white;
484
+ }
485
+
486
+ .btn-primary:hover {
487
+ opacity: 0.9;
488
+ }
489
+
490
+ /* Filter Chips */
491
+ .filter-chips {
492
+ display: flex;
493
+ flex-wrap: wrap;
494
+ gap: 6px;
495
+ margin-top: 8px;
496
+ }
497
+
498
+ .chip {
499
+ padding: 4px 10px;
500
+ border-radius: 16px;
501
+ font-size: 12px;
502
+ cursor: pointer;
503
+ border: 1px solid var(--border-color);
504
+ background: var(--bg-tertiary);
505
+ color: var(--text-secondary);
506
+ }
507
+
508
+ .chip.active {
509
+ background: var(--accent-blue);
510
+ border-color: var(--accent-blue);
511
+ color: white;
512
+ }
513
+
514
+ .chip:hover:not(.active) {
515
+ background: var(--border-color);
516
+ }
517
+
518
+ /* Responsive */
519
+ @media (max-width: 768px) {
520
+ .side-panel {
521
+ display: none;
522
+ }
523
+ .toolbar {
524
+ padding: 10px;
525
+ }
526
+ .search-input {
527
+ width: 150px;
528
+ }
529
+ }
530
+
531
+ /* Replay Modal */
532
+ .modal-overlay {
533
+ display: none;
534
+ position: fixed;
535
+ top: 0;
536
+ left: 0;
537
+ width: 100%;
538
+ height: 100%;
539
+ background: rgba(0, 0, 0, 0.8);
540
+ z-index: 1000;
541
+ justify-content: center;
542
+ align-items: center;
543
+ }
544
+
545
+ .modal-overlay.active {
546
+ display: flex;
547
+ }
548
+
549
+ .modal-content {
550
+ background: var(--bg-primary);
551
+ border-radius: 12px;
552
+ max-width: 95vw;
553
+ max-height: 90vh;
554
+ overflow: hidden;
555
+ box-shadow: 0 20px 60px var(--shadow);
556
+ }
557
+
558
+ .modal-header {
559
+ display: flex;
560
+ justify-content: space-between;
561
+ align-items: center;
562
+ padding: 16px 20px;
563
+ background: var(--bg-secondary);
564
+ border-bottom: 1px solid var(--border-color);
565
+ }
566
+
567
+ .modal-title {
568
+ font-size: 16px;
569
+ font-weight: 600;
570
+ color: var(--text-primary);
571
+ }
572
+
573
+ .modal-close {
574
+ background: none;
575
+ border: none;
576
+ font-size: 24px;
577
+ cursor: pointer;
578
+ color: var(--text-secondary);
579
+ padding: 4px 8px;
580
+ border-radius: 4px;
581
+ }
582
+
583
+ .modal-close:hover {
584
+ background: var(--bg-tertiary);
585
+ color: var(--text-primary);
586
+ }
587
+
588
+ .modal-body {
589
+ padding: 20px;
590
+ overflow-y: auto;
591
+ max-height: calc(90vh - 60px);
592
+ }
593
+
594
+ .replay-container {
595
+ display: flex;
596
+ align-items: center;
597
+ justify-content: center;
598
+ gap: 30px;
599
+ flex-wrap: wrap;
600
+ }
601
+
602
+ .replay-state {
603
+ text-align: center;
604
+ max-width: 45%;
605
+ }
606
+
607
+ .replay-state-label {
608
+ font-size: 12px;
609
+ font-weight: 600;
610
+ color: var(--text-secondary);
611
+ text-transform: uppercase;
612
+ letter-spacing: 0.5px;
613
+ margin-bottom: 8px;
614
+ }
615
+
616
+ .replay-state-id {
617
+ font-family: 'Monaco', 'Menlo', monospace;
618
+ font-size: 11px;
619
+ color: var(--accent-blue);
620
+ margin-bottom: 12px;
621
+ }
622
+
623
+ .replay-screenshot-container {
624
+ position: relative;
625
+ display: inline-block;
626
+ border: 2px solid var(--border-color);
627
+ border-radius: 8px;
628
+ overflow: hidden;
629
+ background: var(--bg-tertiary);
630
+ }
631
+
632
+ .replay-screenshot {
633
+ max-width: 100%;
634
+ max-height: 400px;
635
+ display: block;
636
+ }
637
+
638
+ .replay-screenshot.placeholder {
639
+ width: 300px;
640
+ height: 200px;
641
+ display: flex;
642
+ align-items: center;
643
+ justify-content: center;
644
+ color: var(--text-secondary);
645
+ font-size: 14px;
646
+ }
647
+
648
+ .click-marker {
649
+ position: absolute;
650
+ border: 3px solid #FF6B6B;
651
+ background: rgba(255, 107, 107, 0.3);
652
+ border-radius: 4px;
653
+ pointer-events: none;
654
+ animation: pulse 1.5s ease-in-out infinite;
655
+ }
656
+
657
+ .click-marker::after {
658
+ content: '👆';
659
+ position: absolute;
660
+ top: -30px;
661
+ left: 50%;
662
+ transform: translateX(-50%);
663
+ font-size: 20px;
664
+ }
665
+
666
+ @keyframes pulse {
667
+ 0%, 100% { opacity: 1; transform: scale(1); }
668
+ 50% { opacity: 0.7; transform: scale(1.05); }
669
+ }
670
+
671
+ .replay-arrow {
672
+ font-size: 48px;
673
+ color: var(--accent-orange);
674
+ flex-shrink: 0;
675
+ }
676
+
677
+ .replay-action-info {
678
+ text-align: center;
679
+ margin-top: 20px;
680
+ padding: 16px;
681
+ background: var(--bg-secondary);
682
+ border-radius: 8px;
683
+ }
684
+
685
+ .replay-action-type {
686
+ display: inline-block;
687
+ padding: 4px 12px;
688
+ background: var(--accent-orange);
689
+ color: white;
690
+ border-radius: 16px;
691
+ font-size: 12px;
692
+ font-weight: 600;
693
+ margin-bottom: 8px;
694
+ }
695
+
696
+ .replay-action-desc {
697
+ font-size: 14px;
698
+ color: var(--text-primary);
699
+ }
700
+
701
+ /* Gallery Thumbnails */
702
+ .gallery-thumbnail {
703
+ width: 120px;
704
+ height: 80px;
705
+ object-fit: cover;
706
+ border-radius: 6px;
707
+ cursor: pointer;
708
+ border: 2px solid transparent;
709
+ transition: border-color 0.2s ease, transform 0.2s ease;
710
+ flex-shrink: 0;
711
+ }
712
+
713
+ .gallery-thumbnail:hover {
714
+ transform: scale(1.05);
715
+ border-color: var(--accent-blue);
716
+ }
717
+
718
+ .gallery-thumbnail.active {
719
+ border-color: var(--accent-orange);
720
+ box-shadow: 0 0 10px rgba(255, 167, 38, 0.5);
721
+ }
722
+
723
+ .gallery-thumbnails::-webkit-scrollbar {
724
+ height: 8px;
725
+ }
726
+
727
+ .gallery-thumbnails::-webkit-scrollbar-track {
728
+ background: var(--bg-tertiary);
729
+ border-radius: 4px;
730
+ }
731
+
732
+ .gallery-thumbnails::-webkit-scrollbar-thumb {
733
+ background: var(--border-color);
734
+ border-radius: 4px;
735
+ }
736
+
737
+ .gallery-thumbnails::-webkit-scrollbar-thumb:hover {
738
+ background: var(--text-secondary);
739
+ }
740
+
741
+ .screenshot-badge {
742
+ display: inline-block;
743
+ padding: 2px 6px;
744
+ border-radius: 10px;
745
+ font-size: 10px;
746
+ background: var(--accent-teal);
747
+ color: white;
748
+ margin-left: 8px;
749
+ }
750
+ </style>
751
+ </head>
752
+ <body>
753
+ <div class="container">
754
+ <!-- Toolbar -->
755
+ <div class="toolbar">
756
+ <div class="toolbar-left">
757
+ <span class="title">UTG Visualization</span>
758
+ <select class="layout-select" id="layoutSelect">
759
+ <option value="cose">Force-Directed (CoSE)</option>
760
+ <option value="breadthfirst">Hierarchical</option>
761
+ <option value="circle">Circular</option>
762
+ <option value="grid">Grid</option>
763
+ <option value="concentric">Concentric</option>
764
+ </select>
765
+ </div>
766
+ <div class="toolbar-right">
767
+ <div class="search-container">
768
+ <span class="search-icon">&#128269;</span>
769
+ <input type="text" class="search-input" id="searchInput" placeholder="Search states...">
770
+ </div>
771
+ <button class="btn" id="edgeLabelBtn" title="Toggle edge labels">
772
+ <span id="edgeLabelIcon">&#128279;</span>
773
+ <span id="edgeLabelText">Labels</span>
774
+ </button>
775
+ <button class="btn" id="fitBtn">Fit View</button>
776
+ <button class="btn" id="exportBtn">Export PNG</button>
777
+ <div class="theme-toggle" id="themeToggle">
778
+ <span class="theme-icon" id="themeIcon">&#9790;</span>
779
+ <span id="themeText">Dark</span>
780
+ </div>
781
+ </div>
782
+ </div>
783
+
784
+ <!-- Main Content -->
785
+ <div class="main-content">
786
+ <!-- Graph -->
787
+ <div id="cy"></div>
788
+
789
+ <!-- Side Panel -->
790
+ <div class="side-panel">
791
+ <!-- Statistics -->
792
+ <div class="panel-section">
793
+ <div class="panel-title">&#128202; Statistics</div>
794
+ <div class="stats-grid">
795
+ <div class="stat-card">
796
+ <div class="stat-value">3</div>
797
+ <div class="stat-label">States</div>
798
+ </div>
799
+ <div class="stat-card">
800
+ <div class="stat-value teal">2</div>
801
+ <div class="stat-label">Transitions</div>
802
+ </div>
803
+ <div class="stat-card">
804
+ <div class="stat-value cycle">0</div>
805
+ <div class="stat-label">Cycles</div>
806
+ </div>
807
+ <div class="stat-card">
808
+ <div class="stat-value orange">2</div>
809
+ <div class="stat-label">Max Depth</div>
810
+ </div>
811
+ <div class="stat-card">
812
+ <div class="stat-value purple">1</div>
813
+ <div class="stat-label">Entry Points</div>
814
+ </div>
815
+ <div class="stat-card">
816
+ <div class="stat-value">50.0</div>
817
+ <div class="stat-label">Avg Actions</div>
818
+ </div>
819
+ </div>
820
+ </div>
821
+
822
+ <!-- Legend -->
823
+ <div class="panel-section">
824
+ <div class="panel-title">&#127912; Legend</div>
825
+ <div class="legend">
826
+ <div class="legend-item">
827
+ <div class="legend-color" style="background: #4ECDC4;"></div>
828
+ <span>Regular State</span>
829
+ </div>
830
+ <div class="legend-item">
831
+ <div class="legend-color" style="background: #FF6B6B;"></div>
832
+ <span>State in Cycle</span>
833
+ </div>
834
+ <div class="legend-item">
835
+ <div class="legend-color" style="background: #9C27B0;"></div>
836
+ <span>Entry Point (Root)</span>
837
+ </div>
838
+ <div class="legend-item">
839
+ <div class="legend-color" style="background: #66BB6A;"></div>
840
+ <span>Leaf State</span>
841
+ </div>
842
+ </div>
843
+ <div class="filter-chips">
844
+ <div class="chip active" data-filter="all">All</div>
845
+ <div class="chip" data-filter="cycle">In Cycles</div>
846
+ <div class="chip" data-filter="root">Roots</div>
847
+ <div class="chip" data-filter="leaf">Leaves</div>
848
+ </div>
849
+ </div>
850
+
851
+ <!-- Details Panel -->
852
+ <div class="node-details">
853
+ <div class="detail-placeholder" id="detailPlaceholder">
854
+ &#128073; Click a node or edge to see details
855
+ </div>
856
+ <!-- Node Details -->
857
+ <div class="detail-content" id="nodeDetailContent">
858
+ <div class="detail-type-badge node-badge">State</div>
859
+ <div class="detail-header">
860
+ <div class="detail-state-id" id="detailStateId"></div>
861
+ <div class="detail-url" id="detailUrl"></div>
862
+ </div>
863
+ <div id="detailBadges" style="margin-bottom: 12px;"></div>
864
+ <div class="detail-row">
865
+ <span class="detail-label">Depth</span>
866
+ <span class="detail-value" id="detailDepth"></span>
867
+ </div>
868
+ <div class="detail-row">
869
+ <span class="detail-label">In-Degree</span>
870
+ <span class="detail-value" id="detailInDegree"></span>
871
+ </div>
872
+ <div class="detail-row">
873
+ <span class="detail-label">Out-Degree</span>
874
+ <span class="detail-value" id="detailOutDegree"></span>
875
+ </div>
876
+ <div class="detail-row">
877
+ <span class="detail-label">Actions Available</span>
878
+ <span class="detail-value" id="detailActions"></span>
879
+ </div>
880
+ <div class="actions-list" id="actionsList">
881
+ <div class="actions-title">Available Actions:</div>
882
+ <div id="actionsContainer"></div>
883
+ </div>
884
+ <div class="detail-row">
885
+ <span class="detail-label">Screenshots</span>
886
+ <span class="detail-value" id="detailScreenshotCount">0</span>
887
+ </div>
888
+ <button class="btn btn-primary" id="viewScreenshotBtn" style="width: 100%; margin-top: 16px; justify-content: center;">
889
+ &#128247; View Screenshot
890
+ </button>
891
+ <button class="btn" id="viewAllScreenshotsBtn" style="width: 100%; margin-top: 8px; justify-content: center;">
892
+ &#128444; Browse All Screenshots
893
+ </button>
894
+ </div>
895
+ <!-- Edge Details -->
896
+ <div class="detail-content" id="edgeDetailContent">
897
+ <div class="detail-type-badge edge-badge">Transition</div>
898
+ <div class="edge-flow">
899
+ <span class="edge-flow-node" id="edgeFromState"></span>
900
+ <span class="edge-flow-arrow">&#8594;</span>
901
+ <span class="edge-flow-node" id="edgeToState"></span>
902
+ </div>
903
+ <div class="detail-row">
904
+ <span class="detail-label">Action Type</span>
905
+ <span class="detail-value" id="edgeActionType"></span>
906
+ </div>
907
+ <div class="detail-row">
908
+ <span class="detail-label">Element Tag</span>
909
+ <span class="detail-value" id="edgeTag"></span>
910
+ </div>
911
+ <div class="edge-section" id="edgeDescSection">
912
+ <div class="edge-section-title">Description</div>
913
+ <div class="edge-section-content" id="edgeDescription"></div>
914
+ </div>
915
+ <div class="edge-section" id="edgeSelectorSection">
916
+ <div class="edge-section-title">CSS Selector</div>
917
+ <div class="edge-section-content code" id="edgeSelector"></div>
918
+ </div>
919
+ <div class="edge-section" id="edgeTextSection">
920
+ <div class="edge-section-title">Element Text</div>
921
+ <div class="edge-section-content" id="edgeText"></div>
922
+ </div>
923
+ <div class="edge-section" id="edgeValueSection">
924
+ <div class="edge-section-title">Input Value</div>
925
+ <div class="edge-section-content" id="edgeValue"></div>
926
+ </div>
927
+ <button class="btn btn-primary" id="replayBtn" style="width: 100%; margin-top: 16px; justify-content: center;">
928
+ &#9654; Replay Transition
929
+ </button>
930
+ </div>
931
+ </div>
932
+ </div>
933
+ </div>
934
+
935
+ <!-- Replay Modal -->
936
+ <div class="modal-overlay" id="replayModal">
937
+ <div class="modal-content">
938
+ <div class="modal-header">
939
+ <span class="modal-title">&#128250; Transition Replay</span>
940
+ <button class="modal-close" id="modalClose">&times;</button>
941
+ </div>
942
+ <div class="modal-body">
943
+ <div class="replay-container">
944
+ <div class="replay-state">
945
+ <div class="replay-state-label">From State</div>
946
+ <div class="replay-state-id" id="replayFromId"></div>
947
+ <div class="replay-screenshot-container" id="replayFromContainer">
948
+ <img class="replay-screenshot" id="replayFromImg" src="" alt="Source state screenshot">
949
+ <div class="click-marker" id="clickMarker"></div>
950
+ </div>
951
+ </div>
952
+ <div class="replay-arrow">&#10145;</div>
953
+ <div class="replay-state">
954
+ <div class="replay-state-label">To State</div>
955
+ <div class="replay-state-id" id="replayToId"></div>
956
+ <div class="replay-screenshot-container">
957
+ <img class="replay-screenshot" id="replayToImg" src="" alt="Target state screenshot">
958
+ </div>
959
+ </div>
960
+ </div>
961
+ <div class="replay-action-info">
962
+ <span class="replay-action-type" id="replayActionType"></span>
963
+ <div class="replay-action-desc" id="replayActionDesc"></div>
964
+ </div>
965
+ </div>
966
+ </div>
967
+ </div>
968
+
969
+ <!-- Screenshot Modal -->
970
+ <div class="modal-overlay" id="screenshotModal">
971
+ <div class="modal-content" style="max-width: 80vw;">
972
+ <div class="modal-header">
973
+ <span class="modal-title">&#128247; State Screenshot</span>
974
+ <button class="modal-close" id="screenshotModalClose">&times;</button>
975
+ </div>
976
+ <div class="modal-body" style="text-align: center;">
977
+ <div class="replay-state-label" id="screenshotStateLabel">State</div>
978
+ <div class="replay-state-id" id="screenshotStateId"></div>
979
+ <div class="replay-screenshot-container" style="display: inline-block;">
980
+ <img class="replay-screenshot" id="screenshotImg" src="" alt="State screenshot" style="max-height: 70vh;">
981
+ </div>
982
+ <div class="detail-url" id="screenshotUrl" style="margin-top: 12px;"></div>
983
+ </div>
984
+ </div>
985
+ </div>
986
+
987
+ <!-- Screenshots Gallery Modal -->
988
+ <div class="modal-overlay" id="galleryModal">
989
+ <div class="modal-content" style="max-width: 90vw; max-height: 90vh;">
990
+ <div class="modal-header">
991
+ <span class="modal-title">&#128444; Screenshots Gallery</span>
992
+ <button class="modal-close" id="galleryModalClose">&times;</button>
993
+ </div>
994
+ <div class="modal-body" style="padding: 20px;">
995
+ <div class="gallery-header" style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;">
996
+ <div>
997
+ <span class="replay-state-label">State:</span>
998
+ <span class="replay-state-id" id="galleryStateId"></span>
999
+ </div>
1000
+ <div class="gallery-nav" style="display: flex; align-items: center; gap: 12px;">
1001
+ <button class="btn" id="galleryPrevBtn">&#9664; Prev</button>
1002
+ <span id="galleryCounter" style="font-size: 14px; color: var(--text-secondary);">1 / 1</span>
1003
+ <button class="btn" id="galleryNextBtn">Next &#9654;</button>
1004
+ </div>
1005
+ </div>
1006
+ <div class="gallery-main" style="text-align: center; margin-bottom: 16px;">
1007
+ <div class="replay-screenshot-container" style="display: inline-block; max-width: 100%;">
1008
+ <img class="replay-screenshot" id="galleryImg" src="" alt="Screenshot" style="max-height: 60vh; max-width: 100%;">
1009
+ </div>
1010
+ </div>
1011
+ <div class="gallery-info" style="background: var(--bg-secondary); padding: 12px; border-radius: 8px;">
1012
+ <div class="detail-row">
1013
+ <span class="detail-label">Triggered by action</span>
1014
+ <span class="detail-value" id="galleryAction">N/A</span>
1015
+ </div>
1016
+ <div class="detail-row">
1017
+ <span class="detail-label">From state</span>
1018
+ <span class="detail-value" id="galleryFromState">N/A</span>
1019
+ </div>
1020
+ <div class="detail-row">
1021
+ <span class="detail-label">Timestamp</span>
1022
+ <span class="detail-value" id="galleryTimestamp">N/A</span>
1023
+ </div>
1024
+ <div class="detail-row">
1025
+ <span class="detail-label">Visit #</span>
1026
+ <span class="detail-value" id="galleryVisitIndex">0</span>
1027
+ </div>
1028
+ </div>
1029
+ <div class="gallery-thumbnails" id="galleryThumbnails" style="display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; padding: 8px 0;">
1030
+ </div>
1031
+ </div>
1032
+ </div>
1033
+ </div>
1034
+
1035
+ <!-- Footer -->
1036
+ <div class="footer">
1037
+ <span>Generated by Web UTG Crawler</span>
1038
+ <span id="hoverInfo">Hover over nodes or edges to see details</span>
1039
+ </div>
1040
+ </div>
1041
+
1042
+ <script>
1043
+ // Theme Management
1044
+ const html = document.documentElement;
1045
+ const themeToggle = document.getElementById('themeToggle');
1046
+ const themeIcon = document.getElementById('themeIcon');
1047
+ const themeText = document.getElementById('themeText');
1048
+
1049
+ // Check for saved theme preference or default to light
1050
+ const savedTheme = localStorage.getItem('utg-theme') || 'light';
1051
+ html.setAttribute('data-theme', savedTheme);
1052
+ updateThemeUI(savedTheme);
1053
+
1054
+ themeToggle.addEventListener('click', () => {
1055
+ const currentTheme = html.getAttribute('data-theme');
1056
+ const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
1057
+ html.setAttribute('data-theme', newTheme);
1058
+ localStorage.setItem('utg-theme', newTheme);
1059
+ updateThemeUI(newTheme);
1060
+ updateCyStyle();
1061
+ });
1062
+
1063
+ function updateThemeUI(theme) {
1064
+ if (theme === 'dark') {
1065
+ themeIcon.innerHTML = '&#9728;'; // Sun
1066
+ themeText.textContent = 'Light';
1067
+ } else {
1068
+ themeIcon.innerHTML = '&#9790;'; // Moon
1069
+ themeText.textContent = 'Dark';
1070
+ }
1071
+ }
1072
+
1073
+ // Cytoscape initialization
1074
+ const elements = [{"data": {"id": "state_75fbd3b0cc158494", "label": "state_75", "url": "https://www.amtrak.com/", "actions": 50, "actionList": ["Click a: Winter Storm Fern Adjustments", "Click a", "Click a: BOOK", "Click a: TRAIN STATUS", "Click a: MY TRIP", "Click a: PLAN", "Click a: SCHEDULES", "Click a: DEALS", "Click a: Guest Rewards", "Click a: Sign In"], "inCycle": "no", "depth": 0, "inDegree": 0, "outDegree": 1, "isRoot": "yes", "isLeaf": "no", "screenshotPath": "output/run_20260128_013657/screenshots/state_75fbd3b0cc158494.png", "screenshots": [{"path": "output/run_20260128_013657/screenshots/state_75fbd3b0cc158494.png", "timestamp": "2026-01-28T01:37:16.124391", "from_action": null, "visit_index": 0}], "screenshotCount": 1}}, {"data": {"id": "state_744f8f9a25b7640f", "label": "state_74", "url": "https://www.amtrak.com/home", "actions": 50, "actionList": ["Click a: Winter Storm Fern Adjustments", "Click a", "Click a: BOOK", "Click a: TRAIN STATUS", "Click a: MY TRIP", "Click a: PLAN", "Click a: SCHEDULES", "Click a: DEALS", "Click a: Guest Rewards", "Click a: English"], "inCycle": "no", "depth": 1, "inDegree": 1, "outDegree": 1, "isRoot": "no", "isLeaf": "no", "screenshotPath": "output/run_20260128_013657/screenshots/transition_state_75fbd3_20260128_013734_084288.png", "screenshots": [{"path": "output/run_20260128_013657/screenshots/transition_state_75fbd3_20260128_013734_084288.png", "timestamp": "2026-01-28T01:37:46.002663", "from_action": "Click a: Winter Storm Fern Adjustments", "from_state": "state_75fbd3b0cc158494", "visit_index": 0}, {"path": "output/run_20260128_013657/screenshots/transition_state_744f8f_20260128_013758_625162.png", "timestamp": "2026-01-28T01:37:58.680182", "from_action": "Click a: Winter Storm Fern Adjustments", "from_state": "state_744f8f9a25b7640f", "visit_index": 1}], "screenshotCount": 2}}, {"data": {"id": "state_ed56886a3281327d", "label": "state_ed", "url": "https://www.amtrak.com/home", "actions": 50, "actionList": ["Click a: Winter Storm Fern Adjustments", "Click a", "Click a: BOOK", "Click a: TRAIN STATUS", "Click a: MY TRIP", "Click a: PLAN", "Click a: SCHEDULES", "Click a: DEALS", "Click a: Guest Rewards", "Click a: English"], "inCycle": "no", "depth": 2, "inDegree": 1, "outDegree": 0, "isRoot": "no", "isLeaf": "yes", "screenshotPath": "output/run_20260128_013657/screenshots/transition_state_744f8f_20260128_013816_290070.png", "screenshots": [{"path": "output/run_20260128_013657/screenshots/transition_state_744f8f_20260128_013816_290070.png", "timestamp": "2026-01-28T01:38:28.222960", "from_action": "Click a: START PLANNING(opens in a new tab)", "from_state": "state_744f8f9a25b7640f", "visit_index": 0}, {"path": "output/run_20260128_013657/screenshots/transition_state_ed5688_20260128_013842_158487.png", "timestamp": "2026-01-28T01:38:42.245857", "from_action": "Click a: START PLANNING(opens in a new tab)", "from_state": "state_ed56886a3281327d", "visit_index": 1}, {"path": "output/run_20260128_013657/screenshots/transition_state_ed5688_20260128_013900_228854.png", "timestamp": "2026-01-28T01:39:00.315911", "from_action": "Click a: GET THE APP", "from_state": "state_ed56886a3281327d", "visit_index": 2}, {"path": "output/run_20260128_013657/screenshots/transition_state_ed5688_20260128_013918_339841.png", "timestamp": "2026-01-28T01:39:18.415886", "from_action": "Click a: Learn About Confirming Trips", "from_state": "state_ed56886a3281327d", "visit_index": 3}, {"path": "output/run_20260128_013657/screenshots/transition_state_ed5688_20260128_013939_351785.png", "timestamp": "2026-01-28T01:39:39.411433", "from_action": "Click a", "from_state": "state_ed56886a3281327d", "visit_index": 4}, {"path": "output/run_20260128_013657/screenshots/transition_state_ed5688_20260128_013959_199292.png", "timestamp": "2026-01-28T01:39:59.252296", "from_action": "Click a: MY TRIP", "from_state": "state_ed56886a3281327d", "visit_index": 5}, {"path": "output/run_20260128_013657/screenshots/transition_state_ed5688_20260128_014016_235417.png", "timestamp": "2026-01-28T01:40:16.296523", "from_action": "Click a: Guest Rewards", "from_state": "state_ed56886a3281327d", "visit_index": 6}, {"path": "output/run_20260128_013657/screenshots/transition_state_ed5688_20260128_014033_573462.png", "timestamp": "2026-01-28T01:40:33.624899", "from_action": "Click a: English", "from_state": "state_ed56886a3281327d", "visit_index": 7}, {"path": "output/run_20260128_013657/screenshots/transition_state_ed5688_20260128_014054_686457.png", "timestamp": "2026-01-28T01:40:54.736345", "from_action": "Click a: Need Help?", "from_state": "state_ed56886a3281327d", "visit_index": 8}], "screenshotCount": 9}}, {"data": {"source": "state_75fbd3b0cc158494", "target": "state_744f8f9a25b7640f", "label": "Click a: Winter Storm Fer", "fullLabel": "Click a: Winter Storm Fern Adjustments", "actionType": "click", "selector": "a:has-text(\"Winter Storm Fern Adjustments\")", "tag": "", "text": "", "inputValue": "", "fromStateLabel": "state_75", "toStateLabel": "state_74", "clickX": 400, "clickY": 15, "clickWidth": 235.45001220703125, "clickHeight": 15, "transitionScreenshot": "output/run_20260128_013657/screenshots/transition_state_75fbd3_20260128_013734_084288.png"}}, {"data": {"source": "state_744f8f9a25b7640f", "target": "state_ed56886a3281327d", "label": "Click a: START PLANNING(o", "fullLabel": "Click a: START PLANNING(opens in a new tab)", "actionType": "click", "selector": "a[aria-label='Learn more about Trip Planning Map']:has-text(\"START PLANNING(opens in a new tab)\")", "tag": "", "text": "", "inputValue": "", "fromStateLabel": "state_74", "toStateLabel": "state_ed", "clickX": 360, "clickY": -51.316650390625, "clickWidth": 179.183349609375, "clickHeight": 40, "transitionScreenshot": "output/run_20260128_013657/screenshots/transition_state_744f8f_20260128_013816_290070.png"}}];
1075
+ let showEdgeLabels = false; // Edge label toggle state
1076
+
1077
+ function getCyStyle() {
1078
+ const isDark = html.getAttribute('data-theme') === 'dark';
1079
+ return [
1080
+ {
1081
+ selector: 'node',
1082
+ style: {
1083
+ 'content': 'data(label)',
1084
+ 'text-valign': 'center',
1085
+ 'text-halign': 'center',
1086
+ 'background-color': function(ele) {
1087
+ if (ele.data('isRoot') === 'yes') return '#9C27B0';
1088
+ if (ele.data('isLeaf') === 'yes') return '#66BB6A';
1089
+ if (ele.data('inCycle') === 'yes') return '#FF6B6B';
1090
+ return '#4ECDC4';
1091
+ },
1092
+ 'width': function(ele) {
1093
+ const actions = ele.data('actions') || 0;
1094
+ return Math.max(40, Math.min(80, 40 + actions * 2)) + 'px';
1095
+ },
1096
+ 'height': function(ele) {
1097
+ const actions = ele.data('actions') || 0;
1098
+ return Math.max(40, Math.min(80, 40 + actions * 2)) + 'px';
1099
+ },
1100
+ 'font-size': '10px',
1101
+ 'color': '#fff',
1102
+ 'text-outline-color': isDark ? '#1a1a2e' : '#333',
1103
+ 'text-outline-width': 1,
1104
+ 'border-width': 2,
1105
+ 'border-color': isDark ? '#2d3748' : '#fff'
1106
+ }
1107
+ },
1108
+ {
1109
+ selector: 'edge',
1110
+ style: {
1111
+ 'target-arrow-shape': 'triangle',
1112
+ 'target-arrow-color': isDark ? '#5a6578' : '#666',
1113
+ 'line-color': isDark ? '#5a6578' : '#999',
1114
+ 'width': 2,
1115
+ 'curve-style': 'bezier',
1116
+ 'opacity': 0.7,
1117
+ 'label': showEdgeLabels ? 'data(label)' : '',
1118
+ 'font-size': '9px',
1119
+ 'text-rotation': 'autorotate',
1120
+ 'text-margin-y': -10,
1121
+ 'color': isDark ? '#a0a0a0' : '#555',
1122
+ 'text-background-color': isDark ? '#1a1a2e' : '#fff',
1123
+ 'text-background-opacity': 0.8,
1124
+ 'text-background-padding': '2px'
1125
+ }
1126
+ },
1127
+ {
1128
+ selector: 'node:selected',
1129
+ style: {
1130
+ 'border-width': 4,
1131
+ 'border-color': '#FFD700'
1132
+ }
1133
+ },
1134
+ {
1135
+ selector: 'edge:selected',
1136
+ style: {
1137
+ 'line-color': '#FFA726',
1138
+ 'target-arrow-color': '#FFA726',
1139
+ 'width': 4,
1140
+ 'opacity': 1,
1141
+ 'label': 'data(label)',
1142
+ 'font-size': '10px',
1143
+ 'font-weight': 'bold',
1144
+ 'color': isDark ? '#FFB74D' : '#E65100',
1145
+ 'text-background-color': isDark ? '#1a1a2e' : '#fff',
1146
+ 'text-background-opacity': 0.9
1147
+ }
1148
+ },
1149
+ {
1150
+ selector: '.highlighted',
1151
+ style: {
1152
+ 'background-color': '#FFD700',
1153
+ 'transition-property': 'background-color',
1154
+ 'transition-duration': '0.3s'
1155
+ }
1156
+ },
1157
+ {
1158
+ selector: '.faded',
1159
+ style: {
1160
+ 'opacity': 0.2
1161
+ }
1162
+ },
1163
+ {
1164
+ selector: 'edge.highlighted-edge',
1165
+ style: {
1166
+ 'line-color': '#FFA726',
1167
+ 'target-arrow-color': '#FFA726',
1168
+ 'width': 3,
1169
+ 'opacity': 1
1170
+ }
1171
+ }
1172
+ ];
1173
+ }
1174
+
1175
+ var cy = cytoscape({
1176
+ container: document.getElementById('cy'),
1177
+ elements: elements,
1178
+ style: getCyStyle(),
1179
+ layout: {
1180
+ name: 'cose',
1181
+ animate: true,
1182
+ animationDuration: 500,
1183
+ nodeRepulsion: 8000,
1184
+ idealEdgeLength: 100
1185
+ }
1186
+ });
1187
+
1188
+ function updateCyStyle() {
1189
+ cy.style(getCyStyle());
1190
+ }
1191
+
1192
+ // Layout selection
1193
+ document.getElementById('layoutSelect').addEventListener('change', function(e) {
1194
+ const layoutName = e.target.value;
1195
+ let layoutOptions = { name: layoutName, animate: true, animationDuration: 500 };
1196
+
1197
+ if (layoutName === 'breadthfirst') {
1198
+ layoutOptions.directed = true;
1199
+ layoutOptions.spacingFactor = 1.5;
1200
+ } else if (layoutName === 'concentric') {
1201
+ layoutOptions.concentric = function(node) {
1202
+ return node.data('depth') !== undefined ? -node.data('depth') : 0;
1203
+ };
1204
+ layoutOptions.levelWidth = function() { return 2; };
1205
+ } else if (layoutName === 'cose') {
1206
+ layoutOptions.nodeRepulsion = 8000;
1207
+ layoutOptions.idealEdgeLength = 100;
1208
+ }
1209
+
1210
+ cy.layout(layoutOptions).run();
1211
+ });
1212
+
1213
+ // Search functionality
1214
+ document.getElementById('searchInput').addEventListener('input', function(e) {
1215
+ const query = e.target.value.toLowerCase();
1216
+ if (!query) {
1217
+ cy.elements().removeClass('faded highlighted');
1218
+ return;
1219
+ }
1220
+
1221
+ cy.elements().addClass('faded');
1222
+ cy.nodes().forEach(node => {
1223
+ const id = node.data('id').toLowerCase();
1224
+ const url = (node.data('url') || '').toLowerCase();
1225
+ if (id.includes(query) || url.includes(query)) {
1226
+ node.removeClass('faded').addClass('highlighted');
1227
+ node.connectedEdges().removeClass('faded');
1228
+ node.neighborhood('node').removeClass('faded');
1229
+ }
1230
+ });
1231
+ });
1232
+
1233
+ // Fit view button
1234
+ document.getElementById('fitBtn').addEventListener('click', function() {
1235
+ cy.fit(undefined, 50);
1236
+ });
1237
+
1238
+ // Export PNG
1239
+ document.getElementById('exportBtn').addEventListener('click', function() {
1240
+ const png = cy.png({ scale: 2, bg: html.getAttribute('data-theme') === 'dark' ? '#0d1b2a' : '#f8f9fa' });
1241
+ const link = document.createElement('a');
1242
+ link.download = 'utg_graph.png';
1243
+ link.href = png;
1244
+ link.click();
1245
+ });
1246
+
1247
+ // Edge label toggle
1248
+ const edgeLabelBtn = document.getElementById('edgeLabelBtn');
1249
+ edgeLabelBtn.addEventListener('click', function() {
1250
+ showEdgeLabels = !showEdgeLabels;
1251
+ this.classList.toggle('active', showEdgeLabels);
1252
+ updateCyStyle();
1253
+ });
1254
+
1255
+ // Filter chips
1256
+ document.querySelectorAll('.chip').forEach(chip => {
1257
+ chip.addEventListener('click', function() {
1258
+ document.querySelectorAll('.chip').forEach(c => c.classList.remove('active'));
1259
+ this.classList.add('active');
1260
+
1261
+ const filter = this.dataset.filter;
1262
+ cy.elements().removeClass('faded');
1263
+
1264
+ if (filter === 'all') return;
1265
+
1266
+ cy.nodes().forEach(node => {
1267
+ let match = false;
1268
+ if (filter === 'cycle' && node.data('inCycle') === 'yes') match = true;
1269
+ if (filter === 'root' && node.data('isRoot') === 'yes') match = true;
1270
+ if (filter === 'leaf' && node.data('isLeaf') === 'yes') match = true;
1271
+
1272
+ if (!match) {
1273
+ node.addClass('faded');
1274
+ node.connectedEdges().addClass('faded');
1275
+ }
1276
+ });
1277
+ });
1278
+ });
1279
+
1280
+ // Helper function to hide all detail panels
1281
+ function hideAllDetails() {
1282
+ document.getElementById('detailPlaceholder').style.display = 'block';
1283
+ document.getElementById('nodeDetailContent').style.display = 'none';
1284
+ document.getElementById('edgeDetailContent').style.display = 'none';
1285
+ }
1286
+
1287
+ // Store currently selected node data for screenshot view
1288
+ let currentNodeData = null;
1289
+
1290
+ // Node double-click - open screenshot viewer/gallery
1291
+ cy.on('dblclick', 'node', function(evt) {
1292
+ const node = evt.target;
1293
+ const data = node.data();
1294
+ currentNodeData = data;
1295
+
1296
+ // If multiple screenshots, open gallery; otherwise open single screenshot
1297
+ if (data.screenshotCount > 1) {
1298
+ viewAllScreenshotsBtn.click();
1299
+ } else {
1300
+ viewScreenshotBtn.click();
1301
+ }
1302
+ });
1303
+
1304
+ // Node click - show node details
1305
+ cy.on('tap', 'node', function(evt) {
1306
+ const node = evt.target;
1307
+ const data = node.data();
1308
+
1309
+ // Store for screenshot functionality
1310
+ currentNodeData = data;
1311
+
1312
+ document.getElementById('detailPlaceholder').style.display = 'none';
1313
+ document.getElementById('nodeDetailContent').style.display = 'block';
1314
+ document.getElementById('edgeDetailContent').style.display = 'none';
1315
+
1316
+ document.getElementById('detailStateId').textContent = data.id;
1317
+ document.getElementById('detailUrl').textContent = data.url || 'N/A';
1318
+ document.getElementById('detailDepth').textContent = data.depth;
1319
+ document.getElementById('detailInDegree').textContent = data.inDegree;
1320
+ document.getElementById('detailOutDegree').textContent = data.outDegree;
1321
+ document.getElementById('detailActions').textContent = data.actions;
1322
+ document.getElementById('detailScreenshotCount').textContent = data.screenshotCount || 0;
1323
+
1324
+ // Show/hide gallery button based on screenshot count
1325
+ const galleryBtn = document.getElementById('viewAllScreenshotsBtn');
1326
+ if (data.screenshotCount > 1) {
1327
+ galleryBtn.style.display = 'flex';
1328
+ galleryBtn.textContent = `📂 Browse All Screenshots (${data.screenshotCount})`;
1329
+ } else {
1330
+ galleryBtn.style.display = 'none';
1331
+ }
1332
+
1333
+ // Badges
1334
+ let badges = '';
1335
+ if (data.isRoot === 'yes') badges += '<span class="badge badge-root">Entry Point</span> ';
1336
+ if (data.isLeaf === 'yes') badges += '<span class="badge badge-leaf">Leaf</span> ';
1337
+ if (data.inCycle === 'yes') badges += '<span class="badge badge-cycle">In Cycle</span> ';
1338
+ document.getElementById('detailBadges').innerHTML = badges;
1339
+
1340
+ // Actions list
1341
+ const actionsList = data.actionList || [];
1342
+ const container = document.getElementById('actionsContainer');
1343
+ if (actionsList.length > 0) {
1344
+ container.innerHTML = actionsList.map(a => `<div class="action-item">${a}</div>`).join('');
1345
+ document.getElementById('actionsList').style.display = 'block';
1346
+ } else {
1347
+ document.getElementById('actionsList').style.display = 'none';
1348
+ }
1349
+ });
1350
+
1351
+ // Store currently selected edge data for replay
1352
+ let currentEdgeData = null;
1353
+
1354
+ // Edge double-click - open replay modal
1355
+ cy.on('dblclick', 'edge', function(evt) {
1356
+ const edge = evt.target;
1357
+ currentEdgeData = edge.data();
1358
+ replayBtn.click();
1359
+ });
1360
+
1361
+ // Edge click - show edge details
1362
+ cy.on('tap', 'edge', function(evt) {
1363
+ const edge = evt.target;
1364
+ const data = edge.data();
1365
+
1366
+ // Store for replay functionality
1367
+ currentEdgeData = data;
1368
+
1369
+ document.getElementById('detailPlaceholder').style.display = 'none';
1370
+ document.getElementById('nodeDetailContent').style.display = 'none';
1371
+ document.getElementById('edgeDetailContent').style.display = 'block';
1372
+
1373
+ // Flow display
1374
+ document.getElementById('edgeFromState').textContent = data.fromStateLabel || data.source.substring(0, 8);
1375
+ document.getElementById('edgeToState').textContent = data.toStateLabel || data.target.substring(0, 8);
1376
+
1377
+ // Basic info
1378
+ document.getElementById('edgeActionType').textContent = data.actionType || 'unknown';
1379
+ document.getElementById('edgeTag').textContent = data.tag || 'N/A';
1380
+
1381
+ // Description section
1382
+ const descSection = document.getElementById('edgeDescSection');
1383
+ if (data.fullLabel) {
1384
+ document.getElementById('edgeDescription').textContent = data.fullLabel;
1385
+ descSection.style.display = 'block';
1386
+ } else {
1387
+ descSection.style.display = 'none';
1388
+ }
1389
+
1390
+ // Selector section
1391
+ const selectorSection = document.getElementById('edgeSelectorSection');
1392
+ if (data.selector) {
1393
+ document.getElementById('edgeSelector').textContent = data.selector;
1394
+ selectorSection.style.display = 'block';
1395
+ } else {
1396
+ selectorSection.style.display = 'none';
1397
+ }
1398
+
1399
+ // Text section
1400
+ const textSection = document.getElementById('edgeTextSection');
1401
+ if (data.text) {
1402
+ document.getElementById('edgeText').textContent = data.text;
1403
+ textSection.style.display = 'block';
1404
+ } else {
1405
+ textSection.style.display = 'none';
1406
+ }
1407
+
1408
+ // Value section (for input actions)
1409
+ const valueSection = document.getElementById('edgeValueSection');
1410
+ if (data.inputValue) {
1411
+ document.getElementById('edgeValue').textContent = data.inputValue;
1412
+ valueSection.style.display = 'block';
1413
+ } else {
1414
+ valueSection.style.display = 'none';
1415
+ }
1416
+ });
1417
+
1418
+ // Click background to deselect
1419
+ cy.on('tap', function(evt) {
1420
+ if (evt.target === cy) {
1421
+ hideAllDetails();
1422
+ }
1423
+ });
1424
+
1425
+ // Hover info for nodes
1426
+ cy.on('mouseover', 'node', function(evt) {
1427
+ const url = evt.target.data('url');
1428
+ document.getElementById('hoverInfo').textContent = url || 'No URL';
1429
+ });
1430
+
1431
+ cy.on('mouseout', 'node', function() {
1432
+ document.getElementById('hoverInfo').textContent = 'Hover over nodes or edges to see details';
1433
+ });
1434
+
1435
+ // Hover info for edges
1436
+ cy.on('mouseover', 'edge', function(evt) {
1437
+ const data = evt.target.data();
1438
+ const info = data.fullLabel || data.label || 'No description';
1439
+ document.getElementById('hoverInfo').textContent = `${data.actionType}: ${info}`;
1440
+ });
1441
+
1442
+ cy.on('mouseout', 'edge', function() {
1443
+ document.getElementById('hoverInfo').textContent = 'Hover over nodes or edges to see details';
1444
+ });
1445
+
1446
+ // Build a map of state IDs to screenshot paths
1447
+ const stateScreenshots = {};
1448
+ elements.forEach(el => {
1449
+ if (el.data && el.data.screenshotPath) {
1450
+ stateScreenshots[el.data.id] = el.data.screenshotPath;
1451
+ }
1452
+ });
1453
+
1454
+ // Replay Modal functionality
1455
+ const replayModal = document.getElementById('replayModal');
1456
+ const replayBtn = document.getElementById('replayBtn');
1457
+ const modalClose = document.getElementById('modalClose');
1458
+
1459
+ replayBtn.addEventListener('click', function() {
1460
+ if (!currentEdgeData) return;
1461
+
1462
+ const fromState = currentEdgeData.source;
1463
+ const toState = currentEdgeData.target;
1464
+
1465
+ // Get screenshot paths - prefer transition-specific screenshot for target
1466
+ const fromScreenshot = stateScreenshots[fromState] || '';
1467
+ // Use transition screenshot if available, otherwise fall back to state screenshot
1468
+ const toScreenshot = currentEdgeData.transitionScreenshot || stateScreenshots[toState] || '';
1469
+
1470
+ // Update modal content
1471
+ document.getElementById('replayFromId').textContent = fromState;
1472
+ document.getElementById('replayToId').textContent = toState;
1473
+
1474
+ const fromImg = document.getElementById('replayFromImg');
1475
+ const toImg = document.getElementById('replayToImg');
1476
+
1477
+ // Handle screenshots - convert absolute paths to relative
1478
+ if (fromScreenshot) {
1479
+ // Extract just the filename portion for relative path
1480
+ const fromPath = fromScreenshot.split('/').slice(-2).join('/');
1481
+ fromImg.src = fromPath;
1482
+ fromImg.style.display = 'block';
1483
+ fromImg.onerror = function() {
1484
+ this.style.display = 'none';
1485
+ this.parentElement.innerHTML = '<div class="replay-screenshot placeholder">Screenshot not found</div>';
1486
+ };
1487
+ } else {
1488
+ fromImg.parentElement.innerHTML = '<div class="replay-screenshot placeholder">No screenshot available</div>';
1489
+ }
1490
+
1491
+ if (toScreenshot) {
1492
+ const toPath = toScreenshot.split('/').slice(-2).join('/');
1493
+ toImg.src = toPath;
1494
+ toImg.style.display = 'block';
1495
+ toImg.onerror = function() {
1496
+ this.style.display = 'none';
1497
+ this.parentElement.innerHTML = '<div class="replay-screenshot placeholder">Screenshot not found</div>';
1498
+ };
1499
+ } else {
1500
+ toImg.parentElement.innerHTML = '<div class="replay-screenshot placeholder">No screenshot available</div>';
1501
+ }
1502
+
1503
+ // Show click marker on source screenshot
1504
+ const clickMarker = document.getElementById('clickMarker');
1505
+ const clickX = currentEdgeData.clickX || 0;
1506
+ const clickY = currentEdgeData.clickY || 0;
1507
+ const clickWidth = currentEdgeData.clickWidth || 40;
1508
+ const clickHeight = currentEdgeData.clickHeight || 20;
1509
+
1510
+ if (clickX > 0 || clickY > 0) {
1511
+ // Wait for image to load to calculate position
1512
+ fromImg.onload = function() {
1513
+ const imgRect = fromImg.getBoundingClientRect();
1514
+ const containerRect = fromImg.parentElement.getBoundingClientRect();
1515
+
1516
+ // Calculate scale factor (assuming original screenshot was taken at a known size)
1517
+ const scaleX = imgRect.width / 1920; // Assuming 1920px original width
1518
+ const scaleY = imgRect.height / 1080; // Assuming 1080px original height
1519
+
1520
+ // Position the marker
1521
+ clickMarker.style.left = (clickX * scaleX) + 'px';
1522
+ clickMarker.style.top = (clickY * scaleY) + 'px';
1523
+ clickMarker.style.width = (clickWidth * scaleX) + 'px';
1524
+ clickMarker.style.height = (clickHeight * scaleY) + 'px';
1525
+ clickMarker.style.display = 'block';
1526
+ };
1527
+ } else {
1528
+ clickMarker.style.display = 'none';
1529
+ }
1530
+
1531
+ // Update action info
1532
+ document.getElementById('replayActionType').textContent = currentEdgeData.actionType || 'unknown';
1533
+ document.getElementById('replayActionDesc').textContent = currentEdgeData.fullLabel || currentEdgeData.label || 'No description';
1534
+
1535
+ // Show modal
1536
+ replayModal.classList.add('active');
1537
+ });
1538
+
1539
+ // Close modal handlers
1540
+ modalClose.addEventListener('click', function() {
1541
+ replayModal.classList.remove('active');
1542
+ });
1543
+
1544
+ replayModal.addEventListener('click', function(e) {
1545
+ if (e.target === replayModal) {
1546
+ replayModal.classList.remove('active');
1547
+ }
1548
+ });
1549
+
1550
+ // Close modal with Escape key
1551
+ document.addEventListener('keydown', function(e) {
1552
+ if (e.key === 'Escape') {
1553
+ if (replayModal.classList.contains('active')) {
1554
+ replayModal.classList.remove('active');
1555
+ }
1556
+ if (screenshotModal.classList.contains('active')) {
1557
+ screenshotModal.classList.remove('active');
1558
+ }
1559
+ if (galleryModal.classList.contains('active')) {
1560
+ galleryModal.classList.remove('active');
1561
+ }
1562
+ }
1563
+ });
1564
+
1565
+ // Screenshot Modal functionality
1566
+ const screenshotModal = document.getElementById('screenshotModal');
1567
+ const viewScreenshotBtn = document.getElementById('viewScreenshotBtn');
1568
+ const screenshotModalClose = document.getElementById('screenshotModalClose');
1569
+
1570
+ viewScreenshotBtn.addEventListener('click', function() {
1571
+ if (!currentNodeData) return;
1572
+
1573
+ const stateId = currentNodeData.id;
1574
+ const screenshotPath = currentNodeData.screenshotPath || '';
1575
+ const url = currentNodeData.url || 'N/A';
1576
+
1577
+ // Update modal content
1578
+ document.getElementById('screenshotStateId').textContent = stateId;
1579
+ document.getElementById('screenshotUrl').textContent = url;
1580
+
1581
+ const screenshotImg = document.getElementById('screenshotImg');
1582
+
1583
+ if (screenshotPath) {
1584
+ // Extract relative path for HTML
1585
+ const imgPath = screenshotPath.split('/').slice(-2).join('/');
1586
+ screenshotImg.src = imgPath;
1587
+ screenshotImg.style.display = 'block';
1588
+ screenshotImg.onerror = function() {
1589
+ this.style.display = 'none';
1590
+ this.parentElement.innerHTML = '<div class="replay-screenshot placeholder">Screenshot not found<br><small>' + screenshotPath + '</small></div>';
1591
+ };
1592
+ } else {
1593
+ screenshotImg.parentElement.innerHTML = '<div class="replay-screenshot placeholder">No screenshot available</div>';
1594
+ }
1595
+
1596
+ // Show modal
1597
+ screenshotModal.classList.add('active');
1598
+ });
1599
+
1600
+ // Close screenshot modal handlers
1601
+ screenshotModalClose.addEventListener('click', function() {
1602
+ screenshotModal.classList.remove('active');
1603
+ });
1604
+
1605
+ screenshotModal.addEventListener('click', function(e) {
1606
+ if (e.target === screenshotModal) {
1607
+ screenshotModal.classList.remove('active');
1608
+ }
1609
+ });
1610
+
1611
+ // Gallery Modal functionality
1612
+ const galleryModal = document.getElementById('galleryModal');
1613
+ const viewAllScreenshotsBtn = document.getElementById('viewAllScreenshotsBtn');
1614
+ const galleryModalClose = document.getElementById('galleryModalClose');
1615
+ const galleryPrevBtn = document.getElementById('galleryPrevBtn');
1616
+ const galleryNextBtn = document.getElementById('galleryNextBtn');
1617
+
1618
+ let currentGalleryIndex = 0;
1619
+ let currentGalleryScreenshots = [];
1620
+
1621
+ function updateGalleryDisplay() {
1622
+ if (currentGalleryScreenshots.length === 0) return;
1623
+
1624
+ const screenshot = currentGalleryScreenshots[currentGalleryIndex];
1625
+ const galleryImg = document.getElementById('galleryImg');
1626
+
1627
+ // Extract relative path for HTML
1628
+ const imgPath = (screenshot.path || '').split('/').slice(-2).join('/');
1629
+ galleryImg.src = imgPath;
1630
+ galleryImg.onerror = function() {
1631
+ this.style.display = 'none';
1632
+ this.parentElement.innerHTML = '<div class="replay-screenshot placeholder">Screenshot not found</div>';
1633
+ };
1634
+
1635
+ // Update counter
1636
+ document.getElementById('galleryCounter').textContent = `${currentGalleryIndex + 1} / ${currentGalleryScreenshots.length}`;
1637
+
1638
+ // Update info
1639
+ document.getElementById('galleryAction').textContent = screenshot.from_action || 'Initial state';
1640
+ document.getElementById('galleryFromState').textContent = screenshot.from_state ? screenshot.from_state.substring(0, 16) : 'N/A';
1641
+ document.getElementById('galleryTimestamp').textContent = screenshot.timestamp || 'N/A';
1642
+ document.getElementById('galleryVisitIndex').textContent = screenshot.visit_index !== undefined ? screenshot.visit_index : 'N/A';
1643
+
1644
+ // Update thumbnails
1645
+ const thumbnails = document.querySelectorAll('.gallery-thumbnail');
1646
+ thumbnails.forEach((thumb, idx) => {
1647
+ thumb.classList.toggle('active', idx === currentGalleryIndex);
1648
+ });
1649
+
1650
+ // Update navigation buttons
1651
+ galleryPrevBtn.disabled = currentGalleryIndex === 0;
1652
+ galleryNextBtn.disabled = currentGalleryIndex === currentGalleryScreenshots.length - 1;
1653
+ }
1654
+
1655
+ function buildGalleryThumbnails() {
1656
+ const container = document.getElementById('galleryThumbnails');
1657
+ container.innerHTML = '';
1658
+
1659
+ currentGalleryScreenshots.forEach((screenshot, idx) => {
1660
+ const imgPath = (screenshot.path || '').split('/').slice(-2).join('/');
1661
+ const img = document.createElement('img');
1662
+ img.className = 'gallery-thumbnail' + (idx === currentGalleryIndex ? ' active' : '');
1663
+ img.src = imgPath;
1664
+ img.alt = `Screenshot ${idx + 1}`;
1665
+ img.title = screenshot.from_action || 'Initial state';
1666
+ img.onerror = function() {
1667
+ this.src = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="80"><rect fill="%23333" width="120" height="80"/><text fill="%23999" font-size="12" x="50%" y="50%" dominant-baseline="middle" text-anchor="middle">N/A</text></svg>';
1668
+ };
1669
+ img.addEventListener('click', () => {
1670
+ currentGalleryIndex = idx;
1671
+ updateGalleryDisplay();
1672
+ });
1673
+ container.appendChild(img);
1674
+ });
1675
+ }
1676
+
1677
+ viewAllScreenshotsBtn.addEventListener('click', function() {
1678
+ if (!currentNodeData || !currentNodeData.screenshots) return;
1679
+
1680
+ currentGalleryScreenshots = currentNodeData.screenshots;
1681
+ currentGalleryIndex = 0;
1682
+
1683
+ document.getElementById('galleryStateId').textContent = currentNodeData.id;
1684
+
1685
+ buildGalleryThumbnails();
1686
+ updateGalleryDisplay();
1687
+
1688
+ galleryModal.classList.add('active');
1689
+ });
1690
+
1691
+ galleryPrevBtn.addEventListener('click', function() {
1692
+ if (currentGalleryIndex > 0) {
1693
+ currentGalleryIndex--;
1694
+ updateGalleryDisplay();
1695
+ }
1696
+ });
1697
+
1698
+ galleryNextBtn.addEventListener('click', function() {
1699
+ if (currentGalleryIndex < currentGalleryScreenshots.length - 1) {
1700
+ currentGalleryIndex++;
1701
+ updateGalleryDisplay();
1702
+ }
1703
+ });
1704
+
1705
+ // Keyboard navigation for gallery
1706
+ document.addEventListener('keydown', function(e) {
1707
+ if (galleryModal.classList.contains('active')) {
1708
+ if (e.key === 'ArrowLeft') {
1709
+ galleryPrevBtn.click();
1710
+ } else if (e.key === 'ArrowRight') {
1711
+ galleryNextBtn.click();
1712
+ }
1713
+ }
1714
+ });
1715
+
1716
+ // Close gallery modal handlers
1717
+ galleryModalClose.addEventListener('click', function() {
1718
+ galleryModal.classList.remove('active');
1719
+ });
1720
+
1721
+ galleryModal.addEventListener('click', function(e) {
1722
+ if (e.target === galleryModal) {
1723
+ galleryModal.classList.remove('active');
1724
+ }
1725
+ });
1726
+ </script>
1727
+ </body>
1728
+ </html>
amtrak_com/20260129_201508/coverage_report.json ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "summary": {
3
+ "total_decisions": 50,
4
+ "explored": 14,
5
+ "skipped": 36,
6
+ "exploration_rate": "28.0%"
7
+ },
8
+ "by_action_type": {
9
+ "click": {
10
+ "explored": 14,
11
+ "skipped": 36
12
+ }
13
+ },
14
+ "skip_reasons": {
15
+ "non-informative sibling group (probed, same result)": {
16
+ "count": 36,
17
+ "samples": [
18
+ "a:has-text(\"TRAIN STATUS\")",
19
+ "a:has-text(\"PLAN\")",
20
+ "a:has-text(\"SCHEDULES\")",
21
+ "a:has-text(\"DEALS\")",
22
+ "a:has-text(\"JOIN NOW\")"
23
+ ]
24
+ }
25
+ },
26
+ "sibling_probes": {
27
+ "text-group:a": {
28
+ "probes": 2,
29
+ "unique_states": 1,
30
+ "is_informative": false,
31
+ "samples": [
32
+ "a:has-text(\"Winter Storm Fern Adjustments\")",
33
+ "a:has-text(\"BOOK\")"
34
+ ]
35
+ },
36
+ "tab-group": {
37
+ "probes": 2,
38
+ "unique_states": 1,
39
+ "is_informative": false,
40
+ "samples": [
41
+ "a:has-text(\"Play store(opens in a new tab)\")",
42
+ "a:has-text(\"App Store(opens in a new tab)\")"
43
+ ]
44
+ }
45
+ },
46
+ "skipped_actions_sample": [
47
+ "a:has-text(\"TRAIN STATUS\")",
48
+ "a:has-text(\"PLAN\")",
49
+ "a:has-text(\"SCHEDULES\")",
50
+ "a:has-text(\"DEALS\")",
51
+ "a:has-text(\"JOIN NOW\")",
52
+ "a:has-text(\"Learn More\")",
53
+ "a:has-text(\"More About Redeeming Points\")",
54
+ "a:has-text(\"About Amtrak\")",
55
+ "a:has-text(\"A New Era of Rail(opens in a new tab)\")",
56
+ "a:has-text(\"News & Media(opens in a new tab)\")",
57
+ "a:has-text(\"Careers(opens in a new tab)\")",
58
+ "a:has-text(\"FOIA\")",
59
+ "a:has-text(\"Office of Inspector General(opens in a new tab)\"",
60
+ "a:has-text(\"Amtrak Customer Service Commitments\")",
61
+ "a:has-text(\"Baggage Policy & Services\")",
62
+ "a:has-text(\"Changing Your Reservation\")",
63
+ "a:has-text(\"Unique Amtrak Experience\")",
64
+ "a:has-text(\"Trip Insurance, Reserved Parking\")",
65
+ "a:has-text(\"Accessible Travel Sevices\")",
66
+ "a:has-text(\"Amtrak Vacations\")"
67
+ ]
68
+ }
amtrak_com/20260129_201508/crawl_summary.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "site": "amtrak_com",
3
+ "trace_file": "output/mind2web/amtrak_com/20260129_201508/execution_trace.jsonl",
4
+ "generated_at": "2026-01-29T20:25:29.358783",
5
+ "statistics": {
6
+ "total_attempts": 14,
7
+ "successful_attempts": 14,
8
+ "failed_attempts": 0,
9
+ "new_states_found": 2,
10
+ "same_state_results": 12,
11
+ "by_action_type": {
12
+ "unknown": {
13
+ "success": 14,
14
+ "fail": 0
15
+ }
16
+ },
17
+ "by_error_category": {},
18
+ "success_rate": 1.0,
19
+ "new_state_rate": 0.14285714285714285
20
+ }
21
+ }
amtrak_com/20260129_201508/error_log.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "site": "amtrak_com",
3
+ "crawl_id": "crawl_20260129_201509",
4
+ "generated_at": "2026-01-29T20:25:29.357807",
5
+ "total_errors": 0,
6
+ "errors_by_category": {},
7
+ "error_hotspots": {},
8
+ "errors": [],
9
+ "state_explosion_warnings": [],
10
+ "anti_bot_events": []
11
+ }
amtrak_com/20260129_201508/execution_trace.jsonl ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"_type": "trace_header", "site": "amtrak_com", "started_at": "2026-01-29T20:15:09.000324", "format_version": "1.0"}
2
+ {"_type": "exploration_event", "event_id": "evt_0001", "event_type": "exploration_started", "timestamp": "2026-01-29T20:15:10.030220", "data": {"strategy": "dfs", "start_url": "https://www.amtrak.com/", "max_depth": 9999, "max_iterations": 5000}}
3
+ {"_type": "action_attempt", "attempt_id": "att_0001", "iteration": 1, "timestamp": "2026-01-29T20:16:11.370773", "from_state_id": "state_34b6fd1c376fedca", "action_type": "unknown", "action_signature": "Action(action_type='click', selector=\"button[aria-label='Close']\", description='Click button: Close', element_text='', attributes={'class': 'icon-close agr-popup-close', 'aria-label': 'Close'}, position=None)", "selector": "button[aria-label='Close']", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": "state_7abc7f44a0d8bb2a", "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "new_state"}
4
+ {"_type": "action_attempt", "attempt_id": "att_0002", "iteration": 2, "timestamp": "2026-01-29T20:17:17.739204", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector=\"button[aria-label='Close']\", description='Click button: Close', element_text='', attributes={'class': 'onetrust-close-btn-handler onetrust-close-btn-ui banner-close-button ot-close-icon', 'style': 'background-image: url(\"https://cdn.cookielaw.org/logos/static/ot_close.svg\");', 'aria-label': 'Close'}, position=None)", "selector": "button[aria-label='Close']", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
5
+ {"_type": "action_attempt", "attempt_id": "att_0003", "iteration": 2, "timestamp": "2026-01-29T20:17:54.671332", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a:has-text(\"Winter Storm Fern Adjustments\")', description='Click a: Winter Storm Fern Adjustments', element_text='Winter Storm Fern Adjustments', attributes={'href': 'javascript:void(0);', 'data-redirect-url': 'https://www.amtrak.com/alert/potential-winter-storm-fern-adjustments.html', 'class': 'home-alerts__wrap_alerts_item primary-link-dark', 'data-di-id': 'di-id-a7ec3872-bd5f1783'}, position=None)", "selector": "a:has-text(\"Winter Storm Fern Adjustments\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
6
+ {"_type": "action_attempt", "attempt_id": "att_0004", "iteration": 2, "timestamp": "2026-01-29T20:18:31.867957", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a:has-text(\"BOOK\")', description='Click a: BOOK', element_text='BOOK', attributes={'class': 'nav-link', 'role': 'tab', 'href': '#', 'data-di-id': 'di-id-7760f939-ca337b3c'}, position=None)", "selector": "a:has-text(\"BOOK\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
7
+ {"_type": "action_attempt", "attempt_id": "att_0005", "iteration": 2, "timestamp": "2026-01-29T20:19:09.285220", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a:has-text(\"Play store(opens in a new tab)\")', description='Click a: Play store(opens in a new tab)', element_text='Play store(opens in a new tab)', attributes={'href': 'https://play.google.com/store/apps/details?id=com.amtrak.rider&hl=en_US&gl=US', 'target': '_blank', 'data-di-id': 'di-id-7d5109da-7fec0f5c'}, position=None)", "selector": "a:has-text(\"Play store(opens in a new tab)\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
8
+ {"_type": "action_attempt", "attempt_id": "att_0006", "iteration": 2, "timestamp": "2026-01-29T20:19:46.513039", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a:has-text(\"App Store(opens in a new tab)\")', description='Click a: App Store(opens in a new tab)', element_text='App Store(opens in a new tab)', attributes={'href': 'https://apps.apple.com/us/app/amtrak/id405074003', 'target': '_blank', 'data-di-id': 'di-id-a949dbdc-a0305fe9'}, position=None)", "selector": "a:has-text(\"App Store(opens in a new tab)\")", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
9
+ {"_type": "action_attempt", "attempt_id": "att_0007", "iteration": 2, "timestamp": "2026-01-29T20:20:24.103335", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='a:nth-of-type(1)', description='Click a', element_text='', attributes={'class': 'cmp-image__link', 'href': '/home', 'data-di-id': 'di-id-2f020851-4adc62e0'}, position=None)", "selector": "a:nth-of-type(1)", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
10
+ {"_type": "action_attempt", "attempt_id": "att_0008", "iteration": 2, "timestamp": "2026-01-29T20:21:01.157981", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='[id=\"my-trip-desktop\"]', description='Click a: MY TRIP', element_text='MY TRIP', attributes={'id': 'my-trip-desktop', 'class': 'nav-link', 'role': 'tab', 'href': '#', 'data-di-id': '#my-trip-desktop'}, position=None)", "selector": "[id=\"my-trip-desktop\"]", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
11
+ {"_type": "action_attempt", "attempt_id": "att_0009", "iteration": 2, "timestamp": "2026-01-29T20:21:41.248289", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='[id=\"guest-reward-desktop\"]', description='Click a: Guest Rewards', element_text='Guest Rewards', attributes={'id': 'guest-reward-desktop', 'class': 'nav-link', 'href': '#', 'data-di-id': '#guest-reward-desktop'}, position=None)", "selector": "[id=\"guest-reward-desktop\"]", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
12
+ {"_type": "action_attempt", "attempt_id": "att_0010", "iteration": 2, "timestamp": "2026-01-29T20:22:21.028053", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='[id=\"languageDropdown\"]', description='Click a: English', element_text='English', attributes={'id': 'languageDropdown', 'class': 'nav-link', 'href': '#', 'role': 'tab', 'data-di-id': '#languageDropdown'}, position=None)", "selector": "[id=\"languageDropdown\"]", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
13
+ {"_type": "action_attempt", "attempt_id": "att_0011", "iteration": 2, "timestamp": "2026-01-29T20:22:59.099960", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='[id=\"need-help-desktop\"]', description='Click a: Need Help?', element_text='Need Help?', attributes={'class': 'nav-link font-small', 'href': '#', 'id': 'need-help-desktop', 'data-di-id': '#need-help-desktop'}, position=None)", "selector": "[id=\"need-help-desktop\"]", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
14
+ {"_type": "action_attempt", "attempt_id": "att_0012", "iteration": 2, "timestamp": "2026-01-29T20:23:07.019875", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='[id=\"onetrust-pc-btn-handler\"]', description='Click button: Customize Settings', element_text='Customize Settings', attributes={'id': 'onetrust-pc-btn-handler', 'class': 'cookie-setting-link', 'data-di-id': '#onetrust-pc-btn-handler'}, position=None)", "selector": "[id=\"onetrust-pc-btn-handler\"]", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
15
+ {"_type": "action_attempt", "attempt_id": "att_0013", "iteration": 2, "timestamp": "2026-01-29T20:23:14.446998", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='[id=\"onetrust-reject-all-handler\"]', description='Click button: Disable All', element_text='Disable All', attributes={'id': 'onetrust-reject-all-handler', 'data-di-id': '#onetrust-reject-all-handler'}, position=None)", "selector": "[id=\"onetrust-reject-all-handler\"]", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": null, "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "same_state"}
16
+ {"_type": "action_attempt", "attempt_id": "att_0014", "iteration": 2, "timestamp": "2026-01-29T20:25:29.053996", "from_state_id": "state_7abc7f44a0d8bb2a", "action_type": "unknown", "action_signature": "Action(action_type='click', selector='span:nth-of-type(1)', description='Click span: Trip Planning Map', element_text='Trip Planning Map', attributes={'class': 'switch-button__text', 'role': 'button', 'tabindex': '0'}, position=None)", "selector": "span:nth-of-type(1)", "fill_value": null, "success": true, "duration_ms": 0, "to_state_id": "state_9233f1aeb151a82d", "error_category": null, "error_message": null, "stack_depth": 0, "page_url": "https://www.amtrak.com/home", "outcome": "new_state"}
17
+ {"_type": "exploration_event", "event_id": "evt_0002", "event_type": "exploration_completed", "timestamp": "2026-01-29T20:25:29.064586", "data": {"strategy": "dfs", "completion_reason": "exhaustive", "iterations": 5, "states_discovered": 3, "transitions_discovered": 2, "states_explored": 3, "actions_tried": 51, "cycles_detected": 14, "novelty_ratio": 0.0}}
18
+ {"_type": "trace_footer", "ended_at": "2026-01-29T20:25:29.359337", "final_statistics": {"total_attempts": 14, "successful_attempts": 14, "failed_attempts": 0, "new_states_found": 2, "same_state_results": 12, "by_action_type": {"unknown": {"success": 14, "fail": 0}}, "by_error_category": {}, "success_rate": 1.0, "new_state_rate": 0.14285714285714285}}
amtrak_com/20260129_201508/exploration_report.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_states": 3,
3
+ "total_transitions": 2,
4
+ "unique_urls": 2,
5
+ "avg_actions_per_state": 48.333333333333336,
6
+ "avg_outgoing_edges": 0.6666666666666666,
7
+ "max_depth": 2,
8
+ "strongly_connected_components": 3,
9
+ "is_dag": true,
10
+ "exploration_time": 620.0639750957489,
11
+ "states_explored": 3,
12
+ "actions_executed": 14,
13
+ "errors_encountered": 0,
14
+ "start_time": "2026-01-29 20:15:09.000666",
15
+ "end_time": "2026-01-29 20:25:29.064643",
16
+ "cross_state_dedup": {
17
+ "total_unique_actions": 13,
18
+ "total_explorations": 14,
19
+ "by_type": {
20
+ "unique": {
21
+ "keys": 13,
22
+ "explorations": 14
23
+ }
24
+ }
25
+ }
26
+ }
amtrak_com/20260129_201508/html/state_34b6fd1c376fedca.html ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260129_201508/html/state_7abc7f44a0d8bb2a.html ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260129_201508/html/state_9233f1aeb151a82d.html ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260129_201508/state_graph.graphml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"><key id="d5" for="edge" attr.name="selector" attr.type="string"/>
3
+ <key id="d4" for="edge" attr.name="action_type" attr.type="string"/>
4
+ <key id="d3" for="edge" attr.name="label" attr.type="string"/>
5
+ <key id="d2" for="node" attr.name="dom_hash" attr.type="string"/>
6
+ <key id="d1" for="node" attr.name="url" attr.type="string"/>
7
+ <key id="d0" for="node" attr.name="label" attr.type="string"/>
8
+ <graph edgedefault="directed"><node id="state_34b6fd1c376fedca">
9
+ <data key="d0">Train Tickets, Schedules &amp; Routes | Amtrak</data>
10
+ <data key="d1">https://www.amtrak.com/</data>
11
+ <data key="d2">34b6fd1c376fedca</data>
12
+ </node>
13
+ <node id="state_7abc7f44a0d8bb2a">
14
+ <data key="d0">Train Tickets, Schedules &amp; Routes | Amtrak</data>
15
+ <data key="d1">https://www.amtrak.com/home</data>
16
+ <data key="d2">7abc7f44a0d8bb2a</data>
17
+ </node>
18
+ <node id="state_9233f1aeb151a82d">
19
+ <data key="d0">Train Tickets, Schedules &amp; Routes | Amtrak</data>
20
+ <data key="d1">https://www.amtrak.com/home</data>
21
+ <data key="d2">9233f1aeb151a82d</data>
22
+ </node>
23
+ <edge source="state_34b6fd1c376fedca" target="state_7abc7f44a0d8bb2a">
24
+ <data key="d3">click</data>
25
+ <data key="d4">click</data>
26
+ <data key="d5">button[aria-label='Close']</data>
27
+ </edge>
28
+ <edge source="state_7abc7f44a0d8bb2a" target="state_9233f1aeb151a82d">
29
+ <data key="d3">click</data>
30
+ <data key="d4">click</data>
31
+ <data key="d5">span:nth-of-type(1)</data>
32
+ </edge>
33
+ </graph></graphml>
amtrak_com/20260129_201508/state_graph.json ADDED
The diff for this file is too large to render. See raw diff
 
amtrak_com/20260129_201508/utg_interactive.html ADDED
@@ -0,0 +1,1728 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>UTG Interactive Visualization</title>
5
+ <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.28.1/cytoscape.min.js"></script>
8
+ <style>
9
+ :root {
10
+ --bg-primary: #ffffff;
11
+ --bg-secondary: #f5f5f5;
12
+ --bg-tertiary: #e8e8e8;
13
+ --text-primary: #333333;
14
+ --text-secondary: #666666;
15
+ --border-color: #dddddd;
16
+ --accent-blue: #2196F3;
17
+ --accent-teal: #4ECDC4;
18
+ --accent-red: #FF6B6B;
19
+ --accent-orange: #FFA726;
20
+ --accent-purple: #9C27B0;
21
+ --accent-green: #66BB6A;
22
+ --graph-bg: #f8f9fa;
23
+ --node-text: #ffffff;
24
+ --edge-color: #999999;
25
+ --shadow: rgba(0, 0, 0, 0.1);
26
+ }
27
+
28
+ [data-theme="dark"] {
29
+ --bg-primary: #1a1a2e;
30
+ --bg-secondary: #16213e;
31
+ --bg-tertiary: #0f3460;
32
+ --text-primary: #e8e8e8;
33
+ --text-secondary: #a0a0a0;
34
+ --border-color: #2d3748;
35
+ --accent-blue: #64B5F6;
36
+ --accent-teal: #4DB6AC;
37
+ --accent-red: #EF5350;
38
+ --accent-orange: #FFB74D;
39
+ --accent-purple: #BA68C8;
40
+ --accent-green: #81C784;
41
+ --graph-bg: #0d1b2a;
42
+ --node-text: #ffffff;
43
+ --edge-color: #5a6578;
44
+ --shadow: rgba(0, 0, 0, 0.3);
45
+ }
46
+
47
+ * {
48
+ box-sizing: border-box;
49
+ transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
50
+ }
51
+
52
+ html, body {
53
+ width: 100%;
54
+ height: 100%;
55
+ margin: 0;
56
+ padding: 0;
57
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
58
+ background: var(--bg-primary);
59
+ color: var(--text-primary);
60
+ }
61
+
62
+ .container {
63
+ display: flex;
64
+ flex-direction: column;
65
+ height: 100%;
66
+ }
67
+
68
+ /* Header / Toolbar */
69
+ .toolbar {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: space-between;
73
+ padding: 12px 20px;
74
+ background: var(--bg-secondary);
75
+ border-bottom: 1px solid var(--border-color);
76
+ flex-wrap: wrap;
77
+ gap: 10px;
78
+ }
79
+
80
+ .toolbar-left {
81
+ display: flex;
82
+ align-items: center;
83
+ gap: 20px;
84
+ }
85
+
86
+ .toolbar-right {
87
+ display: flex;
88
+ align-items: center;
89
+ gap: 15px;
90
+ }
91
+
92
+ .title {
93
+ font-size: 18px;
94
+ font-weight: 600;
95
+ color: var(--text-primary);
96
+ }
97
+
98
+ /* Theme Toggle */
99
+ .theme-toggle {
100
+ display: flex;
101
+ align-items: center;
102
+ gap: 8px;
103
+ cursor: pointer;
104
+ padding: 6px 12px;
105
+ border-radius: 20px;
106
+ background: var(--bg-tertiary);
107
+ border: 1px solid var(--border-color);
108
+ }
109
+
110
+ .theme-toggle:hover {
111
+ background: var(--border-color);
112
+ }
113
+
114
+ .theme-icon {
115
+ font-size: 16px;
116
+ }
117
+
118
+ /* Layout Selector */
119
+ .layout-select {
120
+ padding: 6px 12px;
121
+ border-radius: 6px;
122
+ border: 1px solid var(--border-color);
123
+ background: var(--bg-tertiary);
124
+ color: var(--text-primary);
125
+ font-size: 13px;
126
+ cursor: pointer;
127
+ }
128
+
129
+ /* Search */
130
+ .search-container {
131
+ position: relative;
132
+ }
133
+
134
+ .search-input {
135
+ padding: 6px 12px 6px 32px;
136
+ border-radius: 20px;
137
+ border: 1px solid var(--border-color);
138
+ background: var(--bg-tertiary);
139
+ color: var(--text-primary);
140
+ font-size: 13px;
141
+ width: 200px;
142
+ }
143
+
144
+ .search-input::placeholder {
145
+ color: var(--text-secondary);
146
+ }
147
+
148
+ .search-icon {
149
+ position: absolute;
150
+ left: 10px;
151
+ top: 50%;
152
+ transform: translateY(-50%);
153
+ color: var(--text-secondary);
154
+ }
155
+
156
+ /* Main Content */
157
+ .main-content {
158
+ display: flex;
159
+ flex: 1;
160
+ overflow: hidden;
161
+ }
162
+
163
+ /* Graph Container */
164
+ #cy {
165
+ flex: 1;
166
+ background: var(--graph-bg);
167
+ }
168
+
169
+ /* Side Panel */
170
+ .side-panel {
171
+ width: 320px;
172
+ background: var(--bg-secondary);
173
+ border-left: 1px solid var(--border-color);
174
+ display: flex;
175
+ flex-direction: column;
176
+ overflow: hidden;
177
+ }
178
+
179
+ .panel-section {
180
+ padding: 16px;
181
+ border-bottom: 1px solid var(--border-color);
182
+ }
183
+
184
+ .panel-title {
185
+ font-size: 14px;
186
+ font-weight: 600;
187
+ color: var(--text-primary);
188
+ margin-bottom: 12px;
189
+ display: flex;
190
+ align-items: center;
191
+ gap: 8px;
192
+ }
193
+
194
+ /* Statistics Grid */
195
+ .stats-grid {
196
+ display: grid;
197
+ grid-template-columns: repeat(2, 1fr);
198
+ gap: 12px;
199
+ }
200
+
201
+ .stat-card {
202
+ background: var(--bg-tertiary);
203
+ padding: 12px;
204
+ border-radius: 8px;
205
+ text-align: center;
206
+ }
207
+
208
+ .stat-value {
209
+ font-size: 24px;
210
+ font-weight: 700;
211
+ color: var(--accent-blue);
212
+ }
213
+
214
+ .stat-value.cycle {
215
+ color: var(--accent-red);
216
+ }
217
+
218
+ .stat-value.teal {
219
+ color: var(--accent-teal);
220
+ }
221
+
222
+ .stat-value.orange {
223
+ color: var(--accent-orange);
224
+ }
225
+
226
+ .stat-value.purple {
227
+ color: var(--accent-purple);
228
+ }
229
+
230
+ .stat-label {
231
+ font-size: 11px;
232
+ color: var(--text-secondary);
233
+ margin-top: 4px;
234
+ text-transform: uppercase;
235
+ letter-spacing: 0.5px;
236
+ }
237
+
238
+ /* Legend */
239
+ .legend {
240
+ display: flex;
241
+ flex-direction: column;
242
+ gap: 8px;
243
+ }
244
+
245
+ .legend-item {
246
+ display: flex;
247
+ align-items: center;
248
+ gap: 10px;
249
+ font-size: 13px;
250
+ color: var(--text-secondary);
251
+ }
252
+
253
+ .legend-color {
254
+ width: 16px;
255
+ height: 16px;
256
+ border-radius: 50%;
257
+ flex-shrink: 0;
258
+ }
259
+
260
+ /* Node Details */
261
+ .node-details {
262
+ flex: 1;
263
+ overflow-y: auto;
264
+ padding: 16px;
265
+ }
266
+
267
+ .detail-placeholder {
268
+ text-align: center;
269
+ color: var(--text-secondary);
270
+ font-size: 13px;
271
+ padding: 40px 20px;
272
+ }
273
+
274
+ .detail-content {
275
+ display: none;
276
+ }
277
+
278
+ .detail-header {
279
+ margin-bottom: 16px;
280
+ }
281
+
282
+ .detail-state-id {
283
+ font-family: 'Monaco', 'Menlo', monospace;
284
+ font-size: 14px;
285
+ color: var(--accent-blue);
286
+ word-break: break-all;
287
+ background: var(--bg-tertiary);
288
+ padding: 8px 12px;
289
+ border-radius: 6px;
290
+ }
291
+
292
+ .detail-url {
293
+ font-size: 12px;
294
+ color: var(--text-secondary);
295
+ margin-top: 8px;
296
+ word-break: break-all;
297
+ }
298
+
299
+ .detail-row {
300
+ display: flex;
301
+ justify-content: space-between;
302
+ padding: 8px 0;
303
+ border-bottom: 1px solid var(--border-color);
304
+ font-size: 13px;
305
+ }
306
+
307
+ .detail-label {
308
+ color: var(--text-secondary);
309
+ }
310
+
311
+ .detail-value {
312
+ font-weight: 500;
313
+ color: var(--text-primary);
314
+ }
315
+
316
+ .badge {
317
+ display: inline-block;
318
+ padding: 2px 8px;
319
+ border-radius: 12px;
320
+ font-size: 11px;
321
+ font-weight: 500;
322
+ }
323
+
324
+ .badge-root {
325
+ background: var(--accent-purple);
326
+ color: white;
327
+ }
328
+
329
+ .badge-leaf {
330
+ background: var(--accent-green);
331
+ color: white;
332
+ }
333
+
334
+ .badge-cycle {
335
+ background: var(--accent-red);
336
+ color: white;
337
+ }
338
+
339
+ .actions-list {
340
+ margin-top: 12px;
341
+ }
342
+
343
+ .actions-title {
344
+ font-size: 12px;
345
+ font-weight: 600;
346
+ color: var(--text-primary);
347
+ margin-bottom: 8px;
348
+ }
349
+
350
+ .action-item {
351
+ font-size: 12px;
352
+ color: var(--text-secondary);
353
+ padding: 4px 8px;
354
+ background: var(--bg-tertiary);
355
+ border-radius: 4px;
356
+ margin-bottom: 4px;
357
+ word-break: break-all;
358
+ }
359
+
360
+ /* Detail Type Badge */
361
+ .detail-type-badge {
362
+ display: inline-block;
363
+ padding: 4px 12px;
364
+ border-radius: 4px;
365
+ font-size: 11px;
366
+ font-weight: 600;
367
+ text-transform: uppercase;
368
+ letter-spacing: 0.5px;
369
+ margin-bottom: 12px;
370
+ }
371
+
372
+ .node-badge {
373
+ background: var(--accent-teal);
374
+ color: white;
375
+ }
376
+
377
+ .edge-badge {
378
+ background: var(--accent-orange);
379
+ color: white;
380
+ }
381
+
382
+ /* Edge Flow Display */
383
+ .edge-flow {
384
+ display: flex;
385
+ align-items: center;
386
+ justify-content: center;
387
+ gap: 12px;
388
+ padding: 16px;
389
+ background: var(--bg-tertiary);
390
+ border-radius: 8px;
391
+ margin-bottom: 16px;
392
+ }
393
+
394
+ .edge-flow-node {
395
+ font-family: 'Monaco', 'Menlo', monospace;
396
+ font-size: 13px;
397
+ color: var(--accent-blue);
398
+ background: var(--bg-primary);
399
+ padding: 6px 12px;
400
+ border-radius: 6px;
401
+ border: 1px solid var(--border-color);
402
+ }
403
+
404
+ .edge-flow-arrow {
405
+ font-size: 20px;
406
+ color: var(--accent-orange);
407
+ font-weight: bold;
408
+ }
409
+
410
+ /* Edge Section */
411
+ .edge-section {
412
+ margin-top: 12px;
413
+ padding: 10px;
414
+ background: var(--bg-tertiary);
415
+ border-radius: 6px;
416
+ }
417
+
418
+ .edge-section-title {
419
+ font-size: 11px;
420
+ font-weight: 600;
421
+ color: var(--text-secondary);
422
+ text-transform: uppercase;
423
+ letter-spacing: 0.5px;
424
+ margin-bottom: 6px;
425
+ }
426
+
427
+ .edge-section-content {
428
+ font-size: 13px;
429
+ color: var(--text-primary);
430
+ word-break: break-all;
431
+ line-height: 1.5;
432
+ }
433
+
434
+ .edge-section-content.code {
435
+ font-family: 'Monaco', 'Menlo', monospace;
436
+ font-size: 11px;
437
+ background: var(--bg-primary);
438
+ padding: 8px;
439
+ border-radius: 4px;
440
+ overflow-x: auto;
441
+ }
442
+
443
+ /* Active button state */
444
+ .btn.active {
445
+ background: var(--accent-blue);
446
+ border-color: var(--accent-blue);
447
+ color: white;
448
+ }
449
+
450
+ /* Footer */
451
+ .footer {
452
+ padding: 10px 20px;
453
+ background: var(--bg-secondary);
454
+ border-top: 1px solid var(--border-color);
455
+ font-size: 12px;
456
+ color: var(--text-secondary);
457
+ display: flex;
458
+ justify-content: space-between;
459
+ align-items: center;
460
+ }
461
+
462
+ /* Buttons */
463
+ .btn {
464
+ padding: 6px 14px;
465
+ border-radius: 6px;
466
+ border: 1px solid var(--border-color);
467
+ background: var(--bg-tertiary);
468
+ color: var(--text-primary);
469
+ font-size: 13px;
470
+ cursor: pointer;
471
+ display: flex;
472
+ align-items: center;
473
+ gap: 6px;
474
+ }
475
+
476
+ .btn:hover {
477
+ background: var(--border-color);
478
+ }
479
+
480
+ .btn-primary {
481
+ background: var(--accent-blue);
482
+ border-color: var(--accent-blue);
483
+ color: white;
484
+ }
485
+
486
+ .btn-primary:hover {
487
+ opacity: 0.9;
488
+ }
489
+
490
+ /* Filter Chips */
491
+ .filter-chips {
492
+ display: flex;
493
+ flex-wrap: wrap;
494
+ gap: 6px;
495
+ margin-top: 8px;
496
+ }
497
+
498
+ .chip {
499
+ padding: 4px 10px;
500
+ border-radius: 16px;
501
+ font-size: 12px;
502
+ cursor: pointer;
503
+ border: 1px solid var(--border-color);
504
+ background: var(--bg-tertiary);
505
+ color: var(--text-secondary);
506
+ }
507
+
508
+ .chip.active {
509
+ background: var(--accent-blue);
510
+ border-color: var(--accent-blue);
511
+ color: white;
512
+ }
513
+
514
+ .chip:hover:not(.active) {
515
+ background: var(--border-color);
516
+ }
517
+
518
+ /* Responsive */
519
+ @media (max-width: 768px) {
520
+ .side-panel {
521
+ display: none;
522
+ }
523
+ .toolbar {
524
+ padding: 10px;
525
+ }
526
+ .search-input {
527
+ width: 150px;
528
+ }
529
+ }
530
+
531
+ /* Replay Modal */
532
+ .modal-overlay {
533
+ display: none;
534
+ position: fixed;
535
+ top: 0;
536
+ left: 0;
537
+ width: 100%;
538
+ height: 100%;
539
+ background: rgba(0, 0, 0, 0.8);
540
+ z-index: 1000;
541
+ justify-content: center;
542
+ align-items: center;
543
+ }
544
+
545
+ .modal-overlay.active {
546
+ display: flex;
547
+ }
548
+
549
+ .modal-content {
550
+ background: var(--bg-primary);
551
+ border-radius: 12px;
552
+ max-width: 95vw;
553
+ max-height: 90vh;
554
+ overflow: hidden;
555
+ box-shadow: 0 20px 60px var(--shadow);
556
+ }
557
+
558
+ .modal-header {
559
+ display: flex;
560
+ justify-content: space-between;
561
+ align-items: center;
562
+ padding: 16px 20px;
563
+ background: var(--bg-secondary);
564
+ border-bottom: 1px solid var(--border-color);
565
+ }
566
+
567
+ .modal-title {
568
+ font-size: 16px;
569
+ font-weight: 600;
570
+ color: var(--text-primary);
571
+ }
572
+
573
+ .modal-close {
574
+ background: none;
575
+ border: none;
576
+ font-size: 24px;
577
+ cursor: pointer;
578
+ color: var(--text-secondary);
579
+ padding: 4px 8px;
580
+ border-radius: 4px;
581
+ }
582
+
583
+ .modal-close:hover {
584
+ background: var(--bg-tertiary);
585
+ color: var(--text-primary);
586
+ }
587
+
588
+ .modal-body {
589
+ padding: 20px;
590
+ overflow-y: auto;
591
+ max-height: calc(90vh - 60px);
592
+ }
593
+
594
+ .replay-container {
595
+ display: flex;
596
+ align-items: center;
597
+ justify-content: center;
598
+ gap: 30px;
599
+ flex-wrap: wrap;
600
+ }
601
+
602
+ .replay-state {
603
+ text-align: center;
604
+ max-width: 45%;
605
+ }
606
+
607
+ .replay-state-label {
608
+ font-size: 12px;
609
+ font-weight: 600;
610
+ color: var(--text-secondary);
611
+ text-transform: uppercase;
612
+ letter-spacing: 0.5px;
613
+ margin-bottom: 8px;
614
+ }
615
+
616
+ .replay-state-id {
617
+ font-family: 'Monaco', 'Menlo', monospace;
618
+ font-size: 11px;
619
+ color: var(--accent-blue);
620
+ margin-bottom: 12px;
621
+ }
622
+
623
+ .replay-screenshot-container {
624
+ position: relative;
625
+ display: inline-block;
626
+ border: 2px solid var(--border-color);
627
+ border-radius: 8px;
628
+ overflow: hidden;
629
+ background: var(--bg-tertiary);
630
+ }
631
+
632
+ .replay-screenshot {
633
+ max-width: 100%;
634
+ max-height: 400px;
635
+ display: block;
636
+ }
637
+
638
+ .replay-screenshot.placeholder {
639
+ width: 300px;
640
+ height: 200px;
641
+ display: flex;
642
+ align-items: center;
643
+ justify-content: center;
644
+ color: var(--text-secondary);
645
+ font-size: 14px;
646
+ }
647
+
648
+ .click-marker {
649
+ position: absolute;
650
+ border: 3px solid #FF6B6B;
651
+ background: rgba(255, 107, 107, 0.3);
652
+ border-radius: 4px;
653
+ pointer-events: none;
654
+ animation: pulse 1.5s ease-in-out infinite;
655
+ }
656
+
657
+ .click-marker::after {
658
+ content: '👆';
659
+ position: absolute;
660
+ top: -30px;
661
+ left: 50%;
662
+ transform: translateX(-50%);
663
+ font-size: 20px;
664
+ }
665
+
666
+ @keyframes pulse {
667
+ 0%, 100% { opacity: 1; transform: scale(1); }
668
+ 50% { opacity: 0.7; transform: scale(1.05); }
669
+ }
670
+
671
+ .replay-arrow {
672
+ font-size: 48px;
673
+ color: var(--accent-orange);
674
+ flex-shrink: 0;
675
+ }
676
+
677
+ .replay-action-info {
678
+ text-align: center;
679
+ margin-top: 20px;
680
+ padding: 16px;
681
+ background: var(--bg-secondary);
682
+ border-radius: 8px;
683
+ }
684
+
685
+ .replay-action-type {
686
+ display: inline-block;
687
+ padding: 4px 12px;
688
+ background: var(--accent-orange);
689
+ color: white;
690
+ border-radius: 16px;
691
+ font-size: 12px;
692
+ font-weight: 600;
693
+ margin-bottom: 8px;
694
+ }
695
+
696
+ .replay-action-desc {
697
+ font-size: 14px;
698
+ color: var(--text-primary);
699
+ }
700
+
701
+ /* Gallery Thumbnails */
702
+ .gallery-thumbnail {
703
+ width: 120px;
704
+ height: 80px;
705
+ object-fit: cover;
706
+ border-radius: 6px;
707
+ cursor: pointer;
708
+ border: 2px solid transparent;
709
+ transition: border-color 0.2s ease, transform 0.2s ease;
710
+ flex-shrink: 0;
711
+ }
712
+
713
+ .gallery-thumbnail:hover {
714
+ transform: scale(1.05);
715
+ border-color: var(--accent-blue);
716
+ }
717
+
718
+ .gallery-thumbnail.active {
719
+ border-color: var(--accent-orange);
720
+ box-shadow: 0 0 10px rgba(255, 167, 38, 0.5);
721
+ }
722
+
723
+ .gallery-thumbnails::-webkit-scrollbar {
724
+ height: 8px;
725
+ }
726
+
727
+ .gallery-thumbnails::-webkit-scrollbar-track {
728
+ background: var(--bg-tertiary);
729
+ border-radius: 4px;
730
+ }
731
+
732
+ .gallery-thumbnails::-webkit-scrollbar-thumb {
733
+ background: var(--border-color);
734
+ border-radius: 4px;
735
+ }
736
+
737
+ .gallery-thumbnails::-webkit-scrollbar-thumb:hover {
738
+ background: var(--text-secondary);
739
+ }
740
+
741
+ .screenshot-badge {
742
+ display: inline-block;
743
+ padding: 2px 6px;
744
+ border-radius: 10px;
745
+ font-size: 10px;
746
+ background: var(--accent-teal);
747
+ color: white;
748
+ margin-left: 8px;
749
+ }
750
+ </style>
751
+ </head>
752
+ <body>
753
+ <div class="container">
754
+ <!-- Toolbar -->
755
+ <div class="toolbar">
756
+ <div class="toolbar-left">
757
+ <span class="title">UTG Visualization</span>
758
+ <select class="layout-select" id="layoutSelect">
759
+ <option value="cose">Force-Directed (CoSE)</option>
760
+ <option value="breadthfirst">Hierarchical</option>
761
+ <option value="circle">Circular</option>
762
+ <option value="grid">Grid</option>
763
+ <option value="concentric">Concentric</option>
764
+ </select>
765
+ </div>
766
+ <div class="toolbar-right">
767
+ <div class="search-container">
768
+ <span class="search-icon">&#128269;</span>
769
+ <input type="text" class="search-input" id="searchInput" placeholder="Search states...">
770
+ </div>
771
+ <button class="btn" id="edgeLabelBtn" title="Toggle edge labels">
772
+ <span id="edgeLabelIcon">&#128279;</span>
773
+ <span id="edgeLabelText">Labels</span>
774
+ </button>
775
+ <button class="btn" id="fitBtn">Fit View</button>
776
+ <button class="btn" id="exportBtn">Export PNG</button>
777
+ <div class="theme-toggle" id="themeToggle">
778
+ <span class="theme-icon" id="themeIcon">&#9790;</span>
779
+ <span id="themeText">Dark</span>
780
+ </div>
781
+ </div>
782
+ </div>
783
+
784
+ <!-- Main Content -->
785
+ <div class="main-content">
786
+ <!-- Graph -->
787
+ <div id="cy"></div>
788
+
789
+ <!-- Side Panel -->
790
+ <div class="side-panel">
791
+ <!-- Statistics -->
792
+ <div class="panel-section">
793
+ <div class="panel-title">&#128202; Statistics</div>
794
+ <div class="stats-grid">
795
+ <div class="stat-card">
796
+ <div class="stat-value">3</div>
797
+ <div class="stat-label">States</div>
798
+ </div>
799
+ <div class="stat-card">
800
+ <div class="stat-value teal">2</div>
801
+ <div class="stat-label">Transitions</div>
802
+ </div>
803
+ <div class="stat-card">
804
+ <div class="stat-value cycle">0</div>
805
+ <div class="stat-label">Cycles</div>
806
+ </div>
807
+ <div class="stat-card">
808
+ <div class="stat-value orange">2</div>
809
+ <div class="stat-label">Max Depth</div>
810
+ </div>
811
+ <div class="stat-card">
812
+ <div class="stat-value purple">1</div>
813
+ <div class="stat-label">Entry Points</div>
814
+ </div>
815
+ <div class="stat-card">
816
+ <div class="stat-value">48.3</div>
817
+ <div class="stat-label">Avg Actions</div>
818
+ </div>
819
+ </div>
820
+ </div>
821
+
822
+ <!-- Legend -->
823
+ <div class="panel-section">
824
+ <div class="panel-title">&#127912; Legend</div>
825
+ <div class="legend">
826
+ <div class="legend-item">
827
+ <div class="legend-color" style="background: #4ECDC4;"></div>
828
+ <span>Regular State</span>
829
+ </div>
830
+ <div class="legend-item">
831
+ <div class="legend-color" style="background: #FF6B6B;"></div>
832
+ <span>State in Cycle</span>
833
+ </div>
834
+ <div class="legend-item">
835
+ <div class="legend-color" style="background: #9C27B0;"></div>
836
+ <span>Entry Point (Root)</span>
837
+ </div>
838
+ <div class="legend-item">
839
+ <div class="legend-color" style="background: #66BB6A;"></div>
840
+ <span>Leaf State</span>
841
+ </div>
842
+ </div>
843
+ <div class="filter-chips">
844
+ <div class="chip active" data-filter="all">All</div>
845
+ <div class="chip" data-filter="cycle">In Cycles</div>
846
+ <div class="chip" data-filter="root">Roots</div>
847
+ <div class="chip" data-filter="leaf">Leaves</div>
848
+ </div>
849
+ </div>
850
+
851
+ <!-- Details Panel -->
852
+ <div class="node-details">
853
+ <div class="detail-placeholder" id="detailPlaceholder">
854
+ &#128073; Click a node or edge to see details
855
+ </div>
856
+ <!-- Node Details -->
857
+ <div class="detail-content" id="nodeDetailContent">
858
+ <div class="detail-type-badge node-badge">State</div>
859
+ <div class="detail-header">
860
+ <div class="detail-state-id" id="detailStateId"></div>
861
+ <div class="detail-url" id="detailUrl"></div>
862
+ </div>
863
+ <div id="detailBadges" style="margin-bottom: 12px;"></div>
864
+ <div class="detail-row">
865
+ <span class="detail-label">Depth</span>
866
+ <span class="detail-value" id="detailDepth"></span>
867
+ </div>
868
+ <div class="detail-row">
869
+ <span class="detail-label">In-Degree</span>
870
+ <span class="detail-value" id="detailInDegree"></span>
871
+ </div>
872
+ <div class="detail-row">
873
+ <span class="detail-label">Out-Degree</span>
874
+ <span class="detail-value" id="detailOutDegree"></span>
875
+ </div>
876
+ <div class="detail-row">
877
+ <span class="detail-label">Actions Available</span>
878
+ <span class="detail-value" id="detailActions"></span>
879
+ </div>
880
+ <div class="actions-list" id="actionsList">
881
+ <div class="actions-title">Available Actions:</div>
882
+ <div id="actionsContainer"></div>
883
+ </div>
884
+ <div class="detail-row">
885
+ <span class="detail-label">Screenshots</span>
886
+ <span class="detail-value" id="detailScreenshotCount">0</span>
887
+ </div>
888
+ <button class="btn btn-primary" id="viewScreenshotBtn" style="width: 100%; margin-top: 16px; justify-content: center;">
889
+ &#128247; View Screenshot
890
+ </button>
891
+ <button class="btn" id="viewAllScreenshotsBtn" style="width: 100%; margin-top: 8px; justify-content: center;">
892
+ &#128444; Browse All Screenshots
893
+ </button>
894
+ </div>
895
+ <!-- Edge Details -->
896
+ <div class="detail-content" id="edgeDetailContent">
897
+ <div class="detail-type-badge edge-badge">Transition</div>
898
+ <div class="edge-flow">
899
+ <span class="edge-flow-node" id="edgeFromState"></span>
900
+ <span class="edge-flow-arrow">&#8594;</span>
901
+ <span class="edge-flow-node" id="edgeToState"></span>
902
+ </div>
903
+ <div class="detail-row">
904
+ <span class="detail-label">Action Type</span>
905
+ <span class="detail-value" id="edgeActionType"></span>
906
+ </div>
907
+ <div class="detail-row">
908
+ <span class="detail-label">Element Tag</span>
909
+ <span class="detail-value" id="edgeTag"></span>
910
+ </div>
911
+ <div class="edge-section" id="edgeDescSection">
912
+ <div class="edge-section-title">Description</div>
913
+ <div class="edge-section-content" id="edgeDescription"></div>
914
+ </div>
915
+ <div class="edge-section" id="edgeSelectorSection">
916
+ <div class="edge-section-title">CSS Selector</div>
917
+ <div class="edge-section-content code" id="edgeSelector"></div>
918
+ </div>
919
+ <div class="edge-section" id="edgeTextSection">
920
+ <div class="edge-section-title">Element Text</div>
921
+ <div class="edge-section-content" id="edgeText"></div>
922
+ </div>
923
+ <div class="edge-section" id="edgeValueSection">
924
+ <div class="edge-section-title">Input Value</div>
925
+ <div class="edge-section-content" id="edgeValue"></div>
926
+ </div>
927
+ <button class="btn btn-primary" id="replayBtn" style="width: 100%; margin-top: 16px; justify-content: center;">
928
+ &#9654; Replay Transition
929
+ </button>
930
+ </div>
931
+ </div>
932
+ </div>
933
+ </div>
934
+
935
+ <!-- Replay Modal -->
936
+ <div class="modal-overlay" id="replayModal">
937
+ <div class="modal-content">
938
+ <div class="modal-header">
939
+ <span class="modal-title">&#128250; Transition Replay</span>
940
+ <button class="modal-close" id="modalClose">&times;</button>
941
+ </div>
942
+ <div class="modal-body">
943
+ <div class="replay-container">
944
+ <div class="replay-state">
945
+ <div class="replay-state-label">From State</div>
946
+ <div class="replay-state-id" id="replayFromId"></div>
947
+ <div class="replay-screenshot-container" id="replayFromContainer">
948
+ <img class="replay-screenshot" id="replayFromImg" src="" alt="Source state screenshot">
949
+ <div class="click-marker" id="clickMarker"></div>
950
+ </div>
951
+ </div>
952
+ <div class="replay-arrow">&#10145;</div>
953
+ <div class="replay-state">
954
+ <div class="replay-state-label">To State</div>
955
+ <div class="replay-state-id" id="replayToId"></div>
956
+ <div class="replay-screenshot-container">
957
+ <img class="replay-screenshot" id="replayToImg" src="" alt="Target state screenshot">
958
+ </div>
959
+ </div>
960
+ </div>
961
+ <div class="replay-action-info">
962
+ <span class="replay-action-type" id="replayActionType"></span>
963
+ <div class="replay-action-desc" id="replayActionDesc"></div>
964
+ </div>
965
+ </div>
966
+ </div>
967
+ </div>
968
+
969
+ <!-- Screenshot Modal -->
970
+ <div class="modal-overlay" id="screenshotModal">
971
+ <div class="modal-content" style="max-width: 80vw;">
972
+ <div class="modal-header">
973
+ <span class="modal-title">&#128247; State Screenshot</span>
974
+ <button class="modal-close" id="screenshotModalClose">&times;</button>
975
+ </div>
976
+ <div class="modal-body" style="text-align: center;">
977
+ <div class="replay-state-label" id="screenshotStateLabel">State</div>
978
+ <div class="replay-state-id" id="screenshotStateId"></div>
979
+ <div class="replay-screenshot-container" style="display: inline-block;">
980
+ <img class="replay-screenshot" id="screenshotImg" src="" alt="State screenshot" style="max-height: 70vh;">
981
+ </div>
982
+ <div class="detail-url" id="screenshotUrl" style="margin-top: 12px;"></div>
983
+ </div>
984
+ </div>
985
+ </div>
986
+
987
+ <!-- Screenshots Gallery Modal -->
988
+ <div class="modal-overlay" id="galleryModal">
989
+ <div class="modal-content" style="max-width: 90vw; max-height: 90vh;">
990
+ <div class="modal-header">
991
+ <span class="modal-title">&#128444; Screenshots Gallery</span>
992
+ <button class="modal-close" id="galleryModalClose">&times;</button>
993
+ </div>
994
+ <div class="modal-body" style="padding: 20px;">
995
+ <div class="gallery-header" style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;">
996
+ <div>
997
+ <span class="replay-state-label">State:</span>
998
+ <span class="replay-state-id" id="galleryStateId"></span>
999
+ </div>
1000
+ <div class="gallery-nav" style="display: flex; align-items: center; gap: 12px;">
1001
+ <button class="btn" id="galleryPrevBtn">&#9664; Prev</button>
1002
+ <span id="galleryCounter" style="font-size: 14px; color: var(--text-secondary);">1 / 1</span>
1003
+ <button class="btn" id="galleryNextBtn">Next &#9654;</button>
1004
+ </div>
1005
+ </div>
1006
+ <div class="gallery-main" style="text-align: center; margin-bottom: 16px;">
1007
+ <div class="replay-screenshot-container" style="display: inline-block; max-width: 100%;">
1008
+ <img class="replay-screenshot" id="galleryImg" src="" alt="Screenshot" style="max-height: 60vh; max-width: 100%;">
1009
+ </div>
1010
+ </div>
1011
+ <div class="gallery-info" style="background: var(--bg-secondary); padding: 12px; border-radius: 8px;">
1012
+ <div class="detail-row">
1013
+ <span class="detail-label">Triggered by action</span>
1014
+ <span class="detail-value" id="galleryAction">N/A</span>
1015
+ </div>
1016
+ <div class="detail-row">
1017
+ <span class="detail-label">From state</span>
1018
+ <span class="detail-value" id="galleryFromState">N/A</span>
1019
+ </div>
1020
+ <div class="detail-row">
1021
+ <span class="detail-label">Timestamp</span>
1022
+ <span class="detail-value" id="galleryTimestamp">N/A</span>
1023
+ </div>
1024
+ <div class="detail-row">
1025
+ <span class="detail-label">Visit #</span>
1026
+ <span class="detail-value" id="galleryVisitIndex">0</span>
1027
+ </div>
1028
+ </div>
1029
+ <div class="gallery-thumbnails" id="galleryThumbnails" style="display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; padding: 8px 0;">
1030
+ </div>
1031
+ </div>
1032
+ </div>
1033
+ </div>
1034
+
1035
+ <!-- Footer -->
1036
+ <div class="footer">
1037
+ <span>Generated by Web UTG Crawler</span>
1038
+ <span id="hoverInfo">Hover over nodes or edges to see details</span>
1039
+ </div>
1040
+ </div>
1041
+
1042
+ <script>
1043
+ // Theme Management
1044
+ const html = document.documentElement;
1045
+ const themeToggle = document.getElementById('themeToggle');
1046
+ const themeIcon = document.getElementById('themeIcon');
1047
+ const themeText = document.getElementById('themeText');
1048
+
1049
+ // Check for saved theme preference or default to light
1050
+ const savedTheme = localStorage.getItem('utg-theme') || 'light';
1051
+ html.setAttribute('data-theme', savedTheme);
1052
+ updateThemeUI(savedTheme);
1053
+
1054
+ themeToggle.addEventListener('click', () => {
1055
+ const currentTheme = html.getAttribute('data-theme');
1056
+ const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
1057
+ html.setAttribute('data-theme', newTheme);
1058
+ localStorage.setItem('utg-theme', newTheme);
1059
+ updateThemeUI(newTheme);
1060
+ updateCyStyle();
1061
+ });
1062
+
1063
+ function updateThemeUI(theme) {
1064
+ if (theme === 'dark') {
1065
+ themeIcon.innerHTML = '&#9728;'; // Sun
1066
+ themeText.textContent = 'Light';
1067
+ } else {
1068
+ themeIcon.innerHTML = '&#9790;'; // Moon
1069
+ themeText.textContent = 'Dark';
1070
+ }
1071
+ }
1072
+
1073
+ // Cytoscape initialization
1074
+ const elements = [{"data": {"id": "state_34b6fd1c376fedca", "label": "state_34", "url": "https://www.amtrak.com/", "actions": 50, "actionList": ["Click a: Winter Storm Fern Adjustments", "Click a", "Click a: BOOK", "Click a: TRAIN STATUS", "Click a: MY TRIP", "Click a: PLAN", "Click a: SCHEDULES", "Click a: DEALS", "Click a: Guest Rewards", "Click a: Sign In"], "inCycle": "no", "depth": 0, "inDegree": 0, "outDegree": 1, "isRoot": "yes", "isLeaf": "no", "screenshotPath": "output/mind2web/amtrak_com/20260129_201508/screenshots/state_34b6fd1c376fedca.png", "screenshots": [{"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/state_34b6fd1c376fedca.png", "timestamp": "2026-01-29T20:15:23.564236", "from_action": null, "visit_index": 0}], "screenshotCount": 1}}, {"data": {"id": "state_7abc7f44a0d8bb2a", "label": "state_7a", "url": "https://www.amtrak.com/home", "actions": 50, "actionList": ["Click a: Winter Storm Fern Adjustments", "Click a", "Click a: BOOK", "Click a: TRAIN STATUS", "Click a: MY TRIP", "Click a: PLAN", "Click a: SCHEDULES", "Click a: DEALS", "Click a: Guest Rewards", "Click a: English"], "inCycle": "no", "depth": 1, "inDegree": 1, "outDegree": 1, "isRoot": "no", "isLeaf": "no", "screenshotPath": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_34b6fd_20260129_201604_505969.png", "screenshots": [{"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_34b6fd_20260129_201604_505969.png", "timestamp": "2026-01-29T20:16:11.369482", "from_action": "Click button: Close", "from_state": "state_34b6fd1c376fedca", "visit_index": 0}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_201717_689032.png", "timestamp": "2026-01-29T20:17:17.739150", "from_action": "Click button: Close", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 1}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_201754_609579.png", "timestamp": "2026-01-29T20:17:54.671246", "from_action": "Click a: Winter Storm Fern Adjustments", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 2}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_201831_819535.png", "timestamp": "2026-01-29T20:18:31.867933", "from_action": "Click a: BOOK", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 3}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_201909_233391.png", "timestamp": "2026-01-29T20:19:09.285196", "from_action": "Click a: Play store(opens in a new tab)", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 4}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_201946_465852.png", "timestamp": "2026-01-29T20:19:46.513013", "from_action": "Click a: App Store(opens in a new tab)", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 5}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202024_058579.png", "timestamp": "2026-01-29T20:20:24.103313", "from_action": "Click a", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 6}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202101_110256.png", "timestamp": "2026-01-29T20:21:01.157955", "from_action": "Click a: MY TRIP", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 7}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202141_199216.png", "timestamp": "2026-01-29T20:21:41.248255", "from_action": "Click a: Guest Rewards", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 8}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202220_975320.png", "timestamp": "2026-01-29T20:22:21.028031", "from_action": "Click a: English", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 9}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202259_049689.png", "timestamp": "2026-01-29T20:22:59.099930", "from_action": "Click a: Need Help?", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 10}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202306_966559.png", "timestamp": "2026-01-29T20:23:07.019852", "from_action": "Click button: Customize Settings", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 11}, {"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202314_393323.png", "timestamp": "2026-01-29T20:23:14.446969", "from_action": "Click button: Disable All", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 12}], "screenshotCount": 13}}, {"data": {"id": "state_9233f1aeb151a82d", "label": "state_92", "url": "https://www.amtrak.com/home", "actions": 45, "actionList": ["Click a: Winter Storm Fern Adjustments", "Click a", "Click a: BOOK", "Click a: TRAIN STATUS", "Click a: MY TRIP", "Click a: PLAN", "Click a: SCHEDULES", "Click a: DEALS", "Click a: Guest Rewards", "Click a: English"], "inCycle": "no", "depth": 2, "inDegree": 1, "outDegree": 0, "isRoot": "no", "isLeaf": "yes", "screenshotPath": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202522_761279.png", "screenshots": [{"path": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202522_761279.png", "timestamp": "2026-01-29T20:25:29.052678", "from_action": "Click span: Trip Planning Map", "from_state": "state_7abc7f44a0d8bb2a", "visit_index": 0}], "screenshotCount": 1}}, {"data": {"source": "state_34b6fd1c376fedca", "target": "state_7abc7f44a0d8bb2a", "label": "Click button: Close", "fullLabel": "Click button: Close", "actionType": "click", "selector": "button[aria-label='Close']", "tag": "", "text": "", "inputValue": "", "fromStateLabel": "state_34", "toStateLabel": "state_7a", "clickX": 1395.449951171875, "clickY": 84, "clickWidth": 24, "clickHeight": 24, "transitionScreenshot": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_34b6fd_20260129_201604_505969.png"}}, {"data": {"source": "state_7abc7f44a0d8bb2a", "target": "state_9233f1aeb151a82d", "label": "Click span: Trip Planning", "fullLabel": "Click span: Trip Planning Map", "actionType": "click", "selector": "span:nth-of-type(1)", "tag": "", "text": "", "inputValue": "", "fromStateLabel": "state_7a", "toStateLabel": "state_92", "clickX": 700.4166870117188, "clickY": 48.2666015625, "clickWidth": 152.86663818359375, "clickHeight": 34, "transitionScreenshot": "output/mind2web/amtrak_com/20260129_201508/screenshots/transition_state_7abc7f_20260129_202522_761279.png"}}];
1075
+ let showEdgeLabels = false; // Edge label toggle state
1076
+
1077
+ function getCyStyle() {
1078
+ const isDark = html.getAttribute('data-theme') === 'dark';
1079
+ return [
1080
+ {
1081
+ selector: 'node',
1082
+ style: {
1083
+ 'content': 'data(label)',
1084
+ 'text-valign': 'center',
1085
+ 'text-halign': 'center',
1086
+ 'background-color': function(ele) {
1087
+ if (ele.data('isRoot') === 'yes') return '#9C27B0';
1088
+ if (ele.data('isLeaf') === 'yes') return '#66BB6A';
1089
+ if (ele.data('inCycle') === 'yes') return '#FF6B6B';
1090
+ return '#4ECDC4';
1091
+ },
1092
+ 'width': function(ele) {
1093
+ const actions = ele.data('actions') || 0;
1094
+ return Math.max(40, Math.min(80, 40 + actions * 2)) + 'px';
1095
+ },
1096
+ 'height': function(ele) {
1097
+ const actions = ele.data('actions') || 0;
1098
+ return Math.max(40, Math.min(80, 40 + actions * 2)) + 'px';
1099
+ },
1100
+ 'font-size': '10px',
1101
+ 'color': '#fff',
1102
+ 'text-outline-color': isDark ? '#1a1a2e' : '#333',
1103
+ 'text-outline-width': 1,
1104
+ 'border-width': 2,
1105
+ 'border-color': isDark ? '#2d3748' : '#fff'
1106
+ }
1107
+ },
1108
+ {
1109
+ selector: 'edge',
1110
+ style: {
1111
+ 'target-arrow-shape': 'triangle',
1112
+ 'target-arrow-color': isDark ? '#5a6578' : '#666',
1113
+ 'line-color': isDark ? '#5a6578' : '#999',
1114
+ 'width': 2,
1115
+ 'curve-style': 'bezier',
1116
+ 'opacity': 0.7,
1117
+ 'label': showEdgeLabels ? 'data(label)' : '',
1118
+ 'font-size': '9px',
1119
+ 'text-rotation': 'autorotate',
1120
+ 'text-margin-y': -10,
1121
+ 'color': isDark ? '#a0a0a0' : '#555',
1122
+ 'text-background-color': isDark ? '#1a1a2e' : '#fff',
1123
+ 'text-background-opacity': 0.8,
1124
+ 'text-background-padding': '2px'
1125
+ }
1126
+ },
1127
+ {
1128
+ selector: 'node:selected',
1129
+ style: {
1130
+ 'border-width': 4,
1131
+ 'border-color': '#FFD700'
1132
+ }
1133
+ },
1134
+ {
1135
+ selector: 'edge:selected',
1136
+ style: {
1137
+ 'line-color': '#FFA726',
1138
+ 'target-arrow-color': '#FFA726',
1139
+ 'width': 4,
1140
+ 'opacity': 1,
1141
+ 'label': 'data(label)',
1142
+ 'font-size': '10px',
1143
+ 'font-weight': 'bold',
1144
+ 'color': isDark ? '#FFB74D' : '#E65100',
1145
+ 'text-background-color': isDark ? '#1a1a2e' : '#fff',
1146
+ 'text-background-opacity': 0.9
1147
+ }
1148
+ },
1149
+ {
1150
+ selector: '.highlighted',
1151
+ style: {
1152
+ 'background-color': '#FFD700',
1153
+ 'transition-property': 'background-color',
1154
+ 'transition-duration': '0.3s'
1155
+ }
1156
+ },
1157
+ {
1158
+ selector: '.faded',
1159
+ style: {
1160
+ 'opacity': 0.2
1161
+ }
1162
+ },
1163
+ {
1164
+ selector: 'edge.highlighted-edge',
1165
+ style: {
1166
+ 'line-color': '#FFA726',
1167
+ 'target-arrow-color': '#FFA726',
1168
+ 'width': 3,
1169
+ 'opacity': 1
1170
+ }
1171
+ }
1172
+ ];
1173
+ }
1174
+
1175
+ var cy = cytoscape({
1176
+ container: document.getElementById('cy'),
1177
+ elements: elements,
1178
+ style: getCyStyle(),
1179
+ layout: {
1180
+ name: 'cose',
1181
+ animate: true,
1182
+ animationDuration: 500,
1183
+ nodeRepulsion: 8000,
1184
+ idealEdgeLength: 100
1185
+ }
1186
+ });
1187
+
1188
+ function updateCyStyle() {
1189
+ cy.style(getCyStyle());
1190
+ }
1191
+
1192
+ // Layout selection
1193
+ document.getElementById('layoutSelect').addEventListener('change', function(e) {
1194
+ const layoutName = e.target.value;
1195
+ let layoutOptions = { name: layoutName, animate: true, animationDuration: 500 };
1196
+
1197
+ if (layoutName === 'breadthfirst') {
1198
+ layoutOptions.directed = true;
1199
+ layoutOptions.spacingFactor = 1.5;
1200
+ } else if (layoutName === 'concentric') {
1201
+ layoutOptions.concentric = function(node) {
1202
+ return node.data('depth') !== undefined ? -node.data('depth') : 0;
1203
+ };
1204
+ layoutOptions.levelWidth = function() { return 2; };
1205
+ } else if (layoutName === 'cose') {
1206
+ layoutOptions.nodeRepulsion = 8000;
1207
+ layoutOptions.idealEdgeLength = 100;
1208
+ }
1209
+
1210
+ cy.layout(layoutOptions).run();
1211
+ });
1212
+
1213
+ // Search functionality
1214
+ document.getElementById('searchInput').addEventListener('input', function(e) {
1215
+ const query = e.target.value.toLowerCase();
1216
+ if (!query) {
1217
+ cy.elements().removeClass('faded highlighted');
1218
+ return;
1219
+ }
1220
+
1221
+ cy.elements().addClass('faded');
1222
+ cy.nodes().forEach(node => {
1223
+ const id = node.data('id').toLowerCase();
1224
+ const url = (node.data('url') || '').toLowerCase();
1225
+ if (id.includes(query) || url.includes(query)) {
1226
+ node.removeClass('faded').addClass('highlighted');
1227
+ node.connectedEdges().removeClass('faded');
1228
+ node.neighborhood('node').removeClass('faded');
1229
+ }
1230
+ });
1231
+ });
1232
+
1233
+ // Fit view button
1234
+ document.getElementById('fitBtn').addEventListener('click', function() {
1235
+ cy.fit(undefined, 50);
1236
+ });
1237
+
1238
+ // Export PNG
1239
+ document.getElementById('exportBtn').addEventListener('click', function() {
1240
+ const png = cy.png({ scale: 2, bg: html.getAttribute('data-theme') === 'dark' ? '#0d1b2a' : '#f8f9fa' });
1241
+ const link = document.createElement('a');
1242
+ link.download = 'utg_graph.png';
1243
+ link.href = png;
1244
+ link.click();
1245
+ });
1246
+
1247
+ // Edge label toggle
1248
+ const edgeLabelBtn = document.getElementById('edgeLabelBtn');
1249
+ edgeLabelBtn.addEventListener('click', function() {
1250
+ showEdgeLabels = !showEdgeLabels;
1251
+ this.classList.toggle('active', showEdgeLabels);
1252
+ updateCyStyle();
1253
+ });
1254
+
1255
+ // Filter chips
1256
+ document.querySelectorAll('.chip').forEach(chip => {
1257
+ chip.addEventListener('click', function() {
1258
+ document.querySelectorAll('.chip').forEach(c => c.classList.remove('active'));
1259
+ this.classList.add('active');
1260
+
1261
+ const filter = this.dataset.filter;
1262
+ cy.elements().removeClass('faded');
1263
+
1264
+ if (filter === 'all') return;
1265
+
1266
+ cy.nodes().forEach(node => {
1267
+ let match = false;
1268
+ if (filter === 'cycle' && node.data('inCycle') === 'yes') match = true;
1269
+ if (filter === 'root' && node.data('isRoot') === 'yes') match = true;
1270
+ if (filter === 'leaf' && node.data('isLeaf') === 'yes') match = true;
1271
+
1272
+ if (!match) {
1273
+ node.addClass('faded');
1274
+ node.connectedEdges().addClass('faded');
1275
+ }
1276
+ });
1277
+ });
1278
+ });
1279
+
1280
+ // Helper function to hide all detail panels
1281
+ function hideAllDetails() {
1282
+ document.getElementById('detailPlaceholder').style.display = 'block';
1283
+ document.getElementById('nodeDetailContent').style.display = 'none';
1284
+ document.getElementById('edgeDetailContent').style.display = 'none';
1285
+ }
1286
+
1287
+ // Store currently selected node data for screenshot view
1288
+ let currentNodeData = null;
1289
+
1290
+ // Node double-click - open screenshot viewer/gallery
1291
+ cy.on('dblclick', 'node', function(evt) {
1292
+ const node = evt.target;
1293
+ const data = node.data();
1294
+ currentNodeData = data;
1295
+
1296
+ // If multiple screenshots, open gallery; otherwise open single screenshot
1297
+ if (data.screenshotCount > 1) {
1298
+ viewAllScreenshotsBtn.click();
1299
+ } else {
1300
+ viewScreenshotBtn.click();
1301
+ }
1302
+ });
1303
+
1304
+ // Node click - show node details
1305
+ cy.on('tap', 'node', function(evt) {
1306
+ const node = evt.target;
1307
+ const data = node.data();
1308
+
1309
+ // Store for screenshot functionality
1310
+ currentNodeData = data;
1311
+
1312
+ document.getElementById('detailPlaceholder').style.display = 'none';
1313
+ document.getElementById('nodeDetailContent').style.display = 'block';
1314
+ document.getElementById('edgeDetailContent').style.display = 'none';
1315
+
1316
+ document.getElementById('detailStateId').textContent = data.id;
1317
+ document.getElementById('detailUrl').textContent = data.url || 'N/A';
1318
+ document.getElementById('detailDepth').textContent = data.depth;
1319
+ document.getElementById('detailInDegree').textContent = data.inDegree;
1320
+ document.getElementById('detailOutDegree').textContent = data.outDegree;
1321
+ document.getElementById('detailActions').textContent = data.actions;
1322
+ document.getElementById('detailScreenshotCount').textContent = data.screenshotCount || 0;
1323
+
1324
+ // Show/hide gallery button based on screenshot count
1325
+ const galleryBtn = document.getElementById('viewAllScreenshotsBtn');
1326
+ if (data.screenshotCount > 1) {
1327
+ galleryBtn.style.display = 'flex';
1328
+ galleryBtn.textContent = `📂 Browse All Screenshots (${data.screenshotCount})`;
1329
+ } else {
1330
+ galleryBtn.style.display = 'none';
1331
+ }
1332
+
1333
+ // Badges
1334
+ let badges = '';
1335
+ if (data.isRoot === 'yes') badges += '<span class="badge badge-root">Entry Point</span> ';
1336
+ if (data.isLeaf === 'yes') badges += '<span class="badge badge-leaf">Leaf</span> ';
1337
+ if (data.inCycle === 'yes') badges += '<span class="badge badge-cycle">In Cycle</span> ';
1338
+ document.getElementById('detailBadges').innerHTML = badges;
1339
+
1340
+ // Actions list
1341
+ const actionsList = data.actionList || [];
1342
+ const container = document.getElementById('actionsContainer');
1343
+ if (actionsList.length > 0) {
1344
+ container.innerHTML = actionsList.map(a => `<div class="action-item">${a}</div>`).join('');
1345
+ document.getElementById('actionsList').style.display = 'block';
1346
+ } else {
1347
+ document.getElementById('actionsList').style.display = 'none';
1348
+ }
1349
+ });
1350
+
1351
+ // Store currently selected edge data for replay
1352
+ let currentEdgeData = null;
1353
+
1354
+ // Edge double-click - open replay modal
1355
+ cy.on('dblclick', 'edge', function(evt) {
1356
+ const edge = evt.target;
1357
+ currentEdgeData = edge.data();
1358
+ replayBtn.click();
1359
+ });
1360
+
1361
+ // Edge click - show edge details
1362
+ cy.on('tap', 'edge', function(evt) {
1363
+ const edge = evt.target;
1364
+ const data = edge.data();
1365
+
1366
+ // Store for replay functionality
1367
+ currentEdgeData = data;
1368
+
1369
+ document.getElementById('detailPlaceholder').style.display = 'none';
1370
+ document.getElementById('nodeDetailContent').style.display = 'none';
1371
+ document.getElementById('edgeDetailContent').style.display = 'block';
1372
+
1373
+ // Flow display
1374
+ document.getElementById('edgeFromState').textContent = data.fromStateLabel || data.source.substring(0, 8);
1375
+ document.getElementById('edgeToState').textContent = data.toStateLabel || data.target.substring(0, 8);
1376
+
1377
+ // Basic info
1378
+ document.getElementById('edgeActionType').textContent = data.actionType || 'unknown';
1379
+ document.getElementById('edgeTag').textContent = data.tag || 'N/A';
1380
+
1381
+ // Description section
1382
+ const descSection = document.getElementById('edgeDescSection');
1383
+ if (data.fullLabel) {
1384
+ document.getElementById('edgeDescription').textContent = data.fullLabel;
1385
+ descSection.style.display = 'block';
1386
+ } else {
1387
+ descSection.style.display = 'none';
1388
+ }
1389
+
1390
+ // Selector section
1391
+ const selectorSection = document.getElementById('edgeSelectorSection');
1392
+ if (data.selector) {
1393
+ document.getElementById('edgeSelector').textContent = data.selector;
1394
+ selectorSection.style.display = 'block';
1395
+ } else {
1396
+ selectorSection.style.display = 'none';
1397
+ }
1398
+
1399
+ // Text section
1400
+ const textSection = document.getElementById('edgeTextSection');
1401
+ if (data.text) {
1402
+ document.getElementById('edgeText').textContent = data.text;
1403
+ textSection.style.display = 'block';
1404
+ } else {
1405
+ textSection.style.display = 'none';
1406
+ }
1407
+
1408
+ // Value section (for input actions)
1409
+ const valueSection = document.getElementById('edgeValueSection');
1410
+ if (data.inputValue) {
1411
+ document.getElementById('edgeValue').textContent = data.inputValue;
1412
+ valueSection.style.display = 'block';
1413
+ } else {
1414
+ valueSection.style.display = 'none';
1415
+ }
1416
+ });
1417
+
1418
+ // Click background to deselect
1419
+ cy.on('tap', function(evt) {
1420
+ if (evt.target === cy) {
1421
+ hideAllDetails();
1422
+ }
1423
+ });
1424
+
1425
+ // Hover info for nodes
1426
+ cy.on('mouseover', 'node', function(evt) {
1427
+ const url = evt.target.data('url');
1428
+ document.getElementById('hoverInfo').textContent = url || 'No URL';
1429
+ });
1430
+
1431
+ cy.on('mouseout', 'node', function() {
1432
+ document.getElementById('hoverInfo').textContent = 'Hover over nodes or edges to see details';
1433
+ });
1434
+
1435
+ // Hover info for edges
1436
+ cy.on('mouseover', 'edge', function(evt) {
1437
+ const data = evt.target.data();
1438
+ const info = data.fullLabel || data.label || 'No description';
1439
+ document.getElementById('hoverInfo').textContent = `${data.actionType}: ${info}`;
1440
+ });
1441
+
1442
+ cy.on('mouseout', 'edge', function() {
1443
+ document.getElementById('hoverInfo').textContent = 'Hover over nodes or edges to see details';
1444
+ });
1445
+
1446
+ // Build a map of state IDs to screenshot paths
1447
+ const stateScreenshots = {};
1448
+ elements.forEach(el => {
1449
+ if (el.data && el.data.screenshotPath) {
1450
+ stateScreenshots[el.data.id] = el.data.screenshotPath;
1451
+ }
1452
+ });
1453
+
1454
+ // Replay Modal functionality
1455
+ const replayModal = document.getElementById('replayModal');
1456
+ const replayBtn = document.getElementById('replayBtn');
1457
+ const modalClose = document.getElementById('modalClose');
1458
+
1459
+ replayBtn.addEventListener('click', function() {
1460
+ if (!currentEdgeData) return;
1461
+
1462
+ const fromState = currentEdgeData.source;
1463
+ const toState = currentEdgeData.target;
1464
+
1465
+ // Get screenshot paths - prefer transition-specific screenshot for target
1466
+ const fromScreenshot = stateScreenshots[fromState] || '';
1467
+ // Use transition screenshot if available, otherwise fall back to state screenshot
1468
+ const toScreenshot = currentEdgeData.transitionScreenshot || stateScreenshots[toState] || '';
1469
+
1470
+ // Update modal content
1471
+ document.getElementById('replayFromId').textContent = fromState;
1472
+ document.getElementById('replayToId').textContent = toState;
1473
+
1474
+ const fromImg = document.getElementById('replayFromImg');
1475
+ const toImg = document.getElementById('replayToImg');
1476
+
1477
+ // Handle screenshots - convert absolute paths to relative
1478
+ if (fromScreenshot) {
1479
+ // Extract just the filename portion for relative path
1480
+ const fromPath = fromScreenshot.split('/').slice(-2).join('/');
1481
+ fromImg.src = fromPath;
1482
+ fromImg.style.display = 'block';
1483
+ fromImg.onerror = function() {
1484
+ this.style.display = 'none';
1485
+ this.parentElement.innerHTML = '<div class="replay-screenshot placeholder">Screenshot not found</div>';
1486
+ };
1487
+ } else {
1488
+ fromImg.parentElement.innerHTML = '<div class="replay-screenshot placeholder">No screenshot available</div>';
1489
+ }
1490
+
1491
+ if (toScreenshot) {
1492
+ const toPath = toScreenshot.split('/').slice(-2).join('/');
1493
+ toImg.src = toPath;
1494
+ toImg.style.display = 'block';
1495
+ toImg.onerror = function() {
1496
+ this.style.display = 'none';
1497
+ this.parentElement.innerHTML = '<div class="replay-screenshot placeholder">Screenshot not found</div>';
1498
+ };
1499
+ } else {
1500
+ toImg.parentElement.innerHTML = '<div class="replay-screenshot placeholder">No screenshot available</div>';
1501
+ }
1502
+
1503
+ // Show click marker on source screenshot
1504
+ const clickMarker = document.getElementById('clickMarker');
1505
+ const clickX = currentEdgeData.clickX || 0;
1506
+ const clickY = currentEdgeData.clickY || 0;
1507
+ const clickWidth = currentEdgeData.clickWidth || 40;
1508
+ const clickHeight = currentEdgeData.clickHeight || 20;
1509
+
1510
+ if (clickX > 0 || clickY > 0) {
1511
+ // Wait for image to load to calculate position
1512
+ fromImg.onload = function() {
1513
+ const imgRect = fromImg.getBoundingClientRect();
1514
+ const containerRect = fromImg.parentElement.getBoundingClientRect();
1515
+
1516
+ // Calculate scale factor (assuming original screenshot was taken at a known size)
1517
+ const scaleX = imgRect.width / 1920; // Assuming 1920px original width
1518
+ const scaleY = imgRect.height / 1080; // Assuming 1080px original height
1519
+
1520
+ // Position the marker
1521
+ clickMarker.style.left = (clickX * scaleX) + 'px';
1522
+ clickMarker.style.top = (clickY * scaleY) + 'px';
1523
+ clickMarker.style.width = (clickWidth * scaleX) + 'px';
1524
+ clickMarker.style.height = (clickHeight * scaleY) + 'px';
1525
+ clickMarker.style.display = 'block';
1526
+ };
1527
+ } else {
1528
+ clickMarker.style.display = 'none';
1529
+ }
1530
+
1531
+ // Update action info
1532
+ document.getElementById('replayActionType').textContent = currentEdgeData.actionType || 'unknown';
1533
+ document.getElementById('replayActionDesc').textContent = currentEdgeData.fullLabel || currentEdgeData.label || 'No description';
1534
+
1535
+ // Show modal
1536
+ replayModal.classList.add('active');
1537
+ });
1538
+
1539
+ // Close modal handlers
1540
+ modalClose.addEventListener('click', function() {
1541
+ replayModal.classList.remove('active');
1542
+ });
1543
+
1544
+ replayModal.addEventListener('click', function(e) {
1545
+ if (e.target === replayModal) {
1546
+ replayModal.classList.remove('active');
1547
+ }
1548
+ });
1549
+
1550
+ // Close modal with Escape key
1551
+ document.addEventListener('keydown', function(e) {
1552
+ if (e.key === 'Escape') {
1553
+ if (replayModal.classList.contains('active')) {
1554
+ replayModal.classList.remove('active');
1555
+ }
1556
+ if (screenshotModal.classList.contains('active')) {
1557
+ screenshotModal.classList.remove('active');
1558
+ }
1559
+ if (galleryModal.classList.contains('active')) {
1560
+ galleryModal.classList.remove('active');
1561
+ }
1562
+ }
1563
+ });
1564
+
1565
+ // Screenshot Modal functionality
1566
+ const screenshotModal = document.getElementById('screenshotModal');
1567
+ const viewScreenshotBtn = document.getElementById('viewScreenshotBtn');
1568
+ const screenshotModalClose = document.getElementById('screenshotModalClose');
1569
+
1570
+ viewScreenshotBtn.addEventListener('click', function() {
1571
+ if (!currentNodeData) return;
1572
+
1573
+ const stateId = currentNodeData.id;
1574
+ const screenshotPath = currentNodeData.screenshotPath || '';
1575
+ const url = currentNodeData.url || 'N/A';
1576
+
1577
+ // Update modal content
1578
+ document.getElementById('screenshotStateId').textContent = stateId;
1579
+ document.getElementById('screenshotUrl').textContent = url;
1580
+
1581
+ const screenshotImg = document.getElementById('screenshotImg');
1582
+
1583
+ if (screenshotPath) {
1584
+ // Extract relative path for HTML
1585
+ const imgPath = screenshotPath.split('/').slice(-2).join('/');
1586
+ screenshotImg.src = imgPath;
1587
+ screenshotImg.style.display = 'block';
1588
+ screenshotImg.onerror = function() {
1589
+ this.style.display = 'none';
1590
+ this.parentElement.innerHTML = '<div class="replay-screenshot placeholder">Screenshot not found<br><small>' + screenshotPath + '</small></div>';
1591
+ };
1592
+ } else {
1593
+ screenshotImg.parentElement.innerHTML = '<div class="replay-screenshot placeholder">No screenshot available</div>';
1594
+ }
1595
+
1596
+ // Show modal
1597
+ screenshotModal.classList.add('active');
1598
+ });
1599
+
1600
+ // Close screenshot modal handlers
1601
+ screenshotModalClose.addEventListener('click', function() {
1602
+ screenshotModal.classList.remove('active');
1603
+ });
1604
+
1605
+ screenshotModal.addEventListener('click', function(e) {
1606
+ if (e.target === screenshotModal) {
1607
+ screenshotModal.classList.remove('active');
1608
+ }
1609
+ });
1610
+
1611
+ // Gallery Modal functionality
1612
+ const galleryModal = document.getElementById('galleryModal');
1613
+ const viewAllScreenshotsBtn = document.getElementById('viewAllScreenshotsBtn');
1614
+ const galleryModalClose = document.getElementById('galleryModalClose');
1615
+ const galleryPrevBtn = document.getElementById('galleryPrevBtn');
1616
+ const galleryNextBtn = document.getElementById('galleryNextBtn');
1617
+
1618
+ let currentGalleryIndex = 0;
1619
+ let currentGalleryScreenshots = [];
1620
+
1621
+ function updateGalleryDisplay() {
1622
+ if (currentGalleryScreenshots.length === 0) return;
1623
+
1624
+ const screenshot = currentGalleryScreenshots[currentGalleryIndex];
1625
+ const galleryImg = document.getElementById('galleryImg');
1626
+
1627
+ // Extract relative path for HTML
1628
+ const imgPath = (screenshot.path || '').split('/').slice(-2).join('/');
1629
+ galleryImg.src = imgPath;
1630
+ galleryImg.onerror = function() {
1631
+ this.style.display = 'none';
1632
+ this.parentElement.innerHTML = '<div class="replay-screenshot placeholder">Screenshot not found</div>';
1633
+ };
1634
+
1635
+ // Update counter
1636
+ document.getElementById('galleryCounter').textContent = `${currentGalleryIndex + 1} / ${currentGalleryScreenshots.length}`;
1637
+
1638
+ // Update info
1639
+ document.getElementById('galleryAction').textContent = screenshot.from_action || 'Initial state';
1640
+ document.getElementById('galleryFromState').textContent = screenshot.from_state ? screenshot.from_state.substring(0, 16) : 'N/A';
1641
+ document.getElementById('galleryTimestamp').textContent = screenshot.timestamp || 'N/A';
1642
+ document.getElementById('galleryVisitIndex').textContent = screenshot.visit_index !== undefined ? screenshot.visit_index : 'N/A';
1643
+
1644
+ // Update thumbnails
1645
+ const thumbnails = document.querySelectorAll('.gallery-thumbnail');
1646
+ thumbnails.forEach((thumb, idx) => {
1647
+ thumb.classList.toggle('active', idx === currentGalleryIndex);
1648
+ });
1649
+
1650
+ // Update navigation buttons
1651
+ galleryPrevBtn.disabled = currentGalleryIndex === 0;
1652
+ galleryNextBtn.disabled = currentGalleryIndex === currentGalleryScreenshots.length - 1;
1653
+ }
1654
+
1655
+ function buildGalleryThumbnails() {
1656
+ const container = document.getElementById('galleryThumbnails');
1657
+ container.innerHTML = '';
1658
+
1659
+ currentGalleryScreenshots.forEach((screenshot, idx) => {
1660
+ const imgPath = (screenshot.path || '').split('/').slice(-2).join('/');
1661
+ const img = document.createElement('img');
1662
+ img.className = 'gallery-thumbnail' + (idx === currentGalleryIndex ? ' active' : '');
1663
+ img.src = imgPath;
1664
+ img.alt = `Screenshot ${idx + 1}`;
1665
+ img.title = screenshot.from_action || 'Initial state';
1666
+ img.onerror = function() {
1667
+ this.src = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="80"><rect fill="%23333" width="120" height="80"/><text fill="%23999" font-size="12" x="50%" y="50%" dominant-baseline="middle" text-anchor="middle">N/A</text></svg>';
1668
+ };
1669
+ img.addEventListener('click', () => {
1670
+ currentGalleryIndex = idx;
1671
+ updateGalleryDisplay();
1672
+ });
1673
+ container.appendChild(img);
1674
+ });
1675
+ }
1676
+
1677
+ viewAllScreenshotsBtn.addEventListener('click', function() {
1678
+ if (!currentNodeData || !currentNodeData.screenshots) return;
1679
+
1680
+ currentGalleryScreenshots = currentNodeData.screenshots;
1681
+ currentGalleryIndex = 0;
1682
+
1683
+ document.getElementById('galleryStateId').textContent = currentNodeData.id;
1684
+
1685
+ buildGalleryThumbnails();
1686
+ updateGalleryDisplay();
1687
+
1688
+ galleryModal.classList.add('active');
1689
+ });
1690
+
1691
+ galleryPrevBtn.addEventListener('click', function() {
1692
+ if (currentGalleryIndex > 0) {
1693
+ currentGalleryIndex--;
1694
+ updateGalleryDisplay();
1695
+ }
1696
+ });
1697
+
1698
+ galleryNextBtn.addEventListener('click', function() {
1699
+ if (currentGalleryIndex < currentGalleryScreenshots.length - 1) {
1700
+ currentGalleryIndex++;
1701
+ updateGalleryDisplay();
1702
+ }
1703
+ });
1704
+
1705
+ // Keyboard navigation for gallery
1706
+ document.addEventListener('keydown', function(e) {
1707
+ if (galleryModal.classList.contains('active')) {
1708
+ if (e.key === 'ArrowLeft') {
1709
+ galleryPrevBtn.click();
1710
+ } else if (e.key === 'ArrowRight') {
1711
+ galleryNextBtn.click();
1712
+ }
1713
+ }
1714
+ });
1715
+
1716
+ // Close gallery modal handlers
1717
+ galleryModalClose.addEventListener('click', function() {
1718
+ galleryModal.classList.remove('active');
1719
+ });
1720
+
1721
+ galleryModal.addEventListener('click', function(e) {
1722
+ if (e.target === galleryModal) {
1723
+ galleryModal.classList.remove('active');
1724
+ }
1725
+ });
1726
+ </script>
1727
+ </body>
1728
+ </html>
arxiv_org/20260127_211418/screenshots/state_89742596975b7029.png ADDED

Git LFS Details

  • SHA256: f85fee59afffa7a73362bdd8ef83f74541c20be07af043619e31ace19f84e033
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_0f3553_20260127_212358_172471.png ADDED

Git LFS Details

  • SHA256: 44d78b2bef541bea37fdf526ed3956488014a2cee50d30e6ec89da21f21427ae
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_0f3553_20260127_212405_324053.png ADDED

Git LFS Details

  • SHA256: 1cea3fb4cb4fe45fd89ba96e622c39ddf57e213f7caac4d649d3ab9f3f54334b
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_0f3553_20260127_212412_891652.png ADDED

Git LFS Details

  • SHA256: 15b8ebb4b8628bd8caac23f6c452a75000d16529d84d970c3dde0b007c862949
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_0f3553_20260127_212649_237759.png ADDED

Git LFS Details

  • SHA256: 73755263c4e080510728e368c21e84f8270c7a1f9c527a6d2e2d6cc03cc5a2c0
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213148_759381.png ADDED

Git LFS Details

  • SHA256: 25fbf9a93c8402b75c7f19744afde443cd6c9a420f6c6326d81960755163d62d
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213154_863659.png ADDED

Git LFS Details

  • SHA256: 8a557299d194e68d128a64cba4153b94850dbc2bb6087e649a301c5e55b30de8
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213339_264462.png ADDED

Git LFS Details

  • SHA256: 9812fdc980ff4f06053032c42fa9fdd32bac73dedac981c587e427d0912fcd6e
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213343_827758.png ADDED

Git LFS Details

  • SHA256: 8a557299d194e68d128a64cba4153b94850dbc2bb6087e649a301c5e55b30de8
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213349_941738.png ADDED

Git LFS Details

  • SHA256: 8a557299d194e68d128a64cba4153b94850dbc2bb6087e649a301c5e55b30de8
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213352_757985.png ADDED

Git LFS Details

  • SHA256: 8a557299d194e68d128a64cba4153b94850dbc2bb6087e649a301c5e55b30de8
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213359_153991.png ADDED

Git LFS Details

  • SHA256: ce2fb172891fca7a625588428b7e07c31390a14f33ccb17b757355f9c9b6feaf
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_25817e_20260127_213423_036740.png ADDED

Git LFS Details

  • SHA256: a72df296aafe2c60a745b8ecfb444bc8505849e58c8023b21dc3bfdabaaadc1c
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_45b5b5_20260127_214521_283175.png ADDED

Git LFS Details

  • SHA256: d9cb5b9deec7c4627caaabe20af800b6d4598d85411b09bacddeefc63df6de46
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_45b5b5_20260127_214618_483783.png ADDED

Git LFS Details

  • SHA256: 61594b2b4899c6a82e8be0030bf40c027fdfca59d4b61f9ec103e595031925ff
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_4b71e7_20260127_212516_721075.png ADDED

Git LFS Details

  • SHA256: e295643de1804e19532d0d4d0e8716eeba831a2edcb34688aec8591060a108b3
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_4b71e7_20260127_212525_285927.png ADDED

Git LFS Details

  • SHA256: 8ed53eb96ae2c044fce28bc25eef7a2b33df12a599482e4d673817f1543072f4
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_4b71e7_20260127_212542_763658.png ADDED

Git LFS Details

  • SHA256: 25c1a094365ee4e306eb7f959f99573a3e746b3894a5daf7a0c28ce36d215ab3
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_557faa_20260127_212836_012664.png ADDED

Git LFS Details

  • SHA256: e37dc5a68073a9008ecb75fa7df7b07dfa0cf67849e33197f35710c3468d6e19
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_557faa_20260127_212906_134682.png ADDED

Git LFS Details

  • SHA256: 59796c290654c116578cfede9b2c7fb6207f1b9e0d11be9798ac884637d72479
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_897425_20260127_212351_381753.png ADDED

Git LFS Details

  • SHA256: 512e13cc2d8aa453be30d07155bcd2ffbc446c235860d615678529998153f57d
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_897425_20260127_212720_882296.png ADDED

Git LFS Details

  • SHA256: 462182f3acacaf3c484a29e7918e185a802f17fee8bd65a893388b5609a785b7
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes
arxiv_org/20260127_211418/screenshots/transition_state_897425_20260127_213117_855076.png ADDED

Git LFS Details

  • SHA256: 59796c290654c116578cfede9b2c7fb6207f1b9e0d11be9798ac884637d72479
  • Pointer size: 128 Bytes
  • Size of remote file: 131 Bytes