-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_tui_fixes.cpp
More file actions
69 lines (56 loc) · 2.17 KB
/
verify_tui_fixes.cpp
File metadata and controls
69 lines (56 loc) · 2.17 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
// Verification document for TUI fixes
/*
ISSUE 1: Header background color not aligned
BEFORE: Lines 637-645 in draw_status_bar()
output << "\033[32m" << status_text << "\033[0m " << metrics;
output << "\033[0m"; // Resets background!
// Then tries to fill with spaces (no background)
AFTER: Lines 638-642
output << "\033[1;32;44m" << status_text << bg_color << " " << metrics;
// Keeps background color throughout
fill_line_with_bg(output, total_content, cols, bg_color);
// Properly fills with background color
ISSUE 2: Tab bar using approximate width instead of calculated
BEFORE: Line 673
int used = 35; // Approximate - WRONG!
AFTER: Lines 654-666
int tab_width_used = 0;
for (size_t i = 0; i < tabs.size(); ++i) {
std::string tab_text = " " + tabs[i].first + " ";
output << tab_text;
tab_width_used += tab_text.length(); // CALCULATED!
}
ISSUE 3: Broken fill loop in tab bar
BEFORE: Lines 686-690
for (int i = cols; i < cols; ++i) output << " "; // NEVER RUNS!
AFTER: Removed entirely, separator line ends with newline
ISSUE 4: Command bar double-filling and background reset
BEFORE: Lines 1285-1289
for (int i = used; i < cols; ++i) output << " ";
output << "\033[0m"; // Resets background!
for (int i = used; i < cols; ++i) output << " "; // Fills AGAIN without background
AFTER: Lines 1296-1297
fill_line_with_bg(output, used, cols, bg_color);
// Single, correct fill with background color
ISSUE 5: Hardcoded margins in multiple places
BEFORE: tui_input.cpp lines 366-371, 401-406, etc.
const int margin_top = 1;
const int margin_bottom = 1;
// etc - repeated in MANY functions
AFTER: tui.h lines 133-142
static constexpr int MARGIN_TOP = 1;
// All in ONE place, all functions use constants
ISSUE 6: 'q' key behavior not matching ESC
BEFORE: tui_input.cpp line 274
} else if (buf[0] == 'q' || buf[0] == 'Q') {
show_quit_confirmation(); // Always quits
AFTER: Lines 274-282
} else if (buf[0] == 'q') {
if (detail_view_) {
hide_detail(); // Same as ESC
} else {
show_quit_confirmation();
}
} else if (buf[0] == 'Q') {
show_quit_confirmation(); // Always quits
*/