Skip to content

Commit 99ce88c

Browse files
srperensclaude
andauthored
fix(clocks): restore PTP statistics panel hidden behind domain list (#610)
The PTP section's left column wrapped its domain list in an inner ScrollArea with auto_shrink([false, false]). Inside the page's outer vertical ScrollArea and the horizontal_top split, that forced the left column to expand to the full row width, pushing the details/statistics panel off-screen. Clicking a domain set the selection correctly but the stats were rendered beyond the visible area. Render the list directly (the outer ScrollArea already handles scrolling) and give the left column a fixed width so the details panel sits beside it. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 27c1cf5 commit 99ce88c

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

frontend/src/clocks.rs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl ClocksPage {
8181
) {
8282
ui.horizontal_top(|ui| {
8383
ui.vertical(|ui| {
84-
ui.set_min_width(320.0);
84+
ui.set_width(320.0);
8585
self.render_domain_list(ui, domain_info);
8686
});
8787
ui.separator();
@@ -169,22 +169,21 @@ impl ClocksPage {
169169
// Get selected domain as string
170170
let selected_id = self.selected_domain.map(|d| d.to_string());
171171

172-
let result = egui::ScrollArea::vertical()
173-
.auto_shrink([false, false])
174-
.show(ui, |ui| {
175-
let items =
176-
items_data
177-
.iter()
178-
.map(|(id, label, secondary, status_text, status_color)| {
179-
ListItem::new(id, label)
180-
.with_secondary(secondary.clone())
181-
.with_status(status_text, *status_color)
182-
});
183-
184-
list_navigator(ui, "ptp_domains", items, selected_id.as_deref())
172+
// Render the list directly: the page already lives inside a vertical
173+
// ScrollArea, and a nested vertical ScrollArea with auto_shrink([false,
174+
// false]) here would expand to the full row width and push the details
175+
// panel off-screen.
176+
let items = items_data
177+
.iter()
178+
.map(|(id, label, secondary, status_text, status_color)| {
179+
ListItem::new(id, label)
180+
.with_secondary(secondary.clone())
181+
.with_status(status_text, *status_color)
185182
});
186183

187-
if let Some(new_id) = result.inner.selected {
184+
let result = list_navigator(ui, "ptp_domains", items, selected_id.as_deref());
185+
186+
if let Some(new_id) = result.selected {
188187
if let Ok(domain) = new_id.parse::<u8>() {
189188
self.selected_domain = Some(domain);
190189
}

0 commit comments

Comments
 (0)