Skip to content

feat(style): Revamp the entire UI to have less borders and distractions#87

Merged
JayanAXHF merged 3 commits intomainfrom
feat-style/prettify-the-ui
Mar 20, 2026
Merged

feat(style): Revamp the entire UI to have less borders and distractions#87
JayanAXHF merged 3 commits intomainfrom
feat-style/prettify-the-ui

Conversation

@JayanAXHF
Copy link
Owner

feat(style): Revamp the entire UI to have less borders and distractions

  1. Removed a lot of unnecessary borders around elements.
  2. Added line numbers for the input in issue conversation
  3. Added a BodyPreview component that shows a preview of the issue
    body in the TUI list widget.

test(ui): update tests

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@JayanAXHF JayanAXHF force-pushed the feat-style/prettify-the-ui branch 5 times, most recently from f38b8ee to 4c89c3d Compare March 20, 2026 12:10
@JayanAXHF JayanAXHF marked this pull request as ready for review March 20, 2026 12:11
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 20, 2026

Greptile Summary

This PR replaces full-bordered rounded blocks with minimal single-edge borders across all UI components, adds line-number gutters to textarea inputs, and introduces the new IssueConvoPreview component — which shows an issue body preview in list mode and a sliding window of nearby issues in details mode. Two bugs were introduced alongside these improvements.

Key changes:

  • All Block::bordered().border_type(Rounded) widgets are replaced with targeted Borders::BOTTOM / Borders::LEFT / Borders::TOP borders with merge_borders to produce a connected grid appearance.
  • New IssueConvoPreview component renders a body markdown preview (list mode) or a 5-issue sliding window (details mode) in the right panel.
  • render_markdown, MarkdownRender, RenderedLink, and TimelineEventView::from_api promoted to pub(crate) to support the new component.
  • ListPrefix refactored so checklist markers replace the bullet prefix on the first continuation line, fixing aligned wrapping.
  • Line numbers added to the comment input in IssueConversation and the body input in IssueCreate.
  • Default border style changed to .dim() to reduce visual noise on unfocused widgets.

Issues found:

  • issue_list.rs: A RwLock read guard is held across an .await? call when dispatching ChangeIssueBodyPreview. The issue is masked by a file-level #![allow(clippy::await_holding_lock)] suppression, which should instead be fixed by dropping the guard before awaiting.
  • issue_convo_preview.rs: render_body_preview applies textwrap::wrap to raw markdown before passing it to render_markdown. Since textwrap has no markdown awareness, it can split headings, links, and code fences mid-token. render_markdown already handles wrapping internally via its width parameter — the pre-wrap call should be removed.
  • label_list.rs: A new Constraint::Length(1) creates areas[2] in the footer layout split, but areas[2] is never assigned or rendered, silently reducing the list area by one row.
  • issue_detail.rs: The "Type: Issue / Pull Request" field is removed, which is a functional content change (not just a border change) bundled into this PR.

Important Files Changed

Filename Overview
src/ui/components/issue_list.rs Extracts build_issue_list_item/build_issue_list_lines as pub(crate) helpers and adds send_issue_list_preview_for_number; introduces a #![allow(clippy::await_holding_lock)] suppression to hide a real bug where the issue_pool RwLock guard is held across an .await? call when dispatching ChangeIssueBodyPreview.
src/ui/components/issue_convo_preview.rs New component rendering either a body markdown preview (List mode) or a nearby-issues list (Details mode); render_body_preview incorrectly pre-wraps raw markdown with textwrap::wrap before passing it to render_markdown, which can corrupt markdown tokens, and render_issue_list_preview duplicates the sync_selected_issue logic.
src/ui/components/label_list.rs Switches to borderless style (LEFT
src/ui/layout.rs Adds mini_convo_preview field; splits the right panel into three overlapping sections (60%/rest/rest) for the new preview component; shifts main split from 70/30 to 66/34.
src/ui/components/issue_conversation.rs Adds line numbers to the comment input via LineNumberState/LineNumbers; replaces full bordered blocks with single-edge borders; refactors ListPrefix to correctly handle checklist continuation lines; promotes render_markdown, MarkdownRender, and RenderedLink to pub(crate) for use by the new preview component.
src/ui/components/issue_detail.rs Switches IssuePreview block to LEFT
src/ui/components/issue_create.rs Adds line numbers to the body textarea; switches block borders to TOP-only with horizontal padding; dispatches IssueListPreviewUpdated after issue creation.
src/ui/mod.rs Registers IssueConvoPreview as component index 6 and adds ChangeIssueBodyPreview and IssueListPreviewUpdated action variants.
src/ui/utils.rs Changes the default (unfocused) border style to .dim() to reduce visual noise.
src/ui/components/status_bar.rs Fixes a typo in the quit shortcut label: q/<C-q>/<C-cq/<C-q>/<C-c>; reorders imports.
src/ui/testing.rs Minor modernisation: replaces % n == 0 with is_multiple_of(n) and .min(3).max(1) with .clamp(1, 3); no functional changes.

Sequence Diagram

sequenceDiagram
    participant User
    participant IssueList
    participant IssueConvoPreview
    participant IssueConversation
    participant IssuePreview

    User->>IssueList: Select issue (Enter)
    IssueList->>IssueList: read pool lock
    IssueList->>IssueList: resolve body text (pool still locked)
    IssueList-->>IssueConvoPreview: ChangeIssueBodyPreview(body) [await while lock held ⚠️]
    IssueList->>IssueList: drop pool lock
    IssueList-->>IssueConvoPreview: IssueListPreviewUpdated {issue_ids, selected_number}
    IssueList-->>IssuePreview: SelectedIssuePreview {seed}
    IssueList-->>IssueConversation: EnterIssueDetails {seed}

    Note over IssueConvoPreview: List mode → render_body_preview<br/>(pre-wraps markdown with textwrap ⚠️)
    Note over IssueConvoPreview: Details mode → render_issue_list_preview<br/>(shows nearby issues window of 5)

    User->>IssueConvoPreview: Up/Down (Details mode)
    IssueConvoPreview->>IssueConvoPreview: update selected_number
    User->>IssueConvoPreview: Enter
    IssueConvoPreview-->>IssueConversation: EnterIssueDetails {seed}
Loading

Last reviewed commit: "fix(md): fixed check..."

@JayanAXHF JayanAXHF force-pushed the feat-style/prettify-the-ui branch 2 times, most recently from cad7f09 to f77372e Compare March 20, 2026 12:38
1. Removed a lot of unnecessary borders around elements.
2. Added line numbers for the input in issue conversation
3. Added a `BodyPreview` component that shows a preview of the issue
body in the TUI list widget.

test(ui): update tests

chore: fix lints

feat(style): migrate over issue_create

fix(style): remove old style borders for new ones in textarea previews

fix: fix bugs
…ersation

fix: render placeholder in create issue mode for convo preview
test(markdown): add UI tests for fixed list rendering
@JayanAXHF JayanAXHF force-pushed the feat-style/prettify-the-ui branch from f77372e to dc565f9 Compare March 20, 2026 12:38
@JayanAXHF JayanAXHF merged commit a23dbf1 into main Mar 20, 2026
3 of 4 checks passed
@JayanAXHF JayanAXHF deleted the feat-style/prettify-the-ui branch March 20, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant