Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.3.5](https://github.com/JayanAXHF/gitv/compare/gitv-tui-v0.3.4...gitv-tui-v0.3.5) - 2026-03-20

### <!-- 0 -->Features

- *(preview pane)* Add a small issue list preview when in issue conversation
- *(style)* Revamp the entire UI to have less borders and distractions

### <!-- 1 -->Bug Fixes

- *(md)* fixed checklist rendering

### <!-- 10 -->Other

- cleanup fix(changelog): streamline changelog config in release-plz.toml
- Add dependabot.yml
Comment on lines +23 to +24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing blank line between changelog sections

The new [0.3.5] section's last list item runs directly into the ## [0.3.4] heading with no blank line. In standard Markdown, adjacent ATX headings (##) should be separated by a blank line β€” some parsers and renderers will otherwise fail to treat the second heading correctly or will render it as part of the preceding list.

Suggested change
- cleanup fix(changelog): streamline changelog config in release-plz.toml
- Add dependabot.yml
- bump flake.lock, fix nitpick in drv, add .envrc
## [0.3.4] - 2026-03-08

- bump flake.lock, fix nitpick in drv, add .envrc
## [0.3.4] - 2026-03-08

### Bug Fixes
Expand Down
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.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gitv-tui"
version = "0.3.4"
version = "0.3.5"
edition = "2024"
build = "build.rs"
description = "A terminal-based GitHub client built with Rust and Ratatui."
Expand Down Expand Up @@ -39,7 +39,7 @@ rat-cursor = "2.0.0"
rat-widget = "3.2.1"
ratatui = {version = "0.30.0", features = ["unstable-widget-ref"] }
ratatui-macros = "0.7.0"
ratatui-toaster = { path = "crates/ratatui-toaster", version = "0.1.1", features = ["tokio"] }
ratatui-toaster = { path = "crates/ratatui-toaster", version = "0.1.2", features = ["tokio"] }
termprofile = { version = "0.2.0", features = ["convert", "ratatui"] }
textwrap = { version = "0.16.2", features = ["terminal_size"] }
thiserror = "2.0.18"
Expand Down
2 changes: 1 addition & 1 deletion crates/ratatui-toaster/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ratatui-toaster"
description = "An extremely lightweight toast engine for ratatui"
version = "0.1.1"
version = "0.1.2"
edition = "2024"
authors = ["JayanAXHF <sunil.chdry@gmail.com>"]
license = "Unlicense OR MIT"
Expand Down
112 changes: 101 additions & 11 deletions src/ui/components/issue_conversation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2497,11 +2497,56 @@ struct MarkdownRenderer {
in_code_block: bool,
code_block_lang: Option<String>,
code_block_buf: String,
list_prefix: Option<String>,
item_prefix: Option<ListPrefix>,
pending_space: bool,
active_link_url: Option<String>,
}

#[derive(Debug, Clone)]
struct ListPrefix {
first_line: String,
continuation: String,
first_line_pending: bool,
}

impl ListPrefix {
fn bullet() -> Self {
Self::new("β€’ ".to_string())
}

fn task(checked: bool) -> Self {
let prefix = if checked { "[x] " } else { "[ ] " };
Self::new(prefix.to_string())
}

fn new(first_line: String) -> Self {
let continuation = " ".repeat(display_width(&first_line));
Self {
first_line,
continuation,
first_line_pending: true,
}
}

fn current_text(&self) -> &str {
if self.first_line_pending {
&self.first_line
} else {
&self.continuation
}
}

fn current_width(&self) -> usize {
display_width(self.current_text())
}

fn take_for_line(&mut self) -> String {
let prefix = self.current_text().to_string();
self.first_line_pending = false;
prefix
}
}

#[derive(Clone, Copy)]
struct AdmonitionStyle {
marker: &'static str,
Expand Down Expand Up @@ -2564,7 +2609,7 @@ impl MarkdownRenderer {
in_code_block: false,
code_block_lang: None,
code_block_buf: String::new(),
list_prefix: None,
item_prefix: None,
pending_space: false,
active_link_url: None,
}
Expand Down Expand Up @@ -2604,7 +2649,7 @@ impl MarkdownRenderer {
}
Tag::Item => {
self.flush_line();
self.list_prefix = Some("β€’ ".to_string());
self.item_prefix = Some(ListPrefix::bullet());
}
_ => {}
}
Expand Down Expand Up @@ -2644,7 +2689,7 @@ impl MarkdownRenderer {
}
TagEnd::Item => {
self.flush_line();
self.list_prefix = None;
self.item_prefix = None;
}
TagEnd::Paragraph => {
self.flush_line();
Expand Down Expand Up @@ -2716,8 +2761,8 @@ impl MarkdownRenderer {

fn task_list_marker(&mut self, checked: bool) {
self.ensure_admonition_header();
let marker = if checked { "[x] " } else { "[ ] " };
self.push_text(marker, self.current_style);
self.item_prefix = Some(ListPrefix::task(checked));
self.pending_space = false;
}

fn rule(&mut self) {
Expand Down Expand Up @@ -2923,9 +2968,10 @@ impl MarkdownRenderer {
.unwrap_or_else(|| Style::new().fg(Color::DarkGray));
self.current_line.push(Span::styled("β”‚ ", border_style));
}
if let Some(prefix) = &self.list_prefix {
self.current_width += display_width(prefix);
self.current_line.push(Span::raw(prefix.clone()));
if let Some(prefix) = self.item_prefix.as_mut() {
let prefix = prefix.take_for_line();
self.current_width += display_width(&prefix);
self.current_line.push(Span::raw(prefix));
}
}

Expand All @@ -2934,8 +2980,8 @@ impl MarkdownRenderer {
if self.in_block_quote {
width += 2;
}
if let Some(prefix) = &self.list_prefix {
width += display_width(prefix);
if let Some(prefix) = &self.item_prefix {
width += prefix.current_width();
}
width
}
Expand Down Expand Up @@ -3090,6 +3136,19 @@ mod tests {
.collect()
}

fn all_line_text(rendered: &super::MarkdownRender) -> Vec<String> {
rendered
.lines
.iter()
.map(|line| {
line.spans
.iter()
.map(|span| span.content.as_ref())
.collect()
})
.collect()
}

#[test]
fn extracts_link_segments_with_urls() {
let rendered = render_markdown("Go to [ratatui docs](https://github.com/ratatui/).", 80, 0);
Expand Down Expand Up @@ -3122,4 +3181,35 @@ mod tests {
.all(|link| !link.label.starts_with(' ') && !link.label.ends_with(' '))
);
}

#[test]
fn renders_unchecked_checklist_without_bullet_prefix() {
let rendered = render_markdown("- [ ] todo", 80, 0);

assert_eq!(all_line_text(&rendered), vec!["[ ] todo"]);
}

#[test]
fn renders_checked_checklist_without_bullet_prefix() {
let rendered = render_markdown("- [x] done", 80, 0);

assert_eq!(all_line_text(&rendered), vec!["[x] done"]);
}

#[test]
fn wraps_checklist_items_with_aligned_continuation() {
let rendered = render_markdown("- [ ] hello world", 10, 0);

assert_eq!(all_line_text(&rendered), vec!["[ ] hello", " world"]);
}

#[test]
fn keeps_bullets_for_non_task_list_items() {
let rendered = render_markdown("- bullet\n- [x] done\n- [ ] todo", 80, 0);

assert_eq!(
all_line_text(&rendered),
vec!["β€’ bullet", "[x] done", "[ ] todo"]
);
}
}
Loading
Loading