Skip to content

Build a real trading workspace page instead of an anchor jump #201

Description

@Muyideen-js

Problem

Every "open the workspace" affordance in the app is an anchor link that scrolls a few hundred
pixels down the same landing page. There is no workspace.

  • frontend/index.html:123 -- <a href="#trade" class="button button-quiet">Open trading workspace</a>
  • frontend/index.html:151 -- the CTA "Try the trading demo" also points at #trade
  • frontend/markets.html and frontend/leaderboard.html -- the nav CTA is index.html#trade
  • frontend/pages.js -- every market card's "Open market" link is index.html#trade, and it does
    not carry which market was clicked, so the destination is identical for all six cards

The result: a user who clicks "Open market" on the XLM market and one who clicks it on the
ledger-count market land in exactly the same place, looking at whatever market
state.selectedMarket happened to be. The "workspace" itself is a single panel
(#trade, frontend/index.html:94) with a title, a probability bar, and an amount box.

What to build

A dedicated frontend/workspace.html, addressable per market (workspace.html?market=3), that a
user can bookmark, share, and reload without losing context. It should carry the full activity for
that market, not a preview:

  • Market header -- question, resolution criteria, close time, resolution status, and the
    on-chain market id, read from the contract (see the market-data issue).
  • Order panel -- YES/NO selection, amount entry, live fee and estimated payout, and the
    contract minimum surfaced before submission rather than as error 10 afterwards.
  • Pool state -- YES and NO pool totals with the implied probability derived from them, not a
    hardcoded percentage.
  • Your position on this market -- current stake per side from get_bet / get_position, with
    the claim action once the market resolves.
  • Activity feed -- recent bets on this market via get_market_bettors_page, which the contract
    already paginates.
  • Transaction history -- this user's submitted transactions with explorer links, surviving a reload.

Acceptance criteria

  • workspace.html?market=<id> loads that market's state directly, with no dependence on prior
    clicks on the landing page
  • Deep links are shareable and survive a hard reload
  • Market cards in markets.html and index.html link to the workspace for their market
  • An unknown or malformed market query parameter renders a clear not-found state
  • The landing page #trade panel either redirects to the workspace or is removed, so there is
    exactly one trading surface

Why this is critical

This is the core product surface. The app's primary call to action currently does nothing but
scroll, which is the largest gap between what the site advertises and what it does.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: frontendWeb client, wallet, and user experiencefeaturepriority: criticalCritical to protocol safety or mainnet readinessui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions