chore(auto-nav-sidebar): Improve missing page error readability#2880
chore(auto-nav-sidebar): Improve missing page error readability#2880
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@copilot Error: The file "/Users/bytedance/Documents/codes/rspress/website/docs/en/guide/basic/custom-page" does not exist, please check it in "/Users/bytedance/Documents/codes/rspress/website/docs/en/guide/basic/_meta.json". 这个错误信息不是很好读懂,试着优化,可增加颜色显示 |
Updated the error to include colored highlights for the missing file and its meta source. Commit 6bba8d2. Screenshot:
|
Rsdoctor Bundle Diff Analysis📁 webPath:
📦 Download Diff Report: web Bundle Diff Generated by Rsdoctor GitHub Action |
6bba8d2 to
864584c
Compare
There was a problem hiding this comment.
Pull request overview
This PR enhances the error message readability when a custom page file is missing during auto-nav sidebar resolution by adding colorized output to the CLI. The error message now highlights the missing file path in yellow, prefixes it with a red "Missing page file:" label, and shows the source _meta.json file in cyan.
Key Changes
- Added
picocolorsimport for terminal color formatting - Extracted
metaFilePathvariable to avoid duplication - Reformatted the error message with color-coded components for better visual clarity
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6a017ec to
2fe0b4f
Compare

Summary
Colorized the missing custom page error message in auto-nav sidebar resolution to clearly highlight the absent file path and the
_meta.jsonsource, improving readability of the CLI output.Related Issue
Checklist
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.