Skip to content

Flare v5 registry#2312

Open
hardyjosh wants to merge 1 commit intomainfrom
2025-11-07-flare-v5-registry
Open

Flare v5 registry#2312
hardyjosh wants to merge 1 commit intomainfrom
2025-11-07-flare-v5-registry

Conversation

@hardyjosh
Copy link
Contributor

@hardyjosh hardyjosh commented Nov 7, 2025

Motivation

Solution

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • Chores
    • Updated external references for registry and settings resources to their latest versions.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

Walkthrough

Two URL constants in the constants file are updated to reference a different commit hash from the rain.strategies repository. The REGISTRY_URL and REMOTE_SETTINGS_URL constants are modified to point to commit 647695e7e374bf8411f5871f350d7d98ecde8bec instead of the previous commit cf96aab81a59704ea8d9300130ac888eb86f5eff.

Changes

Cohort / File(s) Summary
URL Constants Update
packages/webapp/src/lib/constants.ts
REGISTRY_URL and REMOTE_SETTINGS_URL constants updated to reference a new commit hash in the rain.strategies GitHub repository

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • Update settings #2033: Both PRs update the same REGISTRY_URL and REMOTE_SETTINGS_URL constants to reference different commit hashes
  • Update registry url #1684: Both PRs modify the REGISTRY_URL constant in the same constants file to point to different commits
  • Update registry #1920: Both PRs update registry and settings raw GitHub URLs in the constants file with new commit hashes

Suggested labels

enhancement

Suggested reviewers

  • findolor

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Flare v5 registry' accurately describes the main change: updating registry URLs to point to a new Flare v5 commit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2025-11-07-flare-v5-registry

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dfca341 and 108eb50.

📒 Files selected for processing (1)
  • packages/webapp/src/lib/constants.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
packages/webapp/**/*.{svelte,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Webapp must pass Svelte lint/format checks (npm run svelte-lint-format-check -w @rainlanguage/webapp)

Files:

  • packages/webapp/src/lib/constants.ts
packages/{webapp,ui-components}/**/*.{svelte,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

If you modify frontend code, you must include a screenshot of the built webapp reflecting the change

Files:

  • packages/webapp/src/lib/constants.ts
packages/**

📄 CodeRabbit inference engine (AGENTS.md)

JavaScript/Svelte projects live under packages/* (webapp, ui-components, orderbook)

Files:

  • packages/webapp/src/lib/constants.ts
🧠 Learnings (5)
📓 Common learnings
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2298
File: packages/webapp/src/lib/constants.ts:3-4
Timestamp: 2025-11-06T12:08:39.643Z
Learning: In the rain.orderbook repository, the REMOTE_SETTINGS_URL constant in packages/webapp/src/lib/constants.ts and tauri-app/src/lib/services/loadRemoteSettings.ts should remain duplicated rather than being consolidated into a single import, as this duplication is intentional.
📚 Learning: 2025-11-06T12:08:39.643Z
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2298
File: packages/webapp/src/lib/constants.ts:3-4
Timestamp: 2025-11-06T12:08:39.643Z
Learning: In the rain.orderbook repository, the REMOTE_SETTINGS_URL constant in packages/webapp/src/lib/constants.ts and tauri-app/src/lib/services/loadRemoteSettings.ts should remain duplicated rather than being consolidated into a single import, as this duplication is intentional.

Applied to files:

  • packages/webapp/src/lib/constants.ts
📚 Learning: 2025-10-19T20:24:08.629Z
Learnt from: rouzwelt
Repo: rainlanguage/rain.orderbook PR: 2246
File: packages/webapp/src/hooks.client.ts:2-2
Timestamp: 2025-10-19T20:24:08.629Z
Learning: In the rain.orderbook repository, the import `rainlanguage/orderbook/esm` in packages/webapp/src/hooks.client.ts is intentional and should not be changed to the root package path, as it's specific to the webapp build configuration.

Applied to files:

  • packages/webapp/src/lib/constants.ts
📚 Learning: 2025-04-09T12:58:03.399Z
Learnt from: hardingjam
Repo: rainlanguage/rain.orderbook PR: 1565
File: packages/webapp/src/lib/services/loadRegistryUrl.ts:5-19
Timestamp: 2025-04-09T12:58:03.399Z
Learning: In the rain.orderbook application, URL validation for registry URLs is handled at the frontend/component level before the `loadRegistryUrl` function is called, so additional validation within this function is not necessary.

Applied to files:

  • packages/webapp/src/lib/constants.ts
📚 Learning: 2025-04-09T13:00:24.640Z
Learnt from: hardingjam
Repo: rainlanguage/rain.orderbook PR: 1565
File: packages/webapp/src/__tests__/registryManager.test.ts:227-238
Timestamp: 2025-04-09T13:00:24.640Z
Learning: In the rain.orderbook project, error handling was added to the RegistryManager to handle localStorage exceptions, addressing part of the verification agent's suggestions. The team should also consider testing extremely long URLs that might approach browser limits.

Applied to files:

  • packages/webapp/src/lib/constants.ts
⏰ 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). (17)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-artifacts)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-wasm-test)
  • GitHub Check: standard-tests (ubuntu-latest, test-js-bindings)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-legal)
  • GitHub Check: standard-tests (ubuntu-latest, ob-rs-test, true)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-wasm-artifacts)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-test)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-static)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-static)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-artifacts, true)
  • GitHub Check: test
  • GitHub Check: test
  • GitHub Check: test
  • GitHub Check: git-clean
  • GitHub Check: build-tauri (ubuntu-22.04, true)
  • GitHub Check: Deploy-Preview-Push
  • GitHub Check: Deploy-Docs-Preview
🔇 Additional comments (1)
packages/webapp/src/lib/constants.ts (1)

1-2: Update tauri-app constant to match the new commit hash.

The commit and resources are verified as accessible. However, the PR is incomplete: while packages/webapp/src/lib/constants.ts was updated to commit 647695e7e374bf8411f5871f350d7d98ecde8bec, the duplicate REMOTE_SETTINGS_URL constant in tauri-app/src/lib/services/loadRemoteSettings.ts (line 1) still points to the old commit cf96aab81a59704ea8d9300130ac888eb86f5eff. This creates an inconsistency where the two packages fetch settings from different commits.

Update tauri-app/src/lib/services/loadRemoteSettings.ts:1-2 to use the new commit hash:

const REMOTE_SETTINGS_URL =
  'https://raw.githubusercontent.com/rainlanguage/rain.strategies/647695e7e374bf8411f5871f350d7d98ecde8bec/settings.yaml';
⛔ Skipped due to learnings
Learnt from: findolor
Repo: rainlanguage/rain.orderbook PR: 2298
File: packages/webapp/src/lib/constants.ts:3-4
Timestamp: 2025-11-06T12:08:39.643Z
Learning: In the rain.orderbook repository, the REMOTE_SETTINGS_URL constant in packages/webapp/src/lib/constants.ts and tauri-app/src/lib/services/loadRemoteSettings.ts should remain duplicated rather than being consolidated into a single import, as this duplication is intentional.
Learnt from: rouzwelt
Repo: rainlanguage/rain.orderbook PR: 0
File: :0-0
Timestamp: 2025-05-21T22:14:22.646Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, I must consistently report the PR size after EVERY new commit in the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number" without any formatting blocks. The report must exclude lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock) and can be included either as part of the review or as a separate comment.
Learnt from: rouzwelt
Repo: rainlanguage/rain.orderbook PR: 0
File: :0-0
Timestamp: 2025-05-21T22:14:22.646Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, I must consistently report the PR size after EVERY new commit in the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number" without any additional text or formatting blocks. The report must exclude lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock) and can be included either as part of the review or as a separate comment.
Learnt from: hardingjam
Repo: rainlanguage/rain.orderbook PR: 1565
File: packages/webapp/src/lib/services/loadRegistryUrl.ts:5-19
Timestamp: 2025-04-09T12:58:03.399Z
Learning: In the rain.orderbook application, URL validation for registry URLs is handled at the frontend/component level before the `loadRegistryUrl` function is called, so additional validation within this function is not necessary.
Learnt from: hardingjam
Repo: rainlanguage/rain.orderbook PR: 1565
File: packages/webapp/src/__tests__/registryManager.test.ts:227-238
Timestamp: 2025-04-09T13:00:24.640Z
Learning: In the rain.orderbook project, error handling was added to the RegistryManager to handle localStorage exceptions, addressing part of the verification agent's suggestions. The team should also consider testing extremely long URLs that might approach browser limits.
Learnt from: hardingjam
Repo: rainlanguage/rain.orderbook PR: 1565
File: packages/webapp/src/lib/services/loadRegistryUrl.ts:21-95
Timestamp: 2025-04-09T12:57:52.799Z
Learning: In the loadRegistryUrl function, invalid URL format validation is handled by the fetchRegistryDotrains function rather than explicit URL format validation within loadRegistryUrl itself. The error handling in the catch block will handle any failures from the fetch operation.

Comment on lines 1 to +4
export const REGISTRY_URL =
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/cf96aab81a59704ea8d9300130ac888eb86f5eff/registry';
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/647695e7e374bf8411f5871f350d7d98ecde8bec/registry';
export const REMOTE_SETTINGS_URL =
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/cf96aab81a59704ea8d9300130ac888eb86f5eff/settings.yaml';
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/647695e7e374bf8411f5871f350d7d98ecde8bec/settings.yaml';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Include a screenshot showing the impact of the updated URLs.

This change modifies frontend constants that affect external resource loading in the webapp. Per the coding guidelines, frontend code modifications should include a screenshot of the built webapp reflecting the change.

As per coding guidelines.

🤖 Prompt for AI Agents
In packages/webapp/src/lib/constants.ts lines 1-4, the reviewer requests a
screenshot showing the impact of the updated REGISTRY_URL and
REMOTE_SETTINGS_URL on the built webapp; reproduce the change by building and
running the webapp, navigate to a page that uses these external resources (or
the app's landing/dashboard showing loaded data), capture a clear screenshot
demonstrating successful resource loading (or visible differences/errors),
attach that screenshot to the PR (either upload in the PR description or add to
a docs/screenshots/ directory and reference it), and update the PR description
to mention which page was captured, the build commit used, and where the
screenshot is stored.

Comment on lines 3 to +4
export const REMOTE_SETTINGS_URL =
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/cf96aab81a59704ea8d9300130ac888eb86f5eff/settings.yaml';
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/647695e7e374bf8411f5871f350d7d98ecde8bec/settings.yaml';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify settings.yaml accessibility and check if the duplicate constant needs updating.

The REMOTE_SETTINGS_URL has been updated consistently with REGISTRY_URL (both pointing to the same commit). However, based on learnings, this constant is intentionally duplicated in tauri-app/src/lib/services/loadRemoteSettings.ts. Please verify that:

  1. The settings.yaml file is accessible at the new URL
  2. The duplicate constant in the tauri-app file is also updated to maintain consistency

Based on learnings.

Run the following script to verify:


🏁 Script executed:

#!/bin/bash
# Verify settings.yaml accessibility and check for duplicate constant

# Test if the settings.yaml URL is accessible
echo "Checking settings.yaml URL accessibility..."
curl -f -s -o /dev/null -w "HTTP Status: %{http_code}\n" \
  'https://raw.githubusercontent.com/rainlanguage/rain.strategies/647695e7e374bf8411f5871f350d7d98ecde8bec/settings.yaml' || echo "Settings URL not accessible"

# Show first few lines of settings.yaml content
echo -e "\nSettings.yaml content preview:"
curl -s 'https://raw.githubusercontent.com/rainlanguage/rain.strategies/647695e7e374bf8411f5871f350d7d98ecde8bec/settings.yaml' | head -20

# Check if duplicate constant in tauri-app needs updating
echo -e "\nChecking tauri-app duplicate constant..."
if [ -f "tauri-app/src/lib/services/loadRemoteSettings.ts" ]; then
  echo "Content of tauri-app duplicate:"
  cat tauri-app/src/lib/services/loadRemoteSettings.ts | grep -A 1 "REMOTE_SETTINGS_URL"
else
  echo "tauri-app file not found in this repository"
fi

Length of output: 1015


Update duplicate REMOTE_SETTINGS_URL in tauri-app to match the new commit hash.

The settings.yaml file is accessible at the updated URL. However, the duplicate constant in tauri-app/src/lib/services/loadRemoteSettings.ts uses an outdated commit hash (cf96aab81a59704ea8d9300130ac888eb86f5eff) instead of the new one (647695e7e374bf8411f5871f350d7d98ecde8bec). This causes the webapp and tauri-app to fetch different versions of settings. Update the duplicate constant to maintain consistency:

const REMOTE_SETTINGS_URL =
  'https://raw.githubusercontent.com/rainlanguage/rain.strategies/647695e7e374bf8411f5871f350d7d98ecde8bec/settings.yaml';
🤖 Prompt for AI Agents
In tauri-app/src/lib/services/loadRemoteSettings.ts (the location of the
REMOTE_SETTINGS_URL constant), update the duplicate constant value that
currently uses commit hash cf96aab81a59704ea8d9300130ac888eb86f5eff to the new
commit hash 647695e7e374bf8411f5871f350d7d98ecde8bec so the URL becomes
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/647695e7e374bf8411f5871f350d7d98ecde8bec/settings.yaml',
ensuring both webapp and tauri-app fetch the same settings file.

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