Skip to content

Conversation

moose-code
Copy link
Contributor

@moose-code moose-code commented Aug 27, 2025

Screenshot 2025-08-27 at 13 06 31 Currently a footgun, you click on this link in the tui here and it takes you here in browser which confuses some users, easier to take them to the dashboard

Summary by CodeRabbit

  • Style
    • Renamed label from “GraphQL Endpoint” to “GraphQL Interface”.
    • Reformatted connection details: show the root URL on its own underlined line; display “(password: testing)” on a separate info-colored line.
    • Replaced the inline full endpoint path with the root URL.
    • Improves readability and reduces visual clutter in the connection panel; no functional changes.

@moose-code moose-code requested a review from DZakh August 27, 2025 12:07
Copy link
Contributor

coderabbitai bot commented Aug 27, 2025

Walkthrough

Updated UI text and layout in EnvioInkApp.res: changed label from "GraphQL Endpoint" to "GraphQL Interface", switched displayed URL from the /v1/graphql endpoint to the root Hasura URL, added an underlined URL line, and introduced a separate info-colored line showing "(password: testing)".

Changes

Cohort / File(s) Summary
UI text and URL presentation
codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res
Renamed label to "GraphQL Interface"; replaced inline Env.Hasura.url/v1/graphql with multiline display: underlined Env.Hasura.url and a new info-colored line showing "(password: testing)".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my ears at labels neat,
A fresh interface, a tidy feat.
The URL now stands refined,
Password whispered, underlined.
Hop-hop! UI’s clean and clear—
Ship it swift, with carrot cheer. 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jj/fix-cli-link

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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

🧹 Nitpick comments (1)
codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res (1)

45-60: De-duplicate link rows with a tiny helper for consistency and alignment.

Both “Development Console” and “GraphQL …” rows share structure. A small component improves readability and avoids manual spacing.

Example helper (add near this module):

module LinkRow = {
  @react.component
  let make = (~label: string, ~url: string, ~underline=true, ~color=Info) => {
    <Box flexDirection={Row}>
      <Text> {label->React.string} </Text>
      <Text color={color} underline> {url->React.string} </Text>
    </Box>
  }
}

Then replace the two rows:

<LinkRow label="Development Console: " url={`${Env.envioAppUrl}/console`} />
<LinkRow label="GraphQL Interface: " url={`${Env.Hasura.url}/console`} />
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d9d6e84 and 5e707a7.

📒 Files selected for processing (1)
  • codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{res,resi}

📄 CodeRabbit inference engine (.cursor/rules/rescript.mdc)

**/*.{res,resi}: Never use [| item |] to create an array. Use [ item ] instead.
Must always use = for setting value to a field. Use := only for ref values created using ref function.
ReScript has record types which require a type definition before hand. You can access record fields by dot like foo.myField.
It's also possible to define an inline object, it'll have quoted fields in this case.
Use records when working with structured data, and objects to conveniently pass payload data between functions.
Never use %raw to access object fields if you know the type.

Files:

  • codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res
codegenerator/cli/templates/{dynamic/**/*.hbs,static/**}

📄 CodeRabbit inference engine (.cursor/rules/navigation.mdc)

Templates live under codegenerator/cli/templates: dynamic/ for Handlebars (.hbs), static/ for raw Rescript files copied verbatim.

Files:

  • codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res
{**/generated/src/**/*.res,codegenerator/cli/templates/static/codegen/src/**/*.res,codegenerator/cli/templates/dynamic/codegen/src/**/*.res}

📄 CodeRabbit inference engine (.cursor/rules/navigation.mdc)

Runtime code lives in each project’s generated/src, but template versions (good for editing) are under codegenerator/cli/templates/static/codegen/src or codegenerator/cli/templates/dynamic/codegen/src.

Files:

  • codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build_and_test
🔇 Additional comments (1)
codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res (1)

53-57: Confirm Hasura dashboard URL in EnvioInkApp
Please verify that Env.Hasura.url actually points to your Hasura Console (often served under /console) rather than just the API root. In codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res at line 56 you have:

<Text color={Info} underline=true>
  {`${Env.Hasura.url}`->React.string}
</Text>

If your console is indeed hosted at https://…/console, consider appending that path:

-<Text color={Info} underline=true>
-  {`${Env.Hasura.url}`->React.string}
-</Text>
+<Text color={Info} underline=true>
+  {`${Env.Hasura.url}/console`->React.string}
+</Text>

– Double-check your Hasura setup and update the link only if needed.

Comment on lines +58 to 60
<Text color={Info}>
{" (password: testing)"->React.string}
</Text>
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Remove hard-coded credential from TUI.

Displaying credentials is a security risk and may leak into screenshots or logs. Avoid showing secrets even in dev.

-        <Text color={Info}>
-          {" (password: testing)"->React.string}
-        </Text>

Scan for similar leaks:


🏁 Script executed:

#!/bin/bash
rg -nP -C1 '(password|secret|token)\s*:\s*(testing|test|[A-Za-z0-9._-]{6,})'

Length of output: 3762


Remove the hard-coded credential from the TUI (critical)

Our grep scan confirms that the only literal credential (" (password: testing)") is in codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res. All other matches are type annotations or env-var references rather than hard-coded secrets. Please remove or externalize this snippet:

--- a/codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res
+++ b/codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res
@@ lines 58-60
-        <Text color={Info}>
-          {" (password: testing)"->React.string}
-        </Text>

No other hard-coded credentials were detected by the scan. Once this is removed (and any required placeholder logic added), the critical security issue will be resolved.

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

Suggested change
<Text color={Info}>
{" (password: testing)"->React.string}
</Text>
🤖 Prompt for AI Agents
In codegenerator/cli/templates/static/codegen/src/ink/EnvioInkApp.res around
lines 58-60 there is a hard-coded credential string " (password: testing)" that
must be removed; delete this literal from the TUI and either omit the password
display entirely or read a non-sensitive placeholder from
configuration/environment (e.g., process.env or app config) and render that
value only when present, avoiding any embedded plaintext secrets and ensuring
any display is gated by a feature flag or conditional check.

@DZakh
Copy link
Member

DZakh commented Aug 27, 2025

I'll test locally and approve 🫡

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