Skip to content

Commit

Permalink
fix: fix the table state in topicDetailsComponent, adjust delay for…
Browse files Browse the repository at this point in the history
… checkpoint while consuming records
  • Loading branch information
Mcdostone committed Jan 25, 2025
1 parent ac5b9c3 commit 313e232
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/command/src/headless/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Headless {
let timestamp = message.timestamp().to_millis().unwrap_or_default();
tx_dd.send(message).unwrap();

if current_time.elapsed() > Duration::from_secs(10) {
if current_time.elapsed() > Duration::from_secs(15) {
current_time = Instant::now();
info!("Checkpoint: {}", timestamp);
}
Expand Down
5 changes: 5 additions & 0 deletions crates/tui/src/component/footer_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ impl Component for FooterComponent {
false => (state.theme.bg_disabled, state.theme.fg_disabled),
};
if v.0 > 0 {
#[cfg(not(debug_assertions))]
help.push("—".fg(colors.0));
#[cfg(debug_assertions)]
help.push("".to_string().bg(colors.0).fg(state.theme.bg));
}
let prefix = match v.0 {
0 if self.main_component == ComponentName::TopicsAndRecords => "◧ ",
Expand All @@ -132,6 +135,8 @@ impl Component for FooterComponent {
.fg(colors.1)
.bold(),
);
#[cfg(debug_assertions)]
help.push("".fg(colors.0));
}

help.push(Span::from(" "));
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/component/record_details_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl Component for RecordDetailsComponent<'_> {
fn shortcuts(&self) -> Vec<Shortcut> {
let mut shortcuts = vec![
Shortcut::new("J/K", "Scroll"),
Shortcut::new("↑↓", "Previous/next record"),
Shortcut::new("↑↓", "Prev/next record"),
];

if self
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/component/topic_details_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl Component for TopicDetailsComponent {
width: table_area.width,
height: table_area.height.saturating_sub(5),
},
&mut self.state.clone(), //.with_offset((self.scroll.value() + table_area.y + 10).into()),
&mut self.state,
);

f.render_widget(
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/component/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ impl Ui {
let message = message.detach();
let timestamp = message.timestamp().to_millis().unwrap_or_default();
tx_dd.send(message).unwrap();
if current_time.elapsed() > Duration::from_secs(10) {
if current_time.elapsed() > Duration::from_secs(13) {
current_time = Instant::now();

tx.send(Action::Notification(Notification::new(
Expand Down

0 comments on commit 313e232

Please sign in to comment.