Skip to content

(feat) apply improvements requested by ralph - #214

Open
cardosofede wants to merge 1 commit into
mainfrom
feat/ralph_improvemnts
Open

(feat) apply improvements requested by ralph#214
cardosofede wants to merge 1 commit into
mainfrom
feat/ralph_improvemnts

Conversation

@cardosofede

@cardosofede cardosofede commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

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_defaults but nothing in the UI ever reflected it, and the dashboard always auto-selected the first online server regardless.

  • ServerInfo gains is_default, populated in both /servers and /settings/servers from cm.get_chat_default_server(user.id) — the same entry Telegram reads, so a default set on either surface is honoured by the other.
  • ServerSelector seeds a fresh browser from that default (falling back to the first online server) and marks it with a star in the dropdown.
  • ServersSettings fills the star, shows a Default badge, 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

  • Pool address moved next to the pair name. The address identifies the pool in a way the ticker cannot, so PoolStats was split: PoolAddress (truncated address + copy + open-on-DEX) sits in the header beside the pair, and the network moved into the stat row.
  • More DEX deep links. poolUrl now covers PumpSwap (via pump.fun/coin/<base>), Uniswap and PancakeSwap, with the GeckoTerminal chain-id → DEX-slug mappings those apps route on. GeckoTerminal stays the fallback.
  • Interval buttons trimmed to 1m/5m/15m. 1h/4h/1d candles read as duplicates of the 1h/1d lookback buttons next to them, and a 3-day window of 15m candles already fits GeckoTerminal's 1000-candle cap.
  • LP panel knows the pool is pinned. Opening this page is the pool choice, so LPConfigPanel takes lockedPoolAddress and 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.
  • Dropdowns escape their clipping container. The chain select and DEX filter in PoolSourceTabs render through the shared AnchoredMenu instead of each hand-rolling absolute positioning plus its own outside-click/Escape listeners.

Order panel

  • Spot shows BUY/SELL, not LONG/SHORT — a "short" without tokens to sell isn't something a swap can do.
  • SelectField gains disabled, 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, returning null for non-DLMM pools (only those report a bin step).
  • rangeWarnings takes the bin step and warns when the range exceeds DLMM_MAX_BINS. It's a warning, not a block — Gateway is the authority and its cap can move.
  • DexPool feeds it depth?.bin_step from 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.py covers the new flag: exactly one row carries is_default when a chat default is set, and nothing is flagged when there isn't one. Existing response-shape assertions updated.

# Conflicts:
#	frontend/src/pages/Dex.tsx
#	frontend/src/pages/DexPool.tsx
@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR improves DEX workspace controls and executor configuration while synchronizing each user's default server between the dashboard and Telegram.

  • Adds default-server metadata to server APIs and reflects it in server selectors and settings.
  • Refines pool navigation, statistics, address actions, interval controls, and anchored filtering menus.
  • Improves spot-order labels, locked-pool LP configuration, and Meteora DLMM range warnings.
  • Extends server endpoint tests to cover default-server flags.

Confidence Score: 5/5

The 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.

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "(feat) apply improvements requested by r..." | Re-trigger Greptile

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