-
Notifications
You must be signed in to change notification settings - Fork 1
Spec update to better support multi-chain guis #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughRefactors GUI schema documentation to introduce reusable field-definitions and variations, replacing deployments. Updates ob-yaml with Network Values and GUI v2 sections, restructures examples, headings, and YAML code blocks, and aligns terminology across documents. Adds concrete examples for variations, deposits, select-tokens, and network-to-deployment mappings. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant GUI
participant FieldDefinitions as Field Definitions
participant Variations
participant NetworkValues as Network Values
participant Deployments
User->>GUI: Load strategy UI
GUI->>FieldDefinitions: Fetch reusable field configs
GUI->>Variations: Select variation (by key)
Variations-->>GUI: fields list, deposits, select-tokens, network map
GUI->>NetworkValues: Resolve ${network-values...} (if used)
GUI->>Deployments: Map selected network -> deployment
GUI-->>User: Render fields, tokens, deposits per variation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
gui.md (2)
193-204: Use “variation” (not “deployment”) for select-tokens and fix example caption.This section still references deployments, conflicting with GUI v2 where
select-tokenslive under variations.Apply this diff:
-Each item in the optional `select-tokens` list defines a token that might be presented for selection elsewhere in the UI for this deployment. +Each item in the optional `select-tokens` list defines a token that might be presented for selection elsewhere in the UI for this variation. ```yaml -# Example within a deployment's select-tokens list: +# Example within a variation's select-tokens list: select-tokens:
219-251: Replace outdated “Field Item” terminology with “Field Definition”.Aligns with GUI v2 terms used elsewhere in this doc.
Apply this diff:
-The `validation` object is used within `Deposit Item` and `Field Item` to specify rules that the user's input must adhere to. +The `validation` object is used within `Deposit Item` and `Field Definition` to specify rules that the user's input must adhere to. @@ -* `type` - * **Required**: Yes (for `Field Item`) +* `type` + * **Required**: Yes (for `Field Definition`)ob-yaml.md (2)
59-64: Standardize chain-id representation (hex vs integer).Networks example uses
chain-id: 0x1while GUI mapping uses integer keys (e.g.,42161). Recommend choosing integers throughout to avoid mismatches in lookups.Apply this diff:
mainnet: rpcs: - https://eth.llamarpc.com - https://rpc.ankr.com/eth - chain-id: 0x1 + chain-id: 1If hex must be supported, add a note specifying normalization rules (e.g., tooling coerces hex to integer).
79-101: Remove redundant “format” or clarify its necessity in using-networks-from.The example nests under
chainid:and also setsformat: chainid. Unless multiple providers share the same block,formatis redundant.Apply this diff:
using-networks-from: chainid: url: https://chainid.network/chains.json - format: chainidIf you intend multiple providers under
using-networks-from, clarify the schema (e.g., provider key is arbitrary,formatis required).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
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.
📒 Files selected for processing (2)
gui.md(2 hunks)ob-yaml.md(14 hunks)
🧰 Additional context used
🪛 LanguageTool
gui.md
[grammar] ~7-~7: There might be a mistake here.
Context: ...ection dictates how strategies are named, described, and how their configurable p...
(QB_NEW_EN_OTHER)
[grammar] ~7-~7: Use commas correctly
Context: ...ates how strategies are named, described, and how their configurable parameters (...
(QB_NEW_EN_OTHER_ERROR_IDS_33)
[grammar] ~7-~7: Use correct spacing
Context: ...resets) to simplify the user experience. ## Top-Level gui Object The root of the ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~9-~9: Use correct spacing
Context: ...r experience. ## Top-Level gui Object The root of the GUI configuration is the...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~11-~11: Use correct spacing
Context: ...usable field definitions and variations. yaml gui: name: Fixed limit description: Fixed limit order strategy short-description: Buy WETH with USDC on Base. field-definitions: # ... field definitions ... variations: # ... variation configurations ... ### Fields * name * Required: Yes ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~24-~24: Use correct spacing
Context: ...ation configurations ... ``` ### Fields * name * Required: Yes * Description: The...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~27-~27: There might be a mistake here.
Context: ...# Fields * name * Required: Yes * Description: The primary, human-readab...
(QB_NEW_EN)
[grammar] ~28-~28: Use correct spacing
Context: ...e overall strategy presented in the GUI. * description * Required: Yes * Description: A m...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~30-~30: There might be a mistake here.
Context: ...I. * description * Required: Yes * Description: A more detailed descripti...
(QB_NEW_EN)
[grammar] ~31-~31: Use correct spacing
Context: ...rategy, intended for display in the GUI. * short-description * Required: No * Description: An o...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~33-~33: There might be a mistake here.
Context: ...short-description * Required: No * Description: An optional, concise desc...
(QB_NEW_EN)
[grammar] ~34-~34: Use correct spacing
Context: ...is limited (e.g., list views, tooltips). * field-definitions * Required: No * Description: A ma...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~37-~37: Use correct spacing
Context: ...#field-definitions) section for details. * variations * Required: Yes * Description: A m...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~40-~40: Use correct spacing
Context: ...p](#variations-map) section for details. ## Field Definitions The `field-definition...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~42-~42: Use correct spacing
Context: ...ction for details. ## Field Definitions The field-definitions field under `gui...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~44-~44: Use correct spacing
Context: ...nced by variations to avoid duplication. yaml gui: field-definitions: time-per-amount-epoch: name: Budget period (in seconds) description: The budget is spent over this time period show-custom-field: true default: 86400 presets: - name: Per day (86400) value: 86400 - name: Per week (604800) value: 604800 validation: type: number minimum: 60 amount-per-epoch: name: Budget (${order.outputs.0.token.symbol} per period) description: The amount to spend each budget period default: 0 validation: type: number minimum: 0 ### Field Definition Structure Each field d...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~71-~71: Use correct spacing
Context: ...m: 0 ``` ### Field Definition Structure Each field definition contains the compl...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~73-~73: Use correct spacing
Context: ...sponds to the binding name in scenarios. #### Fields * name * Required: Yes ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~75-~75: Use correct spacing
Context: ... binding name in scenarios. #### Fields * name * Required: Yes * Description: The...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~79-~79: Use correct spacing
Context: ... like ${order.outputs.0.token.symbol}. * description * Required: No * Description: An o...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~81-~81: There might be a mistake here.
Context: ...}. * description` * Required: No * Description: An optional, longer descr...
(QB_NEW_EN)
[grammar] ~82-~82: Use correct spacing
Context: ...potentially as a tooltip or helper text. * presets * Required: No * Description: An o...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~84-~84: There might be a mistake here.
Context: ...r text. * presets * Required: No * Description: An optional list of [Pres...
(QB_NEW_EN)
[grammar] ~85-~85: Use correct spacing
Context: ...lues the user can select for this field. * default * Required: No * Description: An o...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~87-~87: There might be a mistake here.
Context: ... field. * default * Required: No * Description: An optional default value...
(QB_NEW_EN)
[grammar] ~88-~88: Use correct spacing
Context: ...ue to pre-populate the input field with. * validation * Required: No * Description: An o...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~90-~90: There might be a mistake here.
Context: ...ith. * validation * Required: No * Description: An optional [Validation O...
(QB_NEW_EN)
[grammar] ~91-~91: Use correct spacing
Context: ... validation rules for the field's value. * show-custom-field * Required: No * Description: Cont...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~94-~94: Use correct spacing
Context: ...select from presets. Defaults to true. ## Variations Map The variations field u...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~96-~96: Use correct spacing
Context: .... Defaults to true. ## Variations Map The variations field under gui holds...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~98-~98: Use correct spacing
Context: ...tion for that variation of the strategy. yaml gui: variations: standard: name: Standard DCA description: Deploy a standard dollar-cost averaging order fields: - time-per-amount-epoch - amount-per-epoch deposits: - token: output select-tokens: - key: output name: Token to Sell - key: input name: Token to Buy networks: 42161: arbitrum 14: flare special-variant: name: Special Variant description: A specialized version of the strategy fields: - time-per-amount-epoch - special-field deposits: - token: special-token networks: 14: special-deployment ### Variation Configuration Each variation ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~131-~131: Use correct spacing
Context: ...loyment ``` ### Variation Configuration Each variation defines which fields to s...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~133-~133: Use correct spacing
Context: ...s to different networks and deployments. #### Fields * name * Required: Yes ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~135-~135: Use correct spacing
Context: ...t networks and deployments. #### Fields * name * Required: Yes * Description: The...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~138-~138: There might be a mistake here.
Context: ...# Fields * name * Required: Yes * Description: The name of this variatio...
(QB_NEW_EN)
[grammar] ~139-~139: Use correct spacing
Context: ...ariation as it should appear in the GUI. * description * Required: Yes * Description: A d...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~141-~141: There might be a mistake here.
Context: ...I. * description * Required: Yes * Description: A detailed description fo...
(QB_NEW_EN)
[grammar] ~142-~142: Use correct spacing
Context: ...description for this specific variation. * fields * Required: Yes * Description: A l...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~145-~145: Use correct spacing
Context: ...determines the display order in the GUI. * deposits * Required: Yes * Description: A l...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~147-~147: There might be a mistake here.
Context: ... GUI. * deposits * Required: Yes * Description: A list of [Deposit Items]...
(QB_NEW_EN)
[grammar] ~148-~148: Use correct spacing
Context: ...ens users can deposit into the strategy. * select-tokens * Required: No * Description: A li...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~151-~151: Use correct spacing
Context: ...should be defined directly in the order. * networks * Required: Yes * Description: A m...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~154-~154: Use correct spacing
Context: ...network when this variation is selected. ## Deposit Item Each item in the `deposits...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~156-~156: Use correct spacing
Context: ... variation is selected. ## Deposit Item Each item in the deposits list defines...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~158-~158: Use correct spacing
Context: ... and optional preset amounts for the UI. yaml deposits: - token: output # References one of the order's inputs/outputs presets: - 0 - 10 - 100 - 1000 - 10000 validation: minimum: 0 maximum: 100000 multipleOf: 1 # Ensures the value is a whole number if desired - token: token2 # No presets defined for this token validation: minimum: 0.001 # Example for a token with high precision ### Fields * token * Required: Yes ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~183-~183: Use correct spacing
Context: ...n defined in the order's inputs/outputs. * presets * Required: No * Description: An o...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
ob-yaml.md
[grammar] ~103-~103: Use correct spacing
Context: ... format: chainid ``` ## Network Values The network-values section provides ne...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~105-~105: There might be a problem here.
Context: ...hat can be referenced in scenarios (and in future potentially other parts of the yaml) us...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~105-~105: Use correct spacing
Context: ...cific addresses or configuration values. Network values have no required structur...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[typographical] ~107-~107: To join two clauses or set off examples, consider using an em dash.
Context: ...alues. Network values have no required structure - they are arbitrary key-value pairs that can ...
(QB_NEW_EN_DASH_RULE_EM)
[grammar] ~107-~107: Use correct spacing
Context: ....property}` syntax in scenario bindings. ### Example ```yaml network-values: arbit...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~109-~109: Use correct spacing
Context: ...yntax in scenario bindings. ### Example yaml network-values: arbitrum: raindex-subparser: 0xe80e7438ce6b1055c8e9CDE1b6336a4F9D53C666 subparser-0: 0xe80e7438ce6b1055c8e9CDE1b6336a4F9D53C666 flare: raindex-subparser: 0xFe2411CDa193D9E4e83A5c234C7Fd320101883aC subparser-0: 0x915E36ef882941816356bC3718Df868054F868aD ## Subgraphs Currently subgraphs are 1:1 w...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~121-~121: Use correct spacing
Context: ...56bC3718Df868054F868aD ``` ## Subgraphs Currently subgraphs are 1:1 with orderbo...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~123-~123: There might be a mistake here.
Context: ...raphs Currently subgraphs are 1:1 with orderbooks, but this could and probably should cha...
(QB_NEW_EN_OTHER)
[grammar] ~123-~123: There might be a mistake here.
Context: ...aph could handle at least all bytecode identical orderbooks deployed to the sam...
(QB_NEW_EN_OTHER)
[grammar] ~123-~123: There might be a mistake here.
Context: ...andle at least all bytecode identical orderbooks deployed to the same network, if not a ...
(QB_NEW_EN_OTHER)
[grammar] ~123-~123: There might be a mistake here.
Context: ...ight seem overkill to specify subgraphs separately but they should have a 1:many relations...
(QB_NEW_EN_OTHER)
[grammar] ~123-~123: There might be a mistake here.
Context: ... should have a 1:many relationship with orderbooks in the mid term. Subgraphs have no fie...
(QB_NEW_EN_OTHER)
[grammar] ~123-~123: There might be a mistake here.
Context: ... relationship with orderbooks in the mid term. Subgraphs have no fields, they're...
(QB_NEW_EN_OTHER)
[grammar] ~123-~123: Use correct spacing
Context: ...ionship with orderbooks in the mid term. Subgraphs have no fields, they're merely...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~125-~125: There might be a mistake here.
Context: ...oks in the mid term. Subgraphs have no fields, they're merely a name for a url string....
(QB_NEW_EN_OTHER)
[grammar] ~125-~125: Use correct spacing
Context: ... they're merely a name for a url string. yaml subgraphs: polygon: https://... polygon2: https://... mainnet: https://... ## Metaboards Metaboard is an onchain cont...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~134-~134: Use correct spacing
Context: ... mainnet: https://... ``` ## Metaboards Metaboard is an onchain contract for pos...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~136-~136: Ensure spelling is correct
Context: ...... ``` ## Metaboards Metaboard is an onchain contract for posting Rain meta about a ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~136-~136: There might be a problem here.
Context: .... Currently these are 1-1 with networks. Metaboards have no fields, they're merely a name f...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~138-~138: There might be a mistake here.
Context: ... 1-1 with networks. Metaboards have no fields, they're merely a name for a url string....
(QB_NEW_EN_OTHER)
[grammar] ~138-~138: There might be a problem here.
Context: ... they're merely a name for a url string. yaml metaboards: polygon: https://... polygon2: https://... mainnet: https://... ## Orderbooks Every orderbook is a contract deployed o...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~181-~181: Use correct spacing
Context: ...s select-tokens field under variations > > The top-level tokens mapping will be p...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~324-~324: Use correct spacing
Context: ...: 0xabcd ``` ### Front matter scenarios Scenarios are a hierarchical structure t...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~326-~326: There might be a mistake here.
Context: ...nstance that can be parsed and deployed onchain, and deliberately introduces ambiguity t...
(QB_NEW_EN)
[grammar] ~326-~326: Use commas correctly
Context: ...be iteratively disambiguated by a fuzzer, for the purpose of producing simulation...
(QB_NEW_EN_OTHER_ERROR_IDS_33)
[grammar] ~326-~326: Use correct spacing
Context: ...or the purpose of producing simulations. The bindings in yaml are forwarded as-is...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~328-~328: There might be a mistake here.
Context: ... dotrain as strings, so all forms are supported including quote bindings, etc. Scenari...
(QB_NEW_EN_OTHER)
[grammar] ~328-~328: Use correct spacing
Context: ...supported including quote bindings, etc. Scenarios support template syntax for re...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~330-~330: There might be a mistake here.
Context: ...referencing network-specific values via ${network-values.property} which will be resolved based on the net...
(QB_NEW_EN_OTHER)
[grammar] ~330-~330: Use correct spacing
Context: ...d on the network context when deploying. All fields are optional, if there exists...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~393-~393: Use correct spacing
Context: ... bing: ... ``` ### Front matter charts Any scenario can be charted as every con...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~512-~512: Use correct spacing
Context: ...th: 50 ``` ### Front matter deployments Specifies deployments that consist of `s...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~514-~514: Use correct spacing
Context: ...hich deployment to use for each network. Required deployment fields: - scenario...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~516-~516: Use correct spacing
Context: ...ch network. Required deployment fields: - scenario name of a defined scenario - order name of a defined order ```yaml depl...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~518-~518: Use correct spacing
Context: ... scenario - order name of a defined order yaml deployments: first-deployment: scenario: scenario1 order: order1 second-deployment: scenario: scenario2 order: order2 ## GUI Configuration See the separate [GUI...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~530-~530: Use correct spacing
Context: ... order: order2 ``` ## GUI Configuration See the separate [GUI Configuration](gui...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~532-~532: Use correct spacing
Context: ...I configuration in version 2 introduces: - field-definitions: Reusable field configurations that avo...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~534-~534: There might be a mistake here.
Context: ...ld configurations that avoid duplication - variations: Different strategy variations that map...
(QB_NEW_EN)
[grammar] ~535-~535: Use correct spacing
Context: ...that map to deployments based on network Example structure: ```yaml gui: name:...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~537-~537: Use correct spacing
Context: ...nts based on network Example structure: yaml gui: name: Strategy Name description: Strategy description field-definitions: field-1: name: Field Name description: Field description default: 0 variations: standard: name: Standard Variation description: Description fields: - field-1 deposits: - token: output networks: 42161: arbitrum # Chain ID → deployment key 14: flare
(QB_NEW_EN_OTHER_ERROR_IDS_5)
🪛 markdownlint-cli2 (0.17.2)
gui.md
85-85: Link fragments should be valid
(MD051, link-fragments)
🔇 Additional comments (2)
gui.md (1)
150-155: Clarify chain ID type and cross-doc consistency.Here you require chain IDs “as integers,” while ob-yaml shows a hex
chain-id: 0x1. Please confirm the canonical representation and enforce it consistently across docs and examples.Would you like me to update all examples to integer chain IDs and add a note stating “GUI networks map uses integer chain IDs;
networks.chain-idmust also be an integer”? I can provide a PR-wide diff.ob-yaml.md (1)
181-183: Confirm cross-ref to GUI select-tokens under variations.This aligns with GUI v2. Ensure all other references (e.g., in gui.md Select Token Item) are also updated to say “variation,” not “deployment.”
I can sweep both files to ensure “deployment” wording is only used for front-matter deployments and not GUI
select-tokens.
| The `gui` section within the YAML configuration provides metadata specifically tailored for building user interfaces related to Rainlang strategies. It acts as a bridge between the core technical definition of deployments, tokens, orders, etc., and their presentation to an end-user in a graphical application. | ||
|
|
||
| This section dictates how strategy deployments are named, described, and how their configurable parameters (bindings, deposits, token selections) should be rendered as interactive UI elements. It allows for user-friendly labels, descriptions, default values, and predefined options (presets) to simplify the user experience. | ||
| This section dictates how strategies are named, described, and how their configurable parameters (bindings, deposits, token selections) should be rendered as interactive UI elements. It allows for user-friendly labels, descriptions, default values, and predefined options (presets) to simplify the user experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Tighten sentence and fix comma splice.
Apply this diff:
-This section dictates how strategies are named, described, and how their configurable parameters (bindings, deposits, token selections) should be rendered as interactive UI elements.
+This section dictates how strategies are named and described, and how configurable parameters (bindings, deposits, token selections) are rendered as interactive UI elements.📝 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.
| This section dictates how strategies are named, described, and how their configurable parameters (bindings, deposits, token selections) should be rendered as interactive UI elements. It allows for user-friendly labels, descriptions, default values, and predefined options (presets) to simplify the user experience. | |
| This section dictates how strategies are named and described, and how configurable parameters (bindings, deposits, token selections) are rendered as interactive UI elements. |
🧰 Tools
🪛 LanguageTool
[grammar] ~7-~7: There might be a mistake here.
Context: ...ection dictates how strategies are named, described, and how their configurable p...
(QB_NEW_EN_OTHER)
[grammar] ~7-~7: Use commas correctly
Context: ...ates how strategies are named, described, and how their configurable parameters (...
(QB_NEW_EN_OTHER_ERROR_IDS_33)
[grammar] ~7-~7: Use correct spacing
Context: ...resets) to simplify the user experience. ## Top-Level gui Object The root of the ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
🤖 Prompt for AI Agents
In gui.md around line 7, the sentence is a comma splice and needs tightening;
rewrite it into two clauses or use proper punctuation so it reads clearly — for
example split into two sentences or add a conjunction, and ensure the meaning
(naming, descriptions, and rendering of configurable parameters as interactive
UI elements with labels, descriptions, default values and presets) remains
unchanged.
| * `presets` | ||
| * **Required**: No | ||
| * **Description**: An optional list of [Preset Items](#preset-item) containing predefined values the user can select for this field. | ||
| * `default` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix invalid link: “Preset Item” anchor doesn’t exist.
The link to [Preset Items](#preset-item) breaks (MD051). Either add a “Preset Item” section or simplify the reference.
Apply this diff:
-* `presets`
- * **Required**: No
- * **Description**: An optional list of [Preset Items](#preset-item) containing predefined values the user can select for this field.
+* `presets`
+ * **Required**: No
+ * **Description**: An optional list of preset values the user can select for this field.📝 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.
| * `presets` | |
| * **Required**: No | |
| * **Description**: An optional list of [Preset Items](#preset-item) containing predefined values the user can select for this field. | |
| * `default` | |
| * `presets` | |
| * **Required**: No | |
| * **Description**: An optional list of preset values the user can select for this field. | |
| * `default` |
🧰 Tools
🪛 LanguageTool
[grammar] ~84-~84: There might be a mistake here.
Context: ...r text. * presets * Required: No * Description: An optional list of [Pres...
(QB_NEW_EN)
[grammar] ~85-~85: Use correct spacing
Context: ...lues the user can select for this field. * default * Required: No * Description: An o...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
🪛 markdownlint-cli2 (0.17.2)
85-85: Link fragments should be valid
(MD051, link-fragments)
🤖 Prompt for AI Agents
In gui.md around lines 83 to 86, the link text “[Preset Items](#preset-item)”
points to a nonexistent anchor causing MD051; either add a matching "Preset
Item" (or "Preset Items") heading with the corresponding anchor elsewhere in the
document, or change the link to reference an existing heading (for example
adjust to `[Preset Items](#preset-items)` or remove the anchor and inline the
short description). Implement the chosen fix so the markdown link targets a
valid heading slug and update any heading text to match the link slug
casing/punctuation.
| - time-per-amount-epoch | ||
| - amount-per-epoch | ||
| deposits: | ||
| - token: output | ||
| select-tokens: | ||
| # ... select token items ... | ||
| - key: output | ||
| name: Token to Sell | ||
| - key: input | ||
| name: Token to Buy | ||
| networks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix inverted input/output in DCA example (deposits and select-tokens).
In a DCA “Buy WETH with USDC” flow, users deposit the input token (USDC) and receive the output token (WETH). The example currently deposits output and labels output as “Token to Sell”.
Apply this diff:
fields:
- time-per-amount-epoch
- amount-per-epoch
deposits:
- - token: output
+ - token: input
select-tokens:
- - key: output
- name: Token to Sell
- - key: input
- name: Token to Buy
+ - key: input
+ name: Token to Sell
+ - key: output
+ name: Token to BuyAlso applies to: 109-116
🤖 Prompt for AI Agents
In gui.md around lines 107-116 (also applies to 109-116): the DCA example has
input/output inverted — deposits use `output` and the select-tokens labels are
reversed. Change deposits to use token: input, and swap the select-tokens names
so that key: output is labeled "Token to Buy" and key: input is labeled "Token
to Sell" to reflect a "Buy WETH with USDC" flow.
| The `network-values` section provides network-specific values that can be referenced in scenarios (and in future potentially other parts of the yaml) using template syntax. This allows strategies to share scenario definitions while using different network-specific addresses or configuration values. | ||
|
|
||
| Network values have no required structure - they are arbitrary key-value pairs that can be referenced via `${network-values.property}` syntax in scenario bindings. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Document keying requirement for network-values.
Make explicit that network-values keys must match the network keys used elsewhere (e.g., in networks and GUI mappings), or define how they’re mapped.
Apply this diff:
The `network-values` section provides network-specific values that can be referenced in scenarios (and in future potentially other parts of the yaml) using template syntax. This allows strategies to share scenario definitions while using different network-specific addresses or configuration values.
-Network values have no required structure - they are arbitrary key-value pairs that can be referenced via `${network-values.property}` syntax in scenario bindings.
+Network values have no required structure—they are arbitrary key-value pairs that can be referenced via `${network-values.property}` syntax in scenario bindings. The top-level keys under `network-values` must match the names used in the `networks` mapping to ensure correct resolution.Also applies to: 111-119
🧰 Tools
🪛 LanguageTool
[grammar] ~105-~105: There might be a problem here.
Context: ...hat can be referenced in scenarios (and in future potentially other parts of the yaml) us...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~105-~105: Use correct spacing
Context: ...cific addresses or configuration values. Network values have no required structur...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[typographical] ~107-~107: To join two clauses or set off examples, consider using an em dash.
Context: ...alues. Network values have no required structure - they are arbitrary key-value pairs that can ...
(QB_NEW_EN_DASH_RULE_EM)
[grammar] ~107-~107: Use correct spacing
Context: ....property}` syntax in scenario bindings. ### Example ```yaml network-values: arbit...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
🤖 Prompt for AI Agents
In ob-yaml.md around lines 105-108 (also apply same change at 111-119), the docs
describe network-values but don’t state how keys must relate to networks; update
the text to require that each network-values key either exactly matches the
network identifier used in the networks section and GUI mappings (so
`${network-values.<networkKey>.property}` resolves predictably) or explicitly
explain the mapping rule if keys differ (e.g., provide a mapping table or
reference field). Modify the paragraph to state this keying requirement clearly
and give a one-line example of matching keys and where to adjust if a mapping
layer is used.
| - `sentry` (defaults to 'true') | ||
|
|
||
| ``` | ||
| ```yaml | ||
| sentry: false | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Use boolean (not string) for sentry default notation.
Small clarity tweak.
Apply this diff:
-Optional fields:
-- `sentry` (defaults to 'true')
+Optional fields:
+- `sentry` (defaults to true)📝 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.
| - `sentry` (defaults to 'true') | |
| ``` | |
| ```yaml | |
| sentry: false | |
| ``` | |
| Optional fields: | |
| - `sentry` (defaults to true) | |
🧰 Tools
🪛 LanguageTool
[grammar] ~269-~269: Use correct spacing
Context: ... fields: - sentry (defaults to 'true') yaml sentry: false ## Front matter yaml This yaml is NOT arbi...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
🤖 Prompt for AI Agents
In ob-yaml.md around lines 269 to 273, the documentation shows the sentry
default as a string ('true') and gives an example using a string value; update
the text and example to use boolean notation instead. Change the description to
indicate sentry defaults to true (boolean), and replace the code block example
with sentry: false (no quotes) so the example and wording consistently use
boolean values.
Motivation
The current v1 GUI specification creates significant challenges for building multichain applications:
Solution
This PR introduces a new version of the GUI and Orderbook YAML specifications with the following improvements:
Key Changes:
gui.field-definitionsand referenced by variationsgui.variationsmap separates strategy options from network deploymentsnetwork-valuessection for network-specific bindings with template syntax (${network-values.property})Benefits:
network-valuesand deployment mappingsChecks
By submitting this for review, I'm confirming I've done the following:
Summary by CodeRabbit