-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
150 lines (137 loc) · 5.84 KB
/
index.html
File metadata and controls
150 lines (137 loc) · 5.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PostSense - Intelligence-Backed API Debugging</title>
<link rel="icon" type="image/png" href="favicon.png">
<link rel="stylesheet" href="styles.css">
<style>
/* Probe Summary Panel */
.probe-summary-panel { background: #f6f8fa; border: 1px solid #d0d7de; border-radius: 8px; padding: 16px; margin: 12px 0; }
.probe-summary-title { font-weight: 700; font-size: 0.9rem; color: #24292f; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.probe-rows { list-style: none; margin: 0 0 12px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.probe-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; font-size: 0.82rem; border: 1px solid transparent; }
.probe-row.success { background: #dafbe1; border-color: #2da44e; color: #1a7f37; }
.probe-row.fail { background: #ffebe9; border-color: #d73a49; color: #82071e; }
.probe-row.pending { background: #fff8c5; border-color: #bf8700; color: #7d4e00; }
.probe-icon { font-size: 1rem; flex-shrink: 0; }
.probe-label { flex: 1; font-weight: 600; }
.probe-status { font-family: monospace; font-size: 0.78rem; opacity: 0.85; }
.probe-conclusion { margin-top: 12px; padding: 10px 12px; background: #fff; border: 1px solid #d0d7de; border-radius: 6px; font-size: 0.85rem; color: #24292f; line-height: 1.5; }
</style>
<script src="timeline-engine.js"></script>
</head>
<body>
<!-- Top Panel: Mode Toggle -->
<header class="top-panel">
<div class="brand-container">
<img src="favicon.png" alt="PostSense Logo" class="header-logo">
<h1>PostSense</h1>
</div>
<div class="mode-toggle">
<span id="mode-label">PostSense Mode</span>
<label class="switch">
<input type="checkbox" id="mode-toggle">
<span class="slider round"></span>
</label>
</div>
</header>
<main class="main-content">
<!-- Left Panel: Request Configuration -->
<section class="left-panel">
<h2>Request Configuration</h2>
<div class="config-form">
<div class="input-group">
<label for="method">Method</label>
<select id="method">
<option value="GET">GET</option>
<option value="POST">POST</option>
<option value="PUT">PUT</option>
<option value="DELETE">DELETE</option>
</select>
</div>
<div class="input-group">
<label for="url">URL</label>
<input type="text" id="url" placeholder="https://jsonplaceholder.typicode.com/posts/1">
</div>
<div class="input-group">
<label>Headers</label>
<div id="headers-container">
<!-- Dynamic header rows will be appended here -->
<div class="header-row">
<input type="text" class="header-key" placeholder="Key (e.g. Content-Type)">
<input type="text" class="header-value" placeholder="Value (e.g. application/json)">
<button class="remove-header-btn">X</button>
</div>
</div>
<button id="add-header-btn">+ Add Header</button>
</div>
<div class="input-group">
<label for="body">JSON Body</label>
<textarea id="body" rows="6" placeholder='{"key": "value"}'></textarea>
</div>
</div>
<button id="send-btn">Send Request</button>
</section>
</main>
<!-- Bottom Panel: Navigation & Results -->
<footer class="bottom-panel">
<div class="tabs-header">
<button class="tab-btn active" data-tab="tab-response">Response</button>
<button class="tab-btn" data-tab="tab-issues">Issues <span id="issue-count-badge" class="count-badge">0</span></button>
<button class="tab-btn" data-tab="tab-timeline">Timeline</button>
<button class="tab-btn" data-tab="tab-compare">Comparison</button>
</div>
<div class="tabs-content">
<!-- Response Tab -->
<div id="tab-response" class="tab-pane active">
<div class="response-content">
<div class="response-status">
<strong>Status:</strong> <span id="res-status">Waiting...</span>
</div>
<div class="response-headers">
<strong>Headers:</strong>
<pre id="res-headers"></pre>
</div>
<div class="response-body">
<strong>Body:</strong>
<pre id="res-body"></pre>
</div>
</div>
</div>
<!-- Issues Tab -->
<div id="tab-issues" class="tab-pane">
<ul id="issues-list">
<!-- Issues populated here -->
</ul>
</div>
<!-- Timeline Tab -->
<div id="tab-timeline" class="tab-pane">
<div id="debug-timeline-summary" class="timeline-summary-bar">
<!-- One-line summary here -->
</div>
<div id="timeline-reasoning"></div>
<div id="timeline-output"></div>
</div>
<!-- Comparison Tab -->
<div id="tab-compare" class="tab-pane">
<div class="compare-header">
<span>Comparing against:</span>
<select id="baseline-selector" class="toggle-details-btn" style="margin-top: 0;">
<option value="">Last Successful Request</option>
</select>
<button class="toggle-details-btn" id="retry-baseline-btn" style="margin-top: 0; background: #2da44e; color: white; border: none;">Retry with Baseline</button>
</div>
<div id="compare-output" class="compare-container">
<!-- Side-by-side diff rendered here -->
<div class="empty-compare-state">
Send a request and have a previous success in history to see comparison.
</div>
</div>
</div>
</div>
</footer>
<script src="script.js"></script>
</body>
</html>