Skip to content

Update settings url in webapp and tauri#1977

Merged
hardyjosh merged 2 commits intomainfrom
2025-07-08-update-settings-url
Jul 9, 2025
Merged

Update settings url in webapp and tauri#1977
hardyjosh merged 2 commits intomainfrom
2025-07-08-update-settings-url

Conversation

@findolor
Copy link
Copy Markdown
Collaborator

@findolor findolor commented Jul 8, 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 the remote settings source URL to fetch the latest version of the settings file. No visible changes to app functionality.

@findolor findolor requested a review from hardyjosh July 8, 2025 20:26
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 8, 2025

Walkthrough

The commit updates the REMOTE_SETTINGS_URL constant in two files to reference a new commit hash for a remote YAML settings file on GitHub. No additional code, logic, or control flow changes are introduced.

Changes

File(s) Change Summary
packages/webapp/src/routes/+layout.ts Updated REMOTE_SETTINGS_URL to a new GitHub commit hash for the remote settings YAML file.
tauri-app/src/lib/services/loadRemoteSettings.ts Updated REMOTE_SETTINGS_URL to a new GitHub commit hash for the remote settings YAML file.

Possibly related PRs

Suggested labels

Tauri

Suggested reviewers

  • hardyjosh

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-08T20_28_38_693Z-debug-0.log

✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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
Copy Markdown
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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 765de45 and bf2ffdf.

📒 Files selected for processing (2)
  • packages/webapp/src/routes/+layout.ts (1 hunks)
  • tauri-app/src/lib/services/loadRemoteSettings.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#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: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:26:31.566Z
Learning: For PR #1884 and future PRs in rainlanguage/rain.orderbook repository, provide PR size reports in a separate comment with ONLY the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number", without any additional text or explanation. Reports should exclude irrelevant files such as lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock).
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#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
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T22:46:08.530Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, the PR size report should be the only content in the comment - no text before it, no text after it, no formatting blocks, just the raw report in the exact format: "TOTAL=number\nADDITIONS=number\nDELETIONS=number". The report must exclude lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock).
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T23:34:42.328Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, the PR size report must use the format:
TOTAL:number
ADDITIONS:number
DELETIONS:number
with no extra text, formatting blocks, or explanations, and must still exclude lock files and reassess after each new commit.
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T23:09:27.578Z
Learning: For PR #1884 in rainlanguage/rain.orderbook repository, I must always reassess the PR size after each new commit, calculating the total changes up to the very latest commit and ensuring accuracy of the report. The calculation must exclude lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, cargo.lock) and report in the exact format "TOTAL=number\nADDITIONS=number\nDELETIONS=number".
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:53.708Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, provide a separate comment after each review with PR size statistics in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`, excluding lock files like package-lock.json and cargo.lock.
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:53.708Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, provide a separate comment after each review with PR size statistics in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`, excluding lock files like package-lock.json and cargo.lock.
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:53.708Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, provide a separate comment after each review with PR size statistics in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`, excluding lock files like package-lock.json and cargo.lock.
Learnt from: rouzwelt
PR: rainlanguage/rain.orderbook#0
File: :0-0
Timestamp: 2025-05-21T21:24:53.708Z
Learning: For PR #1884 in rainlanguage/rain.orderbook, provide a separate comment after each review with PR size statistics in the format: `TOTAL=number ADDITIONS=number DELETIONS=number`, excluding lock files like package-lock.json and cargo.lock.
Learnt from: hardingjam
PR: rainlanguage/rain.orderbook#1785
File: packages/webapp/src/routes/+layout.ts:22-22
Timestamp: 2025-05-13T10:19:19.558Z
Learning: Making the settings URL configurable via environment variables was considered out of scope for PR #1785, which focused specifically on adding error handling for config fetching.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1903
File: crates/js_api/src/subgraph/vault.rs:129-138
Timestamp: 2025-06-17T16:33:58.549Z
Learning: findolor prefers downstream error handling over early validation checks for empty RPC lists in vault functions, allowing errors to bubble up from provider creation logic naturally.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1916
File: packages/webapp/src/routes/+layout.ts:26-26
Timestamp: 2025-06-10T12:01:07.418Z
Learning: The user findolor prefers to keep string concatenation using the plus operator over template literals in the rainlanguage/rain.orderbook project, even when static analysis tools suggest the change.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1947
File: crates/common/src/raindex_client/orders.rs:462-1643
Timestamp: 2025-06-24T08:45:10.971Z
Learning: User findolor prefers to keep tests simple and avoid refactoring for maintainability when the code is stable and viewed as "one time thing" that won't require frequent changes.
tauri-app/src/lib/services/loadRemoteSettings.ts (4)
Learnt from: hardingjam
PR: rainlanguage/rain.orderbook#1785
File: packages/webapp/src/routes/+layout.ts:22-22
Timestamp: 2025-05-13T10:19:19.558Z
Learning: Making the settings URL configurable via environment variables was considered out of scope for PR #1785, which focused specifically on adding error handling for config fetching.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1483
File: crates/settings/src/remote_tokens.rs:32-57
Timestamp: 2025-04-07T09:51:52.614Z
Learning: The implementation for remote token fetching in `crates/settings/src/remote_tokens.rs` does not include explicit timeouts/retries, as the team considers the current implementation sufficient for now.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1477
File: crates/settings/src/remote_networks.rs:40-75
Timestamp: 2025-04-03T09:45:04.200Z
Learning: The RemoteNetworksCfg implementation in crates/settings/src/remote_networks.rs intentionally fetches remote networks sequentially rather than in parallel.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1917
File: tauri-app/src/lib/stores/order.ts:10-15
Timestamp: 2025-06-11T11:27:14.391Z
Learning: In this codebase, Svelte writable/derived stores (e.g., `subgraph` in `tauri-app/src/lib/stores/settings.ts`) expose a custom asynchronous `.load()` helper that retrieves the current value, so calls like `await subgraph.load()` are valid.
packages/webapp/src/routes/+layout.ts (2)
Learnt from: hardingjam
PR: rainlanguage/rain.orderbook#1785
File: packages/webapp/src/routes/+layout.ts:22-22
Timestamp: 2025-05-13T10:19:19.558Z
Learning: Making the settings URL configurable via environment variables was considered out of scope for PR #1785, which focused specifically on adding error handling for config fetching.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1917
File: tauri-app/src/lib/stores/order.ts:10-15
Timestamp: 2025-06-11T11:27:14.391Z
Learning: In this codebase, Svelte writable/derived stores (e.g., `subgraph` in `tauri-app/src/lib/stores/settings.ts`) expose a custom asynchronous `.load()` helper that retrieves the current value, so calls like `await subgraph.load()` are valid.
⏰ 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). (3)
  • GitHub Check: Deploy-Preview
  • GitHub Check: test
  • GitHub Check: test
🔇 Additional comments (3)
tauri-app/src/lib/services/loadRemoteSettings.ts (1)

1-2: Hard-coded commit hash updated—looks fine
Constant now targets the expected commit; unit tests still cover the fetch path, so behaviour remains intact.

packages/webapp/src/routes/+layout.ts (2)

18-19: URL bump acknowledged—no issues detected
Matches the Tauri client; parsing and error handling remain unchanged.


18-19: Centralise the settings URL
Repeating the hash in multiple entry points invites accidental divergence. Consider importing a single source of truth (env file or shared constant) instead.

⛔ Skipped due to learnings
Learnt from: hardingjam
PR: rainlanguage/rain.orderbook#1785
File: packages/webapp/src/routes/+layout.ts:22-22
Timestamp: 2025-05-13T10:19:19.558Z
Learning: Making the settings URL configurable via environment variables was considered out of scope for PR #1785, which focused specifically on adding error handling for config fetching.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1903
File: tauri-app/src/routes/orders/[network]-[orderHash]/+page.svelte:35-37
Timestamp: 2025-06-17T16:25:44.685Z
Learning: In the tauri-app Svelte application, users must navigate to a settings page to modify settings and then return to other pages. This navigation pattern causes page components to be recreated, which naturally refreshes component state derived from settings without requiring reactive statements ($:). Therefore, reactive statements for settings-derived values are unnecessary when the UX flow involves page navigation.
Learnt from: findolor
PR: rainlanguage/rain.orderbook#1916
File: packages/webapp/src/lib/services/resetActiveNetworkRef.ts:18-20
Timestamp: 2025-06-10T12:08:23.128Z
Learning: In the new NewConfig system that replaced ConfigSource in the rain.orderbook project, the settings store guarantees that $settings.orderbook.networks (and similar nested fields) will always be defined, so null/undefined safety checks are not needed when accessing these fields.

Comment on lines 1 to +2
const REMOTE_SETTINGS_URL =
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/b22f84e7728dee85c326be506d1a6378584f6f00/settings.yaml';
'https://raw.githubusercontent.com/rainlanguage/rain.strategies/1321342555262ff6867f888957b3f03421df334f/settings.yaml';
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.

🧹 Nitpick (assertive)

Deduplicate REMOTE_SETTINGS_URL to prevent future drift
This exact URL also lives in packages/webapp/src/routes/+layout.ts. Pull it into a shared module or config so web and desktop stay in sync with one edit.

🤖 Prompt for AI Agents
In tauri-app/src/lib/services/loadRemoteSettings.ts at lines 1 to 2, the
REMOTE_SETTINGS_URL is hardcoded and duplicated in
packages/webapp/src/routes/+layout.ts. To fix this, extract the URL into a
shared configuration module that both the webapp and tauri-app can import,
ensuring the URL is defined in only one place to keep it consistent across
projects.

@hardyjosh hardyjosh enabled auto-merge July 8, 2025 20:32
@hardyjosh hardyjosh merged commit 978c119 into main Jul 9, 2025
26 of 27 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 26, 2025
4 tasks
This was referenced Oct 27, 2025
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