Skip to content

Update HorizontalForm.res with demo text#734

Open
justin808 wants to merge 1 commit intomasterfrom
justin808-demo-cpflow-1
Open

Update HorizontalForm.res with demo text#734
justin808 wants to merge 1 commit intomasterfrom
justin808-demo-cpflow-1

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented May 9, 2026

Note

Low Risk
Low risk UI-only change that adds static text to the comment author label; no logic or data handling is modified.

Overview
Adds a static "DEMO OF cpflow PR deploys" string to the Name label in HorizontalForm.res so it renders alongside the author field label.

Reviewed by Cursor Bugbot for commit 624f1cc. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • UI Updates
    • Modified the label text in the horizontal comment form.

Review Change Stack

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Control Plane review app commands

/deploy-review-app
Create the review app or redeploy the PR branch to it.

/delete-review-app
Delete the review app and its temporary resources.

/help
Show the required GitHub variables, secrets, and workflow behavior.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Walkthrough

A single text node DEMO OF cpflow PR deploys is inserted into the "Name" label of the horizontal comment form component. The change affects only the rendered label content with no functional or structural modifications.

Changes

Form Label Demo Update

Layer / File(s) Summary
Form Label Content
client/app/bundles/comments/rescript/CommentForm/forms/HorizontalForm.res
The "Name" label in the comment form now displays additional text: DEMO OF cpflow PR deploys.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A label grows a whispered note,
Demo text now gently floats,
In the form where comments dwell,
A cpflow deploy tale to tell! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update HorizontalForm.res with demo text' accurately summarizes the main change: adding demo text to the HorizontalForm component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch justin808-demo-cpflow-1

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 and usage tips.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.

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

<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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 9, 2026

Greptile Summary

This PR adds the text DEMO OF cpflow PR deploys directly inside a JSX label element in HorizontalForm.res, apparently as a test of a PR-deploy workflow. The change should not be merged — it introduces invalid ReScript syntax and leaks demo text into the production UI.

  • Invalid syntax: Bare unquoted text inside ReScript JSX is not a valid expression; the file will fail to compile until the line is removed.
  • Unintended UI change: Even in a scenario where compilation succeeded, the "Name" label would display unwanted demo copy visible to all users.

Confidence Score: 1/5

This PR must not be merged — it introduces a build-breaking syntax error and demo noise into the production label component.

The single changed line inserts raw unquoted text inside a ReScript JSX element, which is not valid syntax. The file will fail to compile, breaking the build for anyone who pulls this change, and the Name label in the comment form would show demo copy to end users if the build error were somehow bypassed.

client/app/bundles/comments/rescript/CommentForm/forms/HorizontalForm.res — the added line on line 11 must be removed before this file can compile.

Important Files Changed

Filename Overview
client/app/bundles/comments/rescript/CommentForm/forms/HorizontalForm.res Adds invalid bare text DEMO OF cpflow PR deploys inside a JSX label element — not valid ReScript syntax, will cause a build failure and exposes demo noise in the UI if bypassed.

Reviews (1): Last reviewed commit: "Update HorizontalForm.res with demo text" | Re-trigger Greptile

<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.

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.

<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.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 624f1cc28f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<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.

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

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with 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.

Inline comments:
In `@client/app/bundles/comments/rescript/CommentForm/forms/HorizontalForm.res`:
- 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.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 657afd69-a6a3-4de9-9a63-5c9f6a85a46b

📥 Commits

Reviewing files that changed from the base of the PR and between 5c94c36 and 624f1cc.

📒 Files selected for processing (1)
  • client/app/bundles/comments/rescript/CommentForm/forms/HorizontalForm.res

<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.

⚠️ 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.

@claude
Copy link
Copy Markdown

claude Bot commented May 9, 2026

Code Review

Overview

This PR adds a single line — DEMO OF cpflow PR deploys — inside the <label> element of HorizontalForm.res. Based on the title and the Cursor Bugbot summary, its sole purpose is to demonstrate/verify that the cpflow PR deployment pipeline is wired up correctly.


Issues

1. Invalid ReScript syntax (compile error)
The bare text DEMO OF cpflow PR deploys is not a valid ReScript expression. In ReScript JSX, text nodes must be wrapped:

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

Without this wrapping, the ReScript compiler will reject the file. The existing "Name" string on the line above correctly uses this pattern.

2. This is temporary demo/test code
The change has no production value — it exists only to confirm that cpflow spins up a preview environment for each PR. Once that's confirmed, the line should be reverted before merging to master.


Recommendation

Do not merge. This PR should either be:

  • Closed once the cpflow PR-deploy pipeline is verified (the goal has been achieved by the mere existence of the PR), or
  • Reverted to remove the demo label text before merging.

No logic, data handling, or styles are affected, so the risk is low — but shipping debug/demo text into production UI and a ReScript compilation failure are both unnecessary.

@justin808
Copy link
Copy Markdown
Member Author

/help

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Control Plane GitHub Flow

PR commands

/deploy-review-app

  • Creates the review app if it does not exist
  • Builds the PR commit image
  • Deploys the image and comments with the review URL
  • Comment body must be exactly /deploy-review-app — no surrounding text, trailing whitespace, or trailing newline. The trigger uses an exact-equality match, so a comment like please /deploy-review-app now or /deploy-review-app (with a trailing space) silently no-ops.

/delete-review-app

  • Deletes the review app when the PR is done
  • This also runs automatically when the PR closes
  • Same exact-match rule as /deploy-review-app: the comment body must be exactly /delete-review-app.

Repository secrets

Name Required Notes
CPLN_TOKEN_STAGING yes Service-account token scoped to the staging org.
CPLN_TOKEN_PRODUCTION yes (for promote) Service-account token scoped to the production org.
DOCKER_BUILD_SSH_KEY optional Private SSH key used when Docker builds fetch private deps via RUN --mount=type=ssh.

Repository variables

Name Required Notes
CPLN_ORG_STAGING yes Control Plane org for staging and review apps.
CPLN_ORG_PRODUCTION yes (for promote) Control Plane org for production.
STAGING_APP_NAME yes App name in controlplane.yml used as the staging deploy target.
PRODUCTION_APP_NAME yes (for promote) App name in controlplane.yml used as the production deploy target.
REVIEW_APP_PREFIX yes Prefix for per-PR review app names (e.g. review-app).
STAGING_APP_BRANCH optional Custom staging branch. Custom branches must also appear in cpflow-deploy-staging.yml's push filter.
PRIMARY_WORKLOAD optional Workload polled for health and rollback (defaults to rails).
DOCKER_BUILD_EXTRA_ARGS optional Newline-delimited extra docker build tokens (e.g. --build-arg=FOO=bar).
DOCKER_BUILD_SSH_KNOWN_HOSTS optional SSH known_hosts entries when SSH build hosts are not GitHub.com.
HEALTH_CHECK_ACCEPTED_STATUSES optional Space-separated HTTP statuses considered healthy on promote (default 200 301 302).
HEALTH_CHECK_RETRIES / HEALTH_CHECK_INTERVAL optional Production health polling controls; defaults to 24 retries and 15 seconds.
ROLLBACK_READINESS_RETRIES / ROLLBACK_READINESS_INTERVAL optional Post-rollback health polling controls; defaults to 24 retries and 15 seconds.
CPLN_CLI_VERSION optional Pin a specific @controlplane/cli version; falls back to the action default when unset.
CPFLOW_VERSION optional Pin a specific cpflow gem version; falls back to the generated default when unset.

Workflow behavior

  • Review apps are opt-in and created with /deploy-review-app
  • New commits redeploy existing review apps automatically
  • Slash command workflows run from the default branch until merged. Test PR-branch edits with gh workflow run cpflow-deploy-review-app.yml --ref <branch> -f pr_number=<pr-number>.
  • Pushes to the staging branch deploy staging automatically
  • Promotion to production is manual via the Actions tab
  • A nightly workflow removes stale review apps

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.

1 participant