(feat) apply improvements requested by ralph - #214
Open
cardosofede wants to merge 1 commit into
Open
Conversation
# Conflicts: # frontend/src/pages/Dex.tsx # frontend/src/pages/DexPool.tsx
Greptile SummaryThis PR improves DEX workspace controls and executor configuration while synchronizing each user's default server between the dashboard and Telegram.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issue identified. The changed default-server, DEX workspace, and executor paths preserve their relevant server, pool, and interval contracts under the reachable scenarios reviewed.
|
| Filename | Overview |
|---|---|
| condor/web/routes/servers.py | Exposes the user's effective default server alongside concurrently resolved server status. |
| condor/web/routes/settings.py | Adds effective default-server metadata to the settings server response. |
| frontend/src/components/layout/ServerSelector.tsx | Seeds an empty browser selection from the online default and marks it in the menu. |
| frontend/src/components/settings/ServersSettings.tsx | Displays default state and synchronizes a successful default change with the active browser server. |
| frontend/src/components/dex/PoolSourceTabs.tsx | Moves chain and venue controls into reusable anchored menus. |
| frontend/src/components/executor/lp-config.ts | Calculates Meteora DLMM bin span and warns when a configured range exceeds the position cap. |
| frontend/src/pages/DexPool.tsx | Refines pool identity, chart intervals, and locked-pool executor configuration. |
| tests/test_web_servers_parallel_status.py | Updates response assertions and verifies default-server flag selection. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
CM[Config manager chat default] --> API[Server list APIs]
API --> SS[Server settings]
API --> SEL[Server selector]
SS -->|Set default| CM
SS -->|Activate server| SEL
DP[DEX pool workspace] --> OC[Spot order configuration]
DP --> LPC[Locked LP configuration]
DP --> CH[Pool chart and statistics]
Reviews (1): Last reviewed commit: "(feat) apply improvements requested by r..." | Re-trigger Greptile
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.
What this does
Follow-up pass on the DEX trade panel work from #203, applying the review feedback from Ralph. Three themes: the default server is now shared between Telegram and the dashboard, the DEX pool workspace stops offering choices it can't honour, and the LP form warns about Meteora's bin cap before Gateway rejects the open.
Default server, shared with Telegram
The Settings star was decorative: clicking it wrote
chat_defaultsbut nothing in the UI ever reflected it, and the dashboard always auto-selected the first online server regardless.ServerInfogainsis_default, populated in both/serversand/settings/serversfromcm.get_chat_default_server(user.id)— the same entry Telegram reads, so a default set on either surface is honoured by the other.ServerSelectorseeds a fresh browser from that default (falling back to the first online server) and marks it with a star in the dropdown.ServersSettingsfills the star, shows aDefaultbadge, disables the button on the row that is already default, spins while the mutation is in flight, and now also points this browser at the server it just made default — without that second half the click had no visible effect at all.DEX pool workspace
PoolStatswas split:PoolAddress(truncated address + copy + open-on-DEX) sits in the header beside the pair, and the network moved into the stat row.poolUrlnow covers PumpSwap (viapump.fun/coin/<base>), Uniswap and PancakeSwap, with the GeckoTerminal chain-id → DEX-slug mappings those apps route on. GeckoTerminal stays the fallback.1m/5m/15m.1h/4h/1dcandles read as duplicates of the1h/1dlookback buttons next to them, and a 3-day window of 15m candles already fits GeckoTerminal's 1000-candle cap.LPConfigPaneltakeslockedPoolAddressand just states the address instead of showing resolution status, an editable address field and a provider picker that would second-guess a decision already made.PoolSourceTabsrender through the sharedAnchoredMenuinstead of each hand-rollingabsolutepositioning plus its own outside-click/Escape listeners.Order panel
SelectFieldgainsdisabled, used on the execution-strategy select when a DEX offers only market: a one-option dropdown reads as broken unless it says so.Meteora bin-count warning
A DLMM position spans at most 69 bins; a wider range failed at open time with the only trace in the Gateway log.
dlmmBinSpan(lower, upper, binStep)computes the span from the geometric bin step, returningnullfor non-DLMM pools (only those report a bin step).rangeWarningstakes the bin step and warns when the range exceedsDLMM_MAX_BINS. It's a warning, not a block — Gateway is the authority and its cap can move.DexPoolfeeds itdepth?.bin_stepfrom Gateway's bins call; the create page passes nothing, since resolve-by-pair doesn't report one.Empty-state fix
On
/dex, a pasted address that resolved to a pool is the result — the empty token-search table underneath it stays hidden rather than saying "No pools found" directly below a pool row.Tests
tests/test_web_servers_parallel_status.pycovers the new flag: exactly one row carriesis_defaultwhen a chat default is set, and nothing is flagged when there isn't one. Existing response-shape assertions updated.