Repository navigation
Conversation
UTA dropped the max-leverage guard (9efb81d, 0b9889a) but the guards editor still offered it for crypto accounts. It could be added and saved but was skipped at load with `guard: unknown type "max-leverage", skipped`, so the user believed a limit was active when it was not. - Remove max-leverage from CRYPTO_GUARD_TYPES, GUARD_DEFAULTS, the summary and its editor. - Show "Not a built-in guard — UTA skips it unless an extension registers this type." on a saved guard whose type is not in the account's guard list. This covers already-saved max-leverage entries. The wording is deliberately conditional: registerGuard() lets extensions add guard types the UI does not know, so an unknown type is not necessarily unenforced. The row keeps its generic JSON editor and remove action. The fix stays in the UI: the editor is the only place the user can see and fix the saved config, and it needs no new API or health channel. UTA keeps logging skipped types and does not rewrite saved config. Fixes TraderAlice#1776
|
@iridite is attempting to deploy a commit to the luokerenx4's Team Team on Vercel. A member of the Team first needs to authorize it. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UTA no longer implements the
max-leverageguard (removed in 9efb81d / 0b9889a), but the UTA guards editor still offered it for crypto accounts. It could be added and saved, then was skipped at load withguard: unknown type "max-leverage", skipped, so the user believed a leverage limit was active when it was not.Fixes #1776
Cause and fix
ui/src/components/guards.tsxstill listedmax-leverageinCRYPTO_GUARD_TYPES/GUARD_DEFAULTSafter the backend guard was deleted. Removed it, with its summary and editor.max-leverageentries. The wording is conditional on purpose:registerGuard()lets extensions add guard types the UI does not know, so an unknown type is not necessarily unenforced. The row keeps its JSON editor and remove action.Verification
ui/src/components/guards.spec.tsx. Against origin/dev'sguards.tsxit fails (2 failed, 1 passed); with the fix 3/3 pass.pnpm test:select --path ui/src/components/guards.spec.tsx --path ui/src/components/uta/EditUTADialog.spec.tsx: 4 passed.pnpm exec tsc -p tests/tsconfig.json --noEmit: exit 0.pnpm test:owner:ui: 358/359 files and 2086/2087 tests passed. The one failure isOfficeBuilding.spec.tsx > gives Prediction its own console and skips departure motion when reduced, which also fails on an unmodified origin/dev checkout, so it is unrelated to this change.Boundary touch
UI display of guard config only. No change to UTA enforcement, trading behavior, persisted config or credentials.
Open question: should UTA also surface skipped guard types through an account health/warning channel so they are visible outside the edit dialog? Kept out of this PR to stay UI-only.