Skip to content

Implement beta testing#200

Merged
Jordonbc merged 14 commits intoDevfrom
Add-Beta
Mar 24, 2026
Merged

Implement beta testing#200
Jordonbc merged 14 commits intoDevfrom
Add-Beta

Conversation

@Jordonbc
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions
Copy link
Copy Markdown

Code Review: PR #200 - Implement Beta Testing

Summary

This PR adds beta channel support for the update system, including a new CI workflow, backend changes for beta update endpoints, and frontend UI/logic.


Issues Found

1. Missing error handling in update.ts:37-39

The fetchJson calls have no error handling. If GitHub API is rate-limited or unreachable, the update dialog will throw an unhandled exception.

const stable = await fetchJson('https://api.github.com/repos/Jordonbc/OpenVCS/releases/latest');
const beta = await fetchJson('https://api.github.com/repos/Jordonbc/OpenVCS/releases/tags/openvcs-beta');
const nightly = await fetchJson('https://api.github.com/repos/Jordonbc/OpenVCS/releases/tags/openvcs-nightly');

2. Hardcoded GitHub URLs in two locations

Both Backend/build.rs:141-142 and Frontend/src/scripts/features/update.ts:37-39 hardcode Jordonbc/OpenVCS. Consider making this configurable or using environment variables.

3. Workflow file missing trailing newline

.github/workflows/beta.yml ends without a newline (shown as \ No newline at end of file).


Suggestions

  1. Add try-catch around fetch calls in update.ts, or at minimum handle the null case more gracefully
  2. Consider consolidating GitHub URLs into a shared constant
  3. Add documentation in docs/ about how beta releases work

Positive Aspects

  • Proper fallback logic: beta falls back to stable if beta is older (update.ts:55-56)
  • Clean separation of beta endpoint in build.rs
  • Correct removal of beta→nightly mapping in settings.ts
  • Good CI workflow structure with proper caching

New%20session%20-%202026-03-24T02%3A53%3A44.575Z
opencode session  |  github run

…tion or class'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Code Review: PR #200 - Implement Beta Testing

Summary

This PR adds beta channel support for the update system, including a new CI workflow, backend changes for beta update endpoints, and frontend UI/logic.


Issues Found

1. Unused variable in update.ts:44

const betaTag = norm(beta?.tag_name || beta?.name || '');

This variable is declared but never used. The existing code already correctly computes pickTag from the chosen release.

Fix: Remove line 44.


2. Missing error handling in update.ts:38-40

const stable = await fetchJson('https://api.github.com/repos/Jordonbc/OpenVCS/releases/latest');
const beta = await fetchJson('https://api.github.com/repos/Jordonbc/OpenVCS/releases/tags/openvcs-beta');
const nightly = await fetchJson('https://api.github.com/repos/Jordonbc/OpenVCS/releases/tags/openvcs-nightly');

The fetchJson calls have no try-catch. If GitHub API is rate-limited or unreachable, the update dialog will throw an unhandled exception.

Fix: Wrap in try-catch or handle null more gracefully.


3. Hardcoded GitHub URLs in two locations

  • Backend/build.rs:138-145: Hardcoded Jordonbc/OpenVCS in URLs
  • Frontend/src/scripts/features/update.ts:38-40: Same hardcoded URLs

Consider making this configurable via environment variables or build config.


4. Workflow file missing trailing newline

.github/workflows/beta.yml ends without a newline (line 127).


5. Confusing beta→nightly mapping in settings.ts:930-931

elChan.value = (v === 'beta') ? 'nightly' : v;

This maps the internal beta channel to the nightly UI option. While this works, it's confusing and could break if the nightly option is ever removed from the dropdown.


Positive Aspects

  • Proper fallback logic: beta falls back to stable if beta is older (update.ts:55-56)
  • Clean separation of beta endpoint in build.rs
  • Good CI workflow structure with proper caching
  • Correct removal of beta→nightly mapping in settings.ts
  • Good error handling in workflow cleanup script (lines 102-106)

Suggested Fixes

  1. Remove unused betaTag variable in update.ts:44
  2. Add try-catch around fetch calls in update.ts:38-40
  3. Add trailing newline to .github/workflows/beta.yml
  4. Document the beta channel behavior in docs/

New%20session%20-%202026-03-24T02%3A56%3A26.411Z
opencode session  |  github run

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: 6cce50569a

ℹ️ 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".

@github-actions
Copy link
Copy Markdown

Code Review Summary

Critical Issues

1. Workflow syntax error in .github/workflows/beta.yml:2

run-name: "OpenVCS Beta • Run #${{ github.run_number }} • Beta@${{ github.sha }}"

github.sha is a full 40-character hash. Using it directly in a run name may exceed length limits and could fail workflow validation. The intended short SHA is already computed in the script step (line 46: const short = context.sha.substring(0, 7)), so use that instead:

run-name: "OpenVCS Beta • Run #${{ github.run_number }} • Beta@${{ steps.meta.outputs.short_sha }}"

2. Draft releases won't work with updater in .github/workflows/beta.yml:125

releaseDraft: true

Beta users won't receive updates because:

  • Frontend fetches /releases/tags/openvcs-beta (public tag)
  • Backend points to .../download/openvcs-beta/latest.json

But a draft release is not visible to the GitHub API or public downloads. Users will silently fall back to stable.

Fix: Remove releaseDraft: true or set to false.


Medium Issues

3. Hardcoded GitHub repo in Backend/build.rs:138-146

The repo Jordonbc/OpenVCS is hardcoded in three places. Consider using environment variables or reading from tauri.conf.json for flexibility.

4. Confusing betanightly mapping in settings.ts (lines 929-931)

The settings UI now includes beta as an option (line 71 of settings.html), but older saved settings may still contain the old mapping. The code currently doesn't remap beta to nightly on load anymore, which is correct—but worth noting this is an intentional behavior change.


Minor Issues

5. Missing newline at end of .github/workflows/beta.yml

Add a trailing newline for POSIX compliance.


Positive Notes

  • Backend Rust updater code is clean with proper error handling
  • Beta-to-stable fallback logic is correct in build.rs
  • Good separation of channel handling
  • Proper caching in CI workflow

Summary

Issue Severity File Line
run-name uses full SHA High .github/workflows/beta.yml 2
Draft release blocks updater High .github/workflows/beta.yml 125
Hardcoded repo URL Medium Backend/build.rs 138-146
Missing trailing newline Low .github/workflows/beta.yml 127

New%20session%20-%202026-03-24T03%3A16%3A28.564Z
opencode session  |  github run

@github-actions
Copy link
Copy Markdown

Code Review Summary

Critical Issues

1. Workflow run-name expression references non-existent step (.github/workflows/beta.yml:2)

run-name: "OpenVCS Beta • Run #${{ github.run_number }} • Beta@${{ steps.meta.outputs.short_sha }}"

The run-name is evaluated at workflow start, but steps.meta doesn't exist until that step runs (line 40). This will cause workflow validation to fail.

Fix: Use ${{ github.sha }} directly (acceptable for run-name) or a hardcoded fallback:

run-name: "OpenVCS Beta • Run #${{ github.run_number }} • Beta@${{ github.sha }}"

2. Draft releases block beta updater (.github/workflows/beta.yml:125)

releaseDraft: true

Draft releases are not visible to the GitHub public API. Both the frontend (update.ts) and backend (build.rs) fetch from public endpoints (/releases/tags/openvcs-beta, /releases/download/openvcs-beta/latest.json). Beta users will silently fall back to stable.

Fix: Remove releaseDraft: true or set to false.


Medium Issues

3. Missing newline at end of workflow file (.github/workflows/beta.yml)

The file ends without a trailing newline. Add one for POSIX compliance.


Minor Observations (Already Addressed)

  • The unused betaTag variable in update.ts has been removed. ✓
  • The old betanightly mapping in settings.ts has been removed. ✓
  • The hardcoded repo URL in build.rs is configurable via OPENVCS_REPO env var (already addresses the concern). ✓

Positive Aspects

  • Clean separation of beta endpoint logic in build.rs
  • Good fallback chain: beta → stable in build endpoints
  • Proper error handling in updater.rs
  • Good workflow cleanup script (lines 102-106)

Summary

Severity Issue Location
High run-name uses non-existent step output .github/workflows/beta.yml:2
High Draft release blocks beta updater .github/workflows/beta.yml:125
Low Missing trailing newline .github/workflows/beta.yml

New%20session%20-%202026-03-24T03%3A33%3A06.236Z
opencode session  |  github run

@Jordonbc Jordonbc merged commit 6137719 into Dev Mar 24, 2026
7 checks passed
Jordonbc added a commit that referenced this pull request Mar 24, 2026
Merge pull request #200 from Open-VCS/Add-Beta

Implement beta testing
Jordonbc added a commit that referenced this pull request Mar 24, 2026
Merge pull request #201 from Open-VCS/Dev

Merge pull request #200 from Open-VCS/Add-Beta

Implement beta testing
Jordonbc added a commit that referenced this pull request Mar 24, 2026
Merge pull request #203 from Open-VCS/Beta

Merge pull request #201 from Open-VCS/Dev

Merge pull request #200 from Open-VCS/Add-Beta

Implement beta testing
@Jordonbc Jordonbc deleted the Add-Beta branch March 24, 2026 15:51
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