-
Notifications
You must be signed in to change notification settings - Fork 0
update docs #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update docs #75
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
📝 WalkthroughWalkthroughThe documentation generation system now supports expanded content formats including language-tagged code blocks, tabs, tables, and state diagrams. The Adapter interface was refactored to handle these new shapes. GitHub corner widget exports were added, theme colors updated, and the readme documentation expanded with configuration schema details. Static diagram data was removed in favor of dynamic generation. Changes
Sequence Diagram(s)sequenceDiagram
participant DocGen as Docs Generator
participant Adapter as Adapter<T, X>
participant Renderer as HTML/Markdown<br/>Renderer
participant DiagSvc as External Diagram<br/>Service
participant LinkVal as Link Validator
participant FileIO as File System
DocGen->>Adapter: tabs(tabs)
Adapter-->>Renderer: render tabbed content
DocGen->>Adapter: codeblock(code, lang)
Adapter->>Renderer: language-aware code rendering
DocGen->>Adapter: process_state_diagram(source)
Adapter->>DiagSvc: fetch diagram (deflate compressed)
DiagSvc-->>Adapter: SVG diagram
Adapter->>Renderer: inject diagram
DocGen->>Adapter: links_collect()
Adapter->>LinkVal: validate internal links
LinkVal->>FileIO: check workspace paths
Adapter->>LinkVal: validate external links
LinkVal-->>Adapter: link validation results
Renderer->>FileIO: write HTML with github corner
FileIO-->>DocGen: complete
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
🤖 Fix all issues with AI agents
In `@docs/github-corner.ts`:
- Around line 5-13: The inline style array in docs/github-corner.ts currently
uses hardcoded colors ("#333333", "#ccc8b1"); replace those literals with
theme-derived values by referencing the theme or CSS variables used across the
app (e.g., use theme.colors.* or CSS vars like var(--color-xxx)) instead of
literals. Locate the style array (the style: [ ... ].join(" ") block) and change
the color entries to use the appropriate theme tokens (for example
theme.colors.background / theme.colors.text or corresponding CSS custom
properties) so the component respects the app theme; ensure you import or accept
the theme/CSS variables used elsewhere and update any tests or usages if the API
changes.
In `@docs/main.ts`:
- Line 215: The href for the GitHub corner link is a placeholder
("https://your-url"); update it in docs/main.ts where the array contains ["a",
{href: "https://your-url", class: "github-corner", "aria-label": "View source on
GitHub"}, github_corner] so it points to the real repository URL (e.g.,
https://github.com/owner/repo) or replace it with a canonical config constant
(REPO_URL) pulled from project config/env; ensure you update the same entry that
pairs github_corner with github_corner_style and keep the "aria-label" intact.
- Around line 582-585: The ternary uses an IIFE to throw on invalid file info
which reduces readability; replace the IIFE by computing the value for the
variable type with a clear if/else (or a small helper like
validateAndGetType(info, link)) that sets type to "DIR" or "FILE" and throws new
Error(`Broken local name: ${link}`) if neither, then keep the
console.log(styleText("greenBright", "OK") + ":", link, "=>", styleText("blue",
type)) as-is; reference symbols: type, info, link, styleText.
- Around line 371-377: The local function named escape in the block that builds
the ["pre", ... ["code", ...]] node shadows the global escape and is the second
occurrence; rename this local function (e.g., to escapeCode or escapeForCode)
and update its usage in the return expression (the spread ...escape(code)) to
the new name, ensuring no other references to the old escape remain; keep the
function logic intact and only change its identifier in that scope to avoid
global shadowing.
- Around line 236-240: The local function named escape shadows the global
escape; rename it (e.g., escapeHtml or escapeAngleBrackets) and update all local
references (e.g., the return ["code", {}, escape(s)] call) to the new name to
avoid shadowing; ensure the function declaration and its usage in this module
(the arrow function that maps characters and returns "<" and ">") are
consistently renamed.
- Around line 576-578: The HTTP status check in the link validation uses
res.status < 200 || res.status >= 299 which incorrectly treats 299 as an error;
update the condition around the fetch result (the res variable from fetch(link)
in docs/main.ts) to use res.status < 200 || res.status >= 300 (or equivalently
!(res.status >= 200 && res.status < 300)) so all 2xx codes are accepted; locate
the check where res is inspected and replace the boundary to >= 300.
- Around line 176-181: The module currently performs a top-level await fetching
Kroki SVG using diagurl/deflate/diagram and assigns diagsvg, which can fail at
import time; refactor this so the fetch is performed lazily inside an async
function (e.g. getDiagramSvg or loadDiagramSvg) or invoked during runtime, wrap
the fetch and response.text() calls (diagresponse, diagsvg) in try/catch, and
provide a safe fallback (placeholder SVG or error marker) and optional
retry/logging so documentation build does not fail if kroki.io is unavailable.
In `@docs/styles.ts`:
- Around line 555-564: The body style in the styles array currently hardcodes
the grid color (`#ccc8b1`) in the "background-image" value; update the "body"
entry so it uses the theme variable instead (e.g., a CSS variable like
--yorha-base00 or the exported colors.base00 value) so the grid color stays in
sync with the yorha theme; modify the "body" object's "background-image" string
to reference that variable rather than the literal hex and ensure the variable
is defined/available in the theme/colors export used by docs/styles.ts.
In `@readme.md`:
- Around line 29-52: The README is missing blank lines around several Markdown
headings (triggering MD022); add a blank line before and after the "###
Supported Formats", "#### JSONNet (.jsonnet)" and "### Configuration Schema"
headings so each heading is surrounded by an empty line as required by
markdownlint; update the lines around those headings in readme.md to insert the
single blank line above and below each heading and ensure the surrounding
paragraphs/list blocks remain separated.
| style: [ | ||
| // TODO: depend on style | ||
| "fill: #333333;", | ||
| "color: #ccc8b1;", | ||
| "position: absolute;", | ||
| "top: 0;", | ||
| "border: 0;", | ||
| "right: 0;", | ||
| ].join(" "), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Address TODO: Hardcoded colors should reference theme variables.
The inline style contains hardcoded colors (#333333, #ccc8b1) that should ideally be derived from the theme for consistency. The existing TODO comment on line 6 acknowledges this.
Would you like me to help integrate theme variables here, or open an issue to track this?
🤖 Prompt for AI Agents
In `@docs/github-corner.ts` around lines 5 - 13, The inline style array in
docs/github-corner.ts currently uses hardcoded colors ("#333333", "#ccc8b1");
replace those literals with theme-derived values by referencing the theme or CSS
variables used across the app (e.g., use theme.colors.* or CSS vars like
var(--color-xxx)) instead of literals. Locate the style array (the style: [ ...
].join(" ") block) and change the color entries to use the appropriate theme
tokens (for example theme.colors.background / theme.colors.text or corresponding
CSS custom properties) so the component respects the app theme; ensure you
import or accept the theme/CSS variables used elsewhere and update any tests or
usages if the API changes.
| const diagurl = "https://kroki.io/mermaid/svg/" + deflate(diagram, {level: 9}) | ||
| .toBase64() | ||
| .replace(/\+/g, '-') | ||
| .replace(/\//g, '_'); | ||
| const diagresponse = await fetch(diagurl); | ||
| const diagsvg = await diagresponse.text(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top-level await for external service may cause build failures.
The diagram fetch executes at module load time. If the kroki.io service is unavailable or rate-limited, this will cause the entire documentation build to fail without clear recovery options.
Consider wrapping this in error handling or making the fetch lazy:
🛡️ Suggested defensive approach
-const diagresponse = await fetch(diagurl);
-const diagsvg = await diagresponse.text();
+let diagsvg: string;
+try {
+ const diagresponse = await fetch(diagurl);
+ if (!diagresponse.ok) {
+ throw new Error(`Diagram fetch returned ${diagresponse.status}`);
+ }
+ diagsvg = await diagresponse.text();
+} catch (e) {
+ console.error("Diagram fetch error:", e);
+ diagsvg = `<!-- Diagram unavailable: ${e} -->`;
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const diagurl = "https://kroki.io/mermaid/svg/" + deflate(diagram, {level: 9}) | |
| .toBase64() | |
| .replace(/\+/g, '-') | |
| .replace(/\//g, '_'); | |
| const diagresponse = await fetch(diagurl); | |
| const diagsvg = await diagresponse.text(); | |
| const diagurl = "https://kroki.io/mermaid/svg/" + deflate(diagram, {level: 9}) | |
| .toBase64() | |
| .replace(/\+/g, '-') | |
| .replace(/\//g, '_'); | |
| let diagsvg: string; | |
| try { | |
| const diagresponse = await fetch(diagurl); | |
| if (!diagresponse.ok) { | |
| throw new Error(`Diagram fetch returned ${diagresponse.status}`); | |
| } | |
| diagsvg = await diagresponse.text(); | |
| } catch (e) { | |
| console.error("Diagram fetch error:", e); | |
| diagsvg = `<!-- Diagram unavailable: ${e} -->`; | |
| } |
🤖 Prompt for AI Agents
In `@docs/main.ts` around lines 176 - 181, The module currently performs a
top-level await fetching Kroki SVG using diagurl/deflate/diagram and assigns
diagsvg, which can fail at import time; refactor this so the fetch is performed
lazily inside an async function (e.g. getDiagramSvg or loadDiagramSvg) or
invoked during runtime, wrap the fetch and response.text() calls (diagresponse,
diagsvg) in try/catch, and provide a safe fallback (placeholder SVG or error
marker) and optional retry/logging so documentation build does not fail if
kroki.io is unavailable.
docs/main.ts
Outdated
| ["style", {}, renderCSS(css)], | ||
| ], | ||
| ["body", {class: "sticky", style: renderCSSProps({margin: "0"})}, | ||
| ["a", {href: "https://your-url", class: "github-corner", "aria-label": "View source on GitHub"}, github_corner], github_corner_style, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placeholder URL needs to be replaced.
The GitHub corner link uses "https://your-url" which is clearly a placeholder. This should be the actual repository URL.
🐛 Suggested fix
- ["a", {href: "https://your-url", class: "github-corner", "aria-label": "View source on GitHub"}, github_corner], github_corner_style,
+ ["a", {href: "https://github.com/rprtr258/pm", class: "github-corner", "aria-label": "View source on GitHub"}, github_corner], github_corner_style,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ["a", {href: "https://your-url", class: "github-corner", "aria-label": "View source on GitHub"}, github_corner], github_corner_style, | |
| ["a", {href: "https://github.com/rprtr258/pm", class: "github-corner", "aria-label": "View source on GitHub"}, github_corner], github_corner_style, |
🤖 Prompt for AI Agents
In `@docs/main.ts` at line 215, The href for the GitHub corner link is a
placeholder ("https://your-url"); update it in docs/main.ts where the array
contains ["a", {href: "https://your-url", class: "github-corner", "aria-label":
"View source on GitHub"}, github_corner] so it points to the real repository URL
(e.g., https://github.com/owner/repo) or replace it with a canonical config
constant (REPO_URL) pulled from project config/env; ensure you update the same
entry that pairs github_corner with github_corner_style and keep the
"aria-label" intact.
| const escape = (s: string) => s.split("").map((c) => { | ||
| if (c == "<") return "<"; | ||
| else if (c == ">") return ">"; | ||
| else return c;}).join(""); | ||
| return ["code", {}, escape(s)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename escape to avoid shadowing global.
Per static analysis (Biome), the local escape function shadows the global escape property. This can cause confusion.
♻️ Suggested fix
- code: s => {
- const escape = (s: string) => s.split("").map((c) => {
+ code: s => {
+ const escapeHtml = (s: string) => s.split("").map((c) => {
if (c == "<") return "<";
else if (c == ">") return ">";
else return c;}).join("");
- return ["code", {}, escape(s)];
+ return ["code", {}, escapeHtml(s)];
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const escape = (s: string) => s.split("").map((c) => { | |
| if (c == "<") return "<"; | |
| else if (c == ">") return ">"; | |
| else return c;}).join(""); | |
| return ["code", {}, escape(s)]; | |
| const escapeHtml = (s: string) => s.split("").map((c) => { | |
| if (c == "<") return "<"; | |
| else if (c == ">") return ">"; | |
| else return c;}).join(""); | |
| return ["code", {}, escapeHtml(s)]; |
🧰 Tools
🪛 Biome (2.3.13)
[error] 236-236: Do not shadow the global "escape" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
🤖 Prompt for AI Agents
In `@docs/main.ts` around lines 236 - 240, The local function named escape shadows
the global escape; rename it (e.g., escapeHtml or escapeAngleBrackets) and
update all local references (e.g., the return ["code", {}, escape(s)] call) to
the new name to avoid shadowing; ensure the function declaration and its usage
in this module (the arrow function that maps characters and returns "<" and
">") are consistently renamed.
| const escape = (s: string) => s.split("").map(c => { | ||
| if (c == "<") return "<"; | ||
| else if (c == ">") return ">"; | ||
| else if (c == "[" || c == "]" || c == "{" || c == "}" || c == "=") return punctuation(c); | ||
| else return c;}); | ||
| return ["pre", {"data-lang": lang, style: renderCSSProps({background: "var(--code-theme-background)"})}, | ||
| ["code", {class: "language-" + lang}, ...escape(code)]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename escape to avoid shadowing global (second occurrence).
Same issue as line 236 - the local escape function shadows the global.
♻️ Suggested fix
- const escape = (s: string) => s.split("").map(c => {
+ const escapeHtml = (s: string) => s.split("").map(c => {
if (c == "<") return "<";
else if (c == ">") return ">";
else if (c == "[" || c == "]" || c == "{" || c == "}" || c == "=") return punctuation(c);
else return c;});
return ["pre", {"data-lang": lang, style: renderCSSProps({background: "var(--code-theme-background)"})},
- ["code", {class: "language-" + lang}, ...escape(code)]];
+ ["code", {class: "language-" + lang}, ...escapeHtml(code)]];📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const escape = (s: string) => s.split("").map(c => { | |
| if (c == "<") return "<"; | |
| else if (c == ">") return ">"; | |
| else if (c == "[" || c == "]" || c == "{" || c == "}" || c == "=") return punctuation(c); | |
| else return c;}); | |
| return ["pre", {"data-lang": lang, style: renderCSSProps({background: "var(--code-theme-background)"})}, | |
| ["code", {class: "language-" + lang}, ...escape(code)]]; | |
| const escapeHtml = (s: string) => s.split("").map(c => { | |
| if (c == "<") return "<"; | |
| else if (c == ">") return ">"; | |
| else if (c == "[" || c == "]" || c == "{" || c == "}" || c == "=") return punctuation(c); | |
| else return c;}); | |
| return ["pre", {"data-lang": lang, style: renderCSSProps({background: "var(--code-theme-background)"})}, | |
| ["code", {class: "language-" + lang}, ...escapeHtml(code)]]; |
🧰 Tools
🪛 Biome (2.3.13)
[error] 371-371: Do not shadow the global "escape" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
🤖 Prompt for AI Agents
In `@docs/main.ts` around lines 371 - 377, The local function named escape in the
block that builds the ["pre", ... ["code", ...]] node shadows the global escape
and is the second occurrence; rename this local function (e.g., to escapeCode or
escapeForCode) and update its usage in the return expression (the spread
...escape(code)) to the new name, ensuring no other references to the old escape
remain; keep the function logic intact and only change its identifier in that
scope to avoid global shadowing.
| const res = await fetch(link); | ||
| if (res.status < 200 || res.status >= 299) | ||
| throw new Error(`Broken link: ${link}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP status check boundary is off by one.
The condition res.status < 200 || res.status >= 299 excludes status 299, which is a valid success code. Should use >= 300 for consistency with standard HTTP status ranges.
🐛 Suggested fix
- if (res.status < 200 || res.status >= 299)
+ if (res.status < 200 || res.status >= 300)
throw new Error(`Broken link: ${link}`);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const res = await fetch(link); | |
| if (res.status < 200 || res.status >= 299) | |
| throw new Error(`Broken link: ${link}`); | |
| const res = await fetch(link); | |
| if (res.status < 200 || res.status >= 300) | |
| throw new Error(`Broken link: ${link}`); |
🤖 Prompt for AI Agents
In `@docs/main.ts` around lines 576 - 578, The HTTP status check in the link
validation uses res.status < 200 || res.status >= 299 which incorrectly treats
299 as an error; update the condition around the fetch result (the res variable
from fetch(link) in docs/main.ts) to use res.status < 200 || res.status >= 300
(or equivalently !(res.status >= 200 && res.status < 300)) so all 2xx codes are
accepted; locate the check where res is inspected and replace the boundary to >=
300.
| const type = info.isDirectory() ? "DIR" : | ||
| info.isFile() ? "FILE" : | ||
| (() => {throw new Error(`Broken local name: ${link}`)})(); | ||
| console.log(styleText("greenBright", "OK") + ":", link, "=>", styleText("blue", type)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Unusual IIFE-throw pattern in ternary.
The pattern of throwing inside an IIFE within a ternary chain is unconventional and reduces readability. Consider using an if-else or a separate validation function.
♻️ Suggested refactor for clarity
- const type = info.isDirectory() ? "DIR" :
- info.isFile() ? "FILE" :
- (() => {throw new Error(`Broken local name: ${link}`)})();
+ let type: string;
+ if (info.isDirectory()) {
+ type = "DIR";
+ } else if (info.isFile()) {
+ type = "FILE";
+ } else {
+ throw new Error(`Broken local name: ${link}`);
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const type = info.isDirectory() ? "DIR" : | |
| info.isFile() ? "FILE" : | |
| (() => {throw new Error(`Broken local name: ${link}`)})(); | |
| console.log(styleText("greenBright", "OK") + ":", link, "=>", styleText("blue", type)); | |
| let type: string; | |
| if (info.isDirectory()) { | |
| type = "DIR"; | |
| } else if (info.isFile()) { | |
| type = "FILE"; | |
| } else { | |
| throw new Error(`Broken local name: ${link}`); | |
| } | |
| console.log(styleText("greenBright", "OK") + ":", link, "=>", styleText("blue", type)); |
🤖 Prompt for AI Agents
In `@docs/main.ts` around lines 582 - 585, The ternary uses an IIFE to throw on
invalid file info which reduces readability; replace the IIFE by computing the
value for the variable type with a clear if/else (or a small helper like
validateAndGetType(info, link)) that sets type to "DIR" or "FILE" and throws new
Error(`Broken local name: ${link}`) if neither, then keep the
console.log(styleText("greenBright", "OK") + ":", link, "=>", styleText("blue",
type)) as-is; reference symbols: type, info, link, styleText.
| ["table", { | ||
| "border-spacing": "0", | ||
| }], | ||
| ["th", { | ||
| "border-bottom": "0.1rem solid var(--sidebar-border-color)", | ||
| }], | ||
| ["body", { | ||
| "background-image": "linear-gradient(to right, #ccc8b1 1px, rgba(204,200,177,0) 1px), linear-gradient(to bottom, #ccc8b1 1px, rgba(204,200,177,0) 1px)", | ||
| "background-size": "0.3rem 0.3rem", | ||
| }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Consider using theme variables for consistency.
The body background-image uses hardcoded color #ccc8b1 which appears to match the yorha theme's base00 value. For maintainability, consider using a CSS variable or the colors object to ensure the grid color stays in sync if the theme changes.
♻️ Suggested refactor
["body", {
- "background-image": "linear-gradient(to right, `#ccc8b1` 1px, rgba(204,200,177,0) 1px), linear-gradient(to bottom, `#ccc8b1` 1px, rgba(204,200,177,0) 1px)",
+ "background-image": `linear-gradient(to right, ${colors.base00} 1px, transparent 1px), linear-gradient(to bottom, ${colors.base00} 1px, transparent 1px)`,
"background-size": "0.3rem 0.3rem",
}],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ["table", { | |
| "border-spacing": "0", | |
| }], | |
| ["th", { | |
| "border-bottom": "0.1rem solid var(--sidebar-border-color)", | |
| }], | |
| ["body", { | |
| "background-image": "linear-gradient(to right, #ccc8b1 1px, rgba(204,200,177,0) 1px), linear-gradient(to bottom, #ccc8b1 1px, rgba(204,200,177,0) 1px)", | |
| "background-size": "0.3rem 0.3rem", | |
| }], | |
| ["table", { | |
| "border-spacing": "0", | |
| }], | |
| ["th", { | |
| "border-bottom": "0.1rem solid var(--sidebar-border-color)", | |
| }], | |
| ["body", { | |
| "background-image": `linear-gradient(to right, ${colors.base00} 1px, transparent 1px), linear-gradient(to bottom, ${colors.base00} 1px, transparent 1px)`, | |
| "background-size": "0.3rem 0.3rem", | |
| }], |
🤖 Prompt for AI Agents
In `@docs/styles.ts` around lines 555 - 564, The body style in the styles array
currently hardcodes the grid color (`#ccc8b1`) in the "background-image" value;
update the "body" entry so it uses the theme variable instead (e.g., a CSS
variable like --yorha-base00 or the exported colors.base00 value) so the grid
color stays in sync with the yorha theme; modify the "body" object's
"background-image" string to reference that variable rather than the literal hex
and ensure the variable is defined/available in the theme/colors export used by
docs/styles.ts.
| PM supports multiple configuration formats for defining processes. The original [jsonnet](https://jsonnet.org/) format is supported, along with several additional formats for flexibility: | ||
|
|
||
| ### Supported Formats | ||
| #### JSONNet (.jsonnet) | ||
| The primary configuration format. JSONNet is fully compatible with plain JSON. | ||
|
|
||
| ```jsonnet | ||
| [ | ||
| { | ||
| name: "web-server", | ||
| command: "node", | ||
| args: ["server.js"], | ||
| env: { | ||
| PORT: "3000", | ||
| NODE_ENV: "production" | ||
| }, | ||
| tags: ["web"], | ||
| startup: true | ||
| } | ||
| ] | ||
| ``` | ||
|
|
||
| ### Configuration Schema | ||
| All formats define list of processes with following fields: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blank lines around headings for markdown compliance.
Per markdownlint (MD022), headings should be surrounded by blank lines. Lines 31-32 and 51-52 are missing required blank lines.
📝 Suggested fix
PM supports multiple configuration formats for defining processes. The original [jsonnet](https://jsonnet.org/) format is supported, along with several additional formats for flexibility:
### Supported Formats
+
#### JSONNet (.jsonnet)
+
The primary configuration format. JSONNet is fully compatible with plain JSON.And after line 49:
Configuration Schema
All formats define list of processes with following fields:
</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
PM supports multiple configuration formats for defining processes. The original [jsonnet](https://jsonnet.org/) format is supported, along with several additional formats for flexibility:
### Supported Formats
#### JSONNet (.jsonnet)
The primary configuration format. JSONNet is fully compatible with plain JSON.
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)
[warning] 31-31: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 32-32: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
[warning] 32-32: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 51-51: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
🤖 Prompt for AI Agents
In `@readme.md` around lines 29 - 52, The README is missing blank lines around
several Markdown headings (triggering MD022); add a blank line before and after
the "### Supported Formats", "#### JSONNet (.jsonnet)" and "### Configuration
Schema" headings so each heading is surrounded by an empty line as required by
markdownlint; update the lines around those headings in readme.md to insert the
single blank line above and below each heading and ensure the surrounding
paragraphs/list blocks remain separated.
Summary by CodeRabbit
Release Notes
New Features
Documentation
Style
✏️ Tip: You can customize this high-level summary in your review settings.