Skip to content

fix(ui): parse markdown changelog properly in update settings and dialogs - #364

Merged
iad1tya merged 2 commits into
EchoMusicApp:mainfrom
Rajendra0309:fix/update-settings-markdown-changelog
Sep 12, 2026
Merged

fix(ui): parse markdown changelog properly in update settings and dialogs#364
iad1tya merged 2 commits into
EchoMusicApp:mainfrom
Rajendra0309:fix/update-settings-markdown-changelog

Conversation

@Rajendra0309

@Rajendra0309 Rajendra0309 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Recently, a "What's New" section was added to Update Settings to display the latest release notes. However, the raw release body was passed directly to a single Text composable, causing Markdown headings (### ), bullet points (- ), and contributor links to render as unformatted text. Additionally, GitHub's auto-generated contributor release notes use nested markdown links ([[user](url)](url)), which caused raw URLs and brackets to be displayed instead of clean clickable usernames across all changelogs.

This PR addresses both issues:

  1. Structured Changelog in Update Settings: Connected parseMarkdownToSections() in UpdateSettings.kt to convert release notes into structured sections with bold primary headers (titleSmall) and hanging-indent bullet rows (), matching UpdateAvailableDialog.
  2. Contributor Link Normalization: Added normalization in MarkdownParser.kt and UpdaterComponents.kt to unpack GitHub's nested [[username](url)](url) into [username](url), rendering clean, clickable contributor profile links without raw URL syntax.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • UI/UX enhancement

Screenshots

1. Update Settings ("What's New" Section)

Before (Raw Markdown) After (Formatted Sections)
Before update Update Settings screen After update Update Settings screen

2. Update Available Dialog (Contributors Links)

Before (Raw URLs / Double Brackets) After (Clean Clickable Links)
Before update Update Available Dialog After update Update Available Dialog

How Has This Been Tested?

  1. Tested on physical device.
  2. Verified that Settings → System Update → What's New renders structured section titles ("New Features", "Improvements", "Bug Fixes", "Contributors") and bullet points.
  3. Verified that contributor entries render as clean, styled, clickable links without raw Markdown brackets or URLs.

Checklist

  • My code follows the code style and guidelines of this project.
  • I have tested my changes locally on a physical device.
  • I have included Before & After screenshots.

Summary by CodeRabbit

  • Improvements
    • Release notes now display clearer descriptions, titled sections, bullet points, spacing, and structured styling.
    • Markdown formatting is handled more consistently for bold, italic, code, links, and mentions.
    • List markers and nested links are normalized for cleaner rendered text.
    • Unrecognized release note content continues to display as plain text.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 372344ab-5ac3-4fb0-9f08-98f58b2dab37

📥 Commits

Reviewing files that changed from the base of the PR and between 11fa2a0 and c6d66eb.

📒 Files selected for processing (2)
  • app/src/main/kotlin/com/music/echo/ui/component/UpdaterComponents.kt
  • app/src/main/kotlin/com/music/echo/ui/screens/settings/UpdateSettings.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/main/kotlin/com/music/echo/ui/component/UpdaterComponents.kt
  • app/src/main/kotlin/com/music/echo/ui/screens/settings/UpdateSettings.kt

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Markdown input is normalized before parsing. Release notes are rendered as structured descriptions, titled sections, and bullet items, with a raw-text fallback.

Changes

Release Notes Flow

Layer / File(s) Summary
Markdown input normalization
app/src/main/kotlin/com/music/echo/ui/utils/MarkdownParser.kt, app/src/main/kotlin/com/music/echo/ui/component/UpdaterComponents.kt
Markdown parsing removes leading list markers, collapses nested link syntax, and uses the cleaned text for matches and trailing content.
Structured release-notes rendering
app/src/main/kotlin/com/music/echo/ui/screens/settings/UpdateSettings.kt
Release notes render parsed descriptions, titled sections, and nonblank bullet items with styling. Raw notes remain the fallback when parsing produces no content.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant UpdateSettings
  participant MarkdownParser
  participant ReleaseNotesUI
  UpdateSettings->>MarkdownParser: parse release-note text
  MarkdownParser-->>UpdateSettings: return description and sections
  UpdateSettings->>ReleaseNotesUI: render styled descriptions and bullet items
  UpdateSettings->>ReleaseNotesUI: render raw notes when parsing returns no content
Loading

Merge Risk: ⚪ Minimal · up to c6d66

The reviewed Markdown rendering changes have no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: fixing Markdown changelog rendering in update settings and dialogs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@iad1tya
iad1tya merged commit e1c0ec5 into EchoMusicApp:main Sep 12, 2026
2 checks passed
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.

2 participants