Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let make = (~author, ~handleAuthorChange, ~text, ~handleTextChange, ~handleSubmi
<div className="flex flex-col gap-0 items-center lg:gap-4 lg:flex-row">
<label htmlFor="comment_author" className="w-full lg:w-2/12 lg:text-end shrink-0">
{"Name"->React.string}
DEMO OF cpflow PR deploys
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Demo text accidentally committed to production component

High Severity

The raw string DEMO OF cpflow PR deploys is rendered directly inside the <label> element next to the "Name" text. This demo/testing text will be visible to end users in the comment submission form.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 624f1cc. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Invalid ReScript syntax / accidental demo text

DEMO OF cpflow PR deploys is raw unquoted text placed directly inside a JSX element, which is not valid ReScript. In ReScript, string literals inside JSX must be wrapped as {"..."->React.string}. This will cause a compilation failure, and even if it somehow compiled, the label would display unintended demo text in the production UI. This looks like a scratch note that was accidentally committed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid ReScript syntax + temporary demo text

DEMO OF cpflow PR deploys is not valid ReScript. In ReScript JSX, string literals must be wrapped with ->React.string:

Suggested change
DEMO OF cpflow PR deploys
{"DEMO OF cpflow PR deploys"->React.string}

However, this line also appears to be intentional temporary text for testing the cpflow PR deploy pipeline — not something that should be merged into the main branch at all. If the goal is to verify that PR deploys render correctly, this label text should be removed before merging.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove demo-only text from the author label

This adds a hard-coded DEMO OF cpflow PR deploys string directly into the visible "Name" label, so every user sees internal demo text in the comment form. Because this path is part of normal comment entry, the change leaks non-product copy into production UI and degrades the form’s clarity unless manually removed before release.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

In ReScript React JSX (.res files), is bare text like DEMO OF cpflow PR deploysvalid inside..., or must it be wrapped as {"..."->React.string}?

💡 Result:

In ReScript React JSX (.res files), bare text like DEMO OF cpflow PR deploys is not valid inside <label></label>. It must be wrapped as {"DEMO OF cpflow PR deploys"->React.string} [1][2][3][4].

Citations:


🏁 Script executed:

find . -type f -name "HorizontalForm.res" | head -5

Repository: shakacode/react-webpack-rails-tutorial

Length of output: 158


🏁 Script executed:

cat -n ./client/app/bundles/comments/rescript/CommentForm/forms/HorizontalForm.res | head -30

Repository: shakacode/react-webpack-rails-tutorial

Length of output: 1386


Bare text in JSX is invalid ReScript syntax—wrap the demo text as a React string.

Line 11 contains bare text DEMO OF cpflow PR deploys inside the <label>, which will fail ReScript compilation. All text children in ReScript JSX must be wrapped with React.string. Either remove this debug text or wrap it like the "Name" node on line 10.

Proposed fix
-        DEMO OF cpflow PR deploys
+        {"DEMO OF cpflow PR deploys"->React.string}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@client/app/bundles/comments/rescript/CommentForm/forms/HorizontalForm.res` at
line 11, The label in the HorizontalForm component contains bare text ("DEMO OF
cpflow PR deploys") which is invalid in ReScript JSX; update the label in
HorizontalForm.res to either remove that debug string or wrap it as a React
string (e.g., use React.string("DEMO OF cpflow PR deploys")) so it matches how
the "Name" node is rendered and compiles correctly.

</label>
<input
type_="text"
Expand Down
Loading