Skip to content

Commit 9f31dbe

Browse files
committed
feat: Run-All bottom progress bar with expandable log panel
1 parent 68176e3 commit 9f31dbe

3 files changed

Lines changed: 283 additions & 10 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Changelog — Run-All Progress Bar with Log Panel
2+
3+
**Date:** 2026-03-16
4+
5+
## Summary
6+
7+
Added a visible bottom status bar during Run All execution with an expandable
8+
log panel that mirrors the console output, so users get real-time feedback
9+
without opening DevTools.
10+
11+
## Changes
12+
13+
### `css/exec-engine.css`
14+
- Restructured `.exec-progress-bar` to column layout with `.exec-progress-row`
15+
- Added `.exec-log-toggle` button with `.exec-log-count` badge
16+
- Added `.exec-log-panel` (expandable, max-height 300px) and `.exec-log-scroll`
17+
- Added `.exec-log-entry` / `.exec-log-ts` / `.exec-log-icon` / `.exec-log-msg`
18+
- Color-coded entries: `.success` (green), `.error` (red), `.warn` (yellow)
19+
- Light-mode overrides for all new classes
20+
21+
### `js/exec-controller.js`
22+
- Added `_logEntries[]` buffer, `_logStartTime`, `_logPanelOpen` state
23+
- Added `appendLog(icon, msg, cls)` — pushes timestamped entries to buffer
24+
- Added `buildLogEntryEl(entry)` — creates a monospaced log line DOM node
25+
- Added `toggleLogPanel()` — opens/closes log panel, populates on open
26+
- Rewrote `showProgress()` — new DOM with log panel + Logs toggle + abort
27+
- Rewrote `hideProgress()` — shows "Done" summary for 4s, then removes element
28+
- Sprinkled `appendLog()` alongside every `console.log` in `executeBlocks()`
29+
- **Bugfix:** moved `hideProgress()` call before `_currentRun = null` so the
30+
completion text actually displays
31+
32+
## Files Modified
33+
- `css/exec-engine.css`
34+
- `js/exec-controller.js`

css/exec-engine.css

Lines changed: 132 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838
right: 0;
3939
z-index: 9999;
4040
display: none;
41-
align-items: center;
42-
gap: 10px;
43-
padding: 8px 16px;
41+
flex-direction: column;
4442
background: var(--bg-color, #1e1e2e);
4543
border-top: 1px solid var(--border-color, #333);
4644
font-size: 0.8rem;
@@ -49,10 +47,18 @@
4947
box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
5048
}
5149

50+
.exec-progress-row {
51+
display: flex;
52+
align-items: center;
53+
gap: 10px;
54+
padding: 8px 16px;
55+
min-height: 36px;
56+
}
57+
5258
.exec-progress-text {
5359
white-space: nowrap;
5460
font-weight: 500;
55-
min-width: 160px;
61+
min-width: 140px;
5662
}
5763

5864
.exec-progress-track {
@@ -70,6 +76,32 @@
7076
transition: width 0.3s ease;
7177
}
7278

79+
/* ---- Logs Toggle ---- */
80+
.exec-log-toggle {
81+
background: none;
82+
border: 1px solid rgba(59, 130, 246, 0.3);
83+
color: #60a5fa;
84+
padding: 2px 10px;
85+
border-radius: 4px;
86+
cursor: pointer;
87+
font-size: 0.75rem;
88+
font-weight: 500;
89+
transition: all 0.2s;
90+
white-space: nowrap;
91+
font-family: inherit;
92+
display: flex;
93+
align-items: center;
94+
gap: 4px;
95+
}
96+
.exec-log-toggle:hover {
97+
background: rgba(59, 130, 246, 0.12);
98+
border-color: #60a5fa;
99+
}
100+
.exec-log-toggle.open {
101+
background: rgba(59, 130, 246, 0.15);
102+
border-color: #60a5fa;
103+
}
104+
73105
.exec-abort-btn {
74106
background: none;
75107
border: 1px solid var(--border-color, #555);
@@ -86,6 +118,80 @@
86118
border-color: #ef4444;
87119
}
88120

121+
/* ---- Expandable Log Panel ---- */
122+
.exec-log-panel {
123+
max-height: 0;
124+
overflow: hidden;
125+
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
126+
border-top: 1px solid transparent;
127+
}
128+
.exec-log-panel.open {
129+
max-height: 300px;
130+
border-top-color: var(--border-color, #333);
131+
}
132+
133+
.exec-log-scroll {
134+
max-height: 300px;
135+
overflow-y: auto;
136+
padding: 8px 16px 8px 16px;
137+
scrollbar-width: thin;
138+
scrollbar-color: var(--scrollbar-thumb, #555) transparent;
139+
}
140+
.exec-log-scroll::-webkit-scrollbar { width: 5px; }
141+
.exec-log-scroll::-webkit-scrollbar-thumb {
142+
background: var(--scrollbar-thumb, #555);
143+
border-radius: 3px;
144+
}
145+
146+
.exec-log-entry {
147+
display: flex;
148+
align-items: baseline;
149+
gap: 8px;
150+
padding: 2px 0;
151+
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
152+
font-size: 0.72rem;
153+
line-height: 1.5;
154+
color: var(--text-color, #cdd6f4);
155+
opacity: 0.85;
156+
}
157+
.exec-log-entry:last-child { opacity: 1; }
158+
159+
.exec-log-ts {
160+
color: #6b7280;
161+
font-size: 0.68rem;
162+
min-width: 52px;
163+
flex-shrink: 0;
164+
text-align: right;
165+
}
166+
167+
.exec-log-icon {
168+
flex-shrink: 0;
169+
width: 16px;
170+
text-align: center;
171+
}
172+
173+
.exec-log-msg {
174+
flex: 1;
175+
word-break: break-word;
176+
}
177+
178+
.exec-log-entry.error .exec-log-msg { color: #f87171; }
179+
.exec-log-entry.success .exec-log-msg { color: #34d399; }
180+
.exec-log-entry.warn .exec-log-msg { color: #fbbf24; }
181+
182+
/* ---- Log count badge on toggle ---- */
183+
.exec-log-count {
184+
background: rgba(59, 130, 246, 0.2);
185+
color: #60a5fa;
186+
font-size: 0.65rem;
187+
font-weight: 700;
188+
padding: 0 5px;
189+
border-radius: 8px;
190+
min-width: 16px;
191+
text-align: center;
192+
line-height: 1.5;
193+
}
194+
89195
/* ---- Per-Block Status Badges ---- */
90196
.exec-status-badge {
91197
display: inline-flex;
@@ -144,3 +250,25 @@
144250
border-color: #cbd5e1;
145251
color: #334155;
146252
}
253+
254+
[data-theme="light"] .exec-log-panel,
255+
:root:not([data-theme="dark"]) .exec-log-panel {
256+
border-top-color: #e2e8f0;
257+
}
258+
259+
[data-theme="light"] .exec-log-toggle,
260+
:root:not([data-theme="dark"]) .exec-log-toggle {
261+
color: #3b82f6;
262+
border-color: rgba(59, 130, 246, 0.25);
263+
}
264+
265+
[data-theme="light"] .exec-log-ts,
266+
:root:not([data-theme="dark"]) .exec-log-ts {
267+
color: #9ca3af;
268+
}
269+
270+
[data-theme="light"] .exec-log-count,
271+
:root:not([data-theme="dark"]) .exec-log-count {
272+
background: rgba(59, 130, 246, 0.12);
273+
color: #3b82f6;
274+
}

0 commit comments

Comments
 (0)