Skip to content

fix: handle empty source in Markdown rendering to avoid NPE - #1230

Merged
undefined-moe merged 1 commit into
hydro-dev:masterfrom
gtn1024:patch-1
Nov 5, 2026
Merged

undefined-moe merged 1 commit into
hydro-dev:masterfrom
gtn1024:patch-1

Conversation

@gtn1024

@gtn1024 gtn1024 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Markdown content now renders safely when its source is empty or otherwise falsy.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The settings Markdown preview now passes an empty string to renderMarkdown when source is falsy. For truthy sources, it passes source as before.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

  • hydro-dev/Hydro#1225: This PR also normalizes missing Markdown content to an empty string before rendering, in a separate renderer path.

Suggested reviewers: undefined-moe

Merge Risk: Minimal · up to 5a5c7

The preview now handles empty Markdown input without changing nonempty content. No merge-blocking issue is identified; merge after normal checks pass.

Pre-merge checks: Passed 5

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: handling an empty Markdown source to prevent an NPE.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/ui-default/pages/setting.page.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1323e071-a33a-4278-b17e-a2fd23b8ad6e
Commits

Reviewing files that changed from the base of the PR and between e5da65b and 5a5c7f7.

Files selected for processing: 1

  • packages/ui-default/pages/setting.page.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@undefined-moe
undefined-moe merged commit 59e6cbf into hydro-dev:master Nov 5, 2026
6 checks passed
@gtn1024
gtn1024 deleted the patch-1 branch November 5, 2026 07:08
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