Skip to content

feat: add versions to links to quick start scripts#2248

Merged
jcstein merged 2 commits intomainfrom
jcs/fix-guide
Sep 25, 2025
Merged

feat: add versions to links to quick start scripts#2248
jcstein merged 2 commits intomainfrom
jcs/fix-guide

Conversation

@jcstein
Copy link
Copy Markdown
Member

@jcstein jcstein commented Sep 25, 2025

Overview

Resolves #2246

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @jcstein, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the documentation by implementing dynamic versioning for quick start script links. By introducing a new Vue component and integrating it into the relevant guide, the PR ensures that users always access the correct script versions for different networks, thereby improving the accuracy and maintainability of the documentation.

Highlights

  • New Vue Component for Network Script Links: A new Vue component, NetworkScriptLinks.vue, has been introduced to centralize and manage the display of quick start script links for various networks (Local devnet, Arabica, Mocha, Mainnet Beta). This component dynamically fetches version information for the public networks.
  • Dynamic Versioning for Quick Start Scripts: The quick start script links for Arabica, Mocha, and Mainnet Beta now include dynamic versioning, ensuring that users are always directed to the correct and up-to-date script versions based on constants defined in the project.
  • Integration into Documentation: The newly created NetworkScriptLinks component has been integrated into the how-to-guides/consensus-node.md documentation. This replaces the previously hardcoded list of script links, improving maintainability and accuracy.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Vue component NetworkScriptLinks to display versioned links for quick start scripts, replacing a hardcoded list in the consensus node guide. This is a good improvement for maintainability. My review includes a suggestion to refactor the new component to reduce code duplication and improve its structure, and a comment to remove now-unused imports from the markdown file.

Comment on lines +1 to +27
<template>
<div>
<ul>
<li>Local devnet: <a href="https://github.com/celestiaorg/celestia-app/blob/main/scripts/single-node.sh" target="_blank" rel="noopener noreferrer">https://github.com/celestiaorg/celestia-app/blob/main/scripts/single-node.sh</a></li>
<li>Arabica: <a :href="`https://github.com/celestiaorg/celestia-app/blob/${arabicaVersions['app-latest-tag']}/scripts/arabica.sh`" target="_blank" rel="noopener noreferrer">{{ `https://github.com/celestiaorg/celestia-app/blob/${arabicaVersions['app-latest-tag']}/scripts/arabica.sh` }}</a></li>
<li>Mocha: <a :href="`https://github.com/celestiaorg/celestia-app/blob/${mochaVersions['app-latest-tag']}/scripts/mocha.sh`" target="_blank" rel="noopener noreferrer">{{ `https://github.com/celestiaorg/celestia-app/blob/${mochaVersions['app-latest-tag']}/scripts/mocha.sh` }}</a></li>
<li>Mainnet Beta: <a :href="`https://github.com/celestiaorg/celestia-app/blob/${mainnetVersions['app-latest-tag']}/scripts/mainnet.sh`" target="_blank" rel="noopener noreferrer">{{ `https://github.com/celestiaorg/celestia-app/blob/${mainnetVersions['app-latest-tag']}/scripts/mainnet.sh` }}</a></li>
</ul>
</div>
</template>

<script>
import arabicaVersions from "/.vitepress/constants/arabica_versions.js";
import mochaVersions from "/.vitepress/constants/mocha_versions.js";
import mainnetVersions from "/.vitepress/constants/mainnet_versions.js";

export default {
name: 'NetworkScriptLinks',
data() {
return {
arabicaVersions,
mochaVersions,
mainnetVersions
};
}
}
</script> No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The current implementation has a lot of repetition in the template for constructing the URLs. This can be improved for maintainability by using a v-for loop in the template and a computed property in the script. This makes the component cleaner, easier to read, and simplifies adding or modifying network links in the future.

<template>
  <div>
    <ul>
      <li>Local devnet: <a href="https://github.com/celestiaorg/celestia-app/blob/main/scripts/single-node.sh" target="_blank" rel="noopener noreferrer">https://github.com/celestiaorg/celestia-app/blob/main/scripts/single-node.sh</a></li>
      <li v-for="network in networks" :key="network.name">
        {{ network.name }}: <a :href="network.url" target="_blank" rel="noopener noreferrer">{{ network.url }}</a>
      </li>
    </ul>
  </div>
</template>

<script>
import arabicaVersions from "/.vitepress/constants/arabica_versions.js";
import mochaVersions from "/.vitepress/constants/mocha_versions.js";
import mainnetVersions from "/.vitepress/constants/mainnet_versions.js";

const networkConfigs = [
  { name: 'Arabica', versions: arabicaVersions, scriptName: 'arabica.sh' },
  { name: 'Mocha', versions: mochaVersions, scriptName: 'mocha.sh' },
  { name: 'Mainnet Beta', versions: mainnetVersions, scriptName: 'mainnet.sh' },
];

export default {
  name: 'NetworkScriptLinks',
  computed: {
    networks() {
      const baseUrl = 'https://github.com/celestiaorg/celestia-app/blob/';
      return networkConfigs.map(config => ({
        name: config.name,
        url: `${baseUrl}${config.versions['app-latest-tag']}/scripts/${config.scriptName}`
      }));
    }
  }
}
</script>

Comment thread how-to-guides/consensus-node.md Outdated
Comment on lines +12 to +14
import arabicaVersions from '/.vitepress/constants/arabica_versions.js'
import mochaVersions from '/.vitepress/constants/mocha_versions.js'
import mainnetVersions from '/.vitepress/constants/mainnet_versions.js'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

These version imports are no longer used within this file. Since the logic for generating network script links has been encapsulated in the NetworkScriptLinks component, these imports have become redundant and should be removed to maintain code cleanliness.

@jcstein jcstein self-assigned this Sep 25, 2025
@jcstein jcstein merged commit cbdcaba into main Sep 25, 2025
5 of 6 checks passed
@jcstein jcstein deleted the jcs/fix-guide branch September 25, 2025 23:24
@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-09-25 23:25 UTC

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.

docs: state sync install scripts aren't easy to find in docs in callout and should use correct version

1 participant